From 5935c10e4e4e6bdde0454ead4cb0b3c52b8bc1f4 Mon Sep 17 00:00:00 2001 From: limingtao <@ming_tao_li> Date: Tue, 30 Jul 2024 14:44:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=85=E5=A1=AB=E5=AD=97=E6=AE=B5=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/investigation/task.vue | 55 ++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/pages/investigation/task.vue b/pages/investigation/task.vue index 41b7763..a88f451 100644 --- a/pages/investigation/task.vue +++ b/pages/investigation/task.vue @@ -32,7 +32,7 @@ - + 隐患信息 @@ -65,15 +65,15 @@ {{sectionName}} - + - {{ formData.roadType }} - + @@ -81,12 +81,12 @@ - + {{ formData.laneCount }} - + @@ -113,7 +113,7 @@ - + @@ -121,7 +121,7 @@ Km/h - + @@ -381,9 +381,8 @@ @@ -513,6 +512,18 @@ designSpeed: "", limitSpeed: "", }, + rules: { + // 对name字段进行必填验证 + roadType: { + rules: [{ + required: true, + errorMessage: '请选择道路类型', + }, + + ] + }, + + }, describe: { bigCategory: "", smallCategory: "", @@ -1229,6 +1240,25 @@ ); } }, + bottomButtonTwo(){ + if(!this.formData.roadType){ + return this.$.toast("请输入道路类型"); + } + if(!this.formData.roadWidth){ + return this.$.toast("请输入道路宽度"); + } + if(!this.formData.laneCount){ + return this.$.toast("请输入车道数"); + } + if(!this.formData.designSpeed){ + return this.$.toast("请输入设计时速"); + } + if(!this.formData.limitSpeed){ + return this.$.toast("请输入限速"); + } + this.isEdit = false; + this.active = 2; + }, submit(temporary) { //查看情况下 直接返回上一页 if (this.type == 'view') { @@ -1828,4 +1858,7 @@ .border-top { border-top: 1px #eee solid; } + // .uni-forms-item__labe{ + // width: ; + // } \ No newline at end of file