diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/data.js index 5960c430..26ebccb4 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/data.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/data.js @@ -16,6 +16,19 @@ const station = { }, }, key: "stakeMark[0]", + rules: [ + { + message: "请补全桩号", + callback(value, data) { + if (value || data.stakeMark[1]){ + return /^0\d{2}|\d{3}$/.test(value); + } else { + return true + } + }, + } + ], + }, { prefix: { @@ -25,6 +38,18 @@ const station = { }, }, key: "stakeMark[1]", + rules: [ + { + message: "请补全桩号", + callback(value, data) { + if (value || data.stakeMark[0]){ + return /^0\d{2}|\d{3}$/.test(value); + } else { + return true + } + }, + } + ], }, ], }, @@ -214,9 +239,33 @@ export const searchFormList = [ options: [ { key: "endStakeMark[0]", + rules: [ + { + message: "请补全桩号", + callback(value, data) { + if (value || data.endStakeMark[1]){ + return /^0\d{2}|\d{3}$/.test(value); + } else { + return true + } + }, + } + ], }, { key: "endStakeMark[1]", + rules: [ + { + message: "请补全桩号", + callback(value, data) { + if (value || data.endStakeMark[0]){ + return /^0\d{2}|\d{3}$/.test(value); + } else { + return true + } + }, + } + ], }, ], }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/index.vue index 96b43006..4391926f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/index.vue @@ -135,7 +135,7 @@ export default { }, onExport() { let url ='/business/warning/export' - + let loadingInstance = Loading.service({ fullscreen: true, background: "#00000052", @@ -230,13 +230,13 @@ export default { warningSource: data?.warningSource || '', direction: data.direction, startTime: daterange && daterange.length > 0 ? daterange[0] : "", - endTime: this.activeName != "-1" && daterange && daterange.length > 0 ? daterange[1] : "", - completeTime: this.activeName == "-1" && daterange && daterange.length > 0 ? daterange[1] : "", + // endTime: this.activeName != "-1" && daterange && daterange.length > 0 ? daterange[1] : "", + completeTime: daterange && daterange.length > 0 ? daterange[1] : "", startStakeMark: stakeMark, endStakeMark: endStakeMark, }; console.log(this.searchData) - // this.getData(); + this.getData(); } }, };