From ffa65ff829e217ea9d95a335eb88d13758319c04 Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Wed, 28 Jun 2023 12:18:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=86=9C=E4=BA=8B=20=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=9C=E4=BA=8B=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/massif/add_farming.vue | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/pages/massif/add_farming.vue b/pages/massif/add_farming.vue index fa778e4..2672ad7 100644 --- a/pages/massif/add_farming.vue +++ b/pages/massif/add_farming.vue @@ -282,7 +282,9 @@ export default { methods:{ async init(){ //农事类型 - var res=await request("/api/plantFarming/listFarmName") + var res=await request("/api/plantFarming/listFarmName",{ + params:{baseId:this.$store.state.baseInfo.id} + }) if(res.statu){ this.typeList=res.data }else{ @@ -379,23 +381,25 @@ export default { }, async addType(){ if(this.tempType){ - var res=await request("/common/api/dict/addDictItem",{ - params:{ - text: this.tempType, - dictCode:"farming_type", - } - }) - if(res.statu){ + // var res=await request("/common/api/dict/addDictItem",{ + // params:{ + // text: this.tempType, + // dictCode:"farming_type", + // } + // }) + // if(res.statu){ this.isShow=false + this.typeList.push({label: this.tempType, value: this.tempType}) + this.formData.farmingType=this.tempType this.tempType='' - this.typeList.push({label: res.data.itemText, value: res.data.itemValue}) - }else{ - uni.showModal({ - title:"提示", - content:res.msg||"添加农资类型失败!", - showCancel:false, - }) - } + // this.typeList.push({label: res.data.itemText, value: res.data.itemValue}) + // }else{ + // uni.showModal({ + // title:"提示", + // content:res.msg||"添加农资类型失败!", + // showCancel:false, + // }) + // } }else{ uni.showToast({title:"请输入内容!",icon:"none"}) }