From be0f2022e21c63f7b560bdb54e29ea659570c2e7 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Thu, 15 Jan 2026 14:08:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/EquipmentLedger/index.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/views/EquipmentLedger/index.vue b/src/views/EquipmentLedger/index.vue index 61c8a419..6eff1710 100644 --- a/src/views/EquipmentLedger/index.vue +++ b/src/views/EquipmentLedger/index.vue @@ -1000,6 +1000,7 @@ export default { async getDeptTreeSelect() { const res = await deptTreeSelect() this.propertyUnitList = this.filterTree(res.data) + console.log('🚀 ~ this.propertyUnitList:', this.propertyUnitList) }, filterTree(nodes) { return nodes @@ -1669,14 +1670,14 @@ export default { await this.getDeptTreeSelect().catch(() => {}) const params = this.$route.query this.queryParams.propertyUnitId = params?.deptId || '' - if (params && params.parentId) { - this.queryParams.propertyUnitIds.push(Number(params.parentId)) - if (params.deptId) { - this.queryParams.propertyUnitIds.push(Number(params.deptId)) - } - } else if (params && params.deptId) { - this.queryParams.propertyUnitIds.push(Number(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.getProvinceList() this.getFirstLevel() this.getManufacturerSelectList()