diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 3a413beed..ad9dba79e 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -307,7 +307,7 @@ class Jlmap { } }); - const prdType2ShowMode = { '01': '03', '02': '02', '09': '09'}; + const prdType2ShowMode = { '01': '03', '02': '02'}; const showMode = prdType2ShowMode[this.showConfig.prdType]; const stationCode = this.stationCode; diff --git a/src/jmapNew/shape/graph/Line/index.js b/src/jmapNew/shape/graph/Line/index.js index cd37dce2a..4d2e17433 100644 --- a/src/jmapNew/shape/graph/Line/index.js +++ b/src/jmapNew/shape/graph/Line/index.js @@ -104,9 +104,6 @@ export default class Line2 extends Group { this.segment && this.segment.hide(); this.viceSegment && this.viceSegment.hide(); } - if (store.state.training.prdType === '09') { - this.text && this.text.hide(); - } } setShowStation(stationCode) { if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { diff --git a/src/jmapNew/shape/graph/Section/index.js b/src/jmapNew/shape/graph/Section/index.js index a181b1460..ec75cdefe 100644 --- a/src/jmapNew/shape/graph/Section/index.js +++ b/src/jmapNew/shape/graph/Section/index.js @@ -580,7 +580,6 @@ export default class Section extends Group { this.eachChild(item => { item.show(); }); - this.isShowShape = true; this.setState(this.model); } if (this.model.showMode === '05') { @@ -621,6 +620,7 @@ export default class Section extends Group { if (this.reentryTrackText) { this.model.reentryTrackNameShow ? this.reentryTrackText.show() : this.reentryTrackText.hide(); } + this.setState(this.model); } else { this.eachChild(item => { diff --git a/src/jmapNew/shape/graph/Signal/index.js b/src/jmapNew/shape/graph/Signal/index.js index db4696044..f557d9356 100644 --- a/src/jmapNew/shape/graph/Signal/index.js +++ b/src/jmapNew/shape/graph/Signal/index.js @@ -1174,7 +1174,6 @@ class Signal extends Group { this.eachChild(item => { item.show(); }); - this.isShowShape = true; this.setState(this.model); } if (showMode == '03') { diff --git a/src/jmapNew/shape/graph/Switch/index.js b/src/jmapNew/shape/graph/Switch/index.js index c47db7bd8..b90ee8602 100644 --- a/src/jmapNew/shape/graph/Switch/index.js +++ b/src/jmapNew/shape/graph/Switch/index.js @@ -802,7 +802,6 @@ export default class Switch extends Group { this.eachChild(item => { item.show(); }); - this.isShowShape = true; this.setState(this.model); } if ( this.model.showMode === '05') { diff --git a/src/jmapNew/shape/graph/Text/index.js b/src/jmapNew/shape/graph/Text/index.js index 8be708a35..e128ca6b0 100644 --- a/src/jmapNew/shape/graph/Text/index.js +++ b/src/jmapNew/shape/graph/Text/index.js @@ -68,9 +68,6 @@ export default class Text2 extends Group { } else { this.text && this.text.hide(); } - if (store.state.training.prdType === '09') { - this.text && this.text.hide(); - } } setShowStation(stationCode) { if (store.getters['map/checkDeviceShow'](stationCode, this._code)) { diff --git a/src/jmapNew/shape/index.js b/src/jmapNew/shape/index.js index 6daa9b42c..f24094ceb 100644 --- a/src/jmapNew/shape/index.js +++ b/src/jmapNew/shape/index.js @@ -3,8 +3,8 @@ import systemGraphShape from './systemGraph'; export default { __Shape: { - ...graphMapShape - // ...systemGraphShape + ...graphMapShape, + ...systemGraphShape }, getBuilder(type) { const ShapeClazz = this.__Shape[type]; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 378088d24..1d7f89989 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,9 +2,9 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; + BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.8.107:9000'; // 袁琪 - BASE_API = 'http://192.168.8.176:9000'; // 旭强 + // BASE_API = 'http://192.168.8.167:9000'; // 旭强 // BASE_API = 'http://192.168.2.183:9000'; // 张赛 // BASE_API = 'http://192.168.8.140:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; diff --git a/src/views/demonstration/detail/index.vue b/src/views/demonstration/detail/index.vue index c608fb5e6..0d539eabc 100644 --- a/src/views/demonstration/detail/index.vue +++ b/src/views/demonstration/detail/index.vue @@ -219,7 +219,7 @@ export default { }); }, async start() { - const jumpFunc = ['jump', 'jump', 'enterIntegratedSimulation', 'jump', 'jumpScheduling', 'enterISCS', 'enterScreen', '', 'jump']; + const jumpFunc = ['jump', 'jump', 'enterIntegratedSimulation', 'jump', 'jumpScheduling', 'enterISCS', 'enterScreen']; this[jumpFunc[parseInt(this.courseModel.prdType) - 1]](); }, jumpSimulation() { diff --git a/src/views/newMap/displayNew/index.vue b/src/views/newMap/displayNew/index.vue index b5eedab8b..5713372ec 100644 --- a/src/views/newMap/displayNew/index.vue +++ b/src/views/newMap/displayNew/index.vue @@ -98,14 +98,19 @@ export default { } }); }, + // 此处代码似乎没什么用,之前从menuSchema复制过来的 + '$store.state.training.prdType':function(val) { + if (val == '01') { this.switchModeInner('01'); } else { this.switchModeInner('02'); } + }, '$store.state.config.menuBarLoadedCount': function (val) { // menuBar加载完成 this.setPosition(); }, '$store.state.app.windowSizeCount': function() { // 窗口缩放 this.setWindowSize(); }, - // '$store.state.training.prdType': function (val) { // 根据权限类型计算高度 - // }, + '$store.state.training.prdType': function (val) { // 根据权限类型计算高度 + this.setPosition(); + }, '$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态 if (this.planRunning) { this.$store.dispatch('training/simulationStart'); @@ -212,6 +217,29 @@ export default { this.dataError = resp.data.dataError; } }, + // 通过showMode切换显示效果 + switchModeInner(swch) { + let showMode = '03'; + if (swch == '01') { + showMode = '03'; + } else if (swch == '02') { + showMode = '02'; + } + + const list = []; + const mapDevice = this.$store.state.map.mapDevice; + for (const key in mapDevice) { + list.push(mapDevice[key]); + } + + if (swch == '01') { + this.$jlmap.updateShowStation(list, this.$store.state.training.centerStationCode); // 显示全部元素 + } else { + this.$jlmap.updateShowStation(list, ''); // 显示全部元素 + } + + this.$jlmap.updateShowMode(list, showMode); // 二次过滤 + }, // 加载地图数据 loadMapData() { if (parseInt(this.mapId)) { diff --git a/src/views/newMap/jlmapNew/index.vue b/src/views/newMap/jlmapNew/index.vue index c24bbd34a..8894b7e1f 100644 --- a/src/views/newMap/jlmapNew/index.vue +++ b/src/views/newMap/jlmapNew/index.vue @@ -144,7 +144,6 @@ export default { }, '$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 this.$store.state.exam.deviceCode && this.setCenter(this.$store.state.exam.deviceCode); - if (this.$store.state.training.prdType === '09') { this.setShowStation(''); } }, '$store.state.config.canvasSizeCount': function (val) { this.resetSize(); @@ -502,6 +501,10 @@ 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) {