From 9b07bfacea5a777b057d28594adb03e2715a75c7 Mon Sep 17 00:00:00 2001
From: dong <58670809@qq.com>
Date: Wed, 10 May 2023 17:39:57 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9ningbo01=E5=88=97=E8=BD=A6?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ningbo_01/menus/dialog/trainDetail.vue | 164 ++++++++++++------
1 file changed, 114 insertions(+), 50 deletions(-)
diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/trainDetail.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/trainDetail.vue
index 65cce18f4..a4325f728 100644
--- a/src/jmapNew/theme/ningbo_01/menus/dialog/trainDetail.vue
+++ b/src/jmapNew/theme/ningbo_01/menus/dialog/trainDetail.vue
@@ -18,7 +18,7 @@
-
+
@@ -35,11 +35,11 @@ export default {
data() {
return {
tabsList: [
- { label: '基本信息', value: 'baseInfo' },
- { label: '车组信息', value: 'groupInfo' },
- { label: '计划信息', value: 'planInfo' },
- { label: 'ATC信息', value: 'atcInfo' },
- { label: '车辆信息', value: 'carInfo' }
+ { label: '基本信息', value: 'baseInfo' }
+ // { label: '车组信息', value: 'groupInfo' },
+ // { label: '计划信息', value: 'planInfo' },
+ // { label: 'ATC信息', value: 'atcInfo' },
+ // { label: '车辆信息', value: 'carInfo' }
],
baseInfo: [],
groupInfo: [],
@@ -106,21 +106,111 @@ export default {
}
},
initData(model) {
- console.log(this.stationNames.get(model.stationCode), this.stationNames, model.stationCode, '=====');
this.groupNumber = model.groupNumber;
+ let direction = model.right == 1;
+ if (!this.$store.state.map.mapConfig.upRight) {
+ direction = model.right != 1;
+ }
+ const physicalSection = this.$store.getters['map/getDeviceByCode'](model.physicalCode);
+ let closeDoorTip = '';
+ if (physicalSection && physicalSection.standTrack) {
+ const stationStand = this.$store.state.map.map.stationStandList.find(item => item.standTrackCode === physicalSection.code);
+ if ((stationStand.right && model.right) || (!stationStand.right && !model.right)) {
+ if (stationStand.inside) {
+ closeDoorTip = '左开右关';
+ } else {
+ closeDoorTip = '左关右开';
+ }
+ } else {
+ if (stationStand.inside) {
+ closeDoorTip = '左关右开';
+ } else {
+ closeDoorTip = '左开右关';
+ }
+ }
+ }
+ const turnBackStrategyMap = new Map([
+ ['NONE', '无折返'],
+ ['DEFAULT', '默认'],
+ ['AUTO', '自动换端'],
+ ['UNMANNED', '无人折返']
+ ]);
+ const turnBackStatusMap = new Map([
+ ['NON', '无折返'],
+ ['INIT', '初始化'],
+ ['TO', '开往折返轨'],
+ ['STOP', '到达折返轨停稳'],
+ ['EXIT', '开出折返轨']
+ ]);
+ const highAtpModeMap = {
+ AM_C: 'AM',
+ SM_C: 'SM',
+ AM_I: 'AM',
+ SM_I: 'SM',
+ RM: 'RM'
+ };
+ const highSignalControlMap = {
+ AM_C: 'CTC',
+ SM_C: 'CTC',
+ AM_I: 'ITC',
+ SM_I: 'ITC',
+ RM: 'IL'
+ };
this.baseInfo = [
+ {key: '列车类型', value: TrainType[model.type] || ''},
+ {key: '来源', value: '人工标记'},
{key: '车组号', value: model.groupNumber || ''},
- {key: '单程号', value: model.tripNumber || ''},
- {key: '服务号', value: model.serviceNumber || ''},
+ {key: '表号', value: model.serviceNumber || ''},
+ {key: '车次号', value: model.tripNumber || ''},
{key: '目的地号', value: model.destinationCode || ''},
- {key: '类型', value: TrainType[model.type] || ''},
- {key: '司机号', value: ''},
- {key: '车站', value: this.stationNames.get(model.stationCode)},
- {key: '所处设备', value: `${model.sectionModel ? (model.sectionModel.parentName ? model.sectionModel.parentName : model.sectionModel.name) : ''}`},
- {key: '跟踪模式', value: `${model.runLevel === 'CBTC' ? 'CTC' : model.runLevel}模式`},
- {key: '标记ATP切除', value: '标记ATP恢复'},
- {key: '停站状态', value: `${!model.stop ? '未停' : '停站'}`}
+ {key: '早晚点', value: this.getTimeStatus(model)},
+ {key: '运行方向', value: direction ? '上行' : '下行'},
+ {key: 'ATP报告方向', value: direction ? '上行' : '下行'},
+ {key: '起点站名', value: this.stationNames.get(model.startStation) || ''},
+ {key: '终点站名', value: this.stationNames.get(model.endStation) || ''},
+ {key: '占用轨道', value: `${model.sectionModel ? (model.sectionModel.parentName ? model.sectionModel.parentName : model.sectionModel.name) : ''}`},
+ {key: '所在车站', value: this.stationNames.get(model.stationCode)},
+ {key: '车次通信', value: '通信车'},
+ {key: '运行时间', value: `${model.runningTime}s`},
+ {key: '停站时间', value: `${model.parkingRemainTime < 0 ? '无效' : `${model.parkingRemainTime}s`}`},
+ {key: '扣车状态', value: `${ model.hold ? '扣车' : '正常'}`},
+ {key: '车载扣车', value: `不执行`},
+ {key: '跳停状态', value: `${model.jump ? '跳停' : '正常'}`},
+ {key: '停稳状态', value: `${!model.stop ? '未停稳' : '停稳'}`},
+ {key: '阻塞状态', value: `无`},
+ {key: '列车状态', value: `${model.runLevel === 'CBTC' ? 'CTC' : model.runLevel}车`},
+ {key: '最高信号系统控制', value: `${highSignalControlMap[model.preselectionMode]}`},
+ {key: '驾驶模式', value: `${model.driveMode}模式`},
+ {key: '最高ATP模式', value: `${highAtpModeMap[model.preselectionMode]}`},
+ {key: 'ATP1状态', value: `激活`},
+ {key: 'ATP2状态', value: `备用`},
+ {key: '速度', value: `${model.speed || 0} km/h`},
+ {key: '车门状态', value: `${model.doorCloseLock ? '关闭' : closeDoorTip}`},
+ {key: '制动状态', value: `无紧急制动`},
+ {key: '停车保证', value: `可保证停车`},
+ {key: '站台无法进入', value: `否`},
+ {key: '前方站台停车点', value: `中间`},
+ {key: '折返策略', value: `${turnBackStrategyMap.get(model.turnBackStrategy) || ''}`},
+ {key: '折返状态', value: `${turnBackStatusMap.get(model.turnBackStatus)}`},
+ {key: '屏蔽门开门许可', value: `是`},
+ {key: '运营里程', value: '无效'},
+ {key: '总重量', value: `196T`},
+ {key: '车长', value: `11860cm`},
+ {key: '列车编组', value: `1`}
];
+ // this.baseInfo = [
+ // {key: '车组号', value: model.groupNumber || ''},
+ // {key: '单程号', value: model.tripNumber || ''},
+ // {key: '服务号', value: model.serviceNumber || ''},
+ // {key: '目的地号', value: model.destinationCode || ''},
+ // {key: '类型', value: TrainType[model.type] || ''},
+ // {key: '司机号', value: ''},
+ // {key: '车站', value: this.stationNames.get(model.stationCode)},
+ // {key: '所处设备', value: `${model.sectionModel ? (model.sectionModel.parentName ? model.sectionModel.parentName : model.sectionModel.name) : ''}`},
+ // {key: '跟踪模式', value: `${model.runLevel === 'CBTC' ? 'CTC' : model.runLevel}模式`},
+ // {key: '标记ATP切除', value: '标记ATP恢复'},
+ // {key: '停站状态', value: `${!model.stop ? '未停' : '停站'}`}
+ // ];
this.groupInfo = [
{key: '车组号', value: model.groupNumber || ''},
{key: '设备ID', value: '1'},
@@ -140,7 +230,7 @@ export default {
{key: '单程号', value: model.tripNumber || ''},
{key: '服务号', value: model.serviceNumber || ''},
{key: '运行等级', value: model.runLevel},
- {key: '状态', value: this.getPlanStatus(model)},
+ {key: '状态', value: this.getTimeStatus(model)},
{key: '计划偏离', value: model.dt},
{key: '停站时间', value: `${model.parkingRemainTime < 0 ? '无效' : `${model.parkingRemainTime}s`}`},
{key: '计划到站', value: ''},
@@ -170,41 +260,15 @@ export default {
];
this.carInfo = [];
},
- getPlanStatus(model) {
+ getTimeStatus(model) {
const device = model.instance;
let destinationText = LangStorage.getLang() == 'en' ? 'unknown' : '未知';
- if (device.style.Train.soonerOrLater && device.style.Train.soonerOrLater.level === 5 && device.style.Train.soonerOrLater.serviceNumber) {
- if (device.model.dt > 240) {
- destinationText = LangStorage.getLang() == 'en' ? 'early seriously' : '严重早点';
- } else if (device.model.dt > 120) {
- destinationText = LangStorage.getLang() == 'en' ? 'early' : '早点';
- } else if (device.model.dt < -240) {
- destinationText = LangStorage.getLang() == 'en' ? 'late seriously ' : '严重晚点';
- } else if (device.model.dt < -120) {
- destinationText = LangStorage.getLang() == 'en' ? 'late' : '晚点';
- } else {
- destinationText = LangStorage.getLang() == 'en' ? 'on time' : '准点';
- }
- } else if (device.style.Train.soonerOrLater && device.style.Train.soonerOrLater.level === 5) {
- if (device.model.dt > 120) {
- destinationText = LangStorage.getLang() == 'en' ? 'early seriously' : '严重早点';
- } else if (device.model.dt >= 15 && device.model.dt <= 120) {
- destinationText = LangStorage.getLang() == 'en' ? 'early' : '早点';
- } else if (device.model.dt >= -120 && device.model.dt <= -15) {
- destinationText = LangStorage.getLang() == 'en' ? 'late' : '晚点';
- } else if (device.model.dt < -120) {
- destinationText = LangStorage.getLang() == 'en' ? 'late seriously ' : '严重晚点';
- } else {
- destinationText = LangStorage.getLang() == 'en' ? 'on time' : '准点';
- }
- } else if (device.style.Train.soonerOrLater && device.style.Train.soonerOrLater.level === 3) {
- if (device.model.dt > 120) {
- destinationText = LangStorage.getLang() == 'en' ? 'early' : '早点';
- } else if (device.model.dt < -120) {
- destinationText = LangStorage.getLang() == 'en' ? 'late' : '晚点';
- } else {
- destinationText = LangStorage.getLang() == 'en' ? 'on time' : '准点';
- }
+ if (device.model.dt > 120) {
+ destinationText = LangStorage.getLang() == 'en' ? 'early' : '早点';
+ } else if (device.model.dt < -120) {
+ destinationText = LangStorage.getLang() == 'en' ? 'late' : '晚点';
+ } else {
+ destinationText = LangStorage.getLang() == 'en' ? 'on time' : '准点';
}
return destinationText;
}