地区选择器增加组

This commit is contained in:
aixianling
2022-06-16 15:52:44 +08:00
parent 393e780440
commit aea629e58a
2 changed files with 70 additions and 40 deletions

View File

@@ -49,7 +49,8 @@ export default {
},
valueLevel() {
return this.$route.query.valueLevel || 5
}
},
extra: v => v.$route.query.extra
},
methods: {
getOptionsByRoot() {
@@ -77,8 +78,17 @@ export default {
this.selectList.push(row)
this.options = res.data.map(e => ({...e, isChecked: !!this.selected[e.id]}))
}
row.locked = false
})
}).finally(() => row.locked = false)
} else if (this.extra && !row.locked) {
row.locked = true
this.$http.post("/admin/appresident/queryAreaIdGroup", null, {
params: {currentAreaId: id}
}).then(res => {
if (res?.data) {
this.selectList.push(row)
this.options = res.data.map(id => ({id, name: id, isChecked: !!this.selected[id]}))
}
}).finally(() => row.locked = false)
}
},
selectListClick(row, index) {