From 9bad0d61a7b9821d968211c0ee01919a9b4fa36e Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Wed, 8 Sep 2021 14:40:35 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=98=BE=E7=A4=BA=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E8=B0=83=E6=95=B4"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 5e5474ae --- src/jmapNew/shape/graph/Arrow/index.js | 2 +- src/jmapNew/shape/graph/AutoTurnBack/index.js | 2 +- src/jmapNew/shape/graph/AutomacticRoute/index.js | 2 +- src/jmapNew/shape/graph/AxleReset/index.js | 2 +- src/jmapNew/shape/graph/DirectionRod/index.js | 2 +- src/jmapNew/shape/graph/FloodGate/index.js | 2 +- src/jmapNew/shape/graph/GuideLock/index.js | 2 +- src/jmapNew/shape/graph/LcControl/index.js | 2 +- src/jmapNew/shape/graph/LimitControl/index.js | 2 +- src/jmapNew/shape/graph/Line/index.js | 2 +- src/jmapNew/shape/graph/OutFrame/index.js | 2 +- src/jmapNew/shape/graph/Power/index.js | 2 +- src/jmapNew/shape/graph/Psd/index.js | 2 +- src/jmapNew/shape/graph/Resource/index.js | 2 +- src/jmapNew/shape/graph/Responder/index.js | 2 +- src/jmapNew/shape/graph/SaidLamp/index.js | 2 +- src/jmapNew/shape/graph/Section/index.js | 2 +- src/jmapNew/shape/graph/Signal/index.js | 2 +- src/jmapNew/shape/graph/SignalButton/index.js | 2 +- src/jmapNew/shape/graph/SplitStation/index.js | 2 +- src/jmapNew/shape/graph/Station/index.js | 2 +- src/jmapNew/shape/graph/StationCounter/index.js | 2 +- src/jmapNew/shape/graph/StationDelayUnlock/index.js | 2 +- src/jmapNew/shape/graph/StationStand/index.js | 2 +- src/jmapNew/shape/graph/StationTurnBack/index.js | 2 +- src/jmapNew/shape/graph/Switch/index.js | 2 +- src/jmapNew/shape/graph/Text/index.js | 2 +- src/jmapNew/shape/graph/Train/index.js | 2 +- src/jmapNew/shape/graph/ZcControl/index.js | 2 +- src/jmapNew/theme/xian_01/menus/index.vue | 4 +--- src/store/modules/map.js | 6 +----- .../newMapdraft/mapoperate/displayConfig/dispatchConfig.vue | 5 +++-- 32 files changed, 34 insertions(+), 39 deletions(-) diff --git a/src/jmapNew/shape/graph/Arrow/index.js b/src/jmapNew/shape/graph/Arrow/index.js index d3abc7cdd..407539661 100644 --- a/src/jmapNew/shape/graph/Arrow/index.js +++ b/src/jmapNew/shape/graph/Arrow/index.js @@ -54,7 +54,7 @@ export default class Arrow extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.show(); this.isShowShape = true; this.setState(this.model); diff --git a/src/jmapNew/shape/graph/AutoTurnBack/index.js b/src/jmapNew/shape/graph/AutoTurnBack/index.js index fe9068545..864cc4252 100644 --- a/src/jmapNew/shape/graph/AutoTurnBack/index.js +++ b/src/jmapNew/shape/graph/AutoTurnBack/index.js @@ -173,7 +173,7 @@ export default class AutoTurnBack extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.isShowShape = true; this.showMode(); } else { diff --git a/src/jmapNew/shape/graph/AutomacticRoute/index.js b/src/jmapNew/shape/graph/AutomacticRoute/index.js index 3498c6402..9d36efa3d 100644 --- a/src/jmapNew/shape/graph/AutomacticRoute/index.js +++ b/src/jmapNew/shape/graph/AutomacticRoute/index.js @@ -138,7 +138,7 @@ export default class AutomacticRoute extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.isShowShape = true; this.showMode(); } else { diff --git a/src/jmapNew/shape/graph/AxleReset/index.js b/src/jmapNew/shape/graph/AxleReset/index.js index d5812cc85..d8582e78b 100644 --- a/src/jmapNew/shape/graph/AxleReset/index.js +++ b/src/jmapNew/shape/graph/AxleReset/index.js @@ -142,7 +142,7 @@ export default class AxleReset extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.isShowShape = true; this.showMode(); } else { diff --git a/src/jmapNew/shape/graph/DirectionRod/index.js b/src/jmapNew/shape/graph/DirectionRod/index.js index 7f3ad987e..e565710b0 100644 --- a/src/jmapNew/shape/graph/DirectionRod/index.js +++ b/src/jmapNew/shape/graph/DirectionRod/index.js @@ -98,7 +98,7 @@ export default class DirectionRod extends Group { } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.isShowShape = true; this.showMode(); } else { diff --git a/src/jmapNew/shape/graph/FloodGate/index.js b/src/jmapNew/shape/graph/FloodGate/index.js index 1103774e5..1b544c886 100644 --- a/src/jmapNew/shape/graph/FloodGate/index.js +++ b/src/jmapNew/shape/graph/FloodGate/index.js @@ -62,7 +62,7 @@ export default class FloodGate extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.isShowShape = true; this.showMode(); } else { diff --git a/src/jmapNew/shape/graph/GuideLock/index.js b/src/jmapNew/shape/graph/GuideLock/index.js index 22ac2311e..04c46cbeb 100644 --- a/src/jmapNew/shape/graph/GuideLock/index.js +++ b/src/jmapNew/shape/graph/GuideLock/index.js @@ -149,7 +149,7 @@ export default class GuideLock extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.isShowShape = true; this.showMode(); } else { diff --git a/src/jmapNew/shape/graph/LcControl/index.js b/src/jmapNew/shape/graph/LcControl/index.js index ba619d55c..468322f6d 100644 --- a/src/jmapNew/shape/graph/LcControl/index.js +++ b/src/jmapNew/shape/graph/LcControl/index.js @@ -89,7 +89,7 @@ export default class LcControl extends Group { } setShowMode() {} setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.control.show(); this.isShowShape = true; this.setState(this.model); diff --git a/src/jmapNew/shape/graph/LimitControl/index.js b/src/jmapNew/shape/graph/LimitControl/index.js index 02f6a9bba..d318cca2a 100644 --- a/src/jmapNew/shape/graph/LimitControl/index.js +++ b/src/jmapNew/shape/graph/LimitControl/index.js @@ -94,7 +94,7 @@ export default class LimitControl extends Group { } setShowMode() {} setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.control.show(); this.isShowShape = true; this.setState(this.model); diff --git a/src/jmapNew/shape/graph/Line/index.js b/src/jmapNew/shape/graph/Line/index.js index 4d2e17433..ccb30003f 100644 --- a/src/jmapNew/shape/graph/Line/index.js +++ b/src/jmapNew/shape/graph/Line/index.js @@ -106,7 +106,7 @@ export default class Line2 extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.segment && this.segment.show(); this.viceSegment && this.viceSegment.show(); this.isShowShape = true; diff --git a/src/jmapNew/shape/graph/OutFrame/index.js b/src/jmapNew/shape/graph/OutFrame/index.js index 58b2ba980..3d17b19f2 100644 --- a/src/jmapNew/shape/graph/OutFrame/index.js +++ b/src/jmapNew/shape/graph/OutFrame/index.js @@ -58,7 +58,7 @@ export default class OutFrame extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.box && this.box.show(); this.isShowShape = true; this.setState(this.model); diff --git a/src/jmapNew/shape/graph/Power/index.js b/src/jmapNew/shape/graph/Power/index.js index 59fe2591d..99563bc82 100644 --- a/src/jmapNew/shape/graph/Power/index.js +++ b/src/jmapNew/shape/graph/Power/index.js @@ -136,7 +136,7 @@ export default class Line2 extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.eachChild((child) => { child.show(); }); diff --git a/src/jmapNew/shape/graph/Psd/index.js b/src/jmapNew/shape/graph/Psd/index.js index e54be1fb2..e01796eac 100644 --- a/src/jmapNew/shape/graph/Psd/index.js +++ b/src/jmapNew/shape/graph/Psd/index.js @@ -92,7 +92,7 @@ export default class Line2 extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.eachChild(item => { item.show(); }); diff --git a/src/jmapNew/shape/graph/Resource/index.js b/src/jmapNew/shape/graph/Resource/index.js index 66e188d20..f90a5c02f 100644 --- a/src/jmapNew/shape/graph/Resource/index.js +++ b/src/jmapNew/shape/graph/Resource/index.js @@ -71,7 +71,7 @@ export default class Resource extends Group { } setShowMode() {} setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.image && this.image.show(); this.isShowShape = true; this.setState(this.model); diff --git a/src/jmapNew/shape/graph/Responder/index.js b/src/jmapNew/shape/graph/Responder/index.js index c58e09523..676a17802 100644 --- a/src/jmapNew/shape/graph/Responder/index.js +++ b/src/jmapNew/shape/graph/Responder/index.js @@ -189,7 +189,7 @@ export default class Responder extends Group { } setShowMode() {} setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.block && this.block.show(); this.isShowShape = true; this.setState(this.model); diff --git a/src/jmapNew/shape/graph/SaidLamp/index.js b/src/jmapNew/shape/graph/SaidLamp/index.js index e1bedff9f..b126ee18b 100644 --- a/src/jmapNew/shape/graph/SaidLamp/index.js +++ b/src/jmapNew/shape/graph/SaidLamp/index.js @@ -223,7 +223,7 @@ export default class SaidLamp extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.control && this.control.show(); this.isShowShape = true; this.setState(this.model); diff --git a/src/jmapNew/shape/graph/Section/index.js b/src/jmapNew/shape/graph/Section/index.js index ec75cdefe..33ace11cb 100644 --- a/src/jmapNew/shape/graph/Section/index.js +++ b/src/jmapNew/shape/graph/Section/index.js @@ -597,7 +597,7 @@ export default class Section extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.eachChild(item => { item.show(); }); diff --git a/src/jmapNew/shape/graph/Signal/index.js b/src/jmapNew/shape/graph/Signal/index.js index f557d9356..95c4d6151 100644 --- a/src/jmapNew/shape/graph/Signal/index.js +++ b/src/jmapNew/shape/graph/Signal/index.js @@ -1189,7 +1189,7 @@ class Signal extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.eachChild(item => { item.show(); }); diff --git a/src/jmapNew/shape/graph/SignalButton/index.js b/src/jmapNew/shape/graph/SignalButton/index.js index e406f7035..3ced63ed2 100644 --- a/src/jmapNew/shape/graph/SignalButton/index.js +++ b/src/jmapNew/shape/graph/SignalButton/index.js @@ -132,7 +132,7 @@ export default class SignalButton extends Group { setShowMode() { } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.eachChild(item => { item.show(); }); diff --git a/src/jmapNew/shape/graph/SplitStation/index.js b/src/jmapNew/shape/graph/SplitStation/index.js index 889ac5c28..0e075bc02 100644 --- a/src/jmapNew/shape/graph/SplitStation/index.js +++ b/src/jmapNew/shape/graph/SplitStation/index.js @@ -133,7 +133,7 @@ export default class SplitStation extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.eachChild(item => { item.show(); }); diff --git a/src/jmapNew/shape/graph/Station/index.js b/src/jmapNew/shape/graph/Station/index.js index 50b09ed83..49ef9ae33 100644 --- a/src/jmapNew/shape/graph/Station/index.js +++ b/src/jmapNew/shape/graph/Station/index.js @@ -784,7 +784,7 @@ export default class Station extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { if (this.model.visible) { this.eachChild(item => { item.show(); diff --git a/src/jmapNew/shape/graph/StationCounter/index.js b/src/jmapNew/shape/graph/StationCounter/index.js index 10e382313..7a74bbbf6 100644 --- a/src/jmapNew/shape/graph/StationCounter/index.js +++ b/src/jmapNew/shape/graph/StationCounter/index.js @@ -91,7 +91,7 @@ export default class StationCounter extends Group { } setShowMode() {} setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.eachChild(item => { item.show(); }); diff --git a/src/jmapNew/shape/graph/StationDelayUnlock/index.js b/src/jmapNew/shape/graph/StationDelayUnlock/index.js index 0231ebafa..3f061abf7 100644 --- a/src/jmapNew/shape/graph/StationDelayUnlock/index.js +++ b/src/jmapNew/shape/graph/StationDelayUnlock/index.js @@ -109,7 +109,7 @@ export default class StationDelayUnlock extends Group { } setShowMode() {} setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.eachChild(item => { item.show(); }); diff --git a/src/jmapNew/shape/graph/StationStand/index.js b/src/jmapNew/shape/graph/StationStand/index.js index f773dceb1..82d911d65 100644 --- a/src/jmapNew/shape/graph/StationStand/index.js +++ b/src/jmapNew/shape/graph/StationStand/index.js @@ -249,7 +249,7 @@ class StationStand extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code) && this.model.visible) { + if ((!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) && this.model.visible) { this.eachChild(item => { item.show(); }); diff --git a/src/jmapNew/shape/graph/StationTurnBack/index.js b/src/jmapNew/shape/graph/StationTurnBack/index.js index c7ede760b..5cb821923 100644 --- a/src/jmapNew/shape/graph/StationTurnBack/index.js +++ b/src/jmapNew/shape/graph/StationTurnBack/index.js @@ -199,7 +199,7 @@ export default class StationTurnBack extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.eachChild(item => { item.show(); }); diff --git a/src/jmapNew/shape/graph/Switch/index.js b/src/jmapNew/shape/graph/Switch/index.js index b90ee8602..565aedd83 100644 --- a/src/jmapNew/shape/graph/Switch/index.js +++ b/src/jmapNew/shape/graph/Switch/index.js @@ -811,7 +811,7 @@ export default class Switch extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.eachChild(item => { item.show(); }); diff --git a/src/jmapNew/shape/graph/Text/index.js b/src/jmapNew/shape/graph/Text/index.js index e128ca6b0..ee484fe2d 100644 --- a/src/jmapNew/shape/graph/Text/index.js +++ b/src/jmapNew/shape/graph/Text/index.js @@ -70,7 +70,7 @@ export default class Text2 extends Group { } } setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.eachChild(item => { item.show(); }); diff --git a/src/jmapNew/shape/graph/Train/index.js b/src/jmapNew/shape/graph/Train/index.js index 5a6236b64..a98851c87 100644 --- a/src/jmapNew/shape/graph/Train/index.js +++ b/src/jmapNew/shape/graph/Train/index.js @@ -462,7 +462,7 @@ export default class Train extends Group { } } setShowStation(stationCode) { - if (this.model.sectionModel && store.getters['map/checkDeviceShow'](stationCode, this.model.sectionModel.code)) { + if ((this.model.sectionModel && store.getters['map/checkDeviceShow'](stationCode, this.model.sectionModel.code)) || !stationCode) { this.eachChild(item => { item.show(); }); diff --git a/src/jmapNew/shape/graph/ZcControl/index.js b/src/jmapNew/shape/graph/ZcControl/index.js index e1e6250ca..04d21ab79 100644 --- a/src/jmapNew/shape/graph/ZcControl/index.js +++ b/src/jmapNew/shape/graph/ZcControl/index.js @@ -111,7 +111,7 @@ export default class ZcControl extends Group { } setShowMode() {} setShowStation(stationCode) { - if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { + if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) { this.eachChild(item => { item.show(); }); diff --git a/src/jmapNew/theme/xian_01/menus/index.vue b/src/jmapNew/theme/xian_01/menus/index.vue index ad6a6c05b..2d1c4fb81 100644 --- a/src/jmapNew/theme/xian_01/menus/index.vue +++ b/src/jmapNew/theme/xian_01/menus/index.vue @@ -148,9 +148,7 @@ export default { const roleDeviceCode = this.$store.state.training.roleDeviceCode; const displayList = this.$store.state.map.map.displayList; const display = displayList.find(each=>{ - if (each.type === 'LOCAL') { - return each.stationCodeList.includes(roleDeviceCode); - } + return each.stationCodeList.includes(roleDeviceCode); }); if (display) { const codeList = [...display.switchStationCodeList]; diff --git a/src/store/modules/map.js b/src/store/modules/map.js index d4b480abf..d6984df37 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -671,11 +671,7 @@ const map = { if (state.map && state.map.displayList && state.map.displayList.length) { let flag = false; state.map.displayList.forEach(item => { - if ( store.state.training.prdType === '01' && item.type === 'LOCAL' && item.stationCodeList.includes(stationCode) && item.elementList.includes(deviceCode)) { - flag = true; - } else if ( store.state.training.prdType === '02' && item.type === 'CENTER' && item.elementList.includes(deviceCode)) { - flag = true; - } else if ( store.state.training.prdType === '09' && item.type === 'DEPOT_IL' && item.elementList.includes(deviceCode)) { + if (item.stationCodeList.includes(stationCode) && item.elementList.includes(deviceCode)) { flag = true; } }); diff --git a/src/views/newMap/newMapdraft/mapoperate/displayConfig/dispatchConfig.vue b/src/views/newMap/newMapdraft/mapoperate/displayConfig/dispatchConfig.vue index cee399e27..12a892c63 100644 --- a/src/views/newMap/newMapdraft/mapoperate/displayConfig/dispatchConfig.vue +++ b/src/views/newMap/newMapdraft/mapoperate/displayConfig/dispatchConfig.vue @@ -142,12 +142,13 @@ export default { this.$emit('goDraw'); }, clear() { - this.addModel = { type: 'CENTER', elementList: []}; + this.addModel = {elementList: []}; }, generateData() { this.loading = true; - this.clear(); + this.tableData = []; const station = this.stationList.find(item => item.depot); + [...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList, ...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.indicatorLightList, ...this.lineList, ...this.outerFrameList, ...this.responderList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList].forEach(item => {