dedsudiyu před 2 roky
rodič
revize
b64a227818

+ 38 - 2
src/views/comprehensive/personnel/onDutyConfiguration/index.vue

@@ -93,6 +93,7 @@
         <el-form :model="formData" ref="upForm" :rules="rules">
           <el-form-item label="实验室:" prop="subCheckList" class="form-item" label-width="80px">
             <el-cascader
+              @change="cascaderChange"
               ref="subCascader"
               v-model="formData.subCheckList"
               :options="options"
@@ -283,6 +284,7 @@
         },
         //列表数据
         dataList:[],
+        getSubList:[],
       }
     },
     created() {
@@ -292,6 +294,21 @@
 
     },
     methods: {
+      cascaderChange(){
+        let getSubList = [];
+        let subList = this.$refs.subCascader.getCheckedNodes()
+        subList.forEach(item=>{
+          if(!item.children[0]){
+            getSubList.push(item.data.subOrDeptId)
+          }
+        })
+        this.$set(this,'getSubList',getSubList);
+
+        this.$set(this,'total',0);
+        this.$set(this,'dataList',[]);
+        this.$set(this,'userCheckList',[]);
+        this.getList();
+      },
       //查询
       handleQuery(){
         this.queryParams.pageNum = 1;
@@ -309,8 +326,27 @@
       },
       getList(){
         let self = this;
+        // if(!this.getSubList[0]){
+        //   this.$set(this,'total',0);
+        //   this.$set(this,'dataList',[]);
+        //   this.$set(this,'userCheckList',[]);
+        //   return
+        // }
         this.loading = true;
-        getUserDutyList(this.queryParams).then( response => {
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        obj.subjectIds = self.getSubList+'';
+        getUserDutyList(obj).then( response => {
+          //处理用户数据
+          // for(let i=0;i<self.userCheckList.length;i++){
+          //   let num = 0;
+          //   for(let o=0;o<self.getSubList.length;o++){
+          //   }
+          //   if(num != 0){
+          //     self.userCheckList.splice(i,1);
+          //     i--
+          //   }
+          // }
+          //处理列表数据
           for(let i=0;i<response.rows.length;i++){
             let num = 0;
             for(let o=0;o<self.userCheckList.length;o++){
@@ -626,7 +662,7 @@
           this.$set(this,'checkList',list);
           this.$set(this,'userCheckList',[]);
           this.$set(this.formData,'subCheckList',[]);
-          this.resetQuery();
+          // this.resetQuery();
           this.treeDeptSubSel();
           this.$set(this,'addPageType',true);
         }

+ 1 - 1
src/views/emergencyManagement/electronicInformationBoard/index.vue

@@ -74,7 +74,7 @@
                width="520px" append-to-body id="onDutyConfiguration-dialog-box">
       <el-form ref="form" :model="addForm" :rules="rules" label-width="100px">
         <el-form-item label="设备编号:" prop="cardNum">
-          <el-input v-model="addForm.cardNum" placeholder="请输入设备编号" maxlength="20" style="width:360px;"/>
+          <el-input v-model="addForm.cardNum" placeholder="请输入设备编号" maxlength="30" style="width:360px;"/>
         </el-form-item>
         <el-form-item label="实验室:" prop="subjectId">
           <el-select