|
|
@ -31,7 +31,7 @@ import request from '@/common/request' |
|
|
|
data(){ |
|
|
|
return{ |
|
|
|
fields:{ |
|
|
|
plantBaseInfoId:{label:"基地名称",type:"select",columns:[[]],value:[],disabled:this.$store.getters['userInfo'].roleCode=="baseAdmin"}, |
|
|
|
plantBaseInfoId:{label:"基地名称",type:"select",columns:[[]],value:[],disabled:this.$store.getters['userInfo'].roleCode=="base_admin"}, |
|
|
|
plotNumber:{label:"地块编号"}, |
|
|
|
plotName:{label:"地块名称"}, |
|
|
|
drawArea:{label:"地块面积(亩)",type:'digit'}, |
|
|
@ -78,7 +78,7 @@ import request from '@/common/request' |
|
|
|
await this.init() |
|
|
|
if(options.id){ |
|
|
|
this.getDetail(options.id) |
|
|
|
}else if(this.$store.getters['userInfo'].roleCode=="baseAdmin"){ |
|
|
|
}else if(this.$store.getters['userInfo'].roleCode=="base_admin"){ |
|
|
|
var baseVal=this.fields.plantBaseInfoId.columns[0].find(v=>v.value==this.$store.state.baseInfo.id) |
|
|
|
if(baseVal){ |
|
|
|
this.formData.plantBaseInfoId=baseVal.value |
|
|
|