This commit is contained in:
bb_pan 2026-01-15 14:08:56 +08:00
parent 5307112844
commit be0f2022e2
1 changed files with 8 additions and 7 deletions

View File

@ -1000,6 +1000,7 @@ export default {
async getDeptTreeSelect() { async getDeptTreeSelect() {
const res = await deptTreeSelect() const res = await deptTreeSelect()
this.propertyUnitList = this.filterTree(res.data) this.propertyUnitList = this.filterTree(res.data)
console.log('🚀 ~ this.propertyUnitList:', this.propertyUnitList)
}, },
filterTree(nodes) { filterTree(nodes) {
return nodes return nodes
@ -1669,14 +1670,14 @@ export default {
await this.getDeptTreeSelect().catch(() => {}) await this.getDeptTreeSelect().catch(() => {})
const params = this.$route.query const params = this.$route.query
this.queryParams.propertyUnitId = params?.deptId || '' this.queryParams.propertyUnitId = params?.deptId || ''
if (params && params.parentId) { const ids = []
this.queryParams.propertyUnitIds.push(Number(params.parentId)) if (params?.parentId) {
if (params.deptId) { ids.push(params.parentId)
this.queryParams.propertyUnitIds.push(Number(params.deptId))
}
} else if (params && params.deptId) {
this.queryParams.propertyUnitIds.push(Number(params.deptId))
} }
if (params?.deptId) {
ids.push(params.deptId)
}
this.queryParams.propertyUnitIds = [...ids.map(Number)]
this.getProvinceList() this.getProvinceList()
this.getFirstLevel() this.getFirstLevel()
this.getManufacturerSelectList() this.getManufacturerSelectList()