|
@ -305,7 +305,7 @@ |
|
|
<view style="display:flex;"> |
|
|
<view style="display:flex;"> |
|
|
<view class="card mana"> |
|
|
<view class="card mana"> |
|
|
<view class="title"> |
|
|
<view class="title"> |
|
|
<text class="plant-dikuaimianji"/> 地块管理 <text class="more" @click="toMassif">更多>></text> |
|
|
<text class="plant-dikuaimianji"/> 地块管理 <text class="more" @click="$u.route({type:'switchTab',url:'pages/massif/index'})">更多>></text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="item" v-for="(v,k) in massif.plotList||[]" :key="k"> |
|
|
<view class="item" v-for="(v,k) in massif.plotList||[]" :key="k"> |
|
|
<text class="over">{{v.plotName}}</text> <text>{{v.realityArea}}亩</text> |
|
|
<text class="over">{{v.plotName}}</text> <text>{{v.realityArea}}亩</text> |
|
@ -391,9 +391,9 @@ import request,{host} from '@/common/request.js' |
|
|
}, |
|
|
}, |
|
|
watch:{ |
|
|
watch:{ |
|
|
"$store.state.plantBaseInfoId"(n){ |
|
|
"$store.state.plantBaseInfoId"(n){ |
|
|
this.getMassif(n) |
|
|
this.getMassif() |
|
|
this.getBaseInfo(n) |
|
|
this.getBaseInfo() |
|
|
this.getStock(n) |
|
|
this.getStock() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad() { |
|
|
onLoad() { |
|
@ -403,6 +403,8 @@ import request,{host} from '@/common/request.js' |
|
|
}else{ |
|
|
}else{ |
|
|
this.$store.commit("setBaseId", this.$store.getters['userInfo'].plantBaseInfoId) |
|
|
this.$store.commit("setBaseId", this.$store.getters['userInfo'].plantBaseInfoId) |
|
|
} |
|
|
} |
|
|
|
|
|
this.$provise.on("updateMassif", this.getMassif()) |
|
|
|
|
|
this.$provise.on("updateStock", this.getStock()) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
async getHeadImg(){ |
|
|
async getHeadImg(){ |
|
@ -412,9 +414,9 @@ import request,{host} from '@/common/request.js' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
//获取地块信息 |
|
|
//获取地块信息 |
|
|
async getMassif(plantBaseId){ |
|
|
async getMassif(){ |
|
|
var res=await request("/api/plantIndex/queryPlot",{ |
|
|
var res=await request("/api/plantIndex/queryPlot",{ |
|
|
params:{plantBaseId} |
|
|
params:{plantBaseId: this.$store.state.plantBaseInfoId} |
|
|
}) |
|
|
}) |
|
|
if(res.statu){ |
|
|
if(res.statu){ |
|
|
this.massif=res.data |
|
|
this.massif=res.data |
|
@ -442,9 +444,9 @@ import request,{host} from '@/common/request.js' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
async getBaseInfo(plantBaseId){ |
|
|
async getBaseInfo(){ |
|
|
var res=await request("/api/plantIndex/queryFarmWorkAndInput",{ |
|
|
var res=await request("/api/plantIndex/queryFarmWorkAndInput",{ |
|
|
params:{plantBaseId} |
|
|
params:{plantBaseId: this.$store.state.plantBaseInfoId} |
|
|
}) |
|
|
}) |
|
|
if(res.statu){ |
|
|
if(res.statu){ |
|
|
this.baseInfo=res.data |
|
|
this.baseInfo=res.data |
|
@ -457,9 +459,9 @@ import request,{host} from '@/common/request.js' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 获取仓库 |
|
|
// 获取仓库 |
|
|
async getStock(baseId){ |
|
|
async getStock(){ |
|
|
var res=await request("/api/plantIndex/queryWarehouse",{ |
|
|
var res=await request("/api/plantIndex/queryWarehouse",{ |
|
|
params:{baseId} |
|
|
params:{baseId: this.$store.state.plantBaseInfoId} |
|
|
}) |
|
|
}) |
|
|
if(res.statu){ |
|
|
if(res.statu){ |
|
|
this.stockList=res.data |
|
|
this.stockList=res.data |
|
@ -471,6 +473,10 @@ import request,{host} from '@/common/request.js' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
} |
|
|
}, |
|
|
|
|
|
onUnload(){ |
|
|
|
|
|
this.$provise.off("updateMassif") |
|
|
|
|
|
this.$provise.off("updateStock") |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|