From 2968b1ddfbefef133cde1ff83b4c5475c741e8e8 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Wed, 3 Feb 2021 13:40:11 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8C=97=E4=BA=A4=E5=A4=A7=E5=AE=A2=E6=B5=81?=
=?UTF-8?q?=E7=AD=96=E7=95=A5=20=E6=B7=BB=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../menus/menuDialog/allocateTime.vue | 2 +-
src/store/modules/socket.js | 4 +
.../newMap/displayNew/practiceDisplay.vue | 124 +++++++++++++++++-
3 files changed, 128 insertions(+), 2 deletions(-)
diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/allocateTime.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/allocateTime.vue
index 719da4037..55228a0db 100644
--- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/allocateTime.vue
+++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/allocateTime.vue
@@ -158,7 +158,7 @@ export default {
this.commit();
}
},
- 'selected': function(val) {
+ 'selected': function(val) {
if (val) {
const stand = this.$store.getters['map/getDeviceByCode'](val.code);
if (stand) {
diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js
index 9e7996b72..01ddf3e4e 100644
--- a/src/store/modules/socket.js
+++ b/src/store/modules/socket.js
@@ -154,6 +154,9 @@ function handle(state, data) {
case 'TRAIN_PFI_BL':
state.trainPfiBL = msg;
break;
+ case 'LPF_STRATEGY_RECOMMEND':
+ state.LPFstrategy = msg;
+ break;
case 'Simulation_Scenes_Reload':
if (msg) {
store.dispatch('training/start');
@@ -299,6 +302,7 @@ const socket = {
standPfiNum:null, // 站台客流人数信息
trainPfiNum:null, // 列车客流当前人数信息
trainPfiBL:null, // 列车客流乘降人数信息
+ LPFstrategy:[], // 北交大 大客流 推荐策略
isFirst:false, // 第一次是否已经订阅
competitionPracticeFinish:0, // 竞赛场景结束标识
simulationAlarmInfo: [] // 仿真报警信息
diff --git a/src/views/newMap/displayNew/practiceDisplay.vue b/src/views/newMap/displayNew/practiceDisplay.vue
index a52756ed2..43d52326c 100644
--- a/src/views/newMap/displayNew/practiceDisplay.vue
+++ b/src/views/newMap/displayNew/practiceDisplay.vue
@@ -20,6 +20,20 @@
留言板
联系方式
+
+
+
+
+
{{ eachLPFstrategy.description }}
+
时刻表偏移指标: {{ eachLPFstrategy.target1 }}
+
乘客等待指标: {{ eachLPFstrategy.target2 }}
+
综合指标: {{ eachLPFstrategy.coTarget }}
+
+
+
{{ currentFlowDataName }}
@@ -129,7 +143,9 @@ export default {
currentFlowDataId:'',
isDisabled:false,
loading:false,
- messageBoard: false
+ messageBoard: false,
+ LPFstrategyList:[],
+ isShowStrategy:false
};
},
computed:{
@@ -219,6 +235,45 @@ export default {
const header = { group: this.group || '', 'X-Token': getToken() };
creatSubscribe(`${jl3dTopic}\/${this.$route.query.group}`, header);
}
+ },
+ '$store.state.socket.LPFstrategy':function(val) {
+ if (val && val.length > 0) {
+ this.LPFstrategyList = [];
+ val.forEach(strategy=>{
+ const eachStrategy = {};
+ switch (strategy.type) {
+ case 'JUMP': {
+ const stand = this.$store.getters['map/getDeviceByCode'](strategy.standCode);
+ const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
+ eachStrategy.description = '为列车[' + strategy.groupNumber +
+ '-' + strategy.serviceNumber + '|' + strategy.tripNumber +
+ '],设置站台' + station.name + '-' + (stand.right ? '右行' : '左行') +
+ stand.name + ' (' + stand.code + ') 跳停';
+ eachStrategy.target1 = strategy.target1;
+ eachStrategy.target2 = strategy.target2;
+ eachStrategy.coTarget = strategy.coTarget;
+ // 为列车[005-02|2057],设置站台秀山-右行-PF42(PF44165)跳停",
+ // strategy.description;
+ break;
+ }
+ case 'PARK_TIME': {
+ const stand = this.$store.getters['map/getDeviceByCode'](strategy.standCode);
+ const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
+ // eachStrategy.description = strategy.description;
+ eachStrategy.target1 = strategy.target1;
+ eachStrategy.target2 = strategy.target2;
+ eachStrategy.coTarget = strategy.coTarget;
+ eachStrategy.description = '为站台[' + station.name + '-' + (stand.right ? '右行' : '左行') +
+ stand.name + '(' + stand.code + '设置停站时间,' + strategy.time + '秒';
+ break;
+ }
+ }
+ this.LPFstrategyList.push(eachStrategy);
+ });
+ if (!this.isShowStrategy) {
+ this.isShowStrategy = true;
+ }
+ }
}
},
beforeDestroy() {
@@ -411,6 +466,9 @@ export default {
this.$messageBox(this.$t('display.demon.endSimulationFail'));
});
},
+ closeLPFstrategy() {
+ this.isShowStrategy = false;
+ },
start(model) { // 开始仿真
const data = {
time: model.initTime
@@ -520,4 +578,68 @@ export default {
left: 10px;
top: 15px;
}
+.LPFstrategyList{
+ position: absolute;
+ width: 360px;
+ left: 10px;
+ height: 500px;
+ top: 80px;
+ background: #f1f1f1;
+ border-radius: 6px;
+ z-index: 2;
+}
+.eachLPFstrategy{
+ width: 100%;
+ box-shadow: 0px 5px 5px #ccc;
+ border-top: 1px #dedede solid;
+ margin-top: 10px;
+ padding:10px;
+ background: #fff;
+ font-size: 14px;
+}
+.LPFstrategyTop{
+ background:#fff;
+ height: 35px;
+ border-bottom: 1px #d4d4d4 solid;
+ width: 100%;
+ border-radius: 5px 5px 0px 0px;
+}
+.LPFstrategyTitle{
+ float: left;
+ padding-top: 10px;
+ padding-left: 10px;
+ font-size: 15px;
+}
+.LPFstrategyClose{
+ float: right;
+ margin-right: 5px;
+ padding: 5px;
+ margin-top: 5px;
+}
+.LPFstrategyListOut{
+ height: 460px;
+ overflow: auto;
+ background: #f1f1f1;
+ padding-bottom: 10px;
+ &::-webkit-scrollbar {
+ width: 5px;
+ }
+
+ &::-webkit-scrollbar-thumb {
+ border-radius: 10px;
+ background: #c3c3c3;
+ }
+
+ &::-webkit-scrollbar-track {
+ border-radius: 0;
+ background: #f0f0f0;
+
+ }
+}
+.eachLPFstrategyData1{
+ line-height:160%;
+}
+.eachLPFstrategyData{
+ margin-top:10px;
+}