瀏覽代碼

bug修改

mengy 3 年之前
父節點
當前提交
c7d34c6e56

+ 6 - 4
shanXiPlatform/src/views/systemManagement/earlyWarningManagement/addEarlyWarningManagement.vue

@@ -51,7 +51,7 @@
51
         </el-form-item>
51
         </el-form-item>
52
         <el-form-item label="检查人员:"  prop="warnTargetArr">
52
         <el-form-item label="检查人员:"  prop="warnTargetArr">
53
             <div style="border:1px solid #ccc;padding:15px;width:800px ">
53
             <div style="border:1px solid #ccc;padding:15px;width:800px ">
54
-              <el-checkbox :indeterminate="isIndeterminate" :disabled="isDetail" v-model="checkAll" v-if="personList && personList.length>0" @change="handleCheckAllChange">全选</el-checkbox>
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
               <el-checkbox-group v-model="formData.warnTargetArr"  :disabled="isDetail" v-if="personList && personList.length>0"  @change="handleCheckedCitiesChange">
56
                 <el-checkbox v-for="item in personList" :key="item.uId" :label="item.uId">{{item.personnelName}}</el-checkbox>
56
                 <el-checkbox v-for="item in personList" :key="item.uId" :label="item.uId">{{item.personnelName}}</el-checkbox>
57
               </el-checkbox-group>
57
               </el-checkbox-group>
@@ -320,6 +320,7 @@ export default {
320
       })
320
       })
321
     },
321
     },
322
     btnSave(formName) {
322
     btnSave(formName) {
323
+      console.log(this.formData.warnTargetArr)
323
       this.loading = true
324
       this.loading = true
324
       this.$refs[formName].validate((valid) => {
325
       this.$refs[formName].validate((valid) => {
325
         if (valid) {
326
         if (valid) {
@@ -362,6 +363,9 @@ export default {
362
       window.history.go(-1)
363
       window.history.go(-1)
363
     },
364
     },
364
     warnTargetTypeSelect() {
365
     warnTargetTypeSelect() {
366
+      this.formData.warnTargetArr = []
367
+        this.checkAll = false
368
+        this.isIndeterminate = true
365
       gerPersonByRole(this.formData.warnTargetType).then(res => {
369
       gerPersonByRole(this.formData.warnTargetType).then(res => {
366
         console.log(res)
370
         console.log(res)
367
         this.personList = []
371
         this.personList = []
@@ -378,9 +382,7 @@ export default {
378
         this.personList.forEach(item => {
382
         this.personList.forEach(item => {
379
           this.personListIds.push(item.uId)
383
           this.personListIds.push(item.uId)
380
         })
384
         })
381
-        this.formData.warnTargetArr = []
382
-        this.checkAll = false
383
-        this.isIndeterminate = true
385
+        
384
       })
386
       })
385
     },
387
     },
386
     handleCheckAllChange(val) {
388
     handleCheckAllChange(val) {