群发
This commit is contained in:
@@ -59,7 +59,7 @@ export default {
|
||||
this.$http.post('/app/appgirdinfo/listByInfo').then((res) => {
|
||||
if (res?.data) {
|
||||
let parents = res.data.map(e => e.parentGirdId)
|
||||
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)}))
|
||||
this.allData = res.data.map(e => ({...e, isChecked: this.selected.find(i=> i.id == e.id), hasChildren: parents.includes(e.id)}))
|
||||
this.gridInit()
|
||||
}
|
||||
}).then(()=> {
|
||||
@@ -78,9 +78,7 @@ export default {
|
||||
},
|
||||
|
||||
getGridsAndUsersByParent(id) {
|
||||
this.treeList = this.allData.filter(e => (e.parentGirdId == id)).map(v=> ({...v,isChecked:this.selected.find(i=>i.id == v.id)}))
|
||||
this.treeList
|
||||
this.$forceUpdate()
|
||||
this.treeList = this.allData.filter(e => (e.parentGirdId == id)).map(v=> ({...v, isChecked: this.selected.find(i=>i.id == v.id)}))
|
||||
},
|
||||
girdNameClick(row, index) {
|
||||
this.userList = []
|
||||
@@ -97,7 +95,7 @@ export default {
|
||||
if(row.isChecked) {
|
||||
this.selected.push(row)
|
||||
} else {
|
||||
let index=this.selected.findIndex(item=>row.id===item.id)
|
||||
let index=this.selected.findIndex(item=>row.id == item.id)
|
||||
index >= 0 && this.selected.splice(index, 1)
|
||||
}
|
||||
uni.setStorageSync('girdSelect', this.selected)
|
||||
|
||||
Reference in New Issue
Block a user