This commit is contained in:
joylink_cuiweidong 2022-06-17 10:17:09 +08:00
commit 2da496887b
11 changed files with 174 additions and 51 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -613,6 +613,10 @@ export const menuOperate = {
releaseTrainFixedPath:{
operation: OperationEvent.CTCCommand.releaseTrainFixedPath.menu.operation,
cmdType: CMD.CTC.CTC_RELEASE_RUN_PLAN_TO_SIMULATION
},
setRoute: {
operation: OperationEvent.CTCCommand.setRoute.menu.operation,
cmdType: CMD.CTC.CTC_SET_ROUTE
}
}

View File

@ -16,7 +16,11 @@
:default-sort="{prop: 'startTime', order: 'descending'}"
>
<el-table-column type="index" width="30" label="序" label-class-name="bottom-table-label-header" />
<el-table-column property="tripNumber" label="车次" width="60" label-class-name="bottom-table-label-header" />
<el-table-column property="tripNumber" label="车次" width="60" label-class-name="bottom-table-label-header">
<template slot-scope="scope">
<div style="width: 100%;height: 22px;" @contextmenu="popMenuShow(scope.row, '' ,$event)">{{ scope.row.tripNumber }}</div>
</template>
</el-table-column>
<el-table-column property="trackName" label="股道" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="autoTrigger" label="自触" width="50" label-class-name="bottom-table-label-header">
<template slot-scope="scope">
@ -31,7 +35,11 @@
<span>{{ getRouteStatus(scope.row.status) }}</span>
</template>
</el-table-column>
<el-table-column property="description" label="进路描述" label-class-name="bottom-table-label-header" />
<el-table-column property="description" label="进路描述" label-class-name="bottom-table-label-header">
<template slot-scope="scope">
<span>{{ getRouteName(scope.row.routeCode) }}</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
@ -111,24 +119,31 @@
</el-row>
</el-col>
</el-row>
<pop-menu ref="popMenu" :menu="menu" style="background: #DFE3E6;" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { EventBus } from '@/scripts/event-bus';
import { EventBus } from '@/scripts/event-bus'; // 996
import { menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import PopMenu from '@/components/PopMenu';
export default {
name: 'BottomTable',
components: {
PopMenu
},
data() {
return {
tableData: [{}],
stationCode: '',
sheetValue: '',
routeParam: {},
showTable: false,
sheetList: [{ label: '历史进路', value: 'historyRoute' }],
sequenceList: [],
sequenceMap: {}
sequenceMap: {},
menu: [{label: '人工触发', handler: this.artificialTrigger, disabled: false}, {label: '删除', handler: this.artificialTrigger, disabled: true}]
};
},
computed: {
@ -203,6 +218,12 @@ export default {
}
}
},
getRouteName(code) {
if (code) {
const route = this.$store.state.map.routeData[code];
return route ? route.name : '';
} else { return ''; }
},
setTrigger(triggerParam, row) {
commitOperate(menuOperate.CTC.autoTrigger, triggerParam, 3).then(({valid, operate})=>{
if (valid) {
@ -214,6 +235,10 @@ export default {
this.$message.error('设置自动触发失败!');
});
},
popMenuShow(item, type, e) {
this.routeParam = {routeCode: item.routeCode, tripNumber: item.tripNumber, force: false, duration: null};
this.$refs.popMenu.resetShowPosition({x: e.x, y:e.y});
},
cancelTrigger(triggerParam, row) {
commitOperate(menuOperate.CTC.autoTrigger, triggerParam, 3).then(({valid, operate})=>{
if (valid) {
@ -224,6 +249,16 @@ export default {
row.autoTrigger = true;
this.$message.error('取消自动触发失败!');
});
},
artificialTrigger() {
commitOperate(menuOperate.CTC.setRoute, this.routeParam, 3).then(({valid, operate})=>{
if (valid) {
this.$message.success('人工触发成功!');
}
}).catch((e) => {
console.error(e);
this.$message.error('人工触发失败!');
});
}
}
};

View File

@ -51,7 +51,7 @@ export default {
},
commit() {
this.show = false;
this.$emit('routeCommit');
this.$emit('routeCommit', '', this.time);
}
}
};

View File

@ -726,8 +726,8 @@ export default {
Handler.clear(); //
this.$store.dispatch('menuOperation/setButtonOperation', this.operation);
},
routeCommit(trainCode) {
const operate = {over: true, cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, param:{ tripNumber: trainCode || '' }};
routeCommit(trainCode, duration) {
const operate = {over: true, cmdType: CMD.CTC.CTC_SET_ROUTE, param:{ tripNumber: trainCode || '', duration: duration >= 0 ? duration : null, force: false }};
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
this.clearOperate();
}).catch((e) => {

View File

@ -121,7 +121,8 @@ export default {
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
console.log(this.buttonOperation, '***********');
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && (!this.buttonOperation || this.$route.query.ctc)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();

View File

@ -227,7 +227,7 @@ export default {
},
watch: {
'$store.state.menuOperation.menuCount': function () {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Train) && !this.buttonOperation) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Train) && (!this.buttonOperation || this.$route.query.ctc)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();

View File

@ -9,7 +9,6 @@ export default class Command {
toFound(definition, wholeParam) {
this.id = definition.operate;
console.log(wholeParam, definition.paramList, 'tripNumber-----');
(definition.paramList || []).forEach(param => {
if (wholeParam.hasOwnProperty(param.name)) {
this.command[param.name] = wholeParam[param.name];

View File

@ -404,6 +404,7 @@ export default {
CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA', label: '增加列车固定径路'},
CTC_COVER_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_COVER_RUN_PLAN_LIST_TO_EDIT_AREA', label: '导入列车固定径路'},
CTC_REMOVE_RUN_PLAN_FROM_EDIT_AREA:{value: 'CTC_REMOVE_RUN_PLAN_FROM_EDIT_AREA', label: '删除列车固定径路'},
CTC_RELEASE_RUN_PLAN_TO_SIMULATION:{value: 'CTC_RELEASE_RUN_PLAN_TO_SIMULATION', label: '运行计划发布至CTC'}
CTC_RELEASE_RUN_PLAN_TO_SIMULATION:{value: 'CTC_RELEASE_RUN_PLAN_TO_SIMULATION', label: '运行计划发布至CTC'},
CTC_SET_ROUTE:{value: 'CTC_SET_ROUTE', label: 'CTC办理进路'}
}
};

View File

@ -1761,15 +1761,15 @@ export const OperationEvent = {
},
// 点灯 (大铁)
signalLight: {
menuButton: {
operation: '3231',
menuButton: {
operation: '3231',
domId: '_Tips-Signal-signalLight-MenuButton{BOTTOM}'
}
},
// 灭灯 (大铁)
signalDestroy: {
menuButton: {
operation: '3232',
menuButton: {
operation: '3232',
domId: '_Tips-Signal-signalDestroy-MenuButton{BOTTOM}'
}
}
@ -2991,16 +2991,16 @@ export const OperationEvent = {
},
// 引导总锁Station_Master_Lock
stationMasterLock: {
menuButton: {
operation: '621',
menuButton: {
operation: '621',
domId: '_Tips-Station-stationMasterLock'
},
leftButton: {
operation: '6211',
operation: '6211',
domId: '_Tips-Station-stationMasterLock-leftButton'
},
rightButton: {
operation: '6212',
operation: '6212',
domId: '_Tips-Station-stationMasterLock-rightButton'
}
}
@ -3775,9 +3775,16 @@ export const OperationEvent = {
// 运行计划发布至CTC
releaseTrainFixedPath:{
menu: {
operation: '1126 ',
operation: '1126',
domId: '_Tips-CTC-releaseTrainFixedPath-Menu{TOP}'
}
},
// 设置进路
setRoute: {
menu: {
operation: '1127',
domId: '_Tips-CTC-setRoute-Menu{TOP}'
}
}
}

View File

@ -3,6 +3,7 @@
title="车站股道图"
:visible.sync="dialogVisible"
width="99%"
z-index="3000"
top="5vh"
class="lineBoard"
center
@ -20,13 +21,28 @@
{{ item.name }}
</div>
</div>
<div v-for="item in trackList" :key="item.id" style="display: flex; justify-content: space-between;border-top: 1px solid #fff;padding: 3px;height: 36px;align-items: center;">
<div
<div v-for="item in trackList" :key="item.id" style="display: flex; justify-content: space-between;border-top: 1px solid #fff;padding: 3px;height: 36px;align-items: center;" :style="{background: item.oddNumber? '#BAC4CF':'#D2D8DB'}">
<!--<div
style="padding: 5px 20px;border-radius: 5px;border-width: 2px;border-style: solid;width: 120px;"
:style="{borderColor: item.occupied ? '#f00': '#DFE3E6', fontWeight: item.occupied? 'bold': 'normal', color:item.occupied? '#f00':'#1e2024' }"
>{{ item.trackName }}</div>
<div v-show="!item.noData" style="width: 80px;">{{ item.tripNumber }}</div>
<div v-show="!item.noData" style="background: #FFCBEC;border: 1px solid #315FD1;border-radius: 3px;font-size: 10px;width: 60px;" :style="{borderColor:item.trainType?'#315FD1':'#DFE3E6'}">{{ item.trainType?'':'' }}</div>
>{{ item.trackName }}</div>-->
<div style="width: 150px;display: flex;">
<el-dropdown v-show="item.showTrack" trigger="click">
<div
style="width: 110px;padding: 5px 20px;border-radius: 5px;border-width: 2px;border-style: solid;display: flex;justify-content: space-between;background: #fff;"
:style="{borderColor: item.occupied ? '#f00': '#DFE3E6', fontWeight: item.occupied? 'bold': 'normal', color:item.occupied? '#f00':'#1e2024' }"
>
<span>{{ item.trackName }}</span>
<i class="el-icon-caret-bottom" />
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>黄金糕</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<div v-show="item.showTrack" style="width: 30px;height: 30px;background: #fff;border-radius: 5px;margin-left: 5px;" />
</div>
<div v-show="!item.noData" style="width: 80px;color: #f00;font-weight: bolder;">{{ item.tripNumber }}</div>
<div v-show="!item.noData" style="background: #FFCBEC;border: 1px solid #315FD1;border-radius: 3px;font-size: 10px;width: 15px;" :style="{borderColor:item.trainType?'#315FD1':'#DFE3E6'}">{{ item.trainType?'':'' }}</div>
<div v-show="!item.noData" style="width: 60px;">{{ item.trainDistanceInfo }}</div>
<div v-show="!item.noData" style="width: 120px;">
<el-select v-model="item.process" placeholder="请选择" size="mini" style="width: 120px;" :disabled="true">
@ -51,15 +67,15 @@
</div>
<div v-show="item.receivingRouteCode" :style="{ background: item.arrive ? '#29CA42': '#ccc' }" class="button-box-fir" style="margin-left: 10px;cursor: default;" @click="doShowRecDep(item, 'arrive')">到点</div>
</div>
<div v-show="!item.noData" style="width: 120px">
<div v-show="!item.noData" style="width: 120px;color: #f00;">
<el-row><div>{{ item.arriveTime || '-' }}</div></el-row>
<el-row><div>{{ item.departureTime|| '-' }}</div></el-row>
</div>
<div v-show="!item.noData" style="width: 120px">
<div v-show="!item.noData" style="width: 120px;color: #f00;font-style:italic;">
<el-row><div>{{ item.planArriveTime|| '-' }}</div></el-row>
<el-row><div>{{ item.planDepartureTime || '-' }}</div></el-row>
</div>
<div v-show="!item.noData" style="width: 150px">
<div v-show="!item.noData" style="width: 150px;color: #f00;">
<el-row>{{ item.receivingDirection||'-' }}</el-row>
<el-row>{{ item.departureDirection||'-' }}</el-row>
</div>
@ -77,19 +93,47 @@
</div>
<div v-show="item.departureRouteCode" :style="{ background: item.departure ? '#29CA42': '#ccc' }" class="button-box-fir" style="margin-left: 10px;cursor: default;" @click="doShowRecDep(item, 'departure')">发点</div>
</div>
<div v-show="!item.noData" style="width: 80px;">{{ item.tripNumber }}</div>
<div style="width: 120px" :style="{fontWeight: item.occupied? 'bold': 'normal', color:item.occupied? '#f00': '#1e2024' }">{{ item.trackName }}</div>
<div v-show="!item.noData" style="width: 80px;color: #f00;font-weight: bolder;">{{ item.tripNumber }}</div>
<div style="width: 120px" :style="{fontWeight: item.occupied? 'bold': 'normal', color:item.occupied? '#f00': '#1e2024' }">{{ item.showTrack ? item.trackName: '' }}</div>
</div>
</div>
<div style="background: #DFE3E6;">
<div style="padding: 5px;text-align: center;width: 700px;margin: 0 auto;">
<div style="background: #999EA7;display: flex;align-items: center;">
<div class="button-box">
<img :src="arrowPic" class="img-button">
</div>
<div class="button-box">
<img :src="controlPanelPic" class="img-button">
</div>
<div class="button-box">
<img :src="t3Pic" class="img-button">
</div>
<div class="button-box">
<img :src="panelPic" class="img-button">
</div>
<div class="button-box">
<img :src="trainPic" class="img-button">
</div>
<div class="button-box">
<img :src="linkPic" class="img-button">
</div>
<div class="button-box">
<img :src="cameraPic" class="img-button">
</div>
<div style="width: 270px;height: 36px; background: #fff;border-radius: 5px;" />
<div class="button-box">
<img :src="unknowPic" class="img-button">
</div>
<div class="button-box">
<div class="img-button"></div>
</div>
<div class="button-box">
<div class="img-button"></div>
</div>
</div>
</div>
</div>
<!--<div style="display: flex; justify-content: center;">-->
<!--<img class="img-box" :src="arrowPic" />-->
<!--<img class="img-box" :src="picT3" />-->
<!--<img class="img-box" :src="controlPanelPic" />-->
<!--<img class="img-box" :src="trainPic" />-->
<!--<img class="img-box" :src="controlPanel2Pic"/>-->
<!--<img class="img-box" :src="linkPic"/>-->
<!--<img class="img-box" :src="cameraPic"/>-->
<!--</div>-->
<div style="display: flex;margin-top: 5px;justify-content: space-around;background: #DEE2E5;">
<div style="width: 49%;margin-top: 10px;">
<div style="display: flex;align-items: center;">
@ -235,13 +279,16 @@ import ArrowPic from '@/assets/datie/arrow.png';
import PicT3 from '@/assets/datie/picT3.png';
import ControlPanelPic from '@/assets/datie/controlPanel.png';
import ControlPanel2Pic from '@/assets/datie/controlPanel2.png';
import TrainPic from '@/assets/datie/train.png';
import LinkPic from '@/assets/datie/link.png';
import CameraPic from '@/assets/datie/camera.png';
import RecDep from '@/jmapNew/theme/datie_02/menus/dialog/recDep';
import RouteSelection from '@/jmapNew/theme/datie_02/menus/dialog/routeSelection1';
import PopMenu from '@/components/PopMenu';
import { menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import T3Pic from '@/assets/ctc_icon/t3.png';
import TrainPic from '@/assets/ctc_icon/train.png';
import PanelPic from '@/assets/ctc_icon/panel.png';
import LinkPic from '@/assets/ctc_icon/link.png';
import CameraPic from '@/assets/ctc_icon/camera.png';
import UnknowPic from '@/assets/ctc_icon/unknow.png';
export default {
name: 'LineBoard',
components: {
@ -259,10 +306,13 @@ export default {
arrowPic: ArrowPic,
picT3: PicT3,
controlPanelPic: ControlPanelPic,
trainPic: TrainPic,
controlPanel2Pic: ControlPanel2Pic,
t3Pic: T3Pic,
panelPic: PanelPic,
trainPic: TrainPic,
linkPic: LinkPic,
cameraPic: CameraPic,
unknowPic: UnknowPic,
searchTrain: '',
andDown: 'all',
unknow: '',
@ -311,12 +361,16 @@ export default {
}
if (item && item.trackView && item.trackView.trackLineMap) {
for (const key in item.trackView.trackLineMap) {
this.standTrackSectionMap[key].lines = item.trackView.trackLineMap[key];
if (this.standTrackSectionMap[key]) {
this.standTrackSectionMap[key].lines = item.trackView.trackLineMap[key];
}
}
}
if (item && item.trackView && item.trackView.sectionOccupiedMap) {
for (const key in item.trackView.sectionOccupiedMap) {
this.standTrackSectionMap[key].occupied = item.trackView.sectionOccupiedMap[key];
if (this.standTrackSectionMap[key]) {
this.standTrackSectionMap[key].occupied = item.trackView.sectionOccupiedMap[key];
}
}
}
});
@ -327,18 +381,17 @@ export default {
}
}
this.trackList = [];
let oddNumber = true;
for (const key in this.standTrackSectionMap) {
if (this.standTrackSectionMap[key].belongStation === this.selectCode) {
if (this.standTrackSectionMap[key].lines && this.standTrackSectionMap[key].lines.length) {
this.standTrackSectionMap[key].lines.forEach((item, index) => {
if (!index) {
this.trackList.push(Object.assign({}, item, { trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied }));
} else {
this.trackList.push(Object.assign({}, item));
}
this.trackList.push(Object.assign({}, item, { trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, oddNumber: oddNumber, showTrack: index === 0 }));
});
oddNumber = !oddNumber;
} else {
this.trackList.push({trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, noData: true});
this.trackList.push({trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, noData: true, oddNumber: oddNumber, showTrack: true});
oddNumber = !oddNumber;
}
}
}
@ -531,4 +584,27 @@ export default {
.pop-background {
background: #DFE3E6;
}
.img-button{
width: 30px;
height: 30px;
background: #EBEBEB;
border: 2px inset #fff;
border-radius: 5px;
line-height: 27px;
}
.img-button:hover{
border: 2px outset #fff;
}
.img-button:active{
border: 2px outset #fff;
}
.button-box{
padding: 3px;
background: #EBEBEB;
width: 36px;
height: 36px;
border-radius: 5px;
margin: 3px;
cursor: pointer;
}
</style>