Ver Fonte

人体样本源扩展分类展示;图片类型扩展在样本源详情中科点击查看;蜜蜂所样本呢展示详情添加种属,采样地址

shihang há 6 anos atrás
pai
commit
b8ad12cd2d

+ 100 - 0
src/dashoo.cn/backend/api/business/samplesinfo/samplesinfo.go

@@ -401,6 +401,106 @@ type SamplesInDetailfoShow struct {
 	BoxY              int       //2017-10-31新增冻存盒位置
 }
 
+// 详情加载model
+type AnimalSamplesInDetail struct {
+	MId               int       `xorm:"<- not null pk autoincr INT(11)"`
+	AccCode           string    `xorm:"VARCHAR(10)"`
+	Name              string    `xorm:"VARCHAR(100)"`
+	SampleCode        string    `xorm:"VARCHAR(100)"` //样本编码
+	SampleType        int       `xorm:"INT(10)"`      //样本类型
+	SampleTypeName    string    `xorm:"VARCHAR(100)"`
+	SourceId          int       `xorm:"INT(10)"`     //样本来源
+	SourceName        string    `xorm:"VARCHAR(50)"` //样本源姓名原Zbackup12
+	Genus             string    `xorm:"VARCHAR(50)"`
+	ProvinceName      string    `xorm:"VARCHAR(50)"`
+	CityName          string    `xorm:"VARCHAR(50)"`
+	StreetName        string    `xorm:"VARCHAR(50)"`
+	Address           string    `xorm:"VARCHAR(50)"`
+	ReceiveDate       time.Time `form:"ReceiveDate,2006-1-2 15:4:5"`
+	ZBack11           string    `xorm:"VARCHAR(256)"`
+	ZBack12           string    `xorm:"VARCHAR(256)"`
+	ZBack13           string    `xorm:"VARCHAR(256)"`
+	ZBack14           string    `xorm:"VARCHAR(256)"`
+	ZBack15           string    `xorm:"VARCHAR(256)"`
+	ZBack16           string    `xorm:"VARCHAR(256)"`
+	ZBack17           string    `xorm:"VARCHAR(256)"`
+	ZBack18           string    `xorm:"VARCHAR(256)"`
+	ZBack19           string    `xorm:"VARCHAR(256)"`
+	ZBack20           string    `xorm:"VARCHAR(256)"`
+	ZBack21           string    `xorm:"VARCHAR(256)"`
+	ZBack22           string    `xorm:"VARCHAR(256)"`
+	ZBack23           string    `xorm:"VARCHAR(256)"`
+	ZBack24           string    `xorm:"VARCHAR(256)"`
+	ZBack25           string    `xorm:"VARCHAR(256)"`
+	ZBack26           string    `xorm:"VARCHAR(256)"`
+	ZBack27           string    `xorm:"VARCHAR(256)"`
+	ZBack28           string    `xorm:"VARCHAR(256)"`
+	ZBack29           string    `xorm:"VARCHAR(256)"`
+	ZBack30           string    `xorm:"VARCHAR(256)"`
+	ZBack31           string    `xorm:"VARCHAR(256)"`
+	ZBack32           string    `xorm:"VARCHAR(256)"`
+	ZBack33           string    `xorm:"VARCHAR(256)"`
+	ZBack34           string    `xorm:"VARCHAR(256)"`
+	ZBack35           string    `xorm:"VARCHAR(256)"`
+	ZBack36           string    `xorm:"VARCHAR(256)"`
+	ZBack37           string    `xorm:"VARCHAR(256)"`
+	ZBack38           string    `xorm:"VARCHAR(256)"`
+	ZBack39           string    `xorm:"VARCHAR(256)"`
+	ZBack40           string    `xorm:"VARCHAR(256)"`
+	ZBack41           string    `xorm:"VARCHAR(256)"`
+	ZBack42           string    `xorm:"VARCHAR(256)"`
+	ZBack43           string    `xorm:"VARCHAR(256)"`
+	ZBack44           string    `xorm:"VARCHAR(256)"`
+	ZBack45           string    `xorm:"VARCHAR(256)"`
+	ZBack46           string    `xorm:"VARCHAR(256)"`
+	ZBack47           string    `xorm:"VARCHAR(256)"`
+	ZBack48           string    `xorm:"VARCHAR(256)"`
+	ZBack49           string    `xorm:"VARCHAR(256)"`
+	ZBack50           string    `xorm:"VARCHAR(256)"`
+	ZBack51           string    `xorm:"VARCHAR(256)"`
+	ZBack52           string    `xorm:"VARCHAR(256)"`
+	ZBack53           string    `xorm:"VARCHAR(256)"`
+	ZBack54           string    `xorm:"VARCHAR(256)"`
+	ZBack55           string    `xorm:"VARCHAR(256)"`
+	ZBack56           string    `xorm:"VARCHAR(256)"`
+	ZBack57           string    `xorm:"VARCHAR(256)"`
+	ZBack58           string    `xorm:"VARCHAR(256)"`
+	ZBack59           string    `xorm:"VARCHAR(256)"`
+	ZBack60           string    `xorm:"VARCHAR(256)"`
+	Id                int
+	BarCode           string    `xorm:"VARCHAR(100)"` //样本条码
+	InnerCode         string    `xorm:"VARCHAR(100)"` //内部编码
+	IState            int       `xorm:"INT(10)"`      //状态  状态  1设备中样本  2预录入 3标签打印预录入 4待复存保留位置  5待复存不保留位置
+	EquipmentId       int       `xorm:"INT(10)"`
+	ShelfId           int       `xorm:"INT(10)"`
+	BoxId             int       `xorm:"INT(10)"`
+	Position          string    `xorm:"VARCHAR(50)"` //位置 冻存盒的 X代表第几列 Y代表第几行  X;
+	DeletionStateCode int       `xorm:"INT(10)"`     //是否删除 0未删除 1删除
+	IsAttachment      int       `xorm:"INT(10)"`     //是否有附件 0没有 1有
+	InitCapacity      float32   `xorm:"FLOAT"`       //初始容量
+	Capacity          float32   `xorm:"FLOAT"`       //当前容量
+	FreezingNum       int       `xorm:"INT(10)"`     //冻融次数
+	Unit              string    `xorm:"VARCHAR(50)"`
+	ValidityDate      time.Time `form:"ValidityDate,2006-1-2 15:4:5"`
+	ParentBarCode     string    `xorm:"VARCHAR(50)"`
+	IType             int       `xorm:"INT(10)"` //样本属性 1分装子样本 2提取子样本
+	Remark            string    `xorm:"TEXT"`
+	CreateUserId      int       `xorm:"INT(10)"`
+	CreateBy          string    `xorm:"VARCHAR(255)"`
+	CreateOn          time.Time `xorm:"DATETIME created"`
+	ModifiedUserId    int       `xorm:"INT(10)"`
+	ModifiedBy        string    `xorm:"VARCHAR(255)"`
+	ModifiedOn        time.Time `xorm:"DATETIME updated"`
+	EName             string    //2017-10-31新增设备名
+	ECode             string    //2017-10-31新增设备Code
+	ShelfCode         string    //2017-10-31新增冻存架code
+	BoxCode           string    //2017-10-31新增冻存盒code
+	ShelfX            int       //2017-10-31新增冻存架位置
+	ShelfY            int       //2017-10-31新增冻存架位置
+	BoxX              int       //2017-10-31新增冻存盒位置
+	BoxY              int       //2017-10-31新增冻存盒位置
+}
+
 type SamplesInfoListPosition struct {
 	MId               int       `xorm:"<- not null pk autoincr INT(11)"`
 	AccCode           string    `xorm:"VARCHAR(10)"`

+ 18 - 0
src/dashoo.cn/backend/api/business/samplesinfo/samplesinfoService.go

@@ -246,6 +246,24 @@ func (s *SamplesInfoService) QuerySampleDetailEntity(acccode string, where strin
 	return
 }
 
+//获取样本详情 --动物
+func (s *SamplesInfoService) QueryAnimalSampleEntity(acccode string, where string) (entity AnimalSamplesInDetail) {
+	tblmain := acccode + SamplesMaintbName
+	tbldetail := acccode + SamplesDetailtbName
+	sourcetb := acccode + AnimalInfoName
+	sql := `select a.*,b.*,c.Name EName,c.Code ECode,d.Code ShelfCode,e.Code BoxCode,
+		d.XStation ShelfX,d.YStation ShelfY,e.XStation BoxX,e.YStation BoxY,f.Genus,f.ProvinceName,f.CityName,f.StreetName,f.Address
+		from   ` + tbldetail + ` a left join 
+		` + tblmain + ` b on a.SampleCode = b.SampleCode 
+		left join ` + sourcetb + ` f on b.SourceId = f.Id
+		inner join Equipment c on a.EquipmentId=c.Id
+		inner join Shelf d on a.ShelfId=d.Id
+		inner join Box e on a.BoxId = e.Id
+		where ` + where
+	s.DBE.Sql(sql).Get(&entity)
+	return
+}
+
 func (s *SamplesInfoService) DeleteDetail(tbldetail, where string) error {
 	sql := "update  " + tbldetail + " set DeletionStateCode=1  where " + where
 	_, err := s.DBE.Exec(sql)

+ 12 - 0
src/dashoo.cn/backend/api/controllers/samplesinfo/sampleoperation.go

@@ -553,6 +553,18 @@ func (this *SampleOperationController) GetSampleById() {
 	this.ServeJSON()
 }
 
+// @Title 根据样本id获取数据--动物
+// @Description get SampleType by token
+// @Success 200 {object} sampletype.SampleType
+// @router /getsamplebyanimalid [get]
+func (this *SampleOperationController) GetSampleByAnimalId() {
+	svc := samplesinfo.GetSamplesInfoService(utils.DBE)
+	where := " a.Id=" + this.GetString("SamplesInfoId") + " and DeletionStateCode =0 "
+	data := svc.QueryAnimalSampleEntity(this.User.AccCode, where)
+	this.Data["json"] = data
+	this.ServeJSON()
+}
+
 // @Title 获取数据
 // @Description get SampleType by token
 // @Success 200 {object} sampletype.SampleType

+ 381 - 0
src/dashoo.cn/frontend_animal/src/components/samples/animalsource.vue

@@ -0,0 +1,381 @@
+<template>
+  <div>
+    <el-dialog title="样本来源详情" :visible.sync="visible" top="5vh" width="1000px">
+      <el-card style="min-height: calc(100vh - 92px)">
+        <div slot="header" style="height: 20px;">
+          <span style="float: left;">
+            <i class="icon icon-table2"></i>
+          </span>
+          <el-breadcrumb class="heading" style="float: left; margin-left: 5px">
+            <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+            <el-breadcrumb-item :to="{ path: '/biobank/source/animal' }">样本来源</el-breadcrumb-item>
+            <el-breadcrumb-item>详细信息</el-breadcrumb-item>
+          </el-breadcrumb>
+          <span style="float: right;">
+            <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 8px" @click="goback">返回
+            </el-button>
+          </span>
+        </div>
+
+        <el-card class="box-card donorsdetailmaincard">
+          <div slot="header">
+            <legend style="color:#436EEE"></legend>
+            <i class="icon icon-paragraph-justify"> </i> 基本信息
+          </div>
+          <div class="donorsdetailcardinfodiv">
+            <el-row>
+              <el-col :span="6">
+                <label>样本名称 : {{ animalForm.Name }}</label>
+              </el-col>
+              <el-col :span="6">
+                <label>蜂种名称 : {{ animalForm.Genus }}</label>
+              </el-col>
+              <el-col :span="6">
+                <label>来源内码 : {{ animalForm.InnerNo }}</label>
+              </el-col>
+              <el-col :span="6">
+                <label>项目属性 : {{ animalForm.ProjectName }}</label>
+              </el-col>
+              <el-col :span="6">
+                <label>数量 : {{ animalForm.Amount }} {{ animalForm.Unit }} </label>
+              </el-col>
+              <el-col :span="6">
+                <label>区号 :{{ animalForm.AreaCode }}</label>
+              </el-col>
+              <el-col :span="12">
+                <label>取样地址 :{{ Address }}</label>
+              </el-col>
+              <el-col :span="6">
+                <label>经度 :{{ animalForm.Longitude }}</label>
+              </el-col>
+              <el-col :span="6">
+                <label>纬度 :{{ animalForm.Latitude }}</label>
+              </el-col>
+              <el-col :span="6">
+                <label>海拔 :{{ animalForm.Altitude }} 米</label>
+              </el-col>
+              <el-col :span="6">
+                <label>调查时间 :{{ jstimehandle(SurveyDate) }}</label>
+              </el-col>
+              <el-col :span="24">
+                <label>备注信息 :{{ animalForm.Remark }}</label>
+              </el-col>
+            </el-row>
+          </div>
+        </el-card>
+
+        <el-card class="box-card donorsdetailmaincard" v-for="groupname in groupnameList" :key="groupname"
+          style="margin-top: 5px">
+          <div slot="header">
+            <i class="icon icon-paragraph-justify"> 扩展信息 / {{groupname}}</i>
+          </div>
+          <div class="donorsdetailkzinfodiv">
+            <el-row>
+              <template v-for="(item, index) in animalextends">
+                <el-col :span="6" :key="index" v-if="item.GroupName === groupname">
+                  <label>{{item.Name}}:{{item.FieldDefault}}</label>
+                </el-col>
+              </template>
+            </el-row>
+          </div>
+        </el-card>
+
+        <el-card class="box-card donorsdetailmaincard">
+          <div slot="header">
+            <legend style="color:#436EEE"></legend>
+            <i class="icon icon-paragraph-justify"></i> 样本信息
+          </div>
+          <div class="donorsdetailcardinfodiv">
+            <el-row>
+              <el-col :span="6">
+                <label>总样本数 : {{sampletotal.allsamplesum}}</label>
+              </el-col>
+              <el-col :span="6">
+                <label>设备中样本:{{sampletotal.samplenum}}</label>
+              </el-col>
+              <el-col :span="6">
+                <label>预录入:{{sampletotal.sampleprenum}}</label>
+              </el-col>
+              <el-col :span="6">
+                <label>待复存:{{sampletotal.sampleunsavenum}}</label>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="6">
+                <label>已归档:{{sampletotal.samplefilesnum}}</label>
+              </el-col>
+            </el-row>
+            <div class="four fields" style="margin-top:10px;">
+              <div class="field">
+
+              </div>
+            </div>
+          </div>
+        </el-card>
+        <el-card class="box-card donorsdetailmaincard">
+          <div slot="header">
+            <legend style="color:#436EEE"></legend>
+            <i class="icon icon-paragraph-justify"></i> 设备中样本
+          </div>
+          <el-table :data="devicesamples" bordertooltip-effect="dark" style="width: 100%;margin-top:10px">
+            <el-table-column label="样本条码" width="200">
+              <template slot-scope="scope">
+                <router-link :to="'/samples/stored/'+scope.row.Id + '/detailed'">
+                  {{scope.row.BarCode}}
+                </router-link>
+              </template>
+            </el-table-column>
+            <el-table-column prop="SampleCode" label="样本编码" width="120" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="Name" label="名称" width="120" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="SampleTypeName" label="样本类型" show-overflow-tooltip></el-table-column>
+            <el-table-column label="可用容量" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{scope.row.Capacity}} {{scope.row.Unit}}
+              </template>
+            </el-table-column>
+            <el-table-column prop="SamplingOrganName" label="组织器官" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="SamplingSiteName" label="取材部位" show-overflow-tooltip></el-table-column>
+            <el-table-column label="有效日期" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{ jstimehandle(scope.row.ValidityDate+'') }}
+              </template>
+            </el-table-column>
+            <el-table-column label="接收日期" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{ jstimehandle(scope.row.ReceiveDate+'') }}
+              </template>
+            </el-table-column>
+          </el-table>
+          <div class="block">
+            <el-pagination @current-change="handleCurrentChange" layout="prev, pager, next" :page-size="size"
+              :current-page="currentPage" :total="currentItemCount">
+            </el-pagination>
+          </div>
+        </el-card>
+      </el-card>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    mapGetters
+  } from 'vuex'
+  export default {
+    name: 'animalsource',
+    props: {
+      visible: {
+        type: Boolean,
+        default: false
+      }
+    },
+    data() {
+      return {
+        pid: 0,
+        currentItemCount: 0, // 当前页显示数量
+        currentPage: 1, // 当前页
+        size: 10, // 每页显示数量
+        formsex: '1',
+        animalForm: {
+          Id: 0,
+          Genus: '',
+          InnerNo: '',
+          Name: '',
+          Amount: '',
+          Unit: '',
+          SourceType: '',
+          Weight: '',
+          Province: '',
+          ProvinceName: '',
+          City: '',
+          CityName: '',
+          Street: '',
+          StreetName: '',
+          Address: '',
+          AreaCode: '',
+          Longitude: '',
+          Latitude: '',
+          Altitude: '',
+          SurveyDate: new Date(),
+          ProjectName: '',
+          Remark: '',
+        },
+        SurveyDate: '',
+        Address: '',
+        groupnameList: [],
+        animalextends: [], // 扩展字段
+        sampletotal: {}, // 样本统计
+        devicesamples: [], // 设备中样本
+        formLabelWidth: '120px'
+      }
+    },
+    created() {
+      this.createpage()
+    },
+    watch: {
+      visible(val) {
+        this.selfVisible = val
+        if (this.visible) {
+          this.createoptions
+        }
+      },
+      selfVisible(val) {
+        this.$emit('update:visible', val)
+      }
+    },
+    methods: {
+      createpage() {
+        this.pid = this.$route.params.opera
+        this.getGroupName()
+        this.getsampletotal()
+        this.getdevicesamples()
+      },
+      initData() {
+        let _this = this // request
+        let params = {
+          Id: this.pid
+        }
+        _this.$axios.get('/samplessource/getanimalinfo', {
+            params
+          })
+          .then(res => {
+            _this.animalForm = res.data.items
+            _this.SurveyDate = res.data.items.SurveyDate
+            _this.animalForm.SurveyDate = new Date(res.data.items.SurveyDate)
+            _this.Address = res.data.items.ProvinceName + res.data.items.CityName + res.data.items.StreetName + res
+              .data.items.Address
+            // 为扩展字段赋值
+            for (var i = 0; i < _this.animalextends.length; i++) {
+              if (_this.animalextends[i].FieldType == '4') {
+                _this.animalextends[i].FieldDefault = res.data.items[_this.animalextends[i].FieldName].substr(0, 24)
+              } else {
+                _this.animalextends[i].FieldDefault = res.data.items[_this.animalextends[i].FieldName]
+              }
+            }
+          }).catch(err => {
+            console.error(err)
+          })
+      },
+      getGroupName() {
+        this.$axios.get('extends/listbyloginwithgroup', {})
+          .then(res => {
+            for (var i = 0; i < res.data.length; i++) {
+              if (res.data[i].GroupName != '') {
+                this.groupnameList.push(res.data[i].GroupName)
+              }
+            }
+            this.Tabs = this.groupnameList[0]
+            this.getextends()
+          })
+      },
+      getextends() {
+        this.$axios.get('extends/listbylogin', {})
+          .then(res => {
+            this.animalextends = res.data
+            this.initData()
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      getsampletotal() {
+        this.$axios.get('samplessource/getsampletotal/' + this.pid, {})
+          .then(res => {
+            this.sampletotal = res.data
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      getdevicesamples() {
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size
+        }
+        this.$axios.get('samplessource/getdevicesamples/' + this.pid, {
+            params
+          })
+          .then(res => {
+            this.devicesamples = res.data.items
+            this.currentItemCount = res.data.currentItemCount
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      handleCurrentChange(value) {
+        this.currentPage = value
+        this.getdevicesamples()
+      },
+      goback() {
+        if (this.$route.query.size) {
+          this.$router.push({
+            name: this.$route.query.pname,
+            query: {
+              size: this.$route.query.size,
+              currentPage: this.$route.query.currentPage
+            }
+          })
+        } else {
+          this.$router.go(-1)
+        }
+      },
+      jstimehandle(val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      }
+    }
+  }
+
+</script>
+
+<style lang="scss">
+  .el-pagination {
+    margin: 1rem 0 2rem;
+    text-align: right;
+  }
+
+  .plab {
+    font-size: 13px;
+    color: #999;
+  }
+
+  .donorsdetailcardinfodiv {
+    margin: 8px 0 15px 0;
+  }
+
+  .donorsdetailcardinfodiv .el-row {
+    padding: 8px 5px 0 0;
+  }
+
+  .donorsdetailmaincard:not(:first-child) {
+    margin-top: 8px;
+  }
+
+  .donorsdetailmaincard .el-card__header {
+    padding: 5px 10px;
+    font-size: 10px;
+  }
+
+  .donorsdetailmaincard .el-card__body {
+    padding: 5px;
+    margin: -11px 0;
+  }
+
+  .donorsdetailkzinfodiv {
+    margin: 8px 0 15px 0;
+  }
+
+  .donorsdetailkzinfodiv .el-row .el-col.el-col-6 {
+    padding: 8px 5px 0 0;
+  }
+
+</style>

+ 10 - 1
src/dashoo.cn/frontend_animal/src/pages/biobank/source/_opera/sourcedetail.vue

@@ -82,7 +82,12 @@
         <div class="donorsdetailkzinfodiv">
           <el-row>
             <template v-for="(item, index) in animalextends">
-              <el-col :span="6" :key="index" v-if="item.GroupName === groupname">
+              <el-col :span="6" :key="index" v-if="item.GroupName === groupname && item.FieldType == '5'">
+                <label>
+                  <a @click="clickachment(item.FieldDefault)">{{item.Name}}:{{item.FieldDefault}}</a>
+                </label>
+              </el-col>
+              <el-col :span="6" :key="index" v-if="item.GroupName === groupname && item.FieldType != '5'">
                 <label>{{item.Name}}:{{item.FieldDefault}}</label>
               </el-col>
             </template>
@@ -302,6 +307,10 @@
         this.currentPage = value
         this.getdevicesamples()
       },
+      clickachment(val) {
+        let host = val.split('|')
+        window.open(`http://${host[0]}`)
+      },
       goback() {
         if (this.$route.query.size) {
           this.$router.push({

+ 107 - 85
src/dashoo.cn/frontend_animal/src/pages/equipment/_opera/manage_new.vue

@@ -153,7 +153,7 @@
       </div>
       <!--冰箱-->
       <el-row>
-        <el-col :span="11">
+        <el-col :span="24">
           <div class="tablebox">
             <table class="sampletablemanage"
               v-bind:style="{ width: yedanguanitem == 20 ? '80px' : 10*TableWidth + '%', height: yedanguanitem == 20 ? '70px' : 10*TableHeight + '%' }">
@@ -193,8 +193,8 @@
             </table>
           </div>
         </el-col>
-        <el-col :span="13">
-          <el-card v-if="Apply_flag" class="box-card sampledetail" style="margin-top: 8px;" id="equiinfocard">
+        <el-col :span="24">
+          <el-card v-if="Apply_flag" class="box-card sampledetail" style="margin-top: -200px;" id="equiinfocard">
             <div slot="header">
               <i class="icon icon-file-text"> </i> 样本管理
               <span style="float: right;">
@@ -226,39 +226,53 @@
                 <el-aside width="100px">
                   <img :src="imgSrc" class="sampleTypeimg">
                 </el-aside>
-                <el-main style="margin-left:45px; margin-top: -35px">
+                <el-main style="margin-left:45px; margin-top: -15px">
                   <h1>样本类型 : {{ sampleForm.SampleTypeName }}</h1>
-                  <h1>样本条码 : {{ sampleForm.BarCode }}</h1>
-                  <h1>位置编码 : {{ checkPosition }}</h1>
+                  <el-row style="margin-top: -10px">
+                    <el-col :span="10">
+                      <h1>样本条码 : {{ sampleForm.BarCode }}</h1>
+                    </el-col>
+                    <el-col :span="10">
+                      <h1>位置编码 : {{ checkPosition }}</h1>
+                    </el-col>
+                  </el-row>
                 </el-main>
               </el-container>
               <div class="sampleInfo">
                 <el-row style="margin-left:25px;margin-top:10px">
-                  <el-col :span="12">
+                  <el-col :span="8">
                     <label><strong>名称 :</strong> {{ sampleForm.Name }} </label>
                   </el-col>
-                  <el-col :span="12">
-                    <label><strong>样本来源 :</strong> {{ sampleForm.SourceName }} </label>
+                  <el-col :span="8">
+                    <label><strong>样本来源 :</strong>
+                      <a @click="getAnimalSource(sampleForm.SourceId)">{{ sampleForm.SourceName }}</a>
+                    </label>
                   </el-col>
-                  <el-col :span="12">
+                  <el-col :span="8">
+                    <label><strong>蜂种名称 :</strong> {{ sampleForm.Genus }} </label>
+                  </el-col>
+                  <el-col :span="8">
                     <label><strong>样本内码 :</strong> {{ sampleForm.InnerCode }} </label>
                   </el-col>
-                  <el-col :span="12">
+                  <el-col :span="16">
+                    <label><strong>取样地址 :</strong> {{ sampleForm.ProvinceName }}{{ sampleForm.CityName }}{{ sampleForm.StreetName }}{{ sampleForm.Address }}</label>
+                  </el-col>
+                  <el-col :span="8">
                     <label><strong>样本编码 :</strong> {{ sampleForm.SampleCode }} </label>
                   </el-col>
-                  <el-col :span="12">
+                  <el-col :span="8">
                     <label><strong>可用容量 :</strong> {{ sampleForm.Capacitystr }} {{ sampleForm.Unit }} </label>
                   </el-col>
-                  <el-col :span="12">
+                  <el-col :span="8">
                     <label><strong>录入人 :</strong> {{ sampleForm.CreateBy }} </label>
                   </el-col>
-                  <el-col :span="12">
+                  <el-col :span="8">
                     <label><strong>接收日期 :</strong> {{ jstimehandle(ReceiveDate) }} </label>
                   </el-col>
-                  <el-col :span="12">
+                  <el-col :span="8">
                     <label><strong>有效日期 :</strong> {{ jstimehandle(ValidityDate) }} </label>
                   </el-col>
-                  <el-col :span="12">
+                  <el-col :span="8">
                     <label><strong>所属分组 :</strong> {{ groupname }} </label>
                   </el-col>
                   <el-col :span="24">
@@ -267,7 +281,7 @@
                   <el-col :span="24">
                     <el-form-item label="附件列表:" style="font-weight:bolder">
                       <el-row>
-                        <el-col :span="6" v-for="item in achmentlist" :key="item">
+                        <el-col :span="6" v-for="item in achmentlist" :key="item">                          
                           <a @click="clickachment(item.Host, item.FileId)">{{item.FileName}}</a>
                         </el-col>
                       </el-row>
@@ -652,7 +666,6 @@
           SampleCode: '', // 样本编码
           SampleTypestr: '', // 样本类型
           SampleTypeName: '',
-          SamplingSiteName: '',
           Name: '', // 名称
           ReceiveDate: new Date(), // 接收日期
           Capacitystr: '', // 可用容量
@@ -661,7 +674,11 @@
           InnerCode: '', // 样本内码
           SourceName: '', // 样本来源
           SourceId: 0,
-          SourceIdCard: '',
+          Genus: '',
+          ProvinceName: '',
+          CityName: '',
+          StreetName: '',
+          Address: '',
           Remark: '', // 备注
           Isyongjiu: false, // 是否永久
           code_default: '',
@@ -2654,7 +2671,7 @@
               let yedanguandatarrtrmp = []
               if (_this.yedanguanitem === 20) {
                 yedanguandatarrtrmp = _this.yedanguanrongqiarr_13kbloodbag
-              } else  if (_this.yedanguanitem === 19){
+              } else if (_this.yedanguanitem === 19) {
                 yedanguandatarrtrmp = _this.yedanguanrongqiarr
               } else {
                 yedanguandatarrtrmp = _this.yedanguanrongqiarr_newmodel
@@ -2815,7 +2832,7 @@
         let yedanguandatarrtrmp = []
         if (_this.yedanguanitem === 20) {
           yedanguandatarrtrmp = _this.yedanguanrongqiarr_13kbloodbag
-        } else if (_this.yedanguanitem === 19){
+        } else if (_this.yedanguanitem === 19) {
           yedanguandatarrtrmp = _this.yedanguanrongqiarr
         } else {
           yedanguandatarrtrmp = _this.yedanguanrongqiarr_newmodel
@@ -2977,8 +2994,8 @@
             _this.boxSample = res.data.Boxsample
             _this.TableHeight = _this.selectedBox.RowNum
             _this.TableWidth = _this.selectedBox.ColumnNum
-            for (var i = 0 ; i < this.boxSample.length; i ++){
-              if (this.boxSample[i].Position == this.ytable + ';' + this.xtable){
+            for (var i = 0; i < this.boxSample.length; i++) {
+              if (this.boxSample[i].Position == this.ytable + ';' + this.xtable) {
                 this.tableclk(this.boxSample[i], this.xtable, this.ytable)
               }
             }
@@ -3004,7 +3021,6 @@
         this.dchytable = -1
       },
       tableclk(v, x, y) {
-         console.log("11111111111111111111",v, x, y)
         this.checkPosition =
           `${this.equipCode}-${this.numtoupchar(this.xshelf)}${this.yshelf}-${this.numtoupchar(this.ybox)}${this.xbox}-${this.numtoupchar(x)}${y}`
         //清空状态
@@ -3078,7 +3094,7 @@
         let _this = this
         _this.extendList = []
         _this.sampleinfoid = id
-        _this.$axios.get('/sampleoperation/getsamplebyid?SamplesInfoId=' + id, {})
+        _this.$axios.get('/sampleoperation/getsamplebyanimalid?SamplesInfoId=' + id, {})
           .then(res => {
             _this.sampleinfodetail = res.data
             _this.sampleForm.BarCode = res.data.BarCode
@@ -3111,8 +3127,12 @@
             _this.sampleForm.InnerCode = res.data.InnerCode
             _this.sampleForm.Remark = res.data.Remark
             _this.sampleForm.SourceId = res.data.SourceId
-            _this.sampleForm.SourceIdCard = res.data.SourceIdCard
             _this.sampleForm.SourceName = res.data.SourceName
+            _this.sampleForm.Genus = res.data.Genus
+            _this.sampleForm.ProvinceName = res.data.ProvinceName
+            _this.sampleForm.CityName = res.data.CityName
+            _this.sampleForm.StreetName = res.data.StreetName
+            _this.sampleForm.Address = res.data.Address
             _this.sampleForm.CreateUserId = res.data.CreateUserId
             _this.sampleForm.CreateBy = res.data.CreateBy
             if (res.data.IState == 1) {
@@ -3205,11 +3225,14 @@
           _this.sampleForm.Capacitystr = val.SampleSize
           _this.sampleForm.Unit = val.SampleUnit
           _this.sampleForm.SourceId = val.SampleSourceId
-          _this.sampleForm.SourceIdCard = val.IdCard
           _this.sampleForm.SourceName = val.Name
         }
       },
 
+      getAnimalSource(val) {
+        this.$router.push('/biobank/source/' + val + '/sourcedetail')
+      },
+
       chooseSampleType(v) {
         let _this = this
         _this.groupnameList = []
@@ -3277,7 +3300,6 @@
                 _this.sampleForm.SampleTypestr = res.data.SampleType + ''
                 _this.sampleForm.Name = res.data.Name
                 _this.sampleForm.SourceId = res.data.SourceId
-                _this.sampleForm.SourceIdCard = res.data.SourceIdCard
                 _this.sampleForm.SourceName = res.data.SourceName
                 if (res.data.ReceiveDate.substring(0, 3) === '000') {
                   _this.sampleForm.ReceiveDate = null
@@ -3408,9 +3430,9 @@
                       type: 'success',
                       message: res.data.message
                     })
-                    _this.getEquipPosition(_this.ybox-1,_this.xshelf,_this.yshelf)
+                    _this.getEquipPosition(_this.ybox - 1, _this.xshelf, _this.yshelf)
                     //_this.shelfs = _this.samplelist[0]
-                    _this.handleclk(_this.xbox-1, _this.ybox-1, _this.xshelf, _this.yshelf)
+                    _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
                     // 获取附件信息
                     _this.getattachment(_this.sampleForm.BarCode, _this.sampleForm.SampleCode)
                     //清空缓存数据
@@ -4020,70 +4042,70 @@
     padding-left: 50px;
   }
 
-  .exbar {
-    margin: 25px 0px 25px 250px;
+  // .exbar {
+  //   margin: 25px 0px 25px 250px;
 
-    .bar1 {
-      width: 20px;
-      height: 20px;
-      background-color: #EAEAEA;
-      display: inline-block;
-    }
+  //   .bar1 {
+  //     width: 20px;
+  //     height: 20px;
+  //     background-color: #EAEAEA;
+  //     display: inline-block;
+  //   }
 
-    .bar2 {
-      width: 20px;
-      height: 20px;
-      background-color: #13CE66;
-      display: inline-block;
-    }
+  //   .bar2 {
+  //     width: 20px;
+  //     height: 20px;
+  //     background-color: #13CE66;
+  //     display: inline-block;
+  //   }
 
-    .bar3 {
-      width: 20px;
-      height: 20px;
-      background-color: #FF4949;
-      display: inline-block;
-    }
+  //   .bar3 {
+  //     width: 20px;
+  //     height: 20px;
+  //     background-color: #FF4949;
+  //     display: inline-block;
+  //   }
 
-    .bar4 {
-      width: 20px;
-      height: 20px;
-      background-color: #D1EEEE;
-      display: inline-block;
-    }
+  //   .bar4 {
+  //     width: 20px;
+  //     height: 20px;
+  //     background-color: #D1EEEE;
+  //     display: inline-block;
+  //   }
 
-    .bar5 {
-      width: 20px;
-      height: 20px;
-      background-color: #20A0FF;
-      display: inline-block;
-    }
+  //   .bar5 {
+  //     width: 20px;
+  //     height: 20px;
+  //     background-color: #20A0FF;
+  //     display: inline-block;
+  //   }
 
-    .bar6 {
-      width: 20px;
-      height: 20px;
-      background-color: #1E90FF;
-      display: inline-block;
-    }
+  //   .bar6 {
+  //     width: 20px;
+  //     height: 20px;
+  //     background-color: #1E90FF;
+  //     display: inline-block;
+  //   }
 
-    .bar7 {
-      width: 20px;
-      height: 20px;
-      background-color: #000080;
-      display: inline-block;
-    }
+  //   .bar7 {
+  //     width: 20px;
+  //     height: 20px;
+  //     background-color: #000080;
+  //     display: inline-block;
+  //   }
 
-    .text0 {
-      width: 60px;
-      height: 20px;
-      display: inline-block;
-    }
+  //   .text0 {
+  //     width: 60px;
+  //     height: 20px;
+  //     display: inline-block;
+  //   }
 
-    .text1 {
-      width: 110px;
-      height: 20px;
-      display: inline-block;
-    }
-  }
+  //   .text1 {
+  //     width: 110px;
+  //     height: 20px;
+  //     display: inline-block;
+  //   }
+  // }
 
   .sampleTypeimg {
     width: 100px;

+ 150 - 54
src/dashoo.cn/frontend_web/src/pages/biobank/source/_opera/operation.vue

@@ -2,9 +2,11 @@
   .input-with-select .el-select .el-input {
     width: 110px;
   }
+
   .input-with-select .el-input-group__append {
     background-color: #fff;
   }
+
 </style>
 
 <template>
@@ -20,7 +22,8 @@
           <el-breadcrumb-item>{{pagetitle}}</el-breadcrumb-item>
         </el-breadcrumb>
         <span style="float: right;">
-          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 8px" onclick="window.history.go(-1)">返回</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 8px"
+            onclick="window.history.go(-1)">返回</el-button>
         </span>
       </div>
 
@@ -32,9 +35,10 @@
                 <legend style="color:#436EEE"></legend>
                 <i class="icon icon-paragraph-justify"> 基本信息</i>
                 <span style="float: right;">
-                  <el-button type="primary" v-if="service_flag == 'addsource'" :disabled="basic_flag" class="el-button--mini"
-                    @click="savebasic">保存</el-button>
-                  <el-button type="primary" v-if="service_flag == 'editsource'" class="el-button--mini" @click="editbasic">保存</el-button>
+                  <el-button type="primary" v-if="service_flag == 'addsource'" :disabled="basic_flag"
+                    class="el-button--mini" @click="savebasic">保存</el-button>
+                  <el-button type="primary" v-if="service_flag == 'editsource'" class="el-button--mini"
+                    @click="editbasic">保存</el-button>
                 </span>
               </div>
               <el-row :gutter="20" class="customordetailcss">
@@ -45,7 +49,8 @@
                 </el-col>
                 <el-col :span="8">
                   <el-form-item label="身份证号" prop="IdCard">
-                    <el-input v-model="samplesForm.IdCard" placeholder="请输入身份证号" @blur="getBirthday(samplesForm.IdCard)"></el-input>
+                    <el-input v-model="samplesForm.IdCard" placeholder="请输入身份证号"
+                      @blur="getBirthday(samplesForm.IdCard)"></el-input>
                   </el-form-item>
                 </el-col>
                 <el-col :span="8">
@@ -111,12 +116,14 @@
                 </el-col>
                 <el-col :span="8">
                   <el-form-item label="工作单位" prop="CompanyName">
-                    <el-input v-model="samplesForm.CompanyName" placeholder="请输入工作单位" type="textarea" :rows=1></el-input>
+                    <el-input v-model="samplesForm.CompanyName" placeholder="请输入工作单位" type="textarea" :rows=1>
+                    </el-input>
                   </el-form-item>
                 </el-col>
                 <el-col :span="16">
                   <el-form-item label="家庭住址" prop="HomeAddress">
-                    <el-input v-model="samplesForm.HomeAddress" placeholder="请输入家庭住址" type="textarea" :rows=1></el-input>
+                    <el-input v-model="samplesForm.HomeAddress" placeholder="请输入家庭住址" type="textarea" :rows=1>
+                    </el-input>
                   </el-form-item>
                 </el-col>
                 <!-- <el-col :span="8">
@@ -145,7 +152,40 @@
             <el-row :gutter="20">
               <el-col :span="24">&nbsp;</el-col>
             </el-row>
-            <el-card class="box-card infocard">
+            <el-tabs tab-position="top" v-model="extendTabs">
+              <el-tab-pane :label="groupname" :name="groupname" :key="groupname" v-for="groupname in groupnameList">
+                <el-card class="box-card infocard">
+                  <el-row>
+                    <template v-for="(item, index) in animalextends">
+                      <el-col :span="(item.FieldType === '3')? 24:8" :key="index" v-if="item.GroupName === groupname">
+                        <el-form-item :label="item.Name">
+                          <el-input v-model="item.FieldDefault" v-if="item.FieldType === '1'"
+                            :placeholder="'请输入'+item.Name" auto-complete="off"></el-input>
+
+                          <el-select v-model="item.FieldDefault" v-if="item.FieldType === '2'" clearable
+                            :placeholder="'请选择'+item.Name" style="width:100%">
+                            <el-option :label="v" :value="v" :key="v" v-for=" v in item.FieldContent.split(',')">
+                            </el-option>
+                          </el-select>
+
+                          <el-input v-model="item.FieldDefault" v-if="item.FieldType === '3'"
+                            :placeholder="'请输入'+item.Name" type="textarea" :rows=3 auto-complete="off"></el-input>
+
+                          <el-date-picker v-model="item.FieldDefault" v-if="item.FieldType === '4'" type="datetime"
+                            style="width:100%" placeholder="请选择日期"></el-date-picker>
+
+                          <el-button plain v-model="item.FieldDefault" v-if="item.FieldType === '5'" type="primary"
+                            size="mini" class="el-button--small" style="margin-left: 8px" @click="getitem(item)">上传图片
+                          </el-button>
+                        </el-form-item>
+                      </el-col>
+                    </template>
+
+                  </el-row>
+                </el-card>
+              </el-tab-pane>
+            </el-tabs>
+            <!-- <el-card class="box-card infocard">
               <div slot="header">
                 <i class="icon icon-paragraph-justify"></i> 扩展信息
               </div>
@@ -165,7 +205,7 @@
                   </el-col>
                 </el-row>
               </div>
-            </el-card>
+            </el-card> -->
           </el-form>
         </el-tab-pane>
         <el-tab-pane label="检验信息" name="checking">
@@ -182,14 +222,19 @@
             <el-table :data="sampletestlist" border stripe style="width: 100%">
               <el-table-column label="操作" width="84px" align="center" header-align="center">
                 <template slot-scope="scope">
-                  <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="getsampletestdetail(scope.row)">
+                  <el-button type="text" title="编辑" size="small" icon="el-icon-edit"
+                    @click="getsampletestdetail(scope.row)">
                   </el-button>
                 </template>
               </el-table-column>
-              <el-table-column prop="InspectionNum" label="检验单号" show-overflow-tooltip align="center" header-align="center"></el-table-column>
-              <el-table-column prop="SampleCode" label="样本编码" show-overflow-tooltip align="center" header-align="center"></el-table-column>
-              <el-table-column prop="BarCode" label="样本条码" show-overflow-tooltip align="center" header-align="center"></el-table-column>
-              <el-table-column prop="SampleTypeName" label="样本类型" show-overflow-tooltip align="center" header-align="center"></el-table-column>
+              <el-table-column prop="InspectionNum" label="检验单号" show-overflow-tooltip align="center"
+                header-align="center"></el-table-column>
+              <el-table-column prop="SampleCode" label="样本编码" show-overflow-tooltip align="center"
+                header-align="center"></el-table-column>
+              <el-table-column prop="BarCode" label="样本条码" show-overflow-tooltip align="center" header-align="center">
+              </el-table-column>
+              <el-table-column prop="SampleTypeName" label="样本类型" show-overflow-tooltip align="center"
+                header-align="center"></el-table-column>
             </el-table>
           </el-card>
         </el-tab-pane>
@@ -200,18 +245,22 @@
                 <legend style="color:#436EEE"></legend>
                 <i class="icon icon-paragraph-justify"> 病理信息</i>
                 <span style="float: right;">
-                  <el-button type="primary" class="el-button--mini" :disabled="path_flag" @click="addpathology">添加</el-button>
+                  <el-button type="primary" class="el-button--mini" :disabled="path_flag" @click="addpathology">添加
+                  </el-button>
                   <!-- <el-button type="primary" class="el-button--mini" @click="addpathology">添加</el-button> -->
                 </span>
               </div>
               <el-table :data="pathologylist" border stripe style="width: 100%">
                 <el-table-column label="操作" width="84px" align="center" header-align="center">
                   <template slot-scope="scope">
-                    <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="pathdetail(scope.row)"></el-button>
-                    <el-button type="text" title="删除" size="small" icon="el-icon-delete" @click="delopescr(scope.row)"></el-button>
+                    <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="pathdetail(scope.row)">
+                    </el-button>
+                    <el-button type="text" title="删除" size="small" icon="el-icon-delete" @click="delopescr(scope.row)">
+                    </el-button>
                   </template>
                 </el-table-column>
-                <el-table-column prop="PathologicalNum" label="病理号" align="center" header-align="center"></el-table-column>
+                <el-table-column prop="PathologicalNum" label="病理号" align="center" header-align="center">
+                </el-table-column>
                 <el-table-column prop="CheckPoint" label="检查位置" align="center" header-align="center"></el-table-column>
                 <el-table-column prop="Department" label="科室" align="center" header-align="center"></el-table-column>
                 <el-table-column prop="DiagnosticTime" sortable label="送检日期" align="center" header-align="center">
@@ -236,19 +285,26 @@
             <el-table :data="imagelist" border stripe style="width: 100%">
               <el-table-column label="操作" width="84px" align="center" header-align="center">
                 <template slot-scope="scope">
-                  <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="imagedetail(scope.row)"></el-button>
-                  <el-button type="text" title="删除" size="small" icon="el-icon-delete" @click="delopescr(scope.row)"></el-button>
+                  <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="imagedetail(scope.row)">
+                  </el-button>
+                  <el-button type="text" title="删除" size="small" icon="el-icon-delete" @click="delopescr(scope.row)">
+                  </el-button>
                 </template>
               </el-table-column>
-              <el-table-column prop="ImageSite" label="拍摄部位" show-overflow-tooltip align="center" header-align="center"></el-table-column>
-              <el-table-column prop="ImageType" label="影像类型" show-overflow-tooltip align="center" header-align="center"></el-table-column>
-              <el-table-column prop="Office" label="科室" show-overflow-tooltip align="center" header-align="center"></el-table-column>
-              <el-table-column prop="ImageTime" sortable label="拍摄日期" show-overflow-tooltip align="center" header-align="center">
+              <el-table-column prop="ImageSite" label="拍摄部位" show-overflow-tooltip align="center" header-align="center">
+              </el-table-column>
+              <el-table-column prop="ImageType" label="影像类型" show-overflow-tooltip align="center" header-align="center">
+              </el-table-column>
+              <el-table-column prop="Office" label="科室" show-overflow-tooltip align="center" header-align="center">
+              </el-table-column>
+              <el-table-column prop="ImageTime" sortable label="拍摄日期" show-overflow-tooltip align="center"
+                header-align="center">
                 <template slot-scope="scope">
                   {{ jstimehandle(scope.row.ImageTime+'') }}
                 </template>
               </el-table-column>
-              <el-table-column prop="ImageDes" label="影像描述" show-overflow-tooltip align="center" header-align="center"></el-table-column>
+              <el-table-column prop="ImageDes" label="影像描述" show-overflow-tooltip align="center" header-align="center">
+              </el-table-column>
             </el-table>
           </el-card>
         </el-tab-pane>
@@ -258,20 +314,26 @@
               <legend style="color:#436EEE"></legend>
               <i class="icon icon-paragraph-justify"> 手术信息</i>
               <span style="float: right;">
-                <el-button type="primary" class="el-button--mini" :disabled="opera_flag" @click="addoperation">添加</el-button>
+                <el-button type="primary" class="el-button--mini" :disabled="opera_flag" @click="addoperation">添加
+                </el-button>
               </span>
             </div>
             <el-table :data="operationlist" border stripe style="width: 100%">
               <el-table-column label="操作" width="84px" align="center" header-align="center">
                 <template slot-scope="scope">
-                  <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="operationdetail(scope.row)">
+                  <el-button type="text" title="编辑" size="small" icon="el-icon-edit"
+                    @click="operationdetail(scope.row)">
+                  </el-button>
+                  <el-button type="text" title="删除" size="small" icon="el-icon-delete" @click="delopescr(scope.row)">
                   </el-button>
-                  <el-button type="text" title="删除" size="small" icon="el-icon-delete" @click="delopescr(scope.row)"></el-button>
                 </template>
               </el-table-column>
-              <el-table-column prop="OperationName" label="手术名称" show-overflow-tooltip align="center" header-align="center"></el-table-column>
-              <el-table-column prop="OperativeSite" label="手术部位" show-overflow-tooltip align="center" header-align="center"></el-table-column>
-              <el-table-column prop="Department" label="科室" show-overflow-tooltip align="center" header-align="center"></el-table-column>
+              <el-table-column prop="OperationName" label="手术名称" show-overflow-tooltip align="center"
+                header-align="center"></el-table-column>
+              <el-table-column prop="OperativeSite" label="手术部位" show-overflow-tooltip align="center"
+                header-align="center"></el-table-column>
+              <el-table-column prop="Department" label="科室" show-overflow-tooltip align="center" header-align="center">
+              </el-table-column>
               <el-table-column prop="OperationTime" sortable label="手术日期" show-overflow-tooltip align="center"
                 header-align="center">
                 <template slot-scope="scope">
@@ -287,20 +349,26 @@
               <legend style="color:#436EEE"></legend>
               <i class="icon icon-paragraph-justify"> 筛查信息</i>
               <span style="float: right;">
-                <el-button type="primary" class="el-button--mini" :disabled="screen_flag" @click="addscreening">添加</el-button>
+                <el-button type="primary" class="el-button--mini" :disabled="screen_flag" @click="addscreening">添加
+                </el-button>
               </span>
             </div>
             <el-table :data="screeninglist" border stripe style="width: 100%">
               <el-table-column label="操作" width="84px" align="center" header-align="center">
                 <template slot-scope="scope">
-                  <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="screeningdetail(scope.row)">
+                  <el-button type="text" title="编辑" size="small" icon="el-icon-edit"
+                    @click="screeningdetail(scope.row)">
+                  </el-button>
+                  <el-button type="text" title="删除" size="small" icon="el-icon-delete" @click="delopescr(scope.row)">
                   </el-button>
-                  <el-button type="text" title="删除" size="small" icon="el-icon-delete" @click="delopescr(scope.row)"></el-button>
                 </template>
               </el-table-column>
-              <el-table-column prop="ScreeningSite" label="检查部位" show-overflow-tooltip align="center" header-align="center"></el-table-column>
-              <el-table-column prop="ScreeningType" label="检查途径" show-overflow-tooltip align="center" header-align="center"></el-table-column>
-              <el-table-column prop="ScreeningResult" label="检查结果" show-overflow-tooltip align="center" header-align="center"></el-table-column>
+              <el-table-column prop="ScreeningSite" label="检查部位" show-overflow-tooltip align="center"
+                header-align="center"></el-table-column>
+              <el-table-column prop="ScreeningType" label="检查途径" show-overflow-tooltip align="center"
+                header-align="center"></el-table-column>
+              <el-table-column prop="ScreeningResult" label="检查结果" show-overflow-tooltip align="center"
+                header-align="center"></el-table-column>
               <el-table-column prop="ScreeningTime" sortable label="筛查日期" show-overflow-tooltip align="center"
                 header-align="center">
                 <template slot-scope="scope">
@@ -315,11 +383,16 @@
 
     <el-dialog title="检验详情" width="80%" :visible.sync="sampletestShow" top="5vh" center>
       <el-table :data="sampletestdetaillist" border stripe style="width: 100%">
-        <el-table-column prop="InspectionNum" label="检验单号" show-overflow-tooltip align="center" header-align="center"></el-table-column>
-        <el-table-column prop="ItemsName" label="检验名" show-overflow-tooltip align="center" header-align="center"></el-table-column>
-        <el-table-column prop="ResultData" label="结果" show-overflow-tooltip align="center" header-align="center"></el-table-column>
-        <el-table-column prop="Reference" label="参考值" show-overflow-tooltip align="center" header-align="center"></el-table-column>
-        <el-table-column prop="Unit" label="单位" show-overflow-tooltip align="center" header-align="center"></el-table-column>
+        <el-table-column prop="InspectionNum" label="检验单号" show-overflow-tooltip align="center" header-align="center">
+        </el-table-column>
+        <el-table-column prop="ItemsName" label="检验名" show-overflow-tooltip align="center" header-align="center">
+        </el-table-column>
+        <el-table-column prop="ResultData" label="结果" show-overflow-tooltip align="center" header-align="center">
+        </el-table-column>
+        <el-table-column prop="Reference" label="参考值" show-overflow-tooltip align="center" header-align="center">
+        </el-table-column>
+        <el-table-column prop="Unit" label="单位" show-overflow-tooltip align="center" header-align="center">
+        </el-table-column>
       </el-table>
     </el-dialog>
 
@@ -339,7 +412,8 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="送检日期">
-              <el-date-picker v-model="pathologyForm.DiagnosticTime" type="date" style="width:100%" placeholder="请选择送检日期"></el-date-picker>
+              <el-date-picker v-model="pathologyForm.DiagnosticTime" type="date" style="width:100%"
+                placeholder="请选择送检日期"></el-date-picker>
             </el-form-item>
           </el-col>
           <el-col :span="8">
@@ -364,7 +438,8 @@
           </el-col>
           <el-col :span="24">
             <el-form-item label="临床诊断">
-              <el-input v-model="pathologyForm.ClinicalDiagnosis" type="textarea" :rows=3 placeholder="请输入临床诊断"></el-input>
+              <el-input v-model="pathologyForm.ClinicalDiagnosis" type="textarea" :rows=3 placeholder="请输入临床诊断">
+              </el-input>
             </el-form-item>
           </el-col>
           <el-col :span="24">
@@ -400,7 +475,8 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="拍摄日期">
-              <el-date-picker v-model="imageForm.ImageTime" type="date" style="width:100%" placeholder="请选择拍摄日期"></el-date-picker>
+              <el-date-picker v-model="imageForm.ImageTime" type="date" style="width:100%" placeholder="请选择拍摄日期">
+              </el-date-picker>
             </el-form-item>
           </el-col>
           <el-col :span="24">
@@ -458,7 +534,8 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="手术日期">
-              <el-date-picker v-model="operationForm.OperationTime" type="date" style="width:100%" placeholder="请选择手术日期"></el-date-picker>
+              <el-date-picker v-model="operationForm.OperationTime" type="date" style="width:100%"
+                placeholder="请选择手术日期"></el-date-picker>
             </el-form-item>
           </el-col>
           <el-col :span="8">
@@ -514,7 +591,8 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="筛查日期">
-              <el-date-picker v-model="screeningForm.ScreeningTime" type="date" style="width:100%" placeholder="请选择筛查日期"></el-date-picker>
+              <el-date-picker v-model="screeningForm.ScreeningTime" type="date" style="width:100%"
+                placeholder="请选择筛查日期"></el-date-picker>
             </el-form-item>
           </el-col>
           <el-col :span="8">
@@ -628,6 +706,8 @@
         },
         Diseases: '',
         diseaseinfolist: [], //疾病
+        extendTabs: '',
+        groupnameList: [],
         samplesrules: {
           IdCard: [{
             required: true,
@@ -753,7 +833,7 @@
         this.opera_flag = false
         this.screen_flag = false
       }
-      this.getextends()
+      this.getGroupName()
       this.getdiseaseslist()
       this.getsampletest()
       this.getpathology()
@@ -785,10 +865,13 @@
             _this.samplesForm.Sex = _this.samplesForm.Sex + ''
             // 为扩展字段赋值
             for (var i = 0; i < _this.userextends.length; i++) {
-              _this.userextends[i].FieldDefault = res.data.items[_this.userextends[i].FieldName]
+              if (_this.userextends[i].FieldType == '4') {
+                _this.userextends[i].FieldDefault = new Date(res.data.items[_this.userextends[i].FieldName])
+              } else {
+                _this.userextends[i].FieldDefault = res.data.items[_this.userextends[i].FieldName]
+              }
             }
           }).catch(err => {
-            // handle error
             console.error(err)
           })
       },
@@ -891,7 +974,6 @@
             params = Object.assign(params, jsonobj)
             _this.$axios.put('/samplessource/editbasic/' + _this.pid, params)
               .then(res => {
-                // response
                 if (res.data.code === 0) {
                   _this.$message({
                     type: 'success',
@@ -1005,7 +1087,8 @@
         let _this = this
         _this.pathologyForm.CheckNum = parseInt(_this.pathologyForm.CheckNum)
         _this.pathologyForm.Type = 3
-        _this.$axios.post('/samplessource/pathologyadd?Name=' + _this.samplesForm.Name + '&Sex=' + _this.samplesForm.Sex +
+        _this.$axios.post('/samplessource/pathologyadd?Name=' + _this.samplesForm.Name + '&Sex=' + _this.samplesForm
+            .Sex +
             '&Age=' + _this.samplesForm.Age,
             _this.pathologyForm)
           .then(res => {
@@ -1319,7 +1402,8 @@
       addScreening(screeningForm) {
         let _this = this
         _this.screeningForm.Type = 2
-        _this.$axios.post('/samplessource/addscreening' + '?ParentId=' + _this.pid + '&IdCard=' + _this.samplesForm.IdCard,
+        _this.$axios.post('/samplessource/addscreening' + '?ParentId=' + _this.pid + '&IdCard=' + _this.samplesForm
+            .IdCard,
             _this.screeningForm)
           .then(res => {
             // response
@@ -1458,11 +1542,23 @@
             })
           })
       },
+      getGroupName() {
+        this.$axios.get('extends/listbyloginwithgroup', {})
+          .then(res => {
+            for (var i = 0; i < res.data.length; i++) {
+              if (res.data[i].GroupName != '') {
+                this.groupnameList.push(res.data[i].GroupName)
+              }
+            }
+            this.extendTabs = this.groupnameList[0]
+            this.getextends()
+          })
+      },
       getextends() {
         this.$axios.get('extends/listbylogin', {})
           .then(res => {
             this.userextends = res.data
-            if( this.service_flag == 'editsource'){
+            if (this.service_flag == 'editsource') {
               this.getbasicinfo()
             }
           })

+ 0 - 3
src/dashoo.cn/frontend_web/src/pages/biobank/source/_opera/operationb.vue

@@ -357,7 +357,6 @@
     methods: {
       getAnimalInfo(ServiceId) {
         let _this = this
-        // request
         _this.$axios.get('/samplessource/getanimalinfo/' + _this.ServiceId, {})
           .then(res => {
             _this.samplesForm = res.data.items
@@ -366,7 +365,6 @@
             }
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
@@ -383,7 +381,6 @@
         _this.$axios.get("/samplessource/innernomakesure?InnerNo=" + this.samplesForm.InnerNo, {})
           .then(function (response) {
             let innerTotal = response.data.items
-            console.log("--------------------",response.data.items)
             if (innerTotal === 0) {
               _this.savebasic()
             } else {

+ 10 - 1
src/dashoo.cn/frontend_web/src/pages/biobank/source/_opera/sourcedetail.vue

@@ -82,7 +82,12 @@
         <div class="donorsdetailkzinfodiv">
           <el-row>
             <template v-for="(item, index) in animalextends">
-              <el-col :span="6" :key="index" v-if="item.GroupName === groupname">
+              <el-col :span="6" :key="index" v-if="item.GroupName === groupname && item.FieldType == '5'">
+                <label>
+                  <a @click="clickachment(item.FieldDefault)">{{item.Name}}:{{item.FieldDefault}}</a>
+                </label>
+              </el-col>
+              <el-col :span="6" :key="index" v-if="item.GroupName === groupname && item.FieldType != '5'">
                 <label>{{item.Name}}:{{item.FieldDefault}}</label>
               </el-col>
             </template>
@@ -301,6 +306,10 @@
         this.currentPage = value
         this.getdevicesamples()
       },
+      clickachment(val) {
+        let host = val.split('|')
+        window.open(`http://${host[0]}`)
+      },
       goback() {
         if (this.$route.query.size) {
           this.$router.push({

+ 14 - 5
src/dashoo.cn/frontend_web/src/pages/biobank/source/_opera/sourceinfo.vue

@@ -90,11 +90,16 @@
         <div>
           <div class="donorsdetailkzinfodiv">
             <el-row>
-              <template v-for="item in userextends">
-                <el-col :span="6" :key="item">
-                  <label>{{item.Name}}:{{item.FieldDefault}}</label>
-                </el-col>
-              </template>
+              <template v-for="(item, index) in animalextends">
+              <el-col :span="6" :key="index" v-if="item.GroupName === groupname && item.FieldType == '5'">
+                <label>
+                  <a @click="clickachment(item.FieldDefault)">{{item.Name}}:{{item.FieldDefault}}</a>
+                </label>
+              </el-col>
+              <el-col :span="6" :key="index" v-if="item.GroupName === groupname && item.FieldType != '5'">
+                <label>{{item.Name}}:{{item.FieldDefault}}</label>
+              </el-col>
+            </template>
             </el-row>
           </div>
         </div>
@@ -355,6 +360,10 @@
         this.currentPage = value
         this.getdevicesamples()
       },
+      clickachment(val) {
+        let host = val.split('|')
+        window.open(`http://${host[0]}`)
+      },
       goback() {
         if (this.$route.query.size) {
           this.$router.push({

+ 10 - 1
src/dashoo.cn/frontend_web/src/pages/biobank/source/_opera/sourcemicinfo.vue

@@ -63,7 +63,12 @@
         <div class="donorsdetailkzinfodiv">
           <el-row>
             <template v-for="(item, index) in animalextends">
-              <el-col :span="6" :key="index" v-if="item.GroupName === groupname">
+              <el-col :span="6" :key="index" v-if="item.GroupName === groupname && item.FieldType == '5'">
+                <label>
+                  <a @click="clickachment(item.FieldDefault)">{{item.Name}}:{{item.FieldDefault}}</a>
+                </label>
+              </el-col>
+              <el-col :span="6" :key="index" v-if="item.GroupName === groupname && item.FieldType != '5'">
                 <label>{{item.Name}}:{{item.FieldDefault}}</label>
               </el-col>
             </template>
@@ -268,6 +273,10 @@
         this.currentPage = value
         this.getdevicesamples()
       },
+      clickachment(val) {
+        let host = val.split('|')
+        window.open(`http://${host[0]}`)
+      },
       goback() {
         if (this.$route.query.size) {
           this.$router.push({