coys 2 ani în urmă
părinte
comite
8ad345755d

+ 10 - 2
src/components/peopleList/index.vue

@@ -113,15 +113,20 @@ export default {
     show(val){
       if(val){
         this.getpeople()
+        
       }
     },
     //监听人员数组变化
     userList(val) {
+      this.peoplesId=[]
       this.$set(this.$data,'peoples',val.map(item => item.userName).join(','))
 
       
       
-      this.peoplesId = [val.map(item => item.userId).join(',')]
+       val.map(item => {
+        this.peoplesId.push(item.userId)
+      })
+     
     }
   },
 
@@ -142,10 +147,13 @@ export default {
             item.userId=item.id
           })
           this.peopleListCpoy = JSON.parse(JSON.stringify(this.peopleList))
-         
+        
           this.peopleListCpoy.forEach(item => {
             this.peoplesId.forEach(i => {
+             
+              console.log(this.peoplesId);
               if (item.userId === i) {
+                
                 this.$set(item, 'checked', true)
               }else{
                 this.$set(item, 'checked', false)

+ 1 - 1
src/views/menu/training/components/addTraining.vue

@@ -376,7 +376,7 @@ export default {
       obj.imageList = obj.imageList.map(item => item.path).join(',')
       console.log(obj.imageList);
       obj.taskUserList = []
-      debugger
+      
       obj.taskUserList.push(...this.userPeopleList, ...this.lackPeopleList)
 
       edittrainingInfo({

+ 5 - 2
src/views/menu/training/index.vue

@@ -191,7 +191,7 @@ export default {
       fieldValue: '全部', //状态名称
       statusValue: ' ', //状态值
       columns: ['全部', '待记录', '待签名', '已完成'], //状态数组
-      typeColumns: ['每月安全培训教育', '专项安全培训教育'], //类型数组
+      typeColumns: ['全部','每月安全培训教育', '专项安全培训教育'], //类型数组
       currentDate: newDateMonth(), //月份值
       conditionShow: false //机构弹框显示隐藏
     }
@@ -422,8 +422,11 @@ export default {
         case '专项安全培训教育':
           this.typeValue = '1'
           break
+        case '全部':
+          this.typeValue = ' '
+          break
       }
-      console.log(this.typeValue)
+      
       this.typeStatus = false
       this.selectListAppHandler()
     },