Browse Source

Bug(4186,4209)

zhangxc 5 years ago
parent
commit
e5f24093b1
1 changed files with 14 additions and 3 deletions
  1. 14 3
      src/components/recordInput/ManageItemBatch.vue

+ 14 - 3
src/components/recordInput/ManageItemBatch.vue

@@ -109,7 +109,7 @@
                                     width="120"
                                     show-overflow-tooltip>
                                     <template slot-scope="scope">
-                                        <span class="checkUsed" :class="{'active': scope.row.isUsed == 1}" @click="checkUsed(scope.row,index,scope.$index)"></span>
+                                        <span class="checkUsed" :class="{'active': scope.row.isUsed == 1,'disabled': getDisabled(scope.row,item.remark)}" @click="checkUsed(scope.row,index,scope.$index,item.remark)"></span>
                                         <!-- <el-checkbox v-model="scope.row.isUsed" :value ="scope.row.isUsed" :disabled="getIsUsed(scope.row)" true-label="1" false-label="0">{{scope.row.isUsed}}</el-checkbox> -->
                                       </template>
                                   </el-table-column>
@@ -146,7 +146,7 @@
         sexType:[],
         bloodType:[],
         rhType:[],
-        title:'批量管理',
+        title:'病历条目-批量管理',
         hospitalId:'',
         tableData:[],
         checkAllMap:{
@@ -202,7 +202,10 @@
         })
         
       },
-      checkUsed(row,index,ii){
+      checkUsed(row,index,ii,remark){
+        if(this.getDisabled(row,remark)){
+          return
+        }
         let isUsed = this.caseLIst[index].qcCasesEntry[ii].isUsed
         const caseLIstCopy = JSON.parse(JSON.stringify(this.caseLIst))
         if(isUsed == 1){
@@ -224,6 +227,10 @@
         //    return true
         // }
         
+      },
+      getDisabled(row,remark){
+        const hasChecked = this.checkAllMap[remark].findIndex(item => item.id === row.id) === -1
+        return hasChecked
       },
        handleChange(val) {
       },
@@ -526,6 +533,10 @@
             -webkit-transform: rotate(45deg) scaleY(1);
             transform: rotate(45deg) scaleY(1);
         }
+        .disabled{
+          cursor: not-allowed;
+          background-color: #edf2fc;
+        }
         /deep/.el-table__row td:nth-child(3){
           text-align: left;
         }