From 40b0b7f065ca1966e482c2e3b618ba5863ccf5e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=9C=8B?= Date: Wed, 28 Feb 2024 15:11:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=A1=A9=E5=8F=B7=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JiHeExpressway/common/PresetFormItems.js | 20 +++++++++++++- .../views/jurisdictionalManagement/index.vue | 27 ++++++++++++++++--- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js b/ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js index 7f61b9c2..0b94fd25 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js +++ b/ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js @@ -132,6 +132,15 @@ export const startStation = { }, }, key: "startStakeMark[0]", + rules: [ + { + message: "请补全桩号", + callback(value, data) { + if (!value?.trim() && data.startStakeMark[1]?.trim()) return false + else return true + } + } + ] }, { prefix: { @@ -140,7 +149,7 @@ export const startStation = { color: "#3DE8FF", }, }, - key: "startStakeMark[1]", + key: "startStakeMark[1]" }, ], } @@ -161,6 +170,15 @@ export const endStation = { }, }, key: "endStakeMark[0]", + rules: [ + { + message: "请补全桩号", + callback(value, data) { + if (!value?.trim() && data.endStakeMark[1]?.trim()) return false + else return true + } + } + ] }, { prefix: { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/index.vue index ccf5c1e6..49065515 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/index.vue @@ -22,7 +22,13 @@ - @@ -120,7 +126,8 @@ export default { data: [], dialogData: null, editEventInformationDialogVisible: false, - isFirst: true + isFirst: true, + params: "sectionName", } }, created() { @@ -134,11 +141,23 @@ export default { ...this.getPagination() }; - if (this.searchData?.startStakeMark) result.startStakeMark = `K${this.searchData?.startStakeMark}`; - if (this.searchData?.endStakeMark) result.endStakeMark = `K${this.searchData?.endStakeMark}`; + result.startStakeMark = this.joinStakeMark(this.searchData?.startStakeMark); + result.endStakeMark = this.joinStakeMark(this.searchData?.endStakeMark); return result }, + //拼接桩号搜索条件 + joinStakeMark(datas) { + console.log("stakeMarks:",datas); + let stakeMark = null; + if (datas && datas[0]) { + if(!datas[1]){ + datas[1] = 0; + } + stakeMark = `K${datas[0]}+${datas[1]}`; + } + return stakeMark; + }, async handleDelete(data) { await confirm({ message: "是否要删除该辖段信息?" });