Commit ba9c4ac5 by 冒粤蓉

fix

1 parent fbdbcabd
......@@ -17,6 +17,10 @@ export default {
getFenceDetailById(params = {}) {
return request(params, '/trialdrive/fence/info', 'get')
},
// 查看原围栏
getUpdatedFenceDetail(params = {}) {
return request(params, '/trialdrive/fence/change/info', 'get')
},
getVehicleSnList(params = {}) {
return request(params, '/trialdrive/vehicle/linksns/search', 'get')
},
......
......@@ -46,7 +46,8 @@ function render({ data = {} , container } = {}) {
data(){
return {
parentRouter: data.router,
parentVuex: data.store
parentVuex: data.store,
parentCommon: data.common
}
},
render: h => h(App),
......
......@@ -573,24 +573,24 @@ export default{
listener() {
const state = history.state;
if(!state) {
this.init();
this.init(null);
return;
}
const { fenceId, readonlyStatus } = state;
const { fenceId, readonlyStatus, btnRemark } = state;
if(readonlyStatus) {
this.readonlyStatus = readonlyStatus;
this.fenceId = fenceId;
}
this.init();
this.init(btnRemark);
},
init(){
init(btnRemark){
const { id, btnText } = this.$route.query;
if(id) {
this.fenceId = id;
this.btnText = btnText;
}
if(typeof this.fenceId != 'undefined'){
this.getFenceDetail(this.fenceId);
btnRemark === 'viewUpdated' ? this.getUpdatedFenceDetail(this.fenceId) :this.getFenceDetail(this.fenceId);;
}else{
// 围栏编号无意义 屏蔽
// MONITOR_SERVICE.getNewFenceId().then((res)=>{
......@@ -619,8 +619,7 @@ export default{
}
})
},
getFenceDetail(id){
MONITOR_SERVICE.getFenceDetailById({fenceId: id}).then((res)=>{
getDetailData(res) {
if(res.code == 200){
const form = this.form;
const data = res.data;
......@@ -664,6 +663,15 @@ export default{
this.$refs.fenceMap.initFence(this.mapData);
}
},
getFenceDetail(id){
MONITOR_SERVICE.getFenceDetailById({fenceId: id}).then((res)=>{
this.getDetailData(res, id);
});
},
getUpdatedFenceDetail(id){
MONITOR_SERVICE.getUpdatedFenceDetail({fenceId: id}).then((res)=>{
this.getDetailData(res, id);
});
},
getFenceSnsList(id, cur, resData){
......
......@@ -276,6 +276,9 @@ export default{
this.total = total;
this.loading = false;
this.queryLoading = false;
this.$nextTick(()=> {
this.$root.parentCommon.setAuthBtn();
})
});
},
getParams(){
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!