Jelajahi Sumber

样本管理分页代码重新上传

jianglw 4 tahun lalu
induk
melakukan
e18f70705b

+ 56 - 4
src/dashoo.cn/frontend_animal/src/pages/biobank/source/animal.vue

@@ -59,7 +59,7 @@
       </div>
 
       <el-table ref="tableData" :data="donorsList" border style="width: 100%" height="calc(100vh - 230px)"
-                @selection-change="handleSelectionChange" @sort-change="orderby">
+                @selection-change="handleSelectionChange" @sort-change="orderby" @header-dragend="header_dragend">
         <el-table-column type="selection" width="55"></el-table-column>
         <el-table-column label="操作" width="100" align="center" fixed>
           <template slot-scope="scope">
@@ -121,6 +121,19 @@
             <template v-if="item.filed === 'Address'">
               {{getaddress(scope.row)}}
             </template>
+            <template v-if="item.filed === 'Genus'">
+              <el-popover trigger="hover" placement="top">
+                <template v-for="item in ExpandInfoList">
+<!--                  <p v-if="item.FieldName == scope.row[item.FieldName]">
+
+                  </p>-->
+                  {{item.Name}}:{{scope.row[item.FieldName]}}
+                </template>
+                <div slot="reference" class="name-wrapper">
+                  <el-tag size="medium">{{ scope.row[item.filed] }}</el-tag>
+                </div>
+              </el-popover>
+            </template>
             <template v-else-if="item.filed === 'SurveyDate'">
               {{jstimehandle(scope.row[item.filed])}}
             </template>
@@ -262,6 +275,7 @@ import {
 } from 'vuex'
 import service from '../../../utils/micro_request'
 import samplesourcesearchdialog from '../../../components/samples/samplesourcesearchdialog'
+import draggable from 'vuedraggable'
 import store from 'store'
 export default {
 
@@ -272,7 +286,8 @@ export default {
   },
   name: 'samplessource',
   components: {
-    samplesourcesearchdialog
+    samplesourcesearchdialog,
+    draggable
   },
   data () {
     return {
@@ -293,6 +308,7 @@ export default {
       isIndeterminate: false,
       checkAll: true,
       exportloading: false,
+      ExpandInfoList: [], // 扩展字段列表
       searchform: {
         GenusId: '',
         Genus: '',
@@ -513,6 +529,10 @@ export default {
         .catch(err => {
           console.error(err)
         })
+      service.postRequest('dashoo.biobank.bee-0.1', 'SampleRelated', 'CustomizeSearch', {type: 'SampleSource'})
+        .then(res => {
+          this.ExpandInfoList = res.data
+        })
     },
     getaddress (val) {
       let address = val.ProvinceName + val.CityName + val.StreetName + val.Address
@@ -582,7 +602,7 @@ export default {
             _this.importfilepath = ''
             _this.importmsg = '未选择文件'
             // 更新界面
-            _this.initData()
+            _this.initdata()
           } else {
             _this.$message({
               type: 'warning',
@@ -676,6 +696,15 @@ export default {
       this.Column.Prop = column.prop
       this.initdata()
     },
+    header_dragend (newWidth, oldWidth, column, event) {
+      for (var i = 0; i < this.showcolumn.length; i++) {
+        if (this.showcolumn[i].name === column.label) {
+          this.showcolumn[i].columnwidth = newWidth
+          store.set('sapminputshowcolumn', this.showcolumn)
+          return
+        }
+      }
+    },
     seachdata () {
       console.log("this.SurveyDateStart", this.SurveyDateStart)
       console.log("this.SurveyDateEnd", this.SurveyDateEnd)
@@ -974,7 +1003,7 @@ export default {
         type: 'success',
         message: '自定义显示列设置成功'
       })
-      this.initData()
+      this.initdata()
     },
     checkedshowall () {
       let tc = 0
@@ -1009,6 +1038,29 @@ export default {
   margin: 1rem 0 2rem;
   text-align: right;
 }
+.sampshowfiledsort_ul_tags {
+  padding-left: 12px;
+  margin-top: -5px;
+}
+
+.sampshowfiledsort_ul_tags:after {
+  clear: both;
+  content: '';
+  display: block;
+}
+
+.sampshowfiledsort_ul_tags li {
+  color: #fff;
+  float: left;
+  margin: 2px 2px 3px 0;
+  padding: 3px 3px;
+  min-width: 15px;
+  font-size: 16px;
+  text-align: center;
+  cursor: move;
+  transition: all 1s;
+  list-style-type: none;
+}
 
 .plab {
   font-size: 13px;

+ 1 - 1
src/dashoo.cn/frontend_animal/src/pages/samples/archived/index.vue

@@ -312,7 +312,7 @@
           </div>
         </el-col>
       </el-row>
-    </el-dialog>-->
+    </el-dialog>--> 
 
     <!-- 自定义查询 -->
     <samplesearchdialog @close="closeDialog"

+ 1 - 1
src/dashoo.cn/frontend_animal/src/pages/samples/prerecorded/index.vue

@@ -1273,7 +1273,7 @@
           let succeedMsg = ''
           let errorMsg = ''
           let count = 0
-          for (var i = 0; i < _this.multipleSelection.length; i++) {
+          for (var i = 0; i < _this.multipleSelection.length; i++) { 
             _this.$axios.delete('samplepreinput/' + _this.multipleSelection[i].Id + '?sampletype=' +
                 _this.multipleSelection[
                   i].SampleType, null)

+ 2 - 0
src/dashoo.cn/frontend_animal/src/pages/samples/stored/index.vue

@@ -259,6 +259,7 @@
         <el-button type="primary" @click="saveshowfiled()">确 定</el-button>
       </div>
     </el-dialog>
+
     <batchrecoverydialog @close="recoverydialogcallback" :applyform="shenhe" :visible.sync="dialogfusuVisible">
     </batchrecoverydialog>
 
@@ -618,6 +619,7 @@
           .then(res => {
             this.EquipmentList = res.data
           })
+        this.$refs.sampleTable.doLayout()
       },
       GetEquipmentInfos () {
         service.postRequest('dashoo.biobank.bee-0.1', 'Equipment', 'GetEquipmentInfos', {DItem: this.DItem})