[update] 修改bug80700

This commit is contained in:
lideqin
2024-02-19 17:59:42 +08:00
parent 618b342965
commit d3fb0678a5
+12
View File
@@ -340,11 +340,23 @@ export default {
getWorkGroupTreeList().then((res) => {
if (res.success) {
this.workGroupList = res.result
this.clearArr(this.workGroupList)
} else {
this.workGroupList = []
}
})
},
// 去掉内部工作组中空数组的subset
clearArr (arr) {
for (const item of arr) {
if (item.subset && item.subset.length <= 0) {
delete item.subset
}
if (item.subset) {
this.clearArr(item.subset)
}
}
},
handleWorkGroupChange ({ value, selectedOptions }) {
this.tempSelectedWorkGroup = selectedOptions.find(tt => tt.id === value) || {}
console.log(this.tempSelectedWorkGroup)