This commit is contained in:
bb_pan 2026-01-13 17:39:06 +08:00
parent 71b66ac8c5
commit b35aad7a51
3 changed files with 32 additions and 12 deletions

View File

@ -258,10 +258,12 @@ export default {
});
this.$router.push({
path: '/equipment/codeToolsLedger',
query: { parentId: rowData.parentId, deptId: rowData.companyId }
});
} else if (type === 'toolNum') {
this.$router.push({
path: '/equipment/toolsLedger',
query: { parentId: rowData.parentId, deptId: rowData.companyId }
});
}
},

View File

@ -515,8 +515,18 @@ export default {
number: 0, //
}
},
created() {
this.getDeptTreeSelect()
async created() {
await this.getDeptTreeSelect()
const params = this.$route.query
this.queryParams.propertyUnitId = params?.deptId || ''
const ids = []
if (params?.parentId) {
ids.push(params.parentId)
}
if (params?.deptId) {
ids.push(params.deptId)
}
this.queryParams.propertyUnitIds = [...ids.map(Number)]
this.getList()
this.getSelectList()
},
@ -529,10 +539,9 @@ export default {
this.queryParams.propertyUnitId = value[value.length - 1]
},
//
getDeptTreeSelect() {
deptTreeSelect().then((res) => {
this.propertyUnitList = this.filterTree(res.data)
})
async getDeptTreeSelect() {
const res = await deptTreeSelect()
this.propertyUnitList = this.filterTree(res.data)
},
filterTree(nodes) {
return nodes

View File

@ -395,8 +395,18 @@ export default {
dialogList: []
}
},
created() {
this.getDeptTreeSelect()
async created() {
await this.getDeptTreeSelect()
const params = this.$route.query
this.queryParams.propertyUnitId = params?.deptId || ''
const ids = []
if (params?.parentId) {
ids.push(params.parentId)
}
if (params?.deptId) {
ids.push(params.deptId)
}
this.queryParams.propertyUnitIds = [...ids.map(Number)]
this.getList()
this.getSelectList()
this.getToolTree()
@ -410,10 +420,9 @@ export default {
this.queryParams.propertyUnitId = value[value.length - 1]
},
//
getDeptTreeSelect() {
deptTreeSelect().then((res) => {
this.propertyUnitList = this.filterTree(res.data)
})
async getDeptTreeSelect() {
const res = await deptTreeSelect()
this.propertyUnitList = this.filterTree(res.data)
},
filterTree(nodes) {
return nodes