dedsudiyu 2 年 前
コミット
089506de28

+ 18 - 0
src/api/safetyCheck/index.js

@@ -326,6 +326,24 @@ export function checkPlanAdd(data) {
   })
 }
 
+//检查计划-计划详情
+export function findCheckPlan(query) {
+  return request({
+    url: '/zd-security/checkPlan/findCheckPlan',
+    method: 'get',
+    params: query
+  })
+}
+
+//检查计划-修改计划
+export function checkPlanUpdate(data) {
+  return request({
+    url: '/zd-security/checkPlan/update',
+    method: 'put',
+    data: data
+  })
+}
+
 /***************************校院巡察组***************************/
 
 //校院巡察组-分页获取校院巡查组列表

+ 40 - 22
src/views/safetyCheck/checkConfiguration/configDialog.vue

@@ -436,11 +436,12 @@
         let self = this;
         if(type == 1){
           //右至左
-          if(this.userIdsRight[0]){
+          if(this.$refs.rightUserTable.selection[0]){
             let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
-            for(let i=0;i<self.userIdsRight.length;i++){
+            let userIdsRight = JSON.parse(JSON.stringify(this.$refs.rightUserTable.selection))
+            for(let i=0;i<userIdsRight.length;i++){
               for(let s=0;s<list.length;s++){
-                if(self.userIdsRight[i] == list[s].userId){
+                if(userIdsRight[i].userId == list[s].userId){
                   list.splice(s,1);
                   s--
                 }
@@ -455,28 +456,45 @@
           }
         }else if(type == 2){
           //左至右
-          if(this.userIdsLeft[0]){
+          if(this.$refs.leftUserTable.selection[0]){
             let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
-            for(let i=0;i<self.userIdsLeft.length;i++){
-              for(let o=0;o<self.userTableListLeft.length;o++){
-                if(self.userIdsLeft[i] == self.userTableListLeft[o].userId){
-                  let obj = {
-                    subId:self.userTableListLeft[o].subjectId,
-                    subName:self.userTableListLeft[o].subjectName,
-                    subRom:self.userTableListLeft[o].roomNum,
-                    deptId:self.userTableListLeft[o].deptId,
-                    deptName:self.userTableListLeft[o].deptName,
-                    userId:self.userTableListLeft[o].userId,
-                    nickName:self.userTableListLeft[o].userName,
-                    userNumber:self.userTableListLeft[o].userNumber,
-                    phonenumber:self.userTableListLeft[o].phonenumber,
-                    validBeginTime:self.userTableListLeft[o].validBeginTime,
-                    validEndTime:self.userTableListLeft[o].validEndTime,
-                  }
-                  list.push(obj);
-                }
+            let userIdsLeft = JSON.parse(JSON.stringify(this.$refs.leftUserTable.selection))
+            for(let i=0;i<userIdsLeft.length;i++){
+              let obj = {
+                subId:userIdsLeft[i].subjectId,
+                subName:userIdsLeft[i].subjectName,
+                subRom:userIdsLeft[i].roomNum,
+                deptId:userIdsLeft[i].deptId,
+                deptName:userIdsLeft[i].deptName,
+                userId:userIdsLeft[i].userId,
+                nickName:userIdsLeft[i].userName,
+                userNumber:userIdsLeft[i].userNumber,
+                phonenumber:userIdsLeft[i].phonenumber,
+                validBeginTime:userIdsLeft[i].validBeginTime,
+                validEndTime:userIdsLeft[i].validEndTime,
               }
+              list.push(obj);
             }
+            // for(let i=0;i<self.userIdsLeft.length;i++){
+            //   for(let o=0;o<self.userTableListLeft.length;o++){
+            //     if(self.userIdsLeft[i] == self.userTableListLeft[o].userId){
+            //       let obj = {
+            //         subId:self.userTableListLeft[o].subjectId,
+            //         subName:self.userTableListLeft[o].subjectName,
+            //         subRom:self.userTableListLeft[o].roomNum,
+            //         deptId:self.userTableListLeft[o].deptId,
+            //         deptName:self.userTableListLeft[o].deptName,
+            //         userId:self.userTableListLeft[o].userId,
+            //         nickName:self.userTableListLeft[o].userName,
+            //         userNumber:self.userTableListLeft[o].userNumber,
+            //         phonenumber:self.userTableListLeft[o].phonenumber,
+            //         validBeginTime:self.userTableListLeft[o].validBeginTime,
+            //         validEndTime:self.userTableListLeft[o].validEndTime,
+            //       }
+            //       list.push(obj);
+            //     }
+            //   }
+            // }
             this.$set(this,'dialogTableDataList',list);
             this.$refs.leftUserTable.clearSelection();
             this.userGetListLeft();

+ 19 - 17
src/views/safetyCheck/schoolInspection/inspectionGroup/addDialog.vue

@@ -441,11 +441,12 @@
         let self = this;
         if(type == 1){
           //右至左
-          if(this.userIdsRight[0]){
+          if(this.$refs.rightUserTable.selection[0]){
             let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
-            for(let i=0;i<self.userIdsRight.length;i++){
+            let userIdsRight = JSON.parse(JSON.stringify(this.$refs.rightUserTable.selection))
+            for(let i=0;i<userIdsRight.length;i++){
               for(let s=0;s<list.length;s++){
-                if(self.userIdsRight[i] == list[s].userId){
+                if(userIdsRight[i].userId == list[s].userId){
                   list.splice(s,1);
                   s--
                 }
@@ -460,22 +461,23 @@
           }
         }else if(type == 2){
           //左至右
-          if(this.userIdsLeft[0]){
+          if(this.$refs.leftUserTable.selection[0]){
             let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
-            for(let i=0;i<self.userIdsLeft.length;i++){
-              for(let o=0;o<self.userTableListLeft.length;o++){
-                if(self.userIdsLeft[i] == self.userTableListLeft[o].userId){
-                  let obj = {
-                    userId:self.userTableListLeft[o].userId,
-                    name:self.userTableListLeft[o].nickName,
-                    jobNum:self.userTableListLeft[o].userName,
-                    deptName:self.userTableListLeft[o].deptName,
-                    deptId:self.userTableListLeft[o].deptId,
-                    userType:self.userTableListLeft[o].userType,
-                  }
-                  list.push(obj);
-                }
+            let userIdsLeft = JSON.parse(JSON.stringify(this.$refs.leftUserTable.selection))
+            for(let i=0;i<userIdsLeft.length;i++){
+              let obj = {
+                userId:userIdsLeft[i].userId,
+                name:userIdsLeft[i].nickName,
+                jobNum:userIdsLeft[i].userName,
+                deptName:userIdsLeft[i].deptName,
+                deptId:userIdsLeft[i].deptId,
+                userType:userIdsLeft[i].userType,
               }
+              list.push(obj);
+            }
+            if(list.length>50){
+              this.msgError('巡查成员最多50人')
+              return
             }
             this.$set(this,'dialogTableDataList',list);
             this.$refs.leftUserTable.clearSelection();

+ 192 - 73
src/views/safetyCheck/schoolInspection/inspectionPlan/addDialog.vue

@@ -62,7 +62,7 @@
                 <p class="inquire-button-one button-p" v-if="dialogForm.checkRange == 3" @click="dialogClickType(3)">{{lookInfoType?'查看':'选择实验室'}}</p>
                 <p class="text-p" v-if="dialogForm.checkRange ==1 && dialogForm.schoolSubCheckNum>0">已选择{{dialogForm.schoolSubCheckNum}}间实验室</p>
                 <p class="text-p" v-if="dialogForm.checkRange == 2 && dialogForm.collegeNum>0">已选择{{dialogForm.collegeNum}}个学院,共{{dialogForm.collegeSubNum}}间实验室</p>
-                <p class="text-p" v-if="dialogForm.checkRange ==3 && dialogForm.subjectNum>0">已选择{{dialogForm.subjectNum}}间实验室</p>
+                <p class="text-p" v-if="dialogForm.checkRange ==3 && dialogForm.subCheckNum>0">已选择{{dialogForm.subCheckNum}}间实验室</p>
               </div>
             </div>
           </el-form-item>
@@ -240,8 +240,8 @@
           <pagination layout="total, prev, pager, next, jumper"
                       v-show="deptTotalRight>0"
                       :total="deptTotalRight"
-                      :page.sync="deptTableListRight.pageNum"
-                      :limit.sync="deptTableListRight.pageSize"
+                      :page.sync="deptQueryParamsRight.pageNum"
+                      :limit.sync="deptQueryParamsRight.pageSize"
                       @pagination="deptGetListRight"
           />
         </div>
@@ -327,7 +327,7 @@
         <div class="dept-table-title-box">
           <p>已选实验室</p>
           <p v-if="!lookInfoType">{{subNumRight}}/{{subTotalRight}}</p>
-          <p v-if="lookInfoType">{{subNumRight}}</p>
+          <p v-if="lookInfoType">{{subTotalRight}}</p>
         </div>
         <div class="dept-table-max-box">
           <el-form v-if="!lookInfoType" :model="subQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
@@ -514,8 +514,9 @@
   import { listDepartments } from "@/api/system/dept";
   import { listClassifiedAll } from "@/api/laboratory/classified";
   import { listClasstypeAll } from "@/api/laboratory/classtype";
-  import { getHistoryPlanTitles,findGroupList,checkGroupFind,findUserList,getAllSubNum,
-           conditionCollegeInfo,findSubInfoByDeptIds,checkPlanAdd,conditionSubjectInfo } from '@/api/safetyCheck/index'
+  import { getHistoryPlanTitles,findGroupList,checkGroupFind,findUserList,
+           getAllSubNum,isSCollege,conditionCollegeInfo,findSubInfoByDeptIds,
+           checkPlanAdd,conditionSubjectInfo,findCheckPlan,checkPlanUpdate } from '@/api/safetyCheck/index'
   export default {
     name: 'addDialog',
     props:{
@@ -546,10 +547,12 @@
         upDataName:"",
         //巡察组
         groupData:"",
+        //巡察组状态 院级/校级
+        groupDataType:"",
         //选中巡查人员列表
         dialogTableList:[],
         //巡查范围列表
-        dialogRangeOptions:[{label:"全校",value:"1"},{label:"学院",value:"2"},{label:"实验室",value:"3"}],
+        dialogRangeOptions:[],
         //学院数量
         collegeNum:0,
         //学院实验室数量
@@ -682,11 +685,6 @@
     created(){
       this.$set(this,'addDialogTitle',this.addDialogData.title);
       this.$set(this,'lookInfoType',this.addDialogData.lookInfoType);
-      if(!this.addDialogData.addType){
-        //编辑
-      }else{
-        //新增
-      }
     },
     mounted(){
       this.initializationInterface();
@@ -702,26 +700,82 @@
           }
           this.$set(this,'quickSelectionList',list);
         });
-        //获取巡察组
-        findGroupList({checkLevel:0}).then(response => {
-          this.$set(this,'dialogOptions',response.data);
-        });
         //获取学院列表
         listDepartments().then(response => {
           this.deptSelectList = response.data;
         });
         /**获取分级*/
         listClassifiedAll().then(response=>{
-          if(response.code==200){
-            this.classifiedList = response.data
-          }
+          this.classifiedList = response.data
         })
         /**获取分类*/
         listClasstypeAll().then(response=>{
-          if(response.code==200){
-            this.classTypeList = response.data;
+          this.classTypeList = response.data;
+        });
+        //查询当前用户是否是院级
+        isSCollege().then(response=>{
+          if(response.data.userFlg){
+            // 院级
+            this.$set(this,'dialogRangeOptions',[{label:"学院",value:2},{label:"实验室",value:3}]);
+            this.$set(this,'groupDataType',2);
+          }else{
+            // 校级
+            this.$set(this,'dialogRangeOptions',[{label:"全校",value:1},{label:"学院",value:2},{label:"实验室",value:3}]);
+            this.$set(this,'groupDataType',0);
           }
+          //获取巡察组 checkLevel: 0全部 1校级 2院级
+          findGroupList({checkLevel:this.groupDataType}).then(response => {
+            this.$set(this,'dialogOptions',response.data);
+          });
         });
+        if(!this.addDialogData.addType){
+          //编辑-详情查询
+          findCheckPlan({id:this.addDialogData.id}).then(response => {
+            //处理基础数据
+            let obj = {
+              id:response.data.id,
+              title:response.data.title,
+              checkType:response.data.checkType,
+              dateRange:[response.data.cycleStartTime,response.data.cycleEndTime],
+              checkRange:response.data.checkRange,
+              schoolSubCheckNum:response.data.checkRange == 1?response.data.subjectNum:0,
+              collegeSubNum:response.data.checkRange == 2?response.data.subjectNum:0,
+              collegeNum:response.data.checkRange == 2?response.data.collegeNum:0,
+              subCheckNum:response.data.checkRange == 3?response.data.subjectNum:0,
+              collegeIds:response.data.collegeIds?response.data.collegeIds.split(','):[],
+              checkDemand:response.data.checkDemand,
+              uploadDtoList:response.data.uploadDtoList,
+              checkMemberDtoList:response.data.checkMemberDtoList,
+            }
+            this.$set(this,'dialogForm',obj);
+            //处理人员数据
+            let userData = [];
+            for(let i=0;i<response.data.checkMemberDtoList.length;i++){
+              userData.push({
+                userId:response.data.checkMemberDtoList[i].userId,
+                name:response.data.checkMemberDtoList[i].name,
+                jobNum:response.data.checkMemberDtoList[i].jobNum,
+                deptName:response.data.checkMemberDtoList[i].deptName,
+                deptId:response.data.checkMemberDtoList[i].deptId,
+                userType:response.data.checkMemberDtoList[i].userType,
+                enable:response.data.checkMemberDtoList[i].enable,
+              })
+            }
+            this.$set(this,'dialogTableList',userData);
+            //处理实验室数据
+            let subList = response.data.subIds?response.data.subIds.split(','):[];
+            let subDataList = [];
+            for(let i=0;i<subList.length;i++){
+              subList[i] = parseInt(subList[i]);
+              let obj = {
+                subId:subList[i],
+              }
+              subDataList.push(obj);
+            }
+            this.$set(this,'dialogTableSubList',subDataList);
+            this.$set(this.subCheckData,'subIds',subList);
+          });
+        }
       },
       //选中检查范围
       rangeChange(val){
@@ -738,12 +792,25 @@
           this.$set(this,'dialogTableList',response.data.checkGroupMemberList);
         });
       },
-      //确定
+      //确定按钮
       addUserButton(){
         let self = this;
         if(this.addDialogBoxType == 1){
+          //提交
           this.$refs["addDialogForm"].validate(valid => {
             if (valid) {
+              //检查范围内是否选择实验室获学院
+              if(this.dialogForm.checkRange == 2){
+                if(!this.dialogForm.collegeIds[0]){
+                  this.msgError('请选择学院')
+                  return
+                }
+              }else if(this.dialogForm.checkRange == 3){
+                if(!this.subCheckData.subIds[0]){
+                  this.msgError('请选择实验室')
+                  return
+                }
+              }
               if(!this.dialogTableList[0]){
                 this.msgError('请添加至少一名巡查成员')
                 return
@@ -756,8 +823,9 @@
                 checkRange:this.dialogForm.checkRange,//检查范围
                 subjectNum:this.dialogForm.checkRange == 1?this.dialogForm.schoolSubCheckNum:(
                            this.dialogForm.checkRange == 2?this.dialogForm.collegeSubNum:(
-                           this.dialogForm.checkRange == 3?this.dialogForm.subCheckNum:'')),//实验室数量
+                           this.dialogForm.checkRange == 3?this.dialogForm.subCheckNum:0)),//实验室数量
                 collegeIds:this.dialogForm.checkRange==2?this.dialogForm.collegeIds+'':'',//学院ID转换字符串
+                collegeNum:this.dialogForm.checkRange==2?this.dialogForm.collegeNum:0,//学院数量
                 subIds:this.dialogForm.checkRange == 3?this.subCheckData.subIds+'':'',//实验室ID
                 checkDemand:this.dialogForm.checkDemand,//检查要求
                 uploadDtoList:this.dialogForm.uploadDtoList,//检查要求
@@ -775,22 +843,40 @@
                   userId: self.dialogTableList[i].userId,
                   userType: self.dialogTableList[i].userType,
                 };
+                //编辑时需要带上父类ID
+                if(this.addDialogData.id){
+                  obj.checkPlanId = this.addDialogData.id
+                }
                 userList.push(obj);
               }
               obj.checkMemberDtoList = userList
-              checkPlanAdd(obj).then(response => {
-
-              })
+              if(this.addDialogData.id){
+                //编辑
+                for(let i=0;i<obj.uploadDtoList.length;i++){
+                  obj.uploadDtoList[i].keyId = this.addDialogData.id;
+                }
+                obj.id = this.addDialogData.id;
+                checkPlanUpdate(obj).then(response => {
+                  this.msgSuccess(response.msg)
+                  this.$parent.addDialogOpen(5)
+                })
+              }else{
+                //新增
+                checkPlanAdd(obj).then(response => {
+                  this.msgSuccess(response.msg)
+                  this.$parent.addDialogOpen(5)
+                })
+              }
             }
           })
         }else if(this.addDialogBoxType == 2){
-          // 学院选择
+          // 学院选择页面确定
           this.$set(this.dialogForm,'collegeNum',this.deptCheckData.deptNum);
           this.$set(this.dialogForm,'collegeSubNum',this.deptCheckData.subNum);
           this.$set(this.dialogForm,'collegeIds',this.deptCheckData.deptIds);
           this.dialogClickType(1);
         }else if(this.addDialogBoxType == 3){
-          //实验室选择确定
+          //实验室选择页面确定
           let list = [];
           let ids = [];
           for(let o=0;o<self.dialogTableSubDataList.length;o++){
@@ -805,13 +891,11 @@
             list.push(obj)
           }
           this.$set(this.subCheckData,'subIds',ids);
-          console.log('list',list);
-          console.log('length',list.length);
           this.$set(this.dialogForm,'subCheckNum',list.length);
           this.$set(this,'dialogTableSubList',list);
           this.dialogClickType(1);
         }else if(this.addDialogBoxType == 4){
-          //人员选择确定
+          //人员选择页面确定
           let list = [];
           for(let o=0;o<self.dialogTableDataList.length;o++){
             let obj = {
@@ -860,12 +944,40 @@
           if(this.dialogForm.collegeIds[0]){
             this.$nextTick(() => {
               conditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
-                self.$set(self,'deptTableListLeft',response.data);
-                self.$set(self,'deptTotalLeft',response.data.length);
-                for(let i=0;i<self.dialogForm.collegeIds.length;i++){
-                  for(let o=0;o<self.deptTableListLeft.length;o++){
-                    if(self.dialogForm.collegeIds[i] == self.deptTableListLeft[o].deptId){
-                      self.$refs.leftDeptTable.toggleRowSelection(self.deptTableListLeft[o]);
+                if(this.lookInfoType){
+                  //查看时
+                  let list = [];
+                  for(let i=0;i<response.data.length;i++){
+                    let num = 0;
+                    for(let o=0;o<self.dialogForm.collegeIds.length;o++){
+                      if(response.data[i].deptId == self.dialogForm.collegeIds[o]){
+                        num++
+                      }
+                    }
+                    if(num == 0){
+                      response.data.splice(i,1);
+                      i--
+                    }
+                  }
+                  self.$set(self,'deptTableListLeft',response.data);
+                  self.$set(self,'deptTotalLeft',response.data.length);
+                  let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
+                  obj.deptIds = self.dialogForm.collegeIds;
+                  findSubInfoByDeptIds(obj).then(response => {
+                    this.deptTotalRight = response.total;
+                    this.deptTableListRight = response.rows;
+                    this.$set(this.deptCheckData,'subNum',response.total);
+                    this.$set(this,'deptNumLeft',self.dialogForm.collegeIds.length);
+                  });
+                }else{
+                  //新增-编辑时
+                  self.$set(self,'deptTableListLeft',response.data);
+                  self.$set(self,'deptTotalLeft',response.data.length);
+                  for(let i=0;i<self.dialogForm.collegeIds.length;i++){
+                    for(let o=0;o<self.deptTableListLeft.length;o++){
+                      if(self.dialogForm.collegeIds[i] == self.deptTableListLeft[o].deptId){
+                        self.$refs.leftDeptTable.toggleRowSelection(self.deptTableListLeft[o]);
+                      }
                     }
                   }
                 }
@@ -977,7 +1089,11 @@
       //查询接口
       deptGetListRight(){
         let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
-        obj.deptIds = this.deptIdsLeft;
+        if(this.lookInfoType){
+          obj.deptIds = this.dialogForm.collegeIds;
+        }else{
+          obj.deptIds = this.deptIdsLeft;
+        }
         findSubInfoByDeptIds(obj).then(response => {
           this.deptTotalRight = response.total;
           this.deptTableListRight = response.rows;
@@ -1046,14 +1162,15 @@
           this.subTableListRight = response.rows;
         });
       },
+      //实验室穿梭按钮
       subArrowButton(type){
-        let self = this;
         if(type == 1){
-          if(this.subIdsRight[0]){
+          if(this.$refs.rightSubTable.selection[0]){
             let list = JSON.parse(JSON.stringify(this.dialogTableSubDataList));
-            for(let i=0;i<self.subIdsRight.length;i++){
+            let subIdsRight = JSON.parse(JSON.stringify(this.$refs.rightSubTable.selection))
+            for(let i=0;i<subIdsRight.length;i++){
               for(let s=0;s<list.length;s++){
-                if(self.subIdsRight[i] == list[s].subId){
+                if(subIdsRight[i].subId == list[s].subId){
                   list.splice(s,1);
                   s--
                 }
@@ -1064,24 +1181,21 @@
             this.subGetListLeft();
             this.subGetListRight();
           }else{
-            this.msgError('请先勾选侧列表')
+            this.msgError('请先勾选侧列表')
           }
         }else if(type == 2){
-          if(this.subIdsLeft[0]){
+          if(this.$refs.leftSubTable.selection[0]){
             let list = JSON.parse(JSON.stringify(this.dialogTableSubDataList));
-            for(let i=0;i<self.subIdsLeft.length;i++){
-              for(let o=0;o<self.subTableListLeft.length;o++){
-                if(self.subIdsLeft[i] == self.subTableListLeft[o].subId){
-                  let obj = {
-                    subId:self.subTableListLeft[o].subId,
-                    subjectName:self.subTableListLeft[o].subjectName,
-                    typeId:self.subTableListLeft[o].typeId,
-                    level:self.subTableListLeft[o].level,
-                    collegeName:self.subTableListLeft[o].collegeName,
-                  }
-                  list.push(obj);
-                }
+            let subIdsLeft = JSON.parse(JSON.stringify(this.$refs.leftSubTable.selection))
+            for(let i=0;i<subIdsLeft.length;i++){
+              let obj = {
+                subId:subIdsLeft[i].subId,
+                subjectName:subIdsLeft[i].subjectName,
+                typeId:subIdsLeft[i].typeId,
+                level:subIdsLeft[i].level,
+                collegeName:subIdsLeft[i].collegeName,
               }
+              list.push(obj);
             }
             this.$set(this,'dialogTableSubDataList',list);
             this.$refs.leftSubTable.clearSelection();
@@ -1157,16 +1271,17 @@
           this.userTableListRight = response.rows;
         });
       },
-      //穿梭按钮
+      //人员穿梭按钮
       userArrowButton(type){
         let self = this;
         if(type == 1){
           //右至左
-          if(this.userIdsRight[0]){
+          if(this.$refs.rightUserTable.selection[0]){
             let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
-            for(let i=0;i<self.userIdsRight.length;i++){
+            let userIdsRight = JSON.parse(JSON.stringify(this.$refs.rightUserTable.selection))
+            for(let i=0;i<userIdsRight.length;i++){
               for(let s=0;s<list.length;s++){
-                if(self.userIdsRight[i] == list[s].userId){
+                if(userIdsRight[i].userId == list[s].userId){
                   list.splice(s,1);
                   s--
                 }
@@ -1183,20 +1298,21 @@
           //左至右
           if(this.userIdsLeft[0]){
             let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
-            for(let i=0;i<self.userIdsLeft.length;i++){
-              for(let o=0;o<self.userTableListLeft.length;o++){
-                if(self.userIdsLeft[i] == self.userTableListLeft[o].userId){
-                  let obj = {
-                    userId:self.userTableListLeft[o].userId,
-                    name:self.userTableListLeft[o].nickName,
-                    jobNum:self.userTableListLeft[o].userName,
-                    deptName:self.userTableListLeft[o].deptName,
-                    deptId:self.userTableListLeft[o].deptId,
-                    userType:self.userTableListLeft[o].userType,
-                  }
-                  list.push(obj);
-                }
+            let userIdsLeft = JSON.parse(JSON.stringify(this.$refs.leftUserTable.selection))
+            for(let i=0;i<userIdsLeft.length;i++){
+              let obj = {
+                userId:userIdsLeft[i].userId,
+                name:userIdsLeft[i].nickName,
+                jobNum:userIdsLeft[i].userName,
+                deptName:userIdsLeft[i].deptName,
+                deptId:userIdsLeft[i].deptId,
+                userType:userIdsLeft[i].userType,
               }
+              list.push(obj);
+            }
+            if(list.length>50){
+              this.msgError('巡查成员最多50人')
+              return
             }
             this.$set(this,'dialogTableDataList',list);
             this.$refs.leftUserTable.clearSelection();
@@ -1459,6 +1575,9 @@
               line-height:40px;
             }
           }
+          .dialog-material-list-box:nth-child(1){
+            margin-top:0;
+          }
           .dialog-material-list-box{
             margin-top:20px;
             div{

+ 5 - 0
src/views/safetyCheck/schoolInspection/inspectionPlan/index.vue

@@ -174,6 +174,7 @@
         }else if(type==2){
           this.$set(this,'addDialogData',{
             title:"编辑巡查计划",
+            id:data.id,
             lookInfoType:false,
             addType:false,
           })
@@ -181,12 +182,16 @@
         }else if(type==3){
           this.$set(this,'addDialogData',{
             title:"巡查计划详情",
+            id:data.id,
             lookInfoType:true,
             addType:false,
           })
           this.$set(this,'addDialogType',true);
         }else if(type==4){
           this.$set(this,'addDialogType',false);
+        }else if(type == 5){
+          this.$set(this,'addDialogType',false);
+          this.getList();
         }
       },
       //范围选择