From 0bba5d051f13d6a5aee7b869f9afbc2c021b116d Mon Sep 17 00:00:00 2001 From: bb_pan Date: Sat, 5 Jul 2025 17:19:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=90=E6=96=99=E7=AB=99=E9=A2=86=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../toolsLease/outBound/component/addToolsApply.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/views/materialsStation/toolsLease/outBound/component/addToolsApply.vue b/src/views/materialsStation/toolsLease/outBound/component/addToolsApply.vue index 7518e132..89311470 100644 --- a/src/views/materialsStation/toolsLease/outBound/component/addToolsApply.vue +++ b/src/views/materialsStation/toolsLease/outBound/component/addToolsApply.vue @@ -396,7 +396,12 @@ export default { projectId: this.maForm.projectId }).then(res => { console.log('🚀 ~ getAgreementId ~ res:', res) - this.agreementId = res.data.agreementId + if (!res.data || !Array.isArray(res.data)) { + this.agreementId = [] + this.equipmentTypeList = [] + return + } + this.agreementId = res.data this.equipmentType() }) }, @@ -448,7 +453,11 @@ export default { }, /** 机具类型 */ equipmentType() { - equipmentTypeTree({ agreementId: this.agreementId }).then(response => { + equipmentTypeTree({ + agreementIdList: this.agreementId, + proId: this.maForm.projectId, + teamId: this.maForm.teamId + }).then(response => { this.equipmentTypeList = response.data // 处理并扁平化所有类型数据 this.flattenTypeOptions = this.processTypeData(response.data)