Merge branch 'test' of git.code.tencent.com:lian-cbtc/jl-client into test

This commit is contained in:
yuan 2021-09-13 14:22:50 +08:00
commit 106307b9cc
6 changed files with 14 additions and 15 deletions

View File

@ -47,7 +47,7 @@ export default class OutFrame extends Group {
}
}
recover() {
this.box && this.box.hide();
this.box && this.box.show();
}
// 设置显示模式
setShowMode() {

View File

@ -4,7 +4,7 @@ import systemGraphShape from './systemGraph';
export default {
__Shape: {
...graphMapShape,
...systemGraphShape
// ...systemGraphShape
},
getBuilder(type) {
const ShapeClazz = this.__Shape[type];

View File

@ -664,15 +664,15 @@ const map = {
return device
},
checkDeviceShow: state => (stationCode, deviceCode) => {
if (state.map && state.map.displayList && state.map.displayList.length) {
checkDeviceShow: state => deviceCode => {
if (state.map && state.map.displayList && state.map.displayList.length && store.state.training.prdType) {
let flag = false
const stationCode = state.showCentralizedStationCode
state.map.displayList.forEach(item => {
if (
store.state.training.prdType === '01' &&
item.type === 'LOCAL' &&
item.stationCodeList.includes(stationCode) &&
item.elementList.includes(deviceCode)
((item.stationCodeList.includes(stationCode) && item.elementList.includes(deviceCode)) || !stationCode)
) {
flag = true
} else if (store.state.training.prdType === '02' && item.type === 'CENTER' && item.elementList.includes(deviceCode)) {
@ -750,13 +750,12 @@ const map = {
showConfig = Vue.prototype.$jlmap.getShowConfig()
}
Object.keys(data).forEach(key => {
state.map[key] = [...state.map[key], ...data[key]]
state.map[key] = deepAssign(state.map[key] || {}, data[key])
})
const parser = parserFactory(ParserType.Graph.value)
state.mapDevice = parser.parser(state.map, state.map.skinVO.code, showConfig)
Vue.prototype.$jlmap && Vue.prototype.$jlmap.setMapDevice(state.mapDevice)
Vue.prototype.$jlmap && Vue.prototype.$jlmap.$painter.repaint(state.mapDevice)
Vue.prototype.$jlmap && Vue.prototype.$jlmap.setDefaultState(state.mapDevice)
},
updateMapDevice: (state, list) => {
list.forEach(elem => {

View File

@ -488,7 +488,7 @@ export default {
setShowMode(showMode) {
if (this.showMode !== showMode) {
this.setShowStation('');
this.localStationShow && this.$refs.switchStation.inintShowStation();
this.localStationShow && this.$refs.switchStation.initShowStation();
}
this.showMode = showMode;
const nameList = Object.keys(this.$store.state.map.map || {});
@ -501,10 +501,6 @@ export default {
this.$jlmap.updateShowMode(list, showMode);
},
setShowStation(stationCode, setCenter) {
const lineCode = this.$store.getters['map/lineCode'];
// if (lineCode === '02' || lineCode === '05') {
// !setCenter && this.setCenter(stationCode);
// } else {
const list = [];
const mapDevice = this.$store.state.map.mapDevice;
for (const key in mapDevice) {

View File

@ -26,9 +26,10 @@ export default {
return {
offsetY: 15,
offsetX: 150,
swch: '02',
swch: 'all',
rightWidth: 0,
swchList: [
{ value: 'all', name: '全部' },
{ value: '02', name: '行调' },
{ value: '03', name: '现地' },
{ value: '04', name: '大屏' }
@ -99,6 +100,8 @@ export default {
this.offsetX = 140 + this.rightWidth;
}
}
const map = { all: '', '02': '02', '03': '01', '04': '02' };
this.$store.dispatch('training/setPrdType', map[val]);
this.$emit('setShowMode', val);
}
}

View File

@ -77,7 +77,8 @@ export default {
}
});
},
inintShowStation() {
initShowStation() {
this.$store.dispatch('map/setShowCentralizedStationCode', '');
this.showStation = '';
},
setOffsetX() {