|
@ -328,7 +328,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<u-picker v-if="isAdmin" :show="show" :columns="plantBase" keyName="baseName" closeOnClickOverlay @close="show=false" @confirm="selectBase" @cancel="show=false"/> |
|
|
<u-picker v-if="isAdmin" :show="show" :columns="plantBase" keyName="baseName" closeOnClickOverlay @close="show=false" @confirm="$store.commit('setBaseId', $event.value[0].id);show=false" @cancel="show=false"/> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -348,15 +348,17 @@ import request from '@/common/request.js' |
|
|
return this.$store.getters.userInfo.roleCode=='companyAdmin' |
|
|
return this.$store.getters.userInfo.roleCode=='companyAdmin' |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
|
|
|
watch:{ |
|
|
|
|
|
"$store.state.plantBaseInfoId"(n){ |
|
|
|
|
|
this.getMassif(n) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
onLoad() { |
|
|
onLoad() { |
|
|
if(this.isAdmin){ |
|
|
if(this.isAdmin){ |
|
|
this.getPlantBase() |
|
|
this.getPlantBase() |
|
|
}else{ |
|
|
}else{ |
|
|
this.getMassif(this.$store.getters['userInfo'].plantBaseInfoId) |
|
|
this.$store.commit("setBaseId", this.$store.getters['userInfo'].plantBaseInfoId) |
|
|
} |
|
|
} |
|
|
}, |
|
|
|
|
|
onShow(){ |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
//获取地块信息 |
|
|
//获取地块信息 |
|
@ -381,7 +383,7 @@ import request from '@/common/request.js' |
|
|
}) |
|
|
}) |
|
|
if(res.statu){ |
|
|
if(res.statu){ |
|
|
this.plantBase=[res.data] |
|
|
this.plantBase=[res.data] |
|
|
this.getMassif(res.data[0].id) |
|
|
this.$store.commit("setBaseId", res.data[0].id) |
|
|
}else{ |
|
|
}else{ |
|
|
uni.showModal({ |
|
|
uni.showModal({ |
|
|
title:"提示", |
|
|
title:"提示", |
|
@ -390,9 +392,6 @@ import request from '@/common/request.js' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
selectBase(e){ |
|
|
|
|
|
this.getMassif(e.value[0].id) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|