From d1f0d5e27ff6eb541a0b58b53b00e3e2c3791476 Mon Sep 17 00:00:00 2001 From: fan Date: Wed, 14 Sep 2022 13:26:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A6=E6=B1=89=E9=A1=B9=E7=9B=AE=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/ningbo_03.js | 12 +-- src/jmapNew/shape/graph/Train/ETriangle.js | 10 +- src/store/modules/socket.js | 6 +- src/store/modules/training.js | 1 - src/utils/baseUrl.js | 4 +- src/views/designPlatform/bigScreen.vue | 19 +++- src/views/designPlatform/whTrainList.vue | 103 +++++++++++++++++++++ 7 files changed, 138 insertions(+), 17 deletions(-) create mode 100644 src/views/designPlatform/whTrainList.vue diff --git a/src/jmapNew/config/skinCode/ningbo_03.js b/src/jmapNew/config/skinCode/ningbo_03.js index b99245471..61c9e68b6 100644 --- a/src/jmapNew/config/skinCode/ningbo_03.js +++ b/src/jmapNew/config/skinCode/ningbo_03.js @@ -158,7 +158,7 @@ class SkinCode extends defaultStyle { display: true, // 列车实时位置显示 specialShow: true, // 列车特殊显示 specialBackground: 'rgba(36, 219, 219, 0.8)', - specialRectWidth: 14, + specialRectWidth: 25, stopTrainRectWidth: 7 } }; @@ -740,12 +740,12 @@ class SkinCode extends defaultStyle { trainTargetTextAlign: 'right' // 车次号文字显示位置 }, trainTargetNumber: { - groupNumberPrefix: '00000', // 车组号前缀 - defaultGroupNumber: 'EEEEE', // 默认车组号 + groupNumberPrefix: '000', // 车组号前缀 + defaultGroupNumber: 'EEE', // 默认车组号 trainTargetNumberOffset: {x: -4, y: 4}, // 车组号偏移量 - lineNumber: '01', // 线路号在人工车时车组号拼接线路号 - manualTypeColor: '#FA7FD7', // 人工车车组号显示颜色 - maskText: '0' // 车组号遮罩 + lineNumber: '', // 线路号在人工车时车组号拼接线路号 + manualTypeColor: '#FA7FD7' // 人工车车组号显示颜色 + // maskText: '0' // 车组号遮罩 }, trainHead: { trainConntWidth: 0, // 列车竖杠的宽度 diff --git a/src/jmapNew/shape/graph/Train/ETriangle.js b/src/jmapNew/shape/graph/Train/ETriangle.js index f7f5f4ebf..72a07e6c9 100644 --- a/src/jmapNew/shape/graph/Train/ETriangle.js +++ b/src/jmapNew/shape/graph/Train/ETriangle.js @@ -23,7 +23,7 @@ export default class ETriangle extends Group { shape: { x: model.point.x - this.style.Section.trainPosition.stopTrainRectWidth, y: model.point.y - this.style.Section.line.width / 4, - width: this.style.Section.trainPosition.stopTrainRectWidth, + width: this.style.Section.line.width - 2, height: this.style.Section.line.width - 2 }, style: { @@ -137,15 +137,15 @@ export default class ETriangle extends Group { this.angle1.dirty(); } if (this.stopRect) { - const offset = (this.style.Section.trainPosition.specialRectWidth - this.style.Section.trainPosition.stopTrainRectWidth) / 2; + const offset = (this.style.Section.trainPosition.specialRectWidth - this.style.Section.line.width) / 2; let trainRight = model.x + offset; if (right == 1) { - trainRight = model.x - offset - this.style.Section.trainPosition.stopTrainRectWidth; + trainRight = model.x - offset - this.style.Section.line.width + 2; } const pointsData = { x: trainRight, - y: model.y - this.style.Section.line.width / 4, - width: this.style.Section.trainPosition.stopTrainRectWidth, + y: model.y - this.style.Section.line.width / 4 - 1, + width: this.style.Section.line.width - 2, height: this.style.Section.line.width - 2 }; this.stopRect.attr({ diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index d12a03613..558dd909f 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -294,6 +294,9 @@ function handle(state, data) { case 'Simulation_Training_Finish': state.trainingOverCount++; break; + case 'YJDDZH_TRAIN_POSITION': + state.whTrainInfo = msg; + break; // // // 大铁项目 调度台 运行图信息 初始化消息 // case 'SIMULATION_RAILWAY_RUN_PLAN_INIT': @@ -483,7 +486,8 @@ const socket = { voiceBroadcastChange: 0, // 语音播报信息变化 trainingStepTip: '', // 新实训推送消息 trainingOverCount: 0, // 新实训结束计数器 - trainingReloadCount: 0 + trainingReloadCount: 0, + whTrainInfo: null // railwaySimulationRpMsg:{}, // 大铁项目 调度台 调度台 // railwaySimulationRpChange:0 // 大铁项目 调度台 运行图信息变化 }, diff --git a/src/store/modules/training.js b/src/store/modules/training.js index a1c7a2ec7..efe65bf5e 100644 --- a/src/store/modules/training.js +++ b/src/store/modules/training.js @@ -439,7 +439,6 @@ const training = { commit('setOperateErrMsg', { errMsg: LangStorage.getLang() == 'en' ? 'Please click start, start training!' : '请点击开始,开始实训!', color: 'red' }); return; } - // 处理operation Handler.handle(operate).then(rtn => { if (store.state.trainingNew.trainingSwitch && store.state.trainingNew.trainingDetail.type === 'SINGLE') { diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index a1a9e525a..72c6c533e 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -27,11 +27,11 @@ export function handlerUrl(data) { // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.233/rtss-server'; // BASE_API = 'http://114.116.51.125/jlcloud'; - // BASE_API = 'http://192.168.8.152:9000'; // 袁琪 + BASE_API = 'http://192.168.3.90:9100'; // 周寅 // BASE_API = 'http://192.168.3.94:9000'; // 旭强 // BASE_API = 'http://192.168.3.15:9000'; // 张赛 // BASE_API = 'http://192.168.3.5:9000'; // 夏增彬 - BASE_API = 'http://192.168.3.37:9000'; // 卫志宏 + // BASE_API = 'http://192.168.3.37:9000'; // 卫志宏 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 diff --git a/src/views/designPlatform/bigScreen.vue b/src/views/designPlatform/bigScreen.vue index adf8cd994..7daf8fed9 100644 --- a/src/views/designPlatform/bigScreen.vue +++ b/src/views/designPlatform/bigScreen.vue @@ -2,6 +2,7 @@
+
返回 @@ -17,11 +18,13 @@ import { mapGetters } from 'vuex'; import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp'; import { getToken } from '@/utils/auth'; import { TrainingMode } from '@/scripts/ConstDic'; +import WhTrainList from './whTrainList'; export default { name: 'BigScreen', components: { - JlmapVisual + JlmapVisual, + WhTrainList }, props: { widthLeft: { @@ -47,7 +50,10 @@ export default { ]), ...mapGetters('config', [ 'canvasId' - ]) + ]), + prdType() { + return this.$route.query.prdType; + } }, watch: { widthLeft(val) { @@ -76,6 +82,9 @@ export default { }, '$store.state.socket.simulationOver':function(val) { this.backOut(); + }, + '$store.state.socket.whTrainInfo': function(val) { + } }, async beforeDestroy() { @@ -180,10 +189,16 @@ export default { this.clearSubscribe(); const header = { group: this.$route.query.group || '', 'X-Token': getToken() }; creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header); + if (this.prdType === '10') { + creatSubscribe(`/topic/yjddzh/trainPosition`, header); + } // await this.$store.dispatch('training/setHasSubscribed'); }, clearSubscribe() { clearSubscribe(`${displayTopic}\/${this.$route.query.group}`); + if (this.prdType === '10') { + clearSubscribe(`/topic/yjddzh/trainPosition`); + } } } }; diff --git a/src/views/designPlatform/whTrainList.vue b/src/views/designPlatform/whTrainList.vue new file mode 100644 index 000000000..44e4c4cf6 --- /dev/null +++ b/src/views/designPlatform/whTrainList.vue @@ -0,0 +1,103 @@ + + +