From ebada89fc589e1910445c0b66832b102ecde6ac7 Mon Sep 17 00:00:00 2001 From: zth <1205836521@qq.com> Date: Thu, 26 Dec 2024 09:47:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dikeBaseInfo/index.vue | 19 +- .../dikeBaseInfo/options/basePage.vue | 229 +++++++++--------- 2 files changed, 132 insertions(+), 116 deletions(-) diff --git a/src/views/dike/engineeringCondition/dikeBaseInfo/index.vue b/src/views/dike/engineeringCondition/dikeBaseInfo/index.vue index 469e9b4..c7760de 100644 --- a/src/views/dike/engineeringCondition/dikeBaseInfo/index.vue +++ b/src/views/dike/engineeringCondition/dikeBaseInfo/index.vue @@ -6,7 +6,7 @@ v-for="(item, index) in routeList" :key="item + index" :to="{ path: item.path }" - >{{ item.routeName }}{{ item.routeName }} 搜索 --> 重置重置 @@ -155,7 +155,7 @@ icon="el-icon-view" @click="handleUpdate(scope.row)" v-hasPermi="['yg:dikeInfo:view']" - >查看状况查看状况 @@ -468,7 +468,16 @@ export default { }, // 堤防型式字典翻译 dikePattFormat(row, column) { - return this.selectDictLabel(this.dikePattOptions, row.dikePatt); + // 将 row.dikePatt 按逗号分割成数组 + let dikePattArray = row.dikePatt.split(','); + + // 遍历数组,逐个元素查找字典的标签 + let formattedLabels = dikePattArray.map(code => { + return this.selectDictLabel(this.dikePattOptions, code); + }); + + // 将结果用逗号拼接 + return formattedLabels.join(', '); }, // 堤防类型字典翻译 dikeTypeFormat(row, column) { @@ -476,7 +485,7 @@ export default { }, // 堤防级别字典翻译 engGradFormat(row, column) { - return this.selectDictLabel(this.engGradOptions, row.engGrad); + return this.selectDictLabel(this.engGradOptions, row.dikeGrad); }, // 主要建筑物级别字典翻译 mainBuildGradFormat(row, column) { diff --git a/src/views/dike/engineeringCondition/dikeBaseInfo/options/basePage.vue b/src/views/dike/engineeringCondition/dikeBaseInfo/options/basePage.vue index b174420..f166edf 100644 --- a/src/views/dike/engineeringCondition/dikeBaseInfo/options/basePage.vue +++ b/src/views/dike/engineeringCondition/dikeBaseInfo/options/basePage.vue @@ -19,14 +19,14 @@ {{ this.form.dikeCode }} - - - - - - - - + + + + + + + + {{ dikePattFormat(this.form) }} @@ -47,19 +47,19 @@ {{ this.form.dikeEndLat }} - - - - + + + + {{ dikeTypeFormat(this.form) }} - - - - + + + + {{ engGradFormat(this.form) }} @@ -72,60 +72,55 @@ {{ this.form.mnun }} - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + {{ this.form.sluiceOverview }} - - - {{ this.form.sluiceOverview }} - - {{ this.form.startLoc }} @@ -138,26 +133,26 @@ {{ this.form.dikeLen }} - - - - - - - - + + + + + + + + {{ engTaskFormat(this.form) }} - - - - - - - - + + + + + + + + {{ this.form.dikePlnStda }} @@ -175,10 +170,10 @@ {{ this.form.dikeNotStdaLen }} - - - - + + + + {{ elevSysFormat(this.form) }} @@ -199,14 +194,14 @@ {{ this.form.dikeWawaMaxElev }} - - - - - - - - + + + + + + + + {{ this.form.dikeElevMin }} @@ -215,22 +210,22 @@ {{ this.form.dikeElevMax }} - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + {{ this.form.sluicesAmount }} @@ -518,7 +513,16 @@ export default { }, // 堤防型式字典翻译 dikePattFormat(row, column) { - return this.selectDictLabel(this.dikePattOptions, row.dikePatt); + // 将 row.dikePatt 按逗号分割成数组 + let dikePattArray = row.dikePatt.split(','); + + // 遍历数组,逐个元素查找字典的标签 + let formattedLabels = dikePattArray.map(code => { + return this.selectDictLabel(this.dikePattOptions, code); + }); + + // 将结果用逗号拼接 + return formattedLabels.join(', '); }, // 堤防类型字典翻译 dikeTypeFormat(row, column) { @@ -526,7 +530,7 @@ export default { }, // 堤防级别字典翻译 engGradFormat(row, column) { - return this.selectDictLabel(this.engGradOptions, row.engGrad); + return this.selectDictLabel(this.engGradOptions, row.dikeGrad); }, // 主要建筑物级别字典翻译 mainBuildGradFormat(row, column) { @@ -549,6 +553,9 @@ export default { }, // 高程系统字典翻译 elevSysFormat(row, column) { + if (row.elevSys.length < 2) { + row.elevSys = "0" + row.elevSys + } return this.selectDictLabel(this.elevSysOptions, row.elevSys); }, // 取消按钮