From d5319fd04da9cb290ba6c3533b5a66efe6f6144c Mon Sep 17 00:00:00 2001 From: itcast Date: Tue, 18 Nov 2025 10:14:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/project/index.vue | 105 ++++++++++++++--------------- 1 file changed, 52 insertions(+), 53 deletions(-) diff --git a/src/views/system/project/index.vue b/src/views/system/project/index.vue index d5ce3faf..69dc6ff9 100644 --- a/src/views/system/project/index.vue +++ b/src/views/system/project/index.vue @@ -21,23 +21,23 @@ /> - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + @@ -292,19 +292,19 @@ - - - - - - + + + + + + @@ -364,12 +364,12 @@ @change="loadDistricts" :disabled="!addOrEditForm.province" > - + @@ -382,12 +382,12 @@ v-model="addOrEditForm.county" :disabled="!addOrEditForm.city" > - + @@ -577,7 +577,7 @@ export default { // 关键转换:将 areaCode → value,name → label this.provinceOptions = res.data.map(item => ({ value: item.areaCode, // 下拉框的选项值(存储用) - label: item.name // 下拉框的显示文本(用户看) + label: item.short_name // 下拉框的显示文本(用户看) })) } else { Message.error('加载省份失败:' + (res.message || '未知错误')) @@ -610,7 +610,7 @@ export default { if (res.code === 200) { this.cityOptions = res.data.map(item => ({ value: item.areaCode, - label: item.name + label: item.short_name })) } else { Message.error('加载城市失败') @@ -653,7 +653,6 @@ export default { }, - // 获取工程列表 async getProjectListData() { try { @@ -782,7 +781,7 @@ export default { const provinceCode = targetProvince ? targetProvince.value : ''; if (!provinceCode) { Message.warning(`未找到“${projectData.province}”对应的编码,请手动选择`); - this.addOrEditForm = { ...projectData }; // 这里也会使用处理后的数据 + this.addOrEditForm = {...projectData}; // 这里也会使用处理后的数据 this.addOrEditDialogVisible = true; return; }