佛山线路 菜单栏 增加显示功能
列车提示代码调整
This commit is contained in:
parent
99346c4b02
commit
eecc022ae5
@ -537,7 +537,7 @@ class SkinCode extends defaultStyle {
|
||||
trainBody: {
|
||||
fontFamily: 'consolas',
|
||||
trainBodyLineWidth: 0, // 车身line宽
|
||||
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||
changeTrainWidth: true, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||
specialTrainType: [
|
||||
{
|
||||
type: '03',
|
||||
@ -592,7 +592,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
common: {
|
||||
useSelfFormat: true,
|
||||
useSelfText: true,
|
||||
useSelfText: false,
|
||||
trainHeight: 17, // 列车高度
|
||||
trainHeadDistance: 2, // 列车和车头之间的间距
|
||||
trainWidth:62, // 列车长度
|
||||
|
@ -39,7 +39,7 @@ class EMouse extends Group {
|
||||
if (Vue.prototype.$jlmap.lineCode == '11' || Vue.prototype.$jlmap.lineCode == '10') {
|
||||
text = `列车类型: ${trainType}\n来\0\0\0\0源:人工标记\n车\0组\0号: ${this.device.model.groupNumber}\n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n早\0晚\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.parentName : ''}\n所在车站: \n车次通信: 通信车\n运行时间: \n停站时间: \n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: CTC车\n最高信号系统控制: CTC\n驾驶模式: SM模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.speed ? '关闭' : direction ? '左开右关' : '左关右开'}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折法策略: \n折返状态: \n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`;
|
||||
} else {
|
||||
text = `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.parentName : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
|
||||
text = `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
|
||||
}
|
||||
}
|
||||
const trainTip = this.device.style.Train.common.trainTip;
|
||||
|
@ -84,6 +84,8 @@ export default class Train extends Group {
|
||||
type: model.type,
|
||||
speed: model.speed,
|
||||
maLen: model.maLen,
|
||||
hold:model.hold,
|
||||
jump:model.jump,
|
||||
dt: model.dt,
|
||||
model: model
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="foshan-01__schedule stand-detain-train-all"
|
||||
class="foshan-01__systerm stand-detain-train-all"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
|
@ -87,6 +87,7 @@
|
||||
</template>
|
||||
</div>
|
||||
<station-control ref="stationControl" />
|
||||
<view-train-id ref="viewTrainId" />
|
||||
<detain-train-contorl ref="detainTrainContorl" />
|
||||
<detain-train-contorl-up-down ref="detainTrainContorlUpDown" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
@ -105,6 +106,7 @@ import StationControl from './menuDialog/stationControl';
|
||||
import DetainTrainContorl from './menuDialog/detainTrainContorl';
|
||||
import DetainTrainContorlUpDown from './menuDialog/detainTrainContorlUpDown';
|
||||
import TrainAdd from './menuDialog/trainAdd';
|
||||
import ViewTrainId from './menuDialog/viewTrainId';
|
||||
import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
import TrainDelete from './menuDialog/trainDelete';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
@ -123,6 +125,7 @@ export default {
|
||||
TrainTranstalet,
|
||||
TrainDelete,
|
||||
ManageUser,
|
||||
ViewTrainId,
|
||||
HelpAbout
|
||||
},
|
||||
props: {
|
||||
@ -187,6 +190,27 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.display'),
|
||||
operate: OperationEvent.Command.mBar.view,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.setTrainIdDisplay'),
|
||||
click: this.setTrainIdDisplay,
|
||||
operate: OperationEvent.Command.view.setTrainIdDisplay
|
||||
}
|
||||
// {
|
||||
// title: this.$t('menu.menuBar.setNameDisplay'),
|
||||
// click: this.setNameDisplay,
|
||||
// operate: OperationEvent.Command.view.setNameDisplay
|
||||
// },
|
||||
// {
|
||||
// title: this.$t('menu.menuBar.setDeviceDisplay'),
|
||||
// click: this.setDeviceDisplay,
|
||||
// operate: OperationEvent.Command.view.setDeviceDisplay
|
||||
// }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '查看',
|
||||
operate: OperationEvent.Command.mBar.check,
|
||||
@ -432,6 +456,27 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.display'),
|
||||
operate: OperationEvent.Command.mBar.view,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.setTrainIdDisplay'),
|
||||
click: this.setTrainIdDisplay,
|
||||
operate: OperationEvent.Command.view.setTrainIdDisplay
|
||||
}
|
||||
// {
|
||||
// title: this.$t('menu.menuBar.setNameDisplay'),
|
||||
// click: this.setNameDisplay,
|
||||
// operate: OperationEvent.Command.view.setNameDisplay
|
||||
// },
|
||||
// {
|
||||
// title: this.$t('menu.menuBar.setDeviceDisplay'),
|
||||
// click: this.setDeviceDisplay,
|
||||
// operate: OperationEvent.Command.view.setDeviceDisplay
|
||||
// }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '查看',
|
||||
operate: OperationEvent.Command.mBar.check,
|
||||
@ -797,6 +842,19 @@ export default {
|
||||
this.closeMenu(true);
|
||||
}
|
||||
},
|
||||
// 设置列车识别号显示
|
||||
setTrainIdDisplay(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewTrainId.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 站遥控
|
||||
stationRemoteControl(order) {
|
||||
const operate = {
|
||||
|
@ -43,8 +43,8 @@ export default {
|
||||
disabledCommit: false,
|
||||
control: '01',
|
||||
controlProps: {
|
||||
'01': '取消上行扣车',
|
||||
'02': '取消下行扣车'
|
||||
'01': '取消上行全线扣车',
|
||||
'02': '取消下行全线扣车'
|
||||
}
|
||||
|
||||
};
|
||||
@ -63,9 +63,9 @@ export default {
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return '取消上行扣车';
|
||||
return '取消上行全线扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return '取消下行扣车';
|
||||
return '取消下行全线扣车';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
208
src/jmapNew/theme/foshan_01/menus/menuDialog/viewTrainId.vue
Normal file
208
src/jmapNew/theme/foshan_01/menus/menuDialog/viewTrainId.vue
Normal file
@ -0,0 +1,208 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="foshan-01__systerm view-train-id"
|
||||
:title="$t('menu.menuDialog.trainIDDisplaySetting')"
|
||||
:visible.sync="show"
|
||||
width="420px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">{{ $t('menu.menuDialog.plantrainDisplayMode') }}</span>
|
||||
<el-radio-group v-model="planMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="1">{{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="2">{{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="elrow">
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="4">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="elrow">
|
||||
<el-col :span="10">
|
||||
<el-radio :label="5">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="6">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
|
||||
<span class="base-label">{{ $t('menu.menuDialog.headCodeStationDisplayMode') }}</span>
|
||||
<el-radio-group v-model="headMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-radio :label="4">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">{{ $t('menu.menuDialog.fontSize') }}</span>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="fontSize" size="small" min="16" max="99" />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="1">
|
||||
<span style="height:32px; line-height:32px;">{{ $t('menu.menuDialog.range') }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import deviceType from '@/jmap/constant/deviceType';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ViewTrainId',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: '',
|
||||
planMode: 5,
|
||||
headMode: 5,
|
||||
fontSize: 19
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setTrainDispaly();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: [this.planMode, this.headMode, this.fontSize].join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.setTrainDispaly();
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setTrainDispaly() {
|
||||
const updatlist = [];
|
||||
const trainList = this.$store.getters['training/viewTrainList']();
|
||||
if (trainList && trainList.length > 0) {
|
||||
const nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
const nameFontSize = this.fontSize;
|
||||
trainList.forEach(elem => {
|
||||
updatlist.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {nameFormat, nameFontSize }));
|
||||
});
|
||||
this.$store.dispatch('map/updateMapDevices', updatlist);
|
||||
}
|
||||
},
|
||||
trainNameFormatBy(mode) {
|
||||
switch (mode.toString()) {
|
||||
case '1': return 'serviceNumber:tripNumber'; // 表号+车次号
|
||||
case '2': return 'serviceNumber:groupNumber'; // 表号+车组号
|
||||
case '3': return 'targetCode:tripNumber'; // 目的地号+车次号
|
||||
case '4': return 'targetCode:groupNumber'; // 目的地号+车组号
|
||||
case '5': return 'targetCode:serviceNumber:tripNumber'; // 目的地号+表号+车次号
|
||||
case '6': return 'targetCode:serviceNumber:groupNumber'; // 目的地号+表号+车组号
|
||||
}
|
||||
|
||||
return ''; // 无格式类型
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
/deep/ {
|
||||
.el-dialog .el-radio__label{
|
||||
width: 150px ;
|
||||
white-space: pre-wrap ;
|
||||
display: inline-block ;
|
||||
}
|
||||
.el-radio__input{
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
.elrow{
|
||||
margin-top:4px;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user