diff --git a/common/request.js b/common/request.js index f02fc6f..b292f9d 100644 --- a/common/request.js +++ b/common/request.js @@ -2,8 +2,8 @@ import store from "@/store" export function host(host='default',suffix='/plant_manage'){ var url=process.env.NODE_ENV === 'development'?{ - default:`http://zrxsae.natappfree.cc` //陈 - // default:`http://k3megd.natappfree.cc` //马 + // default:`http://zrxsae.natappfree.cc` //陈 + default:`http://uq5pak.natappfree.cc` //马 }:{ default:`http://qv6mj8.natappfree.cc` } diff --git a/pages/home/index.vue b/pages/home/index.vue index a5adcc5..4ddd170 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -328,7 +328,7 @@ - + @@ -348,15 +348,17 @@ import request from '@/common/request.js' return this.$store.getters.userInfo.roleCode=='companyAdmin' }, }, + watch:{ + "$store.state.plantBaseInfoId"(n){ + this.getMassif(n) + } + }, onLoad() { if(this.isAdmin){ this.getPlantBase() }else{ - this.getMassif(this.$store.getters['userInfo'].plantBaseInfoId) + this.$store.commit("setBaseId", this.$store.getters['userInfo'].plantBaseInfoId) } - }, - onShow(){ - }, methods: { //获取地块信息 @@ -381,7 +383,7 @@ import request from '@/common/request.js' }) if(res.statu){ this.plantBase=[res.data] - this.getMassif(res.data[0].id) + this.$store.commit("setBaseId", res.data[0].id) }else{ uni.showModal({ title:"提示", @@ -390,9 +392,6 @@ import request from '@/common/request.js' }) } }, - selectBase(e){ - this.getMassif(e.value[0].id) - } } } diff --git a/pages/massif/index.vue b/pages/massif/index.vue index ee40c50..fb8fdee 100644 --- a/pages/massif/index.vue +++ b/pages/massif/index.vue @@ -103,7 +103,7 @@ - + @@ -115,6 +115,7 @@ import request,{host} from '@/common/request' host:host('imgUrl'), searchVal:{ companyId:this.$store.getters.userInfo.companyId, + plantBaseInfoId:this.$store.state.plantBaseInfoId, search:"", pageNo:1, pageSize:5, diff --git a/pages/massif/mana/plantPlan.vue b/pages/massif/mana/plantPlan.vue index 2442067..abfe098 100644 --- a/pages/massif/mana/plantPlan.vue +++ b/pages/massif/mana/plantPlan.vue @@ -132,7 +132,7 @@ 已结束 - + diff --git a/pages/massif/mana/recovery.vue b/pages/massif/mana/recovery.vue index 572715d..901de2a 100644 --- a/pages/massif/mana/recovery.vue +++ b/pages/massif/mana/recovery.vue @@ -108,7 +108,7 @@ - + {{v.detailedParentName}} {{v.supplier}} - + diff --git a/pages/purchase/apply.vue b/pages/purchase/apply.vue index 6f1702c..f90f219 100644 --- a/pages/purchase/apply.vue +++ b/pages/purchase/apply.vue @@ -117,7 +117,7 @@ {{v.detailedParentName}} - + 添加物品 diff --git a/pages/purchase/detail.vue b/pages/purchase/detail.vue index 3b053eb..043cb02 100644 --- a/pages/purchase/detail.vue +++ b/pages/purchase/detail.vue @@ -73,7 +73,7 @@ {{v.detailedParentName}} {{v.supplier}} {{v.packing}} - + diff --git a/pages/purchase/record.vue b/pages/purchase/record.vue index d37dcdf..032ad58 100644 --- a/pages/purchase/record.vue +++ b/pages/purchase/record.vue @@ -94,8 +94,8 @@ - 审核人:章晓华 - 原因:此处是原因此处是原因此处是处是原因此处是原因此处是 + 审核人:xxx + 原因:此处是原因此处是原因此处是处是原因此处是原因此处是 {{({2:"审核中",3:"通过",4:"未通过",5:"农资入库"})[v.applicantStatus]}} diff --git a/static/noData.png b/static/noData.png new file mode 100644 index 0000000..7305230 Binary files /dev/null and b/static/noData.png differ diff --git a/store/index.js b/store/index.js index 4b31437..c0cc9c4 100644 --- a/store/index.js +++ b/store/index.js @@ -6,6 +6,7 @@ export default new Vuex.Store({ state:{ userInfo:{}, token:"", + plantBaseInfoId:"", }, getters:{ userInfo: state=>state.userInfo, @@ -29,6 +30,9 @@ export default new Vuex.Store({ setHeadImg(state,val){ state.userInfo.avatar=val }, + setBaseId(state, val){//基地id + state.plantBaseInfoId = val + }, }, actions:{