修改ningbo01列车信息
This commit is contained in:
parent
2cddeac881
commit
9b07bfacea
@ -18,7 +18,7 @@
|
|||||||
<div class="tabsBox">
|
<div class="tabsBox">
|
||||||
<div v-for="(item,index) in tabsList" :key="index" class="simulate-tabs-button" :class="[tabType===item.value?'active':'']" @click="changeTabs(item.value)">{{ item.label }}</div>
|
<div v-for="(item,index) in tabsList" :key="index" class="simulate-tabs-button" :class="[tabType===item.value?'active':'']" @click="changeTabs(item.value)">{{ item.label }}</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="tableData" :show-header="false" border height="360">
|
<el-table :data="tableData" :show-header="false" border height="460">
|
||||||
<el-table-column prop="key" label="key" />
|
<el-table-column prop="key" label="key" />
|
||||||
<el-table-column prop="value" label="value" />
|
<el-table-column prop="value" label="value" />
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -35,11 +35,11 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabsList: [
|
tabsList: [
|
||||||
{ label: '基本信息', value: 'baseInfo' },
|
{ label: '基本信息', value: 'baseInfo' }
|
||||||
{ label: '车组信息', value: 'groupInfo' },
|
// { label: '车组信息', value: 'groupInfo' },
|
||||||
{ label: '计划信息', value: 'planInfo' },
|
// { label: '计划信息', value: 'planInfo' },
|
||||||
{ label: 'ATC信息', value: 'atcInfo' },
|
// { label: 'ATC信息', value: 'atcInfo' },
|
||||||
{ label: '车辆信息', value: 'carInfo' }
|
// { label: '车辆信息', value: 'carInfo' }
|
||||||
],
|
],
|
||||||
baseInfo: [],
|
baseInfo: [],
|
||||||
groupInfo: [],
|
groupInfo: [],
|
||||||
@ -106,21 +106,111 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
initData(model) {
|
initData(model) {
|
||||||
console.log(this.stationNames.get(model.stationCode), this.stationNames, model.stationCode, '=====');
|
|
||||||
this.groupNumber = model.groupNumber;
|
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 = [
|
this.baseInfo = [
|
||||||
|
{key: '列车类型', value: TrainType[model.type] || ''},
|
||||||
|
{key: '来源', value: '人工标记'},
|
||||||
{key: '车组号', value: model.groupNumber || ''},
|
{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: model.destinationCode || ''},
|
||||||
{key: '类型', value: TrainType[model.type] || ''},
|
{key: '早晚点', value: this.getTimeStatus(model)},
|
||||||
{key: '司机号', value: ''},
|
{key: '运行方向', value: direction ? '上行' : '下行'},
|
||||||
{key: '车站', value: this.stationNames.get(model.stationCode)},
|
{key: 'ATP报告方向', value: direction ? '上行' : '下行'},
|
||||||
{key: '所处设备', value: `${model.sectionModel ? (model.sectionModel.parentName ? model.sectionModel.parentName : model.sectionModel.name) : ''}`},
|
{key: '起点站名', value: this.stationNames.get(model.startStation) || ''},
|
||||||
{key: '跟踪模式', value: `${model.runLevel === 'CBTC' ? 'CTC' : model.runLevel}模式`},
|
{key: '终点站名', value: this.stationNames.get(model.endStation) || ''},
|
||||||
{key: '标记ATP切除', value: '标记ATP恢复'},
|
{key: '占用轨道', value: `${model.sectionModel ? (model.sectionModel.parentName ? model.sectionModel.parentName : model.sectionModel.name) : ''}`},
|
||||||
{key: '停站状态', value: `${!model.stop ? '未停' : '停站'}`}
|
{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 = [
|
this.groupInfo = [
|
||||||
{key: '车组号', value: model.groupNumber || ''},
|
{key: '车组号', value: model.groupNumber || ''},
|
||||||
{key: '设备ID', value: '1'},
|
{key: '设备ID', value: '1'},
|
||||||
@ -140,7 +230,7 @@ export default {
|
|||||||
{key: '单程号', value: model.tripNumber || ''},
|
{key: '单程号', value: model.tripNumber || ''},
|
||||||
{key: '服务号', value: model.serviceNumber || ''},
|
{key: '服务号', value: model.serviceNumber || ''},
|
||||||
{key: '运行等级', value: model.runLevel},
|
{key: '运行等级', value: model.runLevel},
|
||||||
{key: '状态', value: this.getPlanStatus(model)},
|
{key: '状态', value: this.getTimeStatus(model)},
|
||||||
{key: '计划偏离', value: model.dt},
|
{key: '计划偏离', value: model.dt},
|
||||||
{key: '停站时间', value: `${model.parkingRemainTime < 0 ? '无效' : `${model.parkingRemainTime}s`}`},
|
{key: '停站时间', value: `${model.parkingRemainTime < 0 ? '无效' : `${model.parkingRemainTime}s`}`},
|
||||||
{key: '计划到站', value: ''},
|
{key: '计划到站', value: ''},
|
||||||
@ -170,34 +260,9 @@ export default {
|
|||||||
];
|
];
|
||||||
this.carInfo = [];
|
this.carInfo = [];
|
||||||
},
|
},
|
||||||
getPlanStatus(model) {
|
getTimeStatus(model) {
|
||||||
const device = model.instance;
|
const device = model.instance;
|
||||||
let destinationText = LangStorage.getLang() == 'en' ? 'unknown' : '未知';
|
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) {
|
if (device.model.dt > 120) {
|
||||||
destinationText = LangStorage.getLang() == 'en' ? 'early' : '早点';
|
destinationText = LangStorage.getLang() == 'en' ? 'early' : '早点';
|
||||||
} else if (device.model.dt < -120) {
|
} else if (device.model.dt < -120) {
|
||||||
@ -205,7 +270,6 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
destinationText = LangStorage.getLang() == 'en' ? 'on time' : '准点';
|
destinationText = LangStorage.getLang() == 'en' ? 'on time' : '准点';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return destinationText;
|
return destinationText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user