From 24bc9522319348ac4dad7156d627675e2ceb3718 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Fri, 4 Jul 2025 15:23:14 +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 --- .../toolsLease/apply/component/addToolsApply.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/views/materialsStation/toolsLease/apply/component/addToolsApply.vue b/src/views/materialsStation/toolsLease/apply/component/addToolsApply.vue index 92b6fad1..90df5b93 100644 --- a/src/views/materialsStation/toolsLease/apply/component/addToolsApply.vue +++ b/src/views/materialsStation/toolsLease/apply/component/addToolsApply.vue @@ -389,7 +389,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() }) }, @@ -441,7 +446,7 @@ export default { }, /** 机具类型 */ equipmentType() { - equipmentTypeTree({ agreementId: this.agreementId }).then(response => { + equipmentTypeTree({ agreementIdList: this.agreementId }).then(response => { this.equipmentTypeList = response.data // 处理并扁平化所有类型数据 this.flattenTypeOptions = this.processTypeData(response.data)