瀏覽代碼

Merge branch 'master' of http://101.36.160.140:21044/csc/csc-szls-vue

GaoYuPeng 5 年之前
父節點
當前提交
f9350e2834

+ 1 - 1
shanXiPlatform/src/views/home/daiBan/initiated/index.vue

@@ -12,7 +12,7 @@
12 12
           {{ item.workName }}
13 13
         </div>
14 14
         <div class="middle">
15
-          <div class="middle_flex" v-if="item.workName.indexOf('药剂') == -1 && item.type !== 'code1'">
15
+          <div class="middle_flex" v-if="item.houseId && item.workName.indexOf('药剂') == -1 && item.type !== 'code1'">
16 16
             <div>仓号:</div>
17 17
             <div>{{ hourseDic[item.houseId] }}</div>
18 18
           </div>

+ 1 - 1
shanXiPlatform/src/views/home/daiBan/pending/index.vue

@@ -48,7 +48,7 @@
48 48
           </div>
49 49
         </div>
50 50
         <div class="middle">
51
-          <div class="middle_flex"  v-if="item.workName.indexOf('药剂') == -1 && item.type !== 'code1'">
51
+          <div class="middle_flex"  v-if="item.houseId && item.workName.indexOf('药剂') == -1 && item.type !== 'code1'">
52 52
             <div>仓号:</div>
53 53
             <div>{{ hourseDic[item.houseId] }}</div>
54 54
           </div>

+ 2 - 2
shanXiPlatform/src/views/home/daiBan/pending/xunzengDetails.vue

@@ -228,7 +228,7 @@ export default {
228 228
       Approval(data)
229 229
         .then((res) => {
230 230
           if(res.code == 200){
231
-            sessionStorage.setItem("store", JSON.stringify(this.$store.state))
231
+            // sessionStorage.setItem("store", JSON.stringify(this.$store.state))
232 232
             // location.reload();
233 233
             this.$store.commit({
234 234
               type: "changependingCount",
@@ -260,7 +260,7 @@ export default {
260 260
       yjcgApproval(data)
261 261
         .then((res) => {
262 262
           if(res.code == 200){
263
-            sessionStorage.setItem("store", JSON.stringify(this.$store.state))
263
+            // sessionStorage.setItem("store", JSON.stringify(this.$store.state))
264 264
             // location.reload();
265 265
             this.$store.commit({
266 266
               type: "changependingCount",

+ 1 - 1
shanXiPlatform/src/views/home/daiBan/processed/index.vue

@@ -22,7 +22,7 @@
22 22
         
23 23
          
24 24
         <div class="middle">
25
-          <div class="middle_flex"  v-if="item.workName.indexOf('药剂') == -1 && item.type !== 'code1'">
25
+          <div class="middle_flex"  v-if="item.houseId && item.workName.indexOf('药剂') == -1 && item.type !== 'code1'">
26 26
             <div>仓号:</div>
27 27
             <div>{{ hourseDic[item.houseId] }}</div>
28 28
           </div>

+ 24 - 2
shanXiPlatform/src/views/systemManagement/earlyWarningManagement/addEarlyWarningManagement.vue

@@ -51,7 +51,8 @@
51 51
         </el-form-item>
52 52
         <el-form-item label="检查人员:"  prop="warnTargetArr">
53 53
             <div style="border:1px solid #ccc;padding:15px;width:800px ">
54
-              <el-checkbox-group v-model="formData.warnTargetArr"  :disabled="isDetail" v-if="personList && personList.length>0">
54
+              <el-checkbox :indeterminate="isIndeterminate" :disabled="isDetail" v-model="checkAll" v-if="personList && personList.length>0" @change="handleCheckAllChange">全选</el-checkbox>
55
+              <el-checkbox-group v-model="formData.warnTargetArr"  :disabled="isDetail" v-if="personList && personList.length>0"  @change="handleCheckedCitiesChange">
55 56
                 <el-checkbox v-for="item in personList" :key="item.uId" :label="item.uId">{{item.personnelName}}</el-checkbox>
56 57
               </el-checkbox-group>
57 58
               <span v-if="!personList || personList.length == 0" style="color:#cccccc">暂无数据</span>
@@ -231,7 +232,10 @@ export default {
231 232
         levelDepotHouse: [{ required: true, message: '请选择预警单位类型', trigger: 'change' }],
232 233
       },
233 234
       isDetail:false,
234
-      loading:false
235
+      loading:false,
236
+      checkAll: false,
237
+      isIndeterminate: true,
238
+      personListIds: []
235 239
     }
236 240
   },
237 241
   mounted() {
@@ -308,6 +312,8 @@ export default {
308 312
             warnTargetIdArr.push(Number(item.substring(0, item.indexOf("|"))))
309 313
           })
310 314
           this.formData.warnTargetArr = JSON.parse(JSON.stringify(warnTargetIdArr))
315
+          this.checkAll = this.formData.warnTargetArr.length === this.personList.length;
316
+          this.isIndeterminate = this.formData.warnTargetArr.length > 0 && this.formData.warnTargetArr.length < this.personList.length;
311 317
         }
312 318
       }).catch((err) => {
313 319
         console.log(err)
@@ -369,7 +375,23 @@ export default {
369 375
         //   this.personList.push(JSON.parse(JSON.stringify(person)))
370 376
         // }
371 377
         this.personList = res.data
378
+        this.personList.forEach(item => {
379
+          this.personListIds.push(item.uId)
380
+        })
372 381
       })
382
+    },
383
+    handleCheckAllChange(val) {
384
+      if(val){
385
+        this.formData.warnTargetArr = this.personListIds
386
+      }else{
387
+        this.formData.warnTargetArr = []
388
+      }
389
+      this.isIndeterminate = false;
390
+    },
391
+    handleCheckedCitiesChange(value) {
392
+      let checkedCount = value.length;
393
+      this.checkAll = checkedCount === this.personList.length;
394
+      this.isIndeterminate = checkedCount > 0 && checkedCount < this.personList.length;
373 395
     }
374 396
   }
375 397
 }