From b814067c2d9f4112a302ba961365a45663780870 Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Wed, 22 Feb 2023 12:17:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9C=B0=E5=9D=97=20?= =?UTF-8?q?=E5=9F=BA=E5=9C=B0=E3=80=81=E4=BC=81=E4=B8=9A=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=20=E9=BB=98=E8=AE=A4=E8=B4=9F=E8=B4=A3=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/massif/plant_plan.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/massif/plant_plan.vue b/pages/massif/plant_plan.vue index 91a8ed0..5aece1e 100644 --- a/pages/massif/plant_plan.vue +++ b/pages/massif/plant_plan.vue @@ -46,7 +46,7 @@ export default { {label:"普通",value:'4'}, ]}, plantBatch:{label:"种植批次号",btnText:"生成",btnFun:()=>this.formData.plantBatch=`ZZ${new Date().format('yyyyMMdd')}${new Date().getTime()}`}, - principal:{label:"负责人"}, + principal:{label:"负责人",disabled:/^baseAdmin$|^companyAdmin$/.test(this.$store.getters.userInfo.roleCode)}, principalId:{label:"负责人身份证"}, productIntroduce:{label:"产品介绍",type:"textarea"}, }, @@ -94,7 +94,11 @@ export default { await this.init() options.plotId && (this.formData.plotId=options.plotId) - options.id && this.getDetail(options.id) + if(options.id){ + this.getDetail(options.id) + }else if(/^baseAdmin$|^companyAdmin$/.test(this.$store.getters.userInfo.roleCode)){ + this.formData.principal=this.$store.getters.userInfo.realname + } }, methods:{ async init(){