|
@ -367,15 +367,14 @@ import request,{host} from '@/common/request' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad() { |
|
|
onLoad() { |
|
|
// uni.setTabBarItem({ |
|
|
|
|
|
// index:0, |
|
|
|
|
|
// pagePath:"/pages/home/rePassword" |
|
|
|
|
|
// }) |
|
|
|
|
|
this.getHeadImg() |
|
|
this.getHeadImg() |
|
|
if(this.isAdmin){ |
|
|
if(this.isAdmin){ |
|
|
this.getPlantBase() |
|
|
this.getPlantBase() |
|
|
}else{ |
|
|
}else{ |
|
|
this.getBaseName(this.$store.getters['userInfo'].plantBaseInfoId) |
|
|
this.$store.commit("setBaseId", { |
|
|
|
|
|
id: this.$store.getters['userInfo'].plantBaseInfoId, |
|
|
|
|
|
name: this.$store.getters['userInfo'].plantBaseInfoName |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
this.$provise.on("updateMassif", this.getMassif) |
|
|
this.$provise.on("updateMassif", this.getMassif) |
|
|
this.$provise.on("updateStock", this.getStock) |
|
|
this.$provise.on("updateStock", this.getStock) |
|
@ -438,20 +437,20 @@ import request,{host} from '@/common/request' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
//获取基地名称 |
|
|
//获取基地名称 |
|
|
async getBaseName(plantBaseInfoId){ |
|
|
// async getBaseName(plantBaseInfoId){ |
|
|
var res=await request("/api/purchase/purchaseUserShow",{ |
|
|
// var res=await request("/api/purchase/purchaseUserShow",{ |
|
|
params:{plantBaseInfoId} |
|
|
// params:{plantBaseInfoId} |
|
|
}) |
|
|
// }) |
|
|
if(res.statu){ |
|
|
// if(res.statu){ |
|
|
this.$store.commit("setBaseId", {id:plantBaseInfoId,name:res.data.baseName}) |
|
|
// this.$store.commit("setBaseId", {id:plantBaseInfoId,name:res.data.baseName}) |
|
|
}else{ |
|
|
// }else{ |
|
|
uni.showModal({ |
|
|
// uni.showModal({ |
|
|
title:"提示", |
|
|
// title:"提示", |
|
|
content:res.msg||"获取基地名称失败!", |
|
|
// content:res.msg||"获取基地名称失败!", |
|
|
showCancel:false, |
|
|
// showCancel:false, |
|
|
}) |
|
|
// }) |
|
|
} |
|
|
// } |
|
|
}, |
|
|
// }, |
|
|
async getBaseInfo(){ |
|
|
async getBaseInfo(){ |
|
|
if(this.$store.state.baseInfo.id){ |
|
|
if(this.$store.state.baseInfo.id){ |
|
|
var res=await request("/api/plantIndex/queryFarmWorkAndInput",{ |
|
|
var res=await request("/api/plantIndex/queryFarmWorkAndInput",{ |
|
|