Browse Source

Merge branch 'master' of http://code.dashoo.cn/dashoo/biobank

# Conflicts:
#	src/dashoo.cn/frontend_animal/src/pages/samples/archived/index.vue
jianglw 4 năm trước cách đây
mục cha
commit
c6f4ac7765

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

@@ -121,7 +121,7 @@
 <!--            <p>{{jstimehandle(scope.row.SurveyDate)}}</p>-->
 <!--          </template>-->
 <!--        </el-table-column>-->
-        <el-table-column :label="item.name" :key="item.name" v-if="item.show" v-for="item in showcolumn"
+        <el-table-column :label="item.name" :key="item" v-if="item.show" v-for="item in showcolumn"
                          :width="item.columnwidth" align="center" show-overflow-tooltip>
           <template slot-scope="scope">
             <template v-if="item.filed === 'Address'">
@@ -415,7 +415,8 @@ export default {
         filed: 'Genus',
         name: '蜂种',
         show: true,
-        kuoz: false
+        kuoz: false,
+        columnwidth: 100
       }, {
         filed: 'InnerNo',
         name: '来源内码',
@@ -435,7 +436,8 @@ export default {
         filed: 'AuditorStatus',
         name: '审核状态',
         show: true,
-        kuoz: false
+        kuoz: false,
+        columnwidth: 100
       }, {
         filed: 'AuditorName',
         name: '审核人',
@@ -1013,7 +1015,9 @@ export default {
         type: 'success',
         message: '自定义显示列设置成功'
       })
-      this.initdata()
+      this.showcolumn = JSON.parse(JSON.stringify(this.showcolumn))
+      // this.$forceUpdate()
+      // this.initdata()
     },
     checkedshowall () {
       let tc = 0

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

@@ -19,9 +19,9 @@
               查询
               <el-dropdown-menu slot="dropdown">
                 <el-dropdown-item command="search">高级查询</el-dropdown-item>
-                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
                 <el-dropdown-item style="color:black;" v-for="item in searchTemplates" :key="item.name"
                                   :command="item.template">{{item.name}}</el-dropdown-item>
+                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
                 <el-dropdown-item divided style="color:black;" command="编辑">自定义</el-dropdown-item>
               </el-dropdown-menu>
             </el-dropdown>
@@ -61,7 +61,7 @@
             </router-link>
           </template>
         </el-table-column>
-        <el-table-column :label="item.name" :key="item.name" v-if="item.show" v-for="item in showcolumn"
+        <el-table-column :label="item.name" :key="item" v-if="item.show" v-for="item in showcolumn"
           :width="item.columnwidth" align="center" show-overflow-tooltip>
           <template slot-scope="scope">
             <template v-if="item.filed === 'SourceName'">

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

@@ -19,8 +19,11 @@
               查询
               <el-dropdown-menu slot="dropdown">
                 <el-dropdown-item command="search">高级查询</el-dropdown-item>
+                 <el-dropdown-item style="color:black;"
+                                   v-for="item in searchTemplates"
+                                   :key="item.name"
+                                   :command="item.template">{{item.name}}</el-dropdown-item>
                 <el-dropdown-item command="clear">查询重置</el-dropdown-item>
-                <el-dropdown-item style="color:black;" v-for="item in searchTemplates" :key="item.name" :command="item.template">{{item.name}}</el-dropdown-item>
                 <el-dropdown-item divided style="color:black;" command="编辑">自定义</el-dropdown-item>
               </el-dropdown-menu>
             </el-dropdown>
@@ -69,7 +72,7 @@
             </router-link>
           </template>
         </el-table-column>
-        <el-table-column :label="item.name" :key="item.name" v-if="item.show" v-for="item in showcolumn" :width="item.columnwidth"
+        <el-table-column :label="item.name" :key="item" v-if="item.show" v-for="item in showcolumn" :width="item.columnwidth"
           align="center" show-overflow-tooltip>
           <template slot-scope="scope">
             <template v-if="item.filed === 'SourceName'">
@@ -237,7 +240,7 @@
     <el-dialog title="选中显示列(拖拽可以实现排序)" :visible.sync="columndialogVisible" top="5vh">
       <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange" style="margin-left:15px;">全选</el-checkbox>
       <div style="margin: 10px 0;"></div>
-      <draggable v-model="showcolumn">
+      <draggable v-model="showcolumn" @node-drag-end="handleDragEnd">
         <transition-group class="sampshowfiledsort_ul sampshowfiledsort_ul_tags" tag="ul">
           <li v-for="item in showcolumn" :key="item.filed">
             <el-checkbox v-model="item.show" :label="item.filed" @change="checkedshowall()">{{item.name}}</el-checkbox>
@@ -946,7 +949,7 @@
           type: 'success',
           message: '自定义显示列设置成功'
         })
-        this.initData()
+        this.showcolumn = JSON.parse(JSON.stringify(this.showcolumn))
       },
       header_dragend (newWidth, oldWidth, column, event) {
         for (var i = 0; i < this.showcolumn.length; i++) {
@@ -956,6 +959,9 @@
             return
           }
         }
+      },
+      handleDragEnd () {
+
       },
       // ----------------------------------------------------------------
       // 自定义查询

+ 3 - 4
src/dashoo.cn/frontend_animal/src/pages/samples/stored/index.vue

@@ -19,12 +19,11 @@
               查询
               <el-dropdown-menu slot="dropdown">
                 <el-dropdown-item command="search">高级查询</el-dropdown-item>
-                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
-
                 <el-dropdown-item style="color:black;"
                                   v-for="item in searchTemplates"
                                   :key="item.name"
                                   :command="item.template">{{item.name}}</el-dropdown-item>
+                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
                 <el-dropdown-item divided style="color:black;" command="编辑">自定义</el-dropdown-item>
               </el-dropdown-menu>
             </el-dropdown>
@@ -95,7 +94,7 @@
             </el-button>
           </template>
         </el-table-column>
-        <el-table-column :label="item.name" :key="item.name" v-if="item.show" v-for="item in showcolumn"
+        <el-table-column :label="item.name" :key="item" v-if="item.show" v-for="item in showcolumn"
           :width="item.columnwidth" align="center" show-overflow-tooltip>
           <template slot-scope="scope">
             <template v-if="item.filed === 'SourceName'">
@@ -788,7 +787,7 @@
           type: 'success',
           message: '自定义显示列设置成功'
         })
-        this.initData()
+        this.showcolumn = JSON.parse(JSON.stringify(this.showcolumn))
       },
       handleCheckAllChange (val) {
         for (var i = 0; i < this.showcolumn.length; i++) {

+ 6 - 6
src/dashoo.cn/frontend_animal/src/pages/samples/waitingstore/index.vue

@@ -19,11 +19,11 @@
               查询
               <el-dropdown-menu slot="dropdown">
                 <el-dropdown-item command="search">高级查询</el-dropdown-item>
+                 <el-dropdown-item style="color:black;"
+                                   v-for="item in searchTemplates"
+                                   :key="item.name"
+                                   :command="item.template">{{item.name}}</el-dropdown-item>
                 <el-dropdown-item command="clear">查询重置</el-dropdown-item>
-                <el-dropdown-item style="color:black;"
-                                  v-for="item in searchTemplates"
-                                  :key="item.name"
-                                  :command="item.template">{{item.name}}</el-dropdown-item>
                 <el-dropdown-item divided style="color:black;" command="编辑">自定义</el-dropdown-item>
               </el-dropdown-menu>
             </el-dropdown>
@@ -69,7 +69,7 @@
             </router-link>
           </template>
         </el-table-column>
-        <el-table-column :label="item.name" :key="item.name" v-if="item.show" v-for="item in showcolumn" :width="item.columnwidth"
+        <el-table-column :label="item.name" :key="item" v-if="item.show" v-for="item in showcolumn" :width="item.columnwidth"
           align="center" show-overflow-tooltip>
           <template slot-scope="scope">
             <template v-if="item.filed === 'SourceName'">
@@ -694,7 +694,7 @@
           type: 'success',
           message: '自定义显示列设置成功'
         })
-        this.initData()
+        this.showcolumn = JSON.parse(JSON.stringify(this.showcolumn))
       },
       header_dragend (newWidth, oldWidth, column, event) {
         for (var i = 0; i < this.showcolumn.length; i++) {