积分规则

This commit is contained in:
shijingjing
2022-08-17 19:15:57 +08:00
parent 91c4e94609
commit 13a56c373c

View File

@@ -240,6 +240,7 @@ export default {
girdInfoList: [],
rulueType: "0",
girdNameList: [],
list: [],
};
},
created() {
@@ -333,6 +334,7 @@ export default {
this.dialog = false;
this.getList();
this.closed();
this.girdInfoList = []
}
});
@@ -413,13 +415,21 @@ export default {
beforeSelectTree() {
this.instance.post(`/app/appgirdinfo/listAll3`, null, null).then((res) => {
if (res?.data) {
res.data = res.data.map(e => ({...e, checked: !!this.girdInfoList.find(s => s.id == e.id)}))
this.list = res.data.map(e => ({...e, checked: !!this.girdInfoList.find(s => s.id == e.id)}))
this.girdInfoList.map(e => this.treeSelected[e.id] = e)
this.treeObj.treeList = this.$arr2tree(res.data, {parent: 'parentGirdId'})
this.treeObj.treeList = this.$arr2tree(this.list, {parent: 'parentGirdId'})
}
});
},
handleTreeChecked(data) {
if(!this.isEdit) {
this.list.forEach(v=>{
return {
...v,
checked: false
}
})
}
data.checked = !data.checked
if (data.checked) {
this.treeSelected[data.id] = data