|
|
@ -32,9 +32,9 @@ import request from '@/common/request' |
|
|
|
return{ |
|
|
|
fields:{ |
|
|
|
plantBaseInfoId:{label:"基地名称",type:"select",columns:[[]],value:[],disabled:this.$store.getters['userInfo'].roleCode=="base_admin"}, |
|
|
|
plotNumber:{label:"地块编号"}, |
|
|
|
plotName:{label:"地块名称"}, |
|
|
|
drawArea:{label:"地块面积(亩)",type:'digit'}, |
|
|
|
plotNumber:{label:"地块编号"}, |
|
|
|
drawArea:{label:"勾画面积(亩)",disabled:true,type:'digit'}, |
|
|
|
realityArea:{label:"实际面积",type:'digit'}, |
|
|
|
image:{label:"地块图片",type:"upImg",num:3,value:''}, |
|
|
|
date:{label:"使用日期",type:"dateRange",value:[]}, |
|
|
@ -57,19 +57,19 @@ import request from '@/common/request' |
|
|
|
}, |
|
|
|
rules:{ |
|
|
|
plantBaseInfoId:{required:true, message:"基地名称必填!", trigger:"change"}, |
|
|
|
plotNumber:{required:true, message:"地块编号必填!", trigger:"blur"}, |
|
|
|
// plotNumber:{required:false, message:"地块编号必填!", trigger:"blur"}, |
|
|
|
plotName:{required:true, message:"地块名称必填!", trigger:"blur"}, |
|
|
|
drawArea:{required:true, type:'number', message:"地块面积必填!", trigger:"blur"}, |
|
|
|
// drawArea:{required:true, type:'number', message:"!", trigger:"blur"}, |
|
|
|
realityArea:{required:true, type:'number', message:"实际面积必填!", trigger:"blur"}, |
|
|
|
image:{required:true, type:"array", min:1, validator:(rule,val,call)=>{ |
|
|
|
if(this.fields.image.value.length<=0)call(new Error('地块图片必选!')); |
|
|
|
else call() |
|
|
|
}, trigger:"change"}, |
|
|
|
date:{required:true,validator:(rule,val,call)=>{ |
|
|
|
if(!this.fields.date.value[0])call(new Error('请选择开始时间!')); |
|
|
|
else if(!this.fields.date.value[1])call(new Error('请选择结束时间!')); |
|
|
|
else call() |
|
|
|
}, trigger:"change"} |
|
|
|
// date:{required:true,validator:(rule,val,call)=>{ |
|
|
|
// if(!this.fields.date.value[0])call(new Error('请选择开始时间!')); |
|
|
|
// else if(!this.fields.date.value[1])call(new Error('请选择结束时间!')); |
|
|
|
// else call() |
|
|
|
// }, trigger:"change"} |
|
|
|
}, |
|
|
|
eventChannel:null, |
|
|
|
} |
|
|
|