From f64614d240cf20d8e0d809a36314d511e5e218c6 Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Mon, 27 Feb 2023 10:44:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=9A=E9=80=89=E8=A1=A8?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/massif/pestRecord.vue | 7 ++++--- uni_modules/d-form/components/d-form/d-form.vue | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pages/massif/pestRecord.vue b/pages/massif/pestRecord.vue index e9af947..b470754 100644 --- a/pages/massif/pestRecord.vue +++ b/pages/massif/pestRecord.vue @@ -14,8 +14,9 @@ :field="k" v-bind="v" :required="!!rules[k]" - :value="/^$/.test(v.type)?fields[k].value:formData[k]" + :value="/^checkBox$/.test(v.type)?fields[k].value:formData[k]" @input="formData[k]=$event" + @checkBox="fields[k].value=$event;formData[k]=$event.join(',')" @select="formData[k]=$event[0].value" @imgs="fields[k].value=$event"/> @@ -29,7 +30,7 @@ export default { return{ fields:{ growthProcess:{label:"作物生长过程",type:"select-tab",dictCode:"growth_process"}, - pestSite:{label:"病虫害部位",type:"checkBox",columns:[{label:"根",value:"根"},{label:"茎",value:"茎"},{label:"叶",value:"叶"}]}, + pestSite:{label:"病虫害部位",type:"checkBox",value:[],columns:[{label:"根",value:"根"},{label:"茎",value:"茎"},{label:"叶",value:"叶"}]}, symptom:{label:"显著症状",type:"select-tab",dictCode:"symptom"}, medicationArea:{label:"农资作用面积",type:"digit",suffix:"亩"}, pic:{label:"凭证",type:"upImg",value:""}, @@ -45,7 +46,7 @@ export default { }, rules:{ growthProcess:{required:true,message:"请选择作物生长过程!",trigger:['blur','change']}, - pestSite:{required:true,message:"请选择病虫害部位!",type:"array",trigger:['blur','change']}, + pestSite:{required:true,message:"请选择病虫害部位!",trigger:['blur','change']}, symptom:{required:true,message:"请选择显著症状!",trigger:['blur','change']}, medicationArea:{required:true,message:"请输入农资作用面积!",type:"number",trigger:['blur','change']}, pic:{required:true,validator:(rule,val,call)=>{ diff --git a/uni_modules/d-form/components/d-form/d-form.vue b/uni_modules/d-form/components/d-form/d-form.vue index f5f6416..21056bb 100644 --- a/uni_modules/d-form/components/d-form/d-form.vue +++ b/uni_modules/d-form/components/d-form/d-form.vue @@ -302,7 +302,7 @@ - +