新建列车调整
This commit is contained in:
parent
1c9301a3d5
commit
d7c5a1303d
@ -116,8 +116,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isTest = process.env.NODE_ENV === 'test';
|
||||
if (isDev || isTest) {
|
||||
if (isDev) {
|
||||
this.menuNormal.Center.push({
|
||||
label: '新建计划车',
|
||||
handler: this.addPlanTrain,
|
||||
|
@ -102,8 +102,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isTest = process.env.NODE_ENV === 'test';
|
||||
if (isDev || isTest) {
|
||||
if (isDev) {
|
||||
this.menuNormal.Center.push( {
|
||||
label: '新建计划列车',
|
||||
handler: this.createPlanTrain,
|
||||
|
@ -106,8 +106,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isTest = process.env.NODE_ENV === 'test';
|
||||
if (isDev || isTest) {
|
||||
if (isDev) {
|
||||
this.menuNormal.Center.push( {
|
||||
label: '新建计划列车',
|
||||
handler: this.createPlanTrain,
|
||||
|
@ -117,8 +117,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isTest = process.env.NODE_ENV === 'test';
|
||||
if (isDev || isTest) {
|
||||
if (isDev) {
|
||||
this.menuNormal.Center.push({
|
||||
label: '新建计划车',
|
||||
handler: this.addPlanTrain,
|
||||
|
@ -164,8 +164,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isTest = process.env.NODE_ENV === 'test';
|
||||
if (isDev || isTest) {
|
||||
if (isDev) {
|
||||
this.menuNormal.Center.push({
|
||||
label: '新建计划车',
|
||||
handler: this.addPlanTrain,
|
||||
|
@ -111,8 +111,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isTest = process.env.NODE_ENV === 'test';
|
||||
if (isDev || isTest) {
|
||||
if (isDev) {
|
||||
this.menuNormal.Center.push({
|
||||
label: '新建计划车',
|
||||
handler: this.createPlanTrain,
|
||||
|
@ -135,8 +135,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isTest = process.env.NODE_ENV === 'test';
|
||||
if (isDev || isTest) {
|
||||
if (isDev) {
|
||||
this.menuNormal.Center.push({
|
||||
label: '新建计划车',
|
||||
handler: this.addPlanTrain,
|
||||
|
180
src/jmapNew/theme/xian_01/menus/dialog/trainDetail.vue
Normal file
180
src/jmapNew/theme/xian_01/menus/dialog/trainDetail.vue
Normal file
@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="xian-01__systerm train-control" :title="title" :visible.sync="show" width="370px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-select
|
||||
v-model="groupNumber"
|
||||
filterable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
<el-table :data="tableData" :show-header="false">
|
||||
<el-table-column prop="key" label="key" />
|
||||
<el-table-column prop="value" label="value" />
|
||||
</el-table>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'TrainControl',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainList: [],
|
||||
tableData: [],
|
||||
baseInfo: [],
|
||||
marshallingInfo: [],
|
||||
planInfo: [],
|
||||
atcInfo: [],
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
groupNumber: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdConfirm() {
|
||||
return OperationEvent.Train.trainDetailInfo.confirm.operation;
|
||||
},
|
||||
domIdCancel() {
|
||||
return OperationEvent.Command.cancel.menu.domId;
|
||||
},
|
||||
title() {
|
||||
return '列车详细运行信息';
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
const model = this.$store.getters['map/getDeviceByCode'](selected.code);
|
||||
this.groupNumber = model.groupNumber;
|
||||
this.baseInfo = [
|
||||
{key: '车组号', value: model.groupNumber},
|
||||
{key: '车次号', value: ''},
|
||||
{key: '表号', value: ''},
|
||||
{key: '目的地号', value: ''},
|
||||
{key: '类型', value: ''},
|
||||
{key: '司机号', value: ''},
|
||||
{key: '车站', value: ''},
|
||||
{key: '所处设备', value: ''},
|
||||
{key: '跟踪模式', value: ''},
|
||||
{key: 'ATP切除', value: ''},
|
||||
{key: '停站状态', value: ''}
|
||||
];
|
||||
this.marshallingInfo = [
|
||||
{key: '车组号', value: ''},
|
||||
{key: '设备ID', value: ''},
|
||||
{key: '车头号1', value: ''},
|
||||
{key: '车头号2', value: ''},
|
||||
{key: '车厢号1', value: ''},
|
||||
{key: '车厢号2', value: ''},
|
||||
{key: '车厢号3', value: ''},
|
||||
{key: '车厢号4', value: ''},
|
||||
{key: '车厢号5', value: ''},
|
||||
{key: '车厢号6', value: ''},
|
||||
{key: '车厢号7', value: ''},
|
||||
{key: '车厢号8', value: ''}
|
||||
];
|
||||
this.planInfo = [
|
||||
{key: '车组号', value: ''},
|
||||
{key: '车次号', value: ''},
|
||||
{key: '表号', value: ''},
|
||||
{key: '运行等级', value: ''},
|
||||
{key: '状态', value: ''},
|
||||
{key: '计划偏离', value: ''},
|
||||
{key: '停站时间', value: ''},
|
||||
{key: '计划到站', value: ''},
|
||||
{key: '计划到点', value: ''},
|
||||
{key: '计划发点', value: ''},
|
||||
{key: '终端发车站台', value: ''},
|
||||
{key: '终端发车时间', value: ''},
|
||||
{key: '预计离开站台', value: ''},
|
||||
{key: '预计离开时间', value: ''},
|
||||
{key: '预计到达站台', value: ''},
|
||||
{key: '预计到达时间', value: ''},
|
||||
{key: '区间运行时分', value: ''}
|
||||
];
|
||||
this.atcInfo = [
|
||||
{key: '车组号', value: ''},
|
||||
{key: '车次号', value: ''},
|
||||
{key: '表号', value: ''},
|
||||
{key: '运行方向', value: ''},
|
||||
{key: '扣车状态', value: ''},
|
||||
{key: '车门状态', value: ''},
|
||||
{key: '驾驶模式', value: ''},
|
||||
{key: '目的地号', value: ''}
|
||||
];
|
||||
this.tableData = this.baseInfo;
|
||||
/** 加载列车数据*/
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Train.trainDetailInfo.confirm.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -148,8 +148,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isTest = process.env.NODE_ENV === 'test';
|
||||
if (isDev || isTest) {
|
||||
if (isDev) {
|
||||
this.menuNormal.Center.push({
|
||||
label: '新建计划车',
|
||||
handler: this.addPlanTrain,
|
||||
|
@ -52,12 +52,12 @@ export default {
|
||||
{
|
||||
label: this.$t('menu.menuTrain.addTrainId'),
|
||||
handler: this.addTrainId,
|
||||
cmdType:CMD.TrainWindow.CMD_TRAIN_ADD_TRAIN_TRACE
|
||||
cmdType:''
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuTrain.deleteTrainId'),
|
||||
handler: this.delTrainId,
|
||||
cmdType:CMD.TrainWindow.CMD_TRAIN_REMOVE_TRAIN_TRACE
|
||||
cmdType:''
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuTrain.editTrainId'),
|
||||
@ -67,17 +67,32 @@ export default {
|
||||
{
|
||||
label: this.$t('menu.menuTrain.editTrainNo'),
|
||||
handler: this.editTrainNo,
|
||||
cmdType:CMD.TrainWindow.CMD_SWITCH_SINGLE_LOCK
|
||||
cmdType:''
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuTrain.moveTrainId'),
|
||||
handler: this.moveTrainId,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
cmdType:''
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuTrain.switchTrainId'),
|
||||
handler: this.switchTrainId,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
|
||||
cmdType:''
|
||||
},
|
||||
{
|
||||
label: '标记ATP切除',
|
||||
handler: this.undeveloped(),
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_TAG_ATP_CUT
|
||||
},
|
||||
{
|
||||
label: '标记ATP激活',
|
||||
handler: this.undeveloped(),
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_TAG_ATP_RECOVER
|
||||
},
|
||||
{
|
||||
label: '查看列车详细运行信息',
|
||||
handler: this.undeveloped(),
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_INFO
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -139,10 +154,6 @@ export default {
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = [...this.menuForce, ...this.menuSpeed];
|
||||
}
|
||||
|
||||
// this.menu = this.menuNormal.Center;
|
||||
// console.log(this.menu, '222222222222222');
|
||||
// this.menu = MenuContextHandler.covert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
@ -306,6 +317,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {},
|
||||
// 交换列车识别号
|
||||
switchTrainId() {
|
||||
const step = {
|
||||
|
@ -154,8 +154,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isTest = process.env.NODE_ENV === 'test';
|
||||
if (isDev || isTest) {
|
||||
if (isDev) {
|
||||
this.menuNormal.Center.push({
|
||||
label: '新建计划车',
|
||||
handler: this.addPlanTrain,
|
||||
|
@ -17,7 +17,8 @@ class CommandHandle {
|
||||
Local: {},
|
||||
Common: {
|
||||
Set_Fault:{operate: 'Set_Fault', paramList:[{name: 'code'}, {name: 'faultType'}]},
|
||||
Cancel_Fault: {operate:'Cancel_Fault', paramList:[{name: 'code'}, {name: 'faultType'}]}
|
||||
Cancel_Fault: {operate:'Cancel_Fault', paramList:[{name: 'code'}, {name: 'faultType'}]},
|
||||
Train_Init_Plan: {operate: 'Train_Init_Plan', paramList: [{name: 'sectionCode'}, {name: 'serviceNumber'}, {name: 'tripNumber'}]}
|
||||
}
|
||||
};
|
||||
(list || []).forEach(definition => {
|
||||
|
@ -1954,8 +1954,18 @@ export const OperationEvent = {
|
||||
operation: '70e4',
|
||||
domId: '_Tips-Train-createPlanTrain-ChangeTripNumber'
|
||||
}
|
||||
},
|
||||
// 查看列车详细信息
|
||||
trainDetailInfo: {
|
||||
menu: {
|
||||
operation: '70f',
|
||||
domId: '_Tip-Train_trainDetailInfo-Menu'
|
||||
},
|
||||
confirm: {
|
||||
operation: '70f1',
|
||||
domId: '_Tips-Train-trainDetailInfo-Confirm'
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
// 取消全线临时限速
|
||||
|
Loading…
Reference in New Issue
Block a user