Merge branch 'test' of git.code.tencent.com:lian-cbtc/jl-client into test
This commit is contained in:
commit
9530acaa44
12
src/App.vue
12
src/App.vue
@ -89,10 +89,12 @@ export default {
|
||||
}
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
this.subscribe();
|
||||
openIndexedDB();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$store.dispatch('subscribe_un', {});
|
||||
},
|
||||
methods: {
|
||||
resizeHandler() {
|
||||
this.$store.dispatch('app/resize', { width: this._clientWidth, height: this._clientHeight });
|
||||
@ -110,14 +112,6 @@ export default {
|
||||
this.$store.dispatch('socket/setSimulationInvite');
|
||||
this.$store.dispatch('socket/setRoomInvite');
|
||||
}
|
||||
},
|
||||
subscribe() {
|
||||
const token = getToken();
|
||||
const path = window.location.pathname;
|
||||
if (token && this.$route.path != '/404' && !path.endsWith('login')) {
|
||||
const header = { group: '', 'X-Token': token };
|
||||
this.$store.dispatch('subscribe', {header, type: getSessionStorage('project')});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ export default class Resource extends Group {
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
create() { // 58
|
||||
const model = this.model;
|
||||
this.image = new Image({
|
||||
zlevel: this.zlevel,
|
||||
|
@ -110,7 +110,6 @@ export default {
|
||||
window.document.oncontextmenu = function () {
|
||||
return false;
|
||||
};
|
||||
console.log(this.mapData, '---------------');
|
||||
if (this.mapData && this.mapData.skinVO) {
|
||||
const parser = parserFactory(ParserType.Graph.value);
|
||||
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
|
||||
|
@ -141,6 +141,7 @@ export default {
|
||||
},
|
||||
doShow(selected, type) {
|
||||
// this.$root.$emit('dialogOpen', selected);
|
||||
if (!this.mapData) { this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map)); }
|
||||
this.selected = selected;
|
||||
this.type = type;
|
||||
this.dialogShow = true;
|
||||
@ -152,17 +153,14 @@ export default {
|
||||
loadData() {
|
||||
this.beforeSwitchList = [];
|
||||
this.beforeSectionList = [];
|
||||
if (this.mapData) {
|
||||
this.$refs.map.loadData(this.mapData);
|
||||
setTimeout(() => {
|
||||
if (this.type === 'rec') {
|
||||
this.clickEvent(this.selected.receivingRouteCode);
|
||||
} else if (this.type === 'dep') {
|
||||
this.clickEvent(this.selected.departureRouteCode);
|
||||
}
|
||||
}, 100);
|
||||
|
||||
}
|
||||
this.$refs.map.loadData(this.mapData);
|
||||
setTimeout(() => {
|
||||
if (this.type === 'rec') {
|
||||
this.clickEvent(this.selected.receivingRouteCode);
|
||||
} else if (this.type === 'dep') {
|
||||
this.clickEvent(this.selected.departureRouteCode);
|
||||
}
|
||||
}, 100);
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
|
@ -110,7 +110,6 @@ export default {
|
||||
window.document.oncontextmenu = function () {
|
||||
return false;
|
||||
};
|
||||
console.log(this.mapData, '---------------');
|
||||
if (this.mapData && this.mapData.skinVO) {
|
||||
const parser = parserFactory(ParserType.Graph.value);
|
||||
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
|
||||
|
@ -67,7 +67,14 @@ function handleRoute(to, next, loginPath) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function subscribe() {
|
||||
const token = getToken();
|
||||
const path = window.location.pathname;
|
||||
if (token && path != '/404' && !path.endsWith('login')) {
|
||||
const header = { group: '', 'X-Token': token };
|
||||
store.dispatch('subscribe', {header, type: getSessionStorage('project')});
|
||||
}
|
||||
}
|
||||
router.beforeEach( async (to, from, next) => {
|
||||
if (to.query.thirdJump) {
|
||||
setToken(to.query.key);
|
||||
@ -99,6 +106,7 @@ router.beforeEach( async (to, from, next) => {
|
||||
store.dispatch('setResourcesUrl', urlData.VOICE_API);
|
||||
store.dispatch('setUploadUrl', urlData.UPLOAD_API);
|
||||
store.dispatch('setBaseSite', urlData.BASE_SITE);
|
||||
subscribe();
|
||||
} catch (e) {
|
||||
const urlData = handlerUrl();
|
||||
store.dispatch('setBaseUrl', urlData.BASE_API);
|
||||
|
@ -54,7 +54,7 @@ export function creatSubscribe(topic, header) {
|
||||
}
|
||||
Vue.prototype.$stomp.subscribe(topic, callback, header);
|
||||
} catch (error) {
|
||||
console.error('websocket订阅失败');
|
||||
console.error('websocket订阅失败', error, topic, header);
|
||||
}
|
||||
}
|
||||
// 回调函数
|
||||
|
@ -50,14 +50,6 @@ export default {
|
||||
lazy: true,
|
||||
mapData: null,
|
||||
imageLists: [
|
||||
// {
|
||||
// value: `${process.env.VOICE_API}/oss/2d/bj1.png`,
|
||||
// label: this.$t('map.upside')
|
||||
// },
|
||||
// {
|
||||
// value: `${process.env.VOICE_API}/oss/2d/bj2.png`,
|
||||
// label: this.$t('map.hypomere')
|
||||
// }
|
||||
{
|
||||
value: `${this.$store.state.user.resourcesUrl}/PICTURE/2022-08-01/2292-98507.png`,
|
||||
label: '电流表'
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="路票"
|
||||
title="簿册"
|
||||
:visible="registerBookShow"
|
||||
fullscreen
|
||||
:before-close="doClose"
|
||||
|
Loading…
Reference in New Issue
Block a user