列车菜单调整
This commit is contained in:
parent
76a329d9af
commit
3ec64f3794
@ -21,7 +21,7 @@
|
||||
<el-radio-group
|
||||
:id="domIdTrainType"
|
||||
v-model="formModel.type"
|
||||
style="margin-left: 15px;"
|
||||
style="margin-left: 45px;"
|
||||
@change="trainTypeChange"
|
||||
>
|
||||
<el-radio :label="'PLAN'">{{ $t('menu.planTrain') }}</el-radio>
|
||||
@ -30,7 +30,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formModel.type == 'PLAN'" prop="serviceNumber">
|
||||
<span slot="label">{{ $t('menu.serviceNumber') }}</span>
|
||||
<span slot="label">{{ $t('menu.serviceNumber') + ':' }}</span>
|
||||
<el-input
|
||||
:id="domIdServerNo"
|
||||
v-model="formModel.serviceNumber"
|
||||
|
@ -3,6 +3,8 @@
|
||||
<el-select
|
||||
v-model="groupNumber"
|
||||
filterable
|
||||
size="small"
|
||||
style="width: 100%;"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
@ -12,7 +14,13 @@
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
<el-table :data="tableData" :show-header="false">
|
||||
<div style="margin-top: 5px;">
|
||||
<div :class="[tabType==='baseInfo'?'simulate-tabs-button-active':'simulate-tabs-button']" style="margin-right: 6px" @click="changeTabs('baseInfo')">基本信息</div>
|
||||
<div :class="[tabType==='groupInfo'?'simulate-tabs-button-active':'simulate-tabs-button']" style="margin-right: 6px" @click="changeTabs('groupInfo')">车组信息</div>
|
||||
<div :class="[tabType==='planInfo'?'simulate-tabs-button-active':'simulate-tabs-button']" style="margin-right: 6px" @click="changeTabs('planInfo')">计划信息</div>
|
||||
<div :class="[tabType==='atcInfo'?'simulate-tabs-button-active':'simulate-tabs-button']" @click="changeTabs('atcInfo')">ATC信息</div>
|
||||
</div>
|
||||
<el-table :data="tableData" :show-header="false" border style="margin-top: 5px;height: 360px;">
|
||||
<el-table-column prop="key" label="key" />
|
||||
<el-table-column prop="value" label="value" />
|
||||
</el-table>
|
||||
@ -32,6 +40,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
||||
import {TrainType} from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'TrainControl',
|
||||
@ -42,13 +51,14 @@ export default {
|
||||
trainList: [],
|
||||
tableData: [],
|
||||
baseInfo: [],
|
||||
marshallingInfo: [],
|
||||
groupInfo: [],
|
||||
planInfo: [],
|
||||
atcInfo: [],
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
groupNumber: ''
|
||||
groupNumber: '',
|
||||
tabType: 'baseInfo'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -80,64 +90,7 @@ export default {
|
||||
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.initData(selected);
|
||||
this.tableData = this.baseInfo;
|
||||
/** 加载列车数据*/
|
||||
this.dialogShow = true;
|
||||
@ -174,7 +127,118 @@ export default {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
changeTabs(type) {
|
||||
switch (type) {
|
||||
case 'baseInfo':
|
||||
this.tableData = this.baseInfo;
|
||||
this.tabType = 'baseInfo';
|
||||
break;
|
||||
case 'groupInfo':
|
||||
this.tableData = this.groupInfo;
|
||||
this.tabType = 'groupInfo';
|
||||
break;
|
||||
case 'planInfo':
|
||||
this.tableData = this.planInfo;
|
||||
this.tabType = 'planInfo';
|
||||
break;
|
||||
case 'atcInfo':
|
||||
this.tableData = this.atcInfo;
|
||||
this.tabType = 'atcInfo';
|
||||
break;
|
||||
}
|
||||
},
|
||||
initData(model) {
|
||||
this.groupNumber = model.groupNumber;
|
||||
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: ''},
|
||||
{key: '所处设备', value: ''},
|
||||
{key: '跟踪模式', value: ''},
|
||||
{key: 'ATP切除', value: ''},
|
||||
{key: '停站状态', value: ''}
|
||||
];
|
||||
this.groupInfo = [
|
||||
{key: '车组号', value: model.groupNumber},
|
||||
{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: model.groupNumber},
|
||||
{key: '车次号', value: model.tripNumber},
|
||||
{key: '表号', value: model.serviceNumber},
|
||||
{key: '运行等级', value: model.runLevel},
|
||||
{key: '状态', value: ''},
|
||||
{key: '计划偏离', value: model.dt},
|
||||
{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: model.groupNumber},
|
||||
{key: '车次号', value: model.tripNumber},
|
||||
{key: '表号', value: model.serviceNumber},
|
||||
{key: '运行方向', value: model.right ? '上行' : '下行'},
|
||||
{key: '扣车状态', value: model.runControlStatus === '01' ? '正常' : model.runControlStatus === '03' ? '跳停' : '扣车'},
|
||||
{key: '车门状态', value: model.speed ? '关闭' : '开启'},
|
||||
{key: '驾驶模式', value: 'SM模式'},
|
||||
{key: '目的地号', value: model.destinationCode}
|
||||
];
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.simulate-tabs-button {
|
||||
display: inline;
|
||||
border-top: solid 1px #FBFAEF;
|
||||
border-left: solid 1px #FBFAEF;
|
||||
border-bottom: solid 1px #858273;
|
||||
border-right: solid 1px #858273;
|
||||
width: 90px;
|
||||
height: 28px;
|
||||
font-size: 14px;
|
||||
line-height: 28px;
|
||||
padding: 2px 10px;
|
||||
}
|
||||
.simulate-tabs-button:active{
|
||||
border-top: solid 1px #858273;
|
||||
border-left: solid 1px #858273;
|
||||
border-bottom: solid 1px #FBFAEF;
|
||||
border-right: solid 1px #FBFAEF;
|
||||
}
|
||||
.simulate-tabs-button-active{
|
||||
display: inline;
|
||||
border-top: solid 1px #858273;
|
||||
border-left: solid 1px #858273;
|
||||
border-bottom: solid 1px #FBFAEF;
|
||||
border-right: solid 1px #FBFAEF;
|
||||
width: 90px;
|
||||
height: 28px;
|
||||
font-size: 14px;
|
||||
line-height: 28px;
|
||||
padding: 2px 10px;
|
||||
}
|
||||
</style>
|
||||
|
@ -7,6 +7,7 @@
|
||||
<train-move ref="trainMove" />
|
||||
<train-switch ref="trainSwitch" />
|
||||
<train-edit-number ref="trainEditNumber" />
|
||||
<train-detail ref="trainDetail" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -22,6 +23,7 @@ import TrainDelete from './dialog/trainDelete';
|
||||
import TrainMove from './dialog/trainMove';
|
||||
import TrainSwitch from './dialog/trainSwitch';
|
||||
import TrainEditNumber from './dialog/trainEditNumber';
|
||||
import TrainDetail from './dialog/trainDetail';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
@ -33,7 +35,8 @@ export default {
|
||||
TrainDelete,
|
||||
TrainMove,
|
||||
TrainSwitch,
|
||||
TrainEditNumber
|
||||
TrainEditNumber,
|
||||
TrainDetail
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -81,17 +84,17 @@ export default {
|
||||
},
|
||||
{
|
||||
label: '标记ATP切除',
|
||||
handler: this.undeveloped(),
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_TAG_ATP_CUT
|
||||
},
|
||||
{
|
||||
label: '标记ATP激活',
|
||||
handler: this.undeveloped(),
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_TAG_ATP_RECOVER
|
||||
},
|
||||
{
|
||||
label: '查看列车详细运行信息',
|
||||
handler: this.undeveloped(),
|
||||
handler: this.checkTrainDetails,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_INFO
|
||||
}
|
||||
]
|
||||
@ -322,7 +325,6 @@ export default {
|
||||
switchTrainId() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Train.switchTrainId.menu.operation,
|
||||
param: {
|
||||
code: this.selected.code
|
||||
@ -334,6 +336,22 @@ export default {
|
||||
this.$refs.trainSwitch.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
checkTrainDetails() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.trainDetailInfo.menu.operation,
|
||||
param: {
|
||||
code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDetail.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -2211,7 +2211,12 @@ export const IbpShowCondition = {
|
||||
Show_Open_Screen_Door: {statusKey: 'screenDoorOpenStatus', statusValue:['02'], defaultStatus: 'close'},
|
||||
Show_Close_Screen_Door: {statusKey: 'screenDoorOpenStatus', statusValue: ['01'], defaultStatus: 'open'}
|
||||
};
|
||||
|
||||
/** 列车类型 */
|
||||
export const TrainType = {
|
||||
PLAN: '计划车',
|
||||
HEAD: '头码车',
|
||||
MANUAL: '人工车'
|
||||
};
|
||||
export const UrlConfig = {
|
||||
display: '/display',
|
||||
displayNew: '/displayNew',
|
||||
|
Loading…
Reference in New Issue
Block a user