|
|
@@ -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)
|