This commit is contained in:
joylink_cuiweidong 2022-06-15 09:58:03 +08:00
commit 30ca5c7cb1
14 changed files with 1601 additions and 1311 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1013 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/assets/ctc_icon/t3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 953 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,61 +1,43 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-bar v-if="isCtc" ref="menuBar" :selected="selected" />
<div v-if="isCtc" style="position: absolute; top: 35px;z-index: 10;background: #F0F0F0;padding: 2px;height: 65px;width: 100%;">
<div style="display: flex;">
<img :src="ctcBarIcon1" class="img-box" />
<img :src="ctcBarIcon2" class="img-box" />
<img :src="ctcBarIcon3" class="img-box" />
<img :src="ctcBarIcon4" class="img-box" />
<img :src="ctcBarIcon5" class="img-box" />
<img :src="ctcBarIcon6" class="img-box" />
<img :src="ctcBarIcon7" class="img-box" />
<img :src="ctcBarIcon8" class="img-box" />
<img :src="ctcBarIcon9" class="img-box" />
<img :src="ctcBarIcon10" class="img-box" />
<img :src="ctcBarIcon11" class="img-box" />
<img :src="ctcBarIcon12" class="img-box" />
<img :src="ctcBarIcon13" class="img-box" />
<img :src="ctcBarIcon14" class="img-box" />
<img :src="ctcBarIcon15" class="img-box" />
<img :src="ctcBarIcon16" class="img-box" />
<img :src="ctcBarIcon17" class="img-box" />
<img :src="ctcBarIcon18" class="img-box" @click="handleRunplan"/>
</div>
<div style="display: flex;padding: 2px;border-top: 2px solid #D1D1D1;margin-top: 3px">
<div class="img-box" style="width: 100px;height: 25px;line-height: 21px;text-align: center;">调度命令</div>
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;"></div>
<div class="img-box" style="width: 100px;height: 25px;line-height: 21px;text-align: center;margin-left: 100px;">阶段计划</div>
<div class="img-box" style="width: 100px;height: 25px;line-height: 21px;text-align: center;margin-left: 5px;">阶段记事</div>
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">{{ dateString1 + ' ' + time }}</div>
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">同步站机通信中断</div>
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">与中心通信正常</div>
</div>
</div>
<!--<div v-if="$store.state.training.prdType == '01'" class="alarm-window">-->
<!--<div v-for="elem in alarmMessages" :key="elem.id" style="font-size: 14px;">-->
<!--{{ elem.message }}-->
<!--</div>-->
<!--</div>-->
<!--<div class="device-status-window">-->
<!--<div class="device-status-button" :style="{background: mode === 'liansuo' ? '#0f0': '#f00'}" @click="selectedMode('liansuo')">联锁I</div>-->
<!--<div class="device-status-button" :style="{background: mode === 'ctc' ? '#0f0': '#f00'}" @click="selectedMode('ctc')">CTC</div>-->
<!--<div class="device-status-button" style="background: #f00;">联锁II</div>-->
<!--<div class="device-status-button" style="background: #0f0;">操作A</div>-->
<!--<div class="device-status-button" style="background: #ff0;">操作B</div>-->
<!--<div class="device-status-button" style="background: #f00;">维修机</div>-->
<!--</div>-->
<!--<div v-if="$store.state.training.prdType == '01'" class="warning-window">-->
<!--<div v-for="elem in warningMessages" :key="elem.id" style="font-size: 14px;color: #ff0">-->
<!--{{ elem.message }}-->
<!--</div>-->
<!--</div>-->
<div v-if="$store.state.training.prdType == '01'&& !isCtc" style="width: 1405px;position: fixed;height: 30px;background: #808080;z-index: 9;bottom: 0;left: 0;display: flex;">
<div style="width: 60%;height: 30px;line-height: 30px;text-align: center;">提示信息窗</div>
<div style="width: 40%;height: 30px;line-height: 30px;text-align: center;border-left: 2px #ccc solid;">{{ '操控A:主机' + ' ' + dateString + ' ' + time }}</div>
</div>
<div v-if="isCtc" style="position: absolute; top: 35px;z-index: 10;background: #F0F0F0;padding: 2px;height: 65px;width: 100%;">
<div style="display: flex;">
<img :src="ctcBarIcon1" class="img-box">
<img :src="ctcBarIcon2" class="img-box">
<img :src="ctcBarIcon3" class="img-box">
<img :src="ctcBarIcon4" class="img-box">
<img :src="ctcBarIcon5" class="img-box">
<img :src="ctcBarIcon6" class="img-box">
<img :src="ctcBarIcon7" class="img-box">
<img :src="ctcBarIcon8" class="img-box">
<img :src="ctcBarIcon9" class="img-box">
<img :src="ctcBarIcon10" class="img-box">
<img :src="ctcBarIcon11" class="img-box">
<img :src="ctcBarIcon12" class="img-box">
<img :src="ctcBarIcon13" class="img-box">
<img :src="ctcBarIcon14" class="img-box">
<img :src="ctcBarIcon15" class="img-box">
<img :src="ctcBarIcon16" class="img-box">
<img :src="ctcBarIcon17" class="img-box">
<img :src="ctcBarIcon18" class="img-box" @click="handleRunplan">
</div>
<div style="display: flex;padding: 2px;border-top: 2px solid #D1D1D1;margin-top: 3px">
<div class="img-box" style="width: 100px;height: 25px;line-height: 21px;text-align: center;">调度命令</div>
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;" />
<div class="img-box" style="width: 100px;height: 25px;line-height: 21px;text-align: center;margin-left: 100px;">阶段计划</div>
<div class="img-box" style="width: 100px;height: 25px;line-height: 21px;text-align: center;margin-left: 5px;">阶段记事</div>
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">{{ dateString1 + ' ' + time }}</div>
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">同步站机通信中断</div>
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">与中心通信正常</div>
</div>
</div>
<div v-if="$store.state.training.prdType == '01'&& !isCtc" style="width: 1405px;position: fixed;height: 30px;background: #808080;z-index: 9;bottom: 0;left: 0;display: flex;">
<div style="width: 60%;height: 30px;line-height: 30px;text-align: center;">提示信息窗</div>
<div style="width: 40%;height: 30px;line-height: 30px;text-align: center;border-left: 2px #ccc solid;">{{ '操控A:主机' + ' ' + dateString + ' ' + time }}</div>
</div>
<menu-button v-if="!isCtc" ref="menuButton" :selected="selected" />
<menu-button-ctc v-if="isCtc" ref="menuButtonCtc" :selected="selected" />
<menu-button-ctc v-if="isCtc" ref="menuButtonCtc" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" />
@ -66,7 +48,8 @@
<passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" />
<passive-Timeout ref="passiveTimeout" />
<runplan-pane v-if="isCtc" ref="runplanPane" />
<bottom-table ref="bottomTable" />
<bottom-table ref="bottomTable" />
<menu-panel v-if="isCtc" ref="menuPanel" />
</div>
</template>
@ -88,6 +71,7 @@ import PassiveTimeout from './passiveDialog/timeout';
import { timeFormat } from '@/utils/date';
import { prefixIntrger } from '@/utils/date';
import BottomTable from './bottomTable';
import MenuPanel from './menuPanel';
import CtcBarIcon1 from '@/assets/ctc_icon/pic1.png';
import CtcBarIcon2 from '@/assets/ctc_icon/pic2.png';
import CtcBarIcon3 from '@/assets/ctc_icon/pic3.png';
@ -121,9 +105,10 @@ export default {
PassiveAlarm,
PassiveContorl,
PassiveTimeout,
MenuButtonCtc,
MenuButtonCtc,
RunplanPane,
BottomTable
BottomTable,
MenuPanel
},
props: {
selected: {
@ -133,49 +118,49 @@ export default {
}
}
},
data() {
data() {
return {
alarmMessages: [
{ id: 1, message: '这是告警信息一' },
{ id: 2, message: '这是告警信息二' },
{ id: 3, message: '这是告警信息三' },
{ id: 4, message: '这是告警信息四' },
{ id: 5, message: '这是告警信息五' },
{ id: 6, message: '这是告警信息六' },
{ id: 7, message: '这是告警信息七' },
],
warningMessages: [
{ id: 1, message: '这是预警信息一' },
{ id: 2, message: '这是预警信息二' },
{ id: 3, message: '这是预警信息三' },
{ id: 4, message: '这是预警信息四' },
{ id: 5, message: '这是预警信息五' },
{ id: 6, message: '这是预警信息六' },
{ id: 7, message: '这是预警信息七' },
],
time: '00:00:00',
dateString: '',
dateString1: '',
ctcBarIcon1: CtcBarIcon1,
ctcBarIcon2: CtcBarIcon2,
ctcBarIcon3: CtcBarIcon3,
ctcBarIcon4: CtcBarIcon4,
ctcBarIcon5: CtcBarIcon5,
ctcBarIcon6: CtcBarIcon6,
ctcBarIcon7: CtcBarIcon7,
ctcBarIcon8: CtcBarIcon8,
ctcBarIcon9: CtcBarIcon9,
ctcBarIcon10: CtcBarIcon10,
ctcBarIcon11: CtcBarIcon11,
ctcBarIcon12: CtcBarIcon12,
ctcBarIcon13: CtcBarIcon13,
ctcBarIcon14: CtcBarIcon14,
ctcBarIcon15: CtcBarIcon15,
ctcBarIcon16: CtcBarIcon16,
ctcBarIcon17: CtcBarIcon17,
ctcBarIcon18: CtcBarIcon18,
}
},
{ id: 2, message: '这是告警信息二' },
{ id: 3, message: '这是告警信息三' },
{ id: 4, message: '这是告警信息四' },
{ id: 5, message: '这是告警信息五' },
{ id: 6, message: '这是告警信息六' },
{ id: 7, message: '这是告警信息七' }
],
warningMessages: [
{ id: 1, message: '这是预警信息一' },
{ id: 2, message: '这是预警信息二' },
{ id: 3, message: '这是预警信息三' },
{ id: 4, message: '这是预警信息四' },
{ id: 5, message: '这是预警信息五' },
{ id: 6, message: '这是预警信息六' },
{ id: 7, message: '这是预警信息七' }
],
time: '00:00:00',
dateString: '',
dateString1: '',
ctcBarIcon1: CtcBarIcon1,
ctcBarIcon2: CtcBarIcon2,
ctcBarIcon3: CtcBarIcon3,
ctcBarIcon4: CtcBarIcon4,
ctcBarIcon5: CtcBarIcon5,
ctcBarIcon6: CtcBarIcon6,
ctcBarIcon7: CtcBarIcon7,
ctcBarIcon8: CtcBarIcon8,
ctcBarIcon9: CtcBarIcon9,
ctcBarIcon10: CtcBarIcon10,
ctcBarIcon11: CtcBarIcon11,
ctcBarIcon12: CtcBarIcon12,
ctcBarIcon13: CtcBarIcon13,
ctcBarIcon14: CtcBarIcon14,
ctcBarIcon15: CtcBarIcon15,
ctcBarIcon16: CtcBarIcon16,
ctcBarIcon17: CtcBarIcon17,
ctcBarIcon18: CtcBarIcon18
};
},
computed: {
...mapGetters('config', [
'width'
@ -183,19 +168,19 @@ export default {
isShowBar() {
return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07';
},
isCtc() {
return this.$route.query.ctc
}
isCtc() {
return this.$route.query.ctc;
}
},
watch: {
isShowBar(val) {
val && this.$store.dispatch('config/updateMenuBar');
},
'$store.state.socket.simulationTimeSync': function (time) { // 仿
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
this.initDate(date);
}
'$store.state.socket.simulationTimeSync': function (time) { // 仿
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
this.initDate(date);
}
},
mounted() {
this.$nextTick(() => {
@ -217,21 +202,21 @@ export default {
beforeDestroy() {
window.onclick = function (e) {};
},
methods: {
initDate(date) {
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}:${prefixIntrger(date.getSeconds(), 2)}`;
const years = date.getFullYear() + '';
let months = date.getMonth() + 1 + '';
let dates = date.getDate() + '';
if (months.length < 2) { months = '0' + months; }
if (dates.length < 2) { dates = '0' + dates; }
this.dateString = years + months + dates;
this.dateString1 = years + '年' + months + '月' + dates + '日';
},
handleRunplan(){
this.$refs.runplanPane.doShow()
methods: {
initDate(date) {
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}:${prefixIntrger(date.getSeconds(), 2)}`;
const years = date.getFullYear() + '';
let months = date.getMonth() + 1 + '';
let dates = date.getDate() + '';
if (months.length < 2) { months = '0' + months; }
if (dates.length < 2) { dates = '0' + dates; }
this.dateString = years + months + dates;
this.dateString1 = years + '年' + months + '月' + dates + '日';
},
handleRunplan() {
this.$refs.runplanPane.doShow();
}
}
}
};
</script>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,302 @@
<template>
<div v-if="dialogShow" id="faultChoose">
<!-- <div class="falutChooseTitle">ceshi</div>-->
<div class="card" style="padding: 5px;">
<div style="background: #999EA7;display: flex;align-items: center;">
<div class="button-box">
<img :src="t3Pic" class="img-button">
</div>
<div class="button-box">
<img :src="trainPic" class="img-button">
</div>
<div class="button-box">
<img :src="panelPic" class="img-button" @click="showLineBoard">
</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: 205px;height: 36px; background: #fff;border-radius: 5px;" />
<div class="button-box">
<img :src="settingPic" class="img-button">
</div>
<div class="button-box">
<img :src="shutdownPic" class="img-button">
</div>
</div>
</div>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { MouseEvent } from '@/scripts/ConstDic';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
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 SettingPic from '@/assets/ctc_icon/setting.png';
import ShutdownPic from '@/assets/ctc_icon/shutdown.png';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'RouteCreate',
components: {
NoticeInfo
},
data() {
return {
dialogShow: true,
loading: false,
selected: null,
t3Pic: T3Pic,
panelPic: PanelPic,
trainPic: TrainPic,
linkPic: LinkPic,
cameraPic: CameraPic,
settingPic: SettingPic,
shutdownPic: ShutdownPic
};
},
computed: {
...mapGetters('map', [
'stationList',
'sectionList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
createDisable() {
return !(this.groupNumber1 && this.groupNumber1.length === 4 && this.nowSectionCode && this.newTrainCode && this.newTrainCode.length === 8);
},
updateDisable() {
return !(this.newTrainCode && this.newTrainCode.length === 8);
},
moveDisable() {
return !this.newSectionCode;
},
deleteDisable() {
return !this.nowTrainCode;
}
},
watch: {
'$store.state.menuOperation.selectedCount':function(em) {
const device = this.$store.state.menuOperation.selected;
if (device && device.code && device._type === 'Section') {
this.nowSectionCode = device.code;
} else if (device && device.code && device._type === 'Train' && device._event === MouseEvent.Left) {
this.doShow(device);
}
}
},
mounted() {
this.dragEvent(); // 24
},
methods: {
doShow(selected) {
this.dialogShow = true;
this.$nextTick(function () {
this.dragEvent();
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
showLineBoard() {
EventBus.$emit('showLineBoard');
},
dragEvent() {
const offset = this.offset;
const dragDom = document.querySelector('#faultChoose');
dragDom.style.cursor = 'move';
/** 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);*/
const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
dragDom.onmousedown = (e) => {
/** 鼠标按下,计算当前元素距离可视区的距离*/
const disX = e.clientX;
const disY = e.clientY;
/** 获取到的值带px 正则匹配替换*/
let styL, styT;
/** 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px*/
if (sty.left.includes('%')) {
// eslint-disable-next-line no-useless-escape
styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100);
styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
} else {
// eslint-disable-next-line no-useless-escape
styL = +sty.left.replace(/\px/g, '');
// eslint-disable-next-line no-useless-escape
styT = +sty.top.replace(/\px/g, '');
}
document.onmousemove = function (e) {
/** 通过事件委托,计算移动的距离*/
const l = e.clientX - disX;
const t = e.clientY - disY;
/** 移动当前元素*/
// dragDom.style.left = `${l + styL}px`;
// dragDom.style.top = `${t + styT}px`;
/** 移动当前元素*/
if (l + styL < 0) {
dragDom.style.left = `0px`;
} else if (l + styL > document.body.clientWidth - dragDom.clientWidth - 10) {
dragDom.style.left = `${document.body.clientWidth - dragDom.clientWidth - 10}px`;
} else {
dragDom.style.left = `${l + styL}px`;
}
if (t + styT <= offset) {
dragDom.style.top = offset + `px`;
} else if (t + styT > document.body.clientHeight - dragDom.clientHeight - 10) {
dragDom.style.top = `${document.body.clientHeight - dragDom.clientHeight - 10}px`;
} else {
dragDom.style.top = `${t + styT}px`;
}
/** 将此时的位置传出去*/
// binding.value({ x: e.pageX, y: e.pageY });
};
document.onmouseup = function () {
document.onmousemove = null;
document.onmouseup = null;
};
};
}
}
};
</script>
<style lang="scss">
#faultChoose .el-button--mini {
margin-left: 5px;
}
.triggerFaultListLeft{
display: inline-block;
float: left;
width: 730px;
}
// safariqq360
//
#faultChoose .el-table__body-wrapper::-webkit-scrollbar {
width: 6px;
height: 6px;
// height: 110px;
background-color: #FFFFFF;
}
/*定义滚动条轨道 内阴影+圆角*/
#faultChoose .el-table__body-wrapper::-webkit-scrollbar-track {
// box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
background-color: #FFFFFF;;
}
/*定义滑块 内阴影+圆角*/
#faultChoose .el-table__body-wrapper::-webkit-scrollbar-thumb {
border-radius: 10px;
// box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #eaeaea;
}
/*滑块效果*/
#faultChoose .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
border-radius: 5px;
// box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
background: rgba(0,0,0,0.4);
}
/*IE滚动条颜色*/
html {
scrollbar-face-color:#bfbfbf;/*滚动条颜色*/
scrollbar-highlight-color:#000;
scrollbar-3dlight-color:#000;
scrollbar-darkshadow-color:#000;
scrollbar-Shadow-color:#adadad;/*滑块边色*/
scrollbar-arrow-color:rgba(0,0,0,0.4);/*箭头颜色*/
scrollbar-track-color:#eeeeee;/*背景颜色*/
}
</style>
<style rel="stylesheet/scss" lang="scss" scoped>
.triggerFaultInfo{
margin-bottom:10px;
padding: 10px 0px 10px 15px;
}
.triggerFaultList{
font-size: 14px;
margin-top: 10px;
line-height: 20px;
}
.triggerFaultTitle{
font-size: 15px;
font-weight: bold;
}
.falutChooseTitle{
cursor: all-scroll;
background-color: #c0c0c0;
height: 30px;
line-height: 30px;
color: #000;
padding-left: 10px;
border-radius: 6px 6px 0 0;
}
#faultChoose{
width: 510px;
position: absolute;
left: 30%;
top: 20%;
border-radius: 6px;
z-index:2009;
background-color: #E2E2E2;
}
.faultChooseFoot{
display: inline-block;
float: right;
margin-right: 20px;
margin-top: 20px;
}
.closeFalutChoose{
position: absolute;
right: 0px;
top: 0px;
width: 30px;
height: 30px;
cursor: pointer;
line-height: 30px;
}
.closeFalutChooseIn{
font-size: 20px;
margin-left: 5px;
background-color: #f00;
color: #FFF;
border: 1px solid #fff;
border-radius: 5px;
}
.img-button{
width: 30px;
height: 30px;
background: #EBEBEB;
border: 2px inset #fff;
border-radius: 5px;
}
.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>

View File

@ -24,7 +24,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
// import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
import AddSpareTrain from './dialog/addSpareTrain';
import DrawSelect from './dialog/drawSelect';

View File

@ -10,18 +10,18 @@
top="25vh"
>
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="110px" class="demo-ruleForm">
<el-form-item prop="email">
<template slot="label">
<span>邮箱(账号)</span>
</template>
<el-input v-model="form.email" />
</el-form-item>
<el-form-item prop="nickname">
<template slot="label">
<span>&emsp;&emsp;</span>
</template>
<el-input v-model="form.nickname" autocomplete="new-password" />
</el-form-item>
<el-form-item prop="email">
<template slot="label">
<span>邮箱(账号)</span>
</template>
<el-input v-model="form.email" />
</el-form-item>
<el-form-item label="密码:" prop="password">
<template slot="label">
<span>&emsp;&emsp;</span>

View File

@ -1,381 +1,387 @@
<template>
<el-dialog
title="车站股道图"
:visible.sync="dialogVisible"
width="99%"
top="5vh"
class="lineBoard"
center
:before-close="handleClose">
<div style="height: 500px; overflow-y: auto;background: #DFE3E6;padding: 7px;">
<div style="width: 100%;display: flex;align-items: center;margin-bottom: 10px;">
<div
:key="item.code"
v-for="item in stationList"
class="tab-box"
@click="selectStandCode(item.code)"
:style="{background: selectCode === item.code ? '#F1F1F1': '#DBDBDB', color: selectCode === item.code ? '#000': '#ccc'}">
{{ item.name }}
</div>
</div>
<div :key="item.id" v-for="item in infoList" style="display: flex; justify-content: space-between;border-top: 1px solid #fff;padding: 3px;height: 36px;align-items: center;">
<div style="padding: 5px 20px;border-radius: 5px;border-width: 2px;border-style: solid;"
:style="{borderColor: item.occupied ? '#f00': '#DFE3E6', fontWeight: item.occupied? 'bold': 'normal', color:item.occupied? '#f00':'#1e2024' }">{{item.trackName}}</div>
<div>{{item.tripNumber}}</div>
<div style="background: #FFCBEC;border: 1px solid #315FD1;border-radius: 3px;font-size: 10px;">{{ item.trainType?'客':'' }}</div>
<div>{{item.trainDistanceInfo}}</div>
<div>
<el-select v-model="item.process" placeholder="请选择" size="mini" style="width: 120px;" :disabled="true">
<el-option
v-for="elem in sectionStatusList"
:key="elem.value"
:label="elem.label"
:value="elem.value"
/>
</el-select>
</div>
<div style="display: flex;">
<div :style="{ background: item.receivingNotice ? '#29CA42': '#ccc' }" class="button-box-fir" @click="doShowRecDep(item,'rec')">接预</div>
<div
class="button-box-sec"
:style="{ background: handleBackground(item.receivingRouteLock, item.receivingRouteAutoTrigger) }"
@contextmenu="popMenuShow(item, 'rec' ,$event)"
@click="doShowRoute(item, 'rec')">
{{ '接路' + (item.receivingRouteLock ? '':getRouteName(item.receivingRouteCode)) }}
</div>
<div :style="{ background: item.arrive ? '#29CA42': '#ccc' }" class="button-box-fir" style="margin-left: 10px;cursor: default;">到点</div>
</div>
<div>
<div>{{item.arriveTime}}</div>
<div>{{item.departureTime}}</div>
</div>
<div>
<div>{{ item.planArriveTime }}</div>
<div>{{ item.planDepartureTime }}</div>
</div>
<div></div><!--起点--终点-->
<div style="display: flex;">
<div :style="{ background: item.departureNotice ? '#29CA42': '#ccc' }" class="button-box-fir" @click="doShowRecDep(item,'dep')">发预</div>
<div
class="button-box-sec"
:style="{ background: handleBackground(item.departureRouteLock, item.departureRouteAutoTrigger) }"
@contextmenu="popMenuShow(item, 'dep' ,$event)"
@click="doShowRoute(item, 'dep')">
{{ '发路' + (item.departureRouteLock ? '':getRouteName(item.departureRouteCode)) }}
</div>
<div :style="{ background: item.departure ? '#29CA42': '#ccc' }" class="button-box-fir" style="margin-left: 10px;cursor: default;">发点</div>
</div>
<div>{{ item.tripNumber }}</div>
<div :style="{fontWeight: item.occupied? 'bold': 'normal', color:item.occupied? '#f00': '#1e2024' }">{{ item.trackName }}</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;">
<div style="background: #0f0;">{{ `进路序列模式:&lt;${readOnly ? '只读':'可修改'}&gt;` }}</div>
<el-button size="mini" style="padding: 7px 4px;" disabled>修改申请</el-button>
<el-button size="mini" style="padding: 7px 4px;" disabled>只读申请</el-button>
<el-button size="mini" style="padding: 7px 4px;margin-left: 30px;">查找列车</el-button>
<el-input style="width: 70px;height: 25px;" size="mini" v-model="searchTrain" />
<div style="margin-left: 10px;">上下行</div>
<el-select size="mini" v-model="andDown" style="width: 80px;margin-left: 5px;">
<el-option
v-for="item in andDownList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div style="margin-left: 10px;">接车口</div>
<el-select size="mini" v-model="andDown" style="width: 100px;margin-left: 5px;" disabled>
<el-option
v-for="item in andDownList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div style="margin-left: 10px;">发车口</div>
<el-select size="mini" v-model="andDown" style="width: 100px;margin-left: 5px;" disabled>
<el-option
v-for="item in andDownList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<el-table
:data="tableData"
style="width: 100%;margin-top: 10px;"
highlight-current-row
:row-style="{ background: '#ff0' }"
height="180"
border
>
<el-table-column width="50" label="序号" align="center">
<template slot-scope="scope">
<!--:style="{ background: scope.$index? '#f00':'#ff0' }" -->
<div>{{ scope.$index }}</div>
</template>
</el-table-column>
<el-table-column property="date" label="注意确认"/>
<el-table-column property="tripNumber" label="车次"/>
<el-table-column property="trackName" label="股道"/>
<el-table-column property="autoTrigger" label="自触">
<template slot-scope="scope">
<div style="width: 100%;height: 22px;" @contextmenu="popMenuShow(scope.row, '' ,$event)">{{ scope.row.autoTrigger? '√':'' }}</div>
</template>
</el-table-column>
<el-table-column property="type" label="类型"/>
<el-table-column property="status" label="状态"/>
<el-table-column property="startTime" label="开始时间"/>
<el-table-column property="planTime" label="计划时间"/>
<el-table-column property="direction" label="方向"/>
<el-table-column property="routeCode" label="序列描述">
<template slot-scope="scope">
<div>{{getRouteName(scope.row.routeCode)}}</div>
</template>
</el-table-column>
</el-table>
<div style="width: 100%;display: flex;align-items: center;margin: 5px 0;">
<div
:key="item.code"
v-for="item in stationList"
class="tab-box"
@click="selectStandCode1(item.code)"
:style="{background: selectCode1 === item.code ? '#F1F1F1': '#DBDBDB', color: selectCode1 === item.code ? '#000': '#ccc'}">
{{ item.name }}
</div>
</div>
</div>
<div style="width: 49%;margin-top: 10px;">
<div style="display: flex;align-items: center;">
<el-select size="mini" v-model="unknow" disabled>
<el-option
v-for="item in unknowList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div>调机-J101</div>
<el-button size="mini" disabled>进路预览</el-button>
<el-select size="mini" v-model="unknow1" disabled>
<el-option
v-for="item in unknowList1"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-button size="mini" disabled>办理进路</el-button>
<el-button size="mini" disabled>发送机车</el-button>
</div>
<el-table
:data="tableData1"
style="width: 100%;margin-top: 10px;"
highlight-current-row
border
height="180"
>
<el-table-column type="index" width="50" label="勾"/>
<el-table-column property="line" label="线路"/>
<el-table-column property="method" label="方法"/>
<el-table-column property="nums" label="辆数"/>
<el-table-column property="direction" label="方向"/>
<el-table-column property="leadWire" label="牵出线"/>
<el-table-column property="status" label="状态"/>
<el-table-column property="leadRoute" label="牵出进路"/>
<el-table-column property="pushRoute" label="推入进路"/>
<el-table-column property="note" label="记事"/>
</el-table>
</div>
</div>
<rec-dep ref="recDep" />
<route-selection ref="routeSelection" />
<pop-menu ref="popMenu" :menu="menu" style="background: #DFE3E6;"/>
</el-dialog>
<el-dialog
title="车站股道图"
:visible.sync="dialogVisible"
width="99%"
top="5vh"
class="lineBoard"
center
:before-close="handleClose"
>
<div style="height: 500px; overflow-y: auto;background: #DFE3E6;padding: 7px;">
<div style="width: 100%;display: flex;align-items: center;margin-bottom: 10px;">
<div
v-for="item in stationList"
:key="item.code"
class="tab-box"
:style="{background: selectCode === item.code ? '#F1F1F1': '#DBDBDB', color: selectCode === item.code ? '#000': '#ccc'}"
@click="selectStandCode(item.code)"
>
{{ item.name }}
</div>
</div>
<div v-for="item in infoList" :key="item.id" style="display: flex; justify-content: space-between;border-top: 1px solid #fff;padding: 3px;height: 36px;align-items: center;">
<div
style="padding: 5px 20px;border-radius: 5px;border-width: 2px;border-style: solid;"
:style="{borderColor: item.occupied ? '#f00': '#DFE3E6', fontWeight: item.occupied? 'bold': 'normal', color:item.occupied? '#f00':'#1e2024' }"
>{{ item.trackName }}</div>
<div>{{ item.tripNumber }}</div>
<div style="background: #FFCBEC;border: 1px solid #315FD1;border-radius: 3px;font-size: 10px;">{{ item.trainType?'客':'' }}</div>
<div>{{ item.trainDistanceInfo }}</div>
<div>
<el-select v-model="item.process" placeholder="请选择" size="mini" style="width: 120px;" :disabled="true">
<el-option
v-for="elem in sectionStatusList"
:key="elem.value"
:label="elem.label"
:value="elem.value"
/>
</el-select>
</div>
<div style="display: flex;">
<div :style="{ background: item.receivingNotice ? '#29CA42': '#ccc' }" class="button-box-fir" @click="doShowRecDep(item,'rec')">接预</div>
<div
class="button-box-sec"
:style="{ background: handleBackground(item.receivingRouteLock, item.receivingRouteAutoTrigger) }"
@contextmenu="popMenuShow(item, 'rec' ,$event)"
@click="doShowRoute(item, 'rec')"
>
{{ '接路' + (item.receivingRouteLock ? '':getRouteName(item.receivingRouteCode)) }}
</div>
<div :style="{ background: item.arrive ? '#29CA42': '#ccc' }" class="button-box-fir" style="margin-left: 10px;cursor: default;">到点</div>
</div>
<div>
<div>{{ item.arriveTime }}</div>
<div>{{ item.departureTime }}</div>
</div>
<div>
<div>{{ item.planArriveTime }}</div>
<div>{{ item.planDepartureTime }}</div>
</div>
<div /><!--起点--终点-->
<div style="display: flex;">
<div :style="{ background: item.departureNotice ? '#29CA42': '#ccc' }" class="button-box-fir" @click="doShowRecDep(item,'dep')">发预</div>
<div
class="button-box-sec"
:style="{ background: handleBackground(item.departureRouteLock, item.departureRouteAutoTrigger) }"
@contextmenu="popMenuShow(item, 'dep' ,$event)"
@click="doShowRoute(item, 'dep')"
>
{{ '发路' + (item.departureRouteLock ? '':getRouteName(item.departureRouteCode)) }}
</div>
<div :style="{ background: item.departure ? '#29CA42': '#ccc' }" class="button-box-fir" style="margin-left: 10px;cursor: default;">发点</div>
</div>
<div>{{ item.tripNumber }}</div>
<div :style="{fontWeight: item.occupied? 'bold': 'normal', color:item.occupied? '#f00': '#1e2024' }">{{ item.trackName }}</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;">
<div style="background: #0f0;">{{ `进路序列模式:&lt;${readOnly ? '只读':'可修改'}&gt;` }}</div>
<el-button size="mini" style="padding: 7px 4px;" disabled>修改申请</el-button>
<el-button size="mini" style="padding: 7px 4px;" disabled>只读申请</el-button>
<el-button size="mini" style="padding: 7px 4px;margin-left: 30px;">查找列车</el-button>
<el-input v-model="searchTrain" style="width: 70px;height: 25px;" size="mini" />
<div style="margin-left: 10px;">上下行</div>
<el-select v-model="andDown" size="mini" style="width: 80px;margin-left: 5px;">
<el-option
v-for="item in andDownList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div style="margin-left: 10px;">接车口</div>
<el-select v-model="andDown" size="mini" style="width: 100px;margin-left: 5px;" disabled>
<el-option
v-for="item in andDownList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div style="margin-left: 10px;">发车口</div>
<el-select v-model="andDown" size="mini" style="width: 100px;margin-left: 5px;" disabled>
<el-option
v-for="item in andDownList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<el-table
:data="tableData"
style="width: 100%;margin-top: 10px;"
highlight-current-row
:row-style="{ background: '#ff0' }"
height="180"
border
>
<el-table-column width="50" label="序号" align="center">
<template slot-scope="scope">
<!--:style="{ background: scope.$index? '#f00':'#ff0' }" -->
<div>{{ scope.$index }}</div>
</template>
</el-table-column>
<el-table-column property="date" label="注意确认" />
<el-table-column property="tripNumber" label="车次" />
<el-table-column property="trackName" label="股道" />
<el-table-column property="autoTrigger" label="自触">
<template slot-scope="scope">
<div style="width: 100%;height: 22px;" @contextmenu="popMenuShow(scope.row, '' ,$event)">{{ scope.row.autoTrigger? '√':'' }}</div>
</template>
</el-table-column>
<el-table-column property="type" label="类型" />
<el-table-column property="status" label="状态" />
<el-table-column property="startTime" label="开始时间" />
<el-table-column property="planTime" label="计划时间" />
<el-table-column property="direction" label="方向" />
<el-table-column property="routeCode" label="序列描述">
<template slot-scope="scope">
<div>{{ getRouteName(scope.row.routeCode) }}</div>
</template>
</el-table-column>
</el-table>
<div style="width: 100%;display: flex;align-items: center;margin: 5px 0;">
<div
v-for="item in stationList"
:key="item.code"
class="tab-box"
:style="{background: selectCode1 === item.code ? '#F1F1F1': '#DBDBDB', color: selectCode1 === item.code ? '#000': '#ccc'}"
@click="selectStandCode1(item.code)"
>
{{ item.name }}
</div>
</div>
</div>
<div style="width: 49%;margin-top: 10px;">
<div style="display: flex;align-items: center;">
<el-select v-model="unknow" size="mini" disabled>
<el-option
v-for="item in unknowList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div>调机-J101</div>
<el-button size="mini" disabled>进路预览</el-button>
<el-select v-model="unknow1" size="mini" disabled>
<el-option
v-for="item in unknowList1"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-button size="mini" disabled>办理进路</el-button>
<el-button size="mini" disabled>发送机车</el-button>
</div>
<el-table
:data="tableData1"
style="width: 100%;margin-top: 10px;"
highlight-current-row
border
height="180"
>
<el-table-column type="index" width="50" label="勾" />
<el-table-column property="line" label="线路" />
<el-table-column property="method" label="方法" />
<el-table-column property="nums" label="辆数" />
<el-table-column property="direction" label="方向" />
<el-table-column property="leadWire" label="牵出线" />
<el-table-column property="status" label="状态" />
<el-table-column property="leadRoute" label="牵出进路" />
<el-table-column property="pushRoute" label="推入进路" />
<el-table-column property="note" label="记事" />
</el-table>
</div>
</div>
<rec-dep ref="recDep" />
<route-selection ref="routeSelection" />
<pop-menu ref="popMenu" :menu="menu" style="background: #DFE3E6;" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
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 { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'lineBoard',
components: {
RecDep,
RouteSelection,
PopMenu
},
data() {
return {
menu: [{label: '设置自触', handler: this.setTrigger, disabled: false},{label: '取消自触', handler: this.cancelTrigger, disabled: false}],
dialogVisible: false,
triggerParam: {},
selectCode: '',
selectCode1: '',
readOnly: '',
arrowPic: ArrowPic,
picT3: PicT3,
controlPanelPic: ControlPanelPic,
trainPic: TrainPic,
controlPanel2Pic: ControlPanel2Pic,
linkPic: LinkPic,
cameraPic: CameraPic,
searchTrain: '',
andDown: 'all',
unknow: '',
unknow1: '',
tableData: [],
tableData1: [],
unknowList1: [{label: '全部机车', value: 'all'}],
unknowList: [{label: 'J101-执行中', value: 'J101'}],
andDownList: [{ label: '全部', value: 'all' }, { label: '上行', value: 'up' }, { label: '下行', value: 'down' }],
sectionStatusList: [
{label: '办理接车闭塞', value: 'RECEIVING_BLOCK'},
{label: '准备接车', value: 'RECEIVING'},
{label: '办理接车进路', value: 'RECEIVING_ROUTE'},
{label: '列车到达(通过)报点', value: 'ARRIVE'},
{label: '办理发车闭塞', value: 'DEPARTURE_BLOCK'},
{label: '发车进路办理', value: 'DEPARTURE_ROUTE'},
{label: '发车报点', value: 'DEPARTURE'},
{label: '流程终止', value: 'FINISH'}
],
stationDataMap: {},
infoList : []
}
},
computed: {
...mapGetters('map', [
'sectionList',
'stationList'
])
},
watch: {
'$store.state.socket.railCtcStatusMsg': function (val) {
if (val && val.length) {
val.forEach(item => {
if (item) {
this.stationDataMap[item.stationCode] = { trackView: item.trackView, routeSequence: item.routeSequence };
}
});
this.infoList = this.stationDataMap[this.selectCode] ? this.stationDataMap[this.selectCode].trackView.lines: [];
this.tableData = this.stationDataMap[this.selectCode1] ? this.stationDataMap[this.selectCode1].routeSequence.lines: [];
this.readOnly = this.stationDataMap[this.selectCode1] ? this.stationDataMap[this.selectCode1].routeSequence.readOnly: false;
};
}
},
methods: {
handleClose() {
this.dialogVisible = false;
},
doShow() {
this.dialogVisible = true;
this.selectCode = this.stationList[0].code;
this.selectCode1 = this.stationList[0].code;
this.infoList = this.stationDataMap[this.selectCode] ? this.stationDataMap[this.selectCode].trackView.lines: [];
this.tableData = this.stationDataMap[this.selectCode1] ? this.stationDataMap[this.selectCode1].routeSequence.lines: [];
this.readOnly = this.stationDataMap[this.selectCode1] ? this.stationDataMap[this.selectCode1].routeSequence.readOnly: false;
},
selectStandCode(code) {
this.selectCode = code;
this.infoList = this.stationDataMap[this.selectCode].trackView.lines;
},
selectStandCode1(code) {
this.selectCode1 = code;
this.tableData = this.stationDataMap[this.selectCode1].routeSequence.lines;
this.readOnly = this.stationDataMap[this.selectCode1].routeSequence.readOnly;
},
getRouteName(code){
if(code){
const route = this.$store.state.map.routeData[code];
return route? route.name: ''
} else { return '' }
},
handleBackground(flag, trigger) {
if (flag){
return '#29CA42';
} else {
return trigger ? '#FFBF2F' : '#CCCCCC';
}
},
doShowRecDep(row, type) {
this.$refs.recDep.doShow(row, type, this.selectCode);
},
doShowRoute(row, type) {
this.$refs.routeSelection.doShow(row, type, this.selectCode);
},
popMenuShow(item,type, e){
if (type === 'rec') {
this.menu[0].disabled = item.receivingRouteAutoTrigger;
this.menu[1].disabled = !item.receivingRouteAutoTrigger;
this.triggerParam = { stationCode: this.selectCode, tripNumber: item.tripNumber, routeCode: item.receivingRouteCode }
} else if (type === 'dep') {
this.menu[0].disabled = item.departureRouteAutoTrigger;
this.menu[1].disabled = !item.departureRouteAutoTrigger;
this.triggerParam = { stationCode: this.selectCode, tripNumber: item.tripNumber, routeCode: item.departureRouteCode }
} else {
this.menu[0].disabled = item.autoTrigger;
this.menu[1].disabled = !item.autoTrigger;
this.triggerParam = { stationCode: this.selectCode1, tripNumber: item.tripNumber, routeCode: item.routeCode }
}
this.$refs.popMenu.resetShowPosition({x: e.x, y:e.y});
},
setTrigger() {
const param = { ...this.triggerParam, trigger: true };
import { mapGetters } from 'vuex';
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';
export default {
name: 'LineBoard',
components: {
RecDep,
RouteSelection,
PopMenu
},
data() {
return {
menu: [{label: '设置自触', handler: this.setTrigger, disabled: false}, {label: '取消自触', handler: this.cancelTrigger, disabled: false}],
dialogVisible: false,
triggerParam: {},
selectCode: '',
selectCode1: '',
readOnly: '',
arrowPic: ArrowPic,
picT3: PicT3,
controlPanelPic: ControlPanelPic,
trainPic: TrainPic,
controlPanel2Pic: ControlPanel2Pic,
linkPic: LinkPic,
cameraPic: CameraPic,
searchTrain: '',
andDown: 'all',
unknow: '',
unknow1: '',
tableData: [],
tableData1: [],
unknowList1: [{label: '全部机车', value: 'all'}],
unknowList: [{label: 'J101-执行中', value: 'J101'}],
andDownList: [{ label: '全部', value: 'all' }, { label: '上行', value: 'up' }, { label: '下行', value: 'down' }],
sectionStatusList: [
{label: '办理接车闭塞', value: 'RECEIVING_BLOCK'},
{label: '准备接车', value: 'RECEIVING'},
{label: '办理接车进路', value: 'RECEIVING_ROUTE'},
{label: '列车到达(通过)报点', value: 'ARRIVE'},
{label: '办理发车闭塞', value: 'DEPARTURE_BLOCK'},
{label: '发车进路办理', value: 'DEPARTURE_ROUTE'},
{label: '发车报点', value: 'DEPARTURE'},
{label: '流程终止', value: 'FINISH'}
],
stationDataMap: {},
infoList : []
};
},
computed: {
...mapGetters('map', [
'sectionList',
'stationList'
])
},
watch: {
'$store.state.socket.railCtcStatusMsg': function (val) {
if (val && val.length) {
val.forEach(item => {
if (item) {
this.stationDataMap[item.stationCode] = { trackView: item.trackView, routeSequence: item.routeSequence };
}
});
this.infoList = this.stationDataMap[this.selectCode] ? this.stationDataMap[this.selectCode].trackView.lines : [];
this.tableData = this.stationDataMap[this.selectCode1] ? this.stationDataMap[this.selectCode1].routeSequence.lines : [];
this.readOnly = this.stationDataMap[this.selectCode1] ? this.stationDataMap[this.selectCode1].routeSequence.readOnly : false;
}
}
},
methods: {
handleClose() {
this.dialogVisible = false;
},
doShow() {
this.dialogVisible = true;
this.selectCode = this.stationList[0].code;
this.selectCode1 = this.stationList[0].code;
this.infoList = this.stationDataMap[this.selectCode] ? this.stationDataMap[this.selectCode].trackView.lines : [];
this.tableData = this.stationDataMap[this.selectCode1] ? this.stationDataMap[this.selectCode1].routeSequence.lines : [];
this.readOnly = this.stationDataMap[this.selectCode1] ? this.stationDataMap[this.selectCode1].routeSequence.readOnly : false;
},
selectStandCode(code) {
this.selectCode = code;
this.infoList = this.stationDataMap[this.selectCode].trackView.lines;
},
selectStandCode1(code) {
this.selectCode1 = code;
this.tableData = this.stationDataMap[this.selectCode1].routeSequence.lines;
this.readOnly = this.stationDataMap[this.selectCode1].routeSequence.readOnly;
},
getRouteName(code) {
if (code) {
const route = this.$store.state.map.routeData[code];
return route ? route.name : '';
} else { return ''; }
},
handleBackground(flag, trigger) {
if (flag) {
return '#29CA42';
} else {
return trigger ? '#FFBF2F' : '#CCCCCC';
}
},
doShowRecDep(row, type) {
this.$refs.recDep.doShow(row, type, this.selectCode);
},
doShowRoute(row, type) {
this.$refs.routeSelection.doShow(row, type, this.selectCode);
},
popMenuShow(item, type, e) {
if (type === 'rec') {
this.menu[0].disabled = item.receivingRouteAutoTrigger;
this.menu[1].disabled = !item.receivingRouteAutoTrigger;
this.triggerParam = { stationCode: this.selectCode, tripNumber: item.tripNumber, routeCode: item.receivingRouteCode };
} else if (type === 'dep') {
this.menu[0].disabled = item.departureRouteAutoTrigger;
this.menu[1].disabled = !item.departureRouteAutoTrigger;
this.triggerParam = { stationCode: this.selectCode, tripNumber: item.tripNumber, routeCode: item.departureRouteCode };
} else {
this.menu[0].disabled = item.autoTrigger;
this.menu[1].disabled = !item.autoTrigger;
this.triggerParam = { stationCode: this.selectCode1, tripNumber: item.tripNumber, routeCode: item.routeCode };
}
this.$refs.popMenu.resetShowPosition({x: e.x, y:e.y});
},
setTrigger() {
const param = { ...this.triggerParam, trigger: true };
commitOperate(menuOperate.CTC.autoTrigger, param, 3).then(({valid, operate})=>{
this.loading = false;
this.triggerParam = {};
if (valid) {
this.doClose();
this.$message.success('设置自动触发成功!')
}
}).catch((e) => {
console.error(e);
this.loading = false;
this.doClose();
this.triggerParam = {};
this.$refs.noticeInfo.doShow();
});
},
cancelTrigger() {
const param = { ...this.triggerParam, trigger: false };
console.log(menuOperate.CTC.autoTrigger, 'trigger');
commitOperate(menuOperate.CTC.autoTrigger, param, 3).then(({valid, operate})=>{
this.triggerParam = {};
if (valid) {
this.$message.success('取消自动触发成功!')
}
}).catch((e) => {
console.error(e);
this.triggerParam = {};
this.$message.error('取消自动触发失败!')
});
}
}
};
commitOperate(menuOperate.CTC.autoTrigger, param, 3).then(({valid, operate})=>{
this.loading = false;
this.triggerParam = {};
if (valid) {
this.doClose();
this.$message.success('设置自动触发成功!');
}
}).catch((e) => {
console.error(e);
this.loading = false;
this.doClose();
this.triggerParam = {};
this.$refs.noticeInfo.doShow();
});
},
cancelTrigger() {
const param = { ...this.triggerParam, trigger: false };
console.log(menuOperate.CTC.autoTrigger, 'trigger');
commitOperate(menuOperate.CTC.autoTrigger, param, 3).then(({valid, operate})=>{
this.triggerParam = {};
if (valid) {
this.$message.success('取消自动触发成功!');
}
}).catch((e) => {
console.error(e);
this.triggerParam = {};
this.$message.error('取消自动触发失败!');
});
}
}
};
</script>
<style scoped>

View File

@ -12,19 +12,17 @@
</el-select>
<template v-if="!dataError">
<el-button-group v-if="project !== 'bjd'">
<el-button v-if="isCtc" size="small" @click="showLineBoard">占线板</el-button>
<el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goCtc">CTC</el-button>
<el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goRpManage">管理终端</el-button>
<el-button v-if="isLocalStation && $route.query.lineCode!='08' && $route.query.lineCode!='16'" size="small" @click="goIbp">IBP盘</el-button>
<el-button v-if="isScheduling && isDepot" size="small" type="primary" @click="runPlanEditShow">运行图编辑</el-button>
<!-- 加载剧本 -->
<el-button v-if="isDemon && !isScheduling && !isContest && !isDepoltSim && $route.query.lineCode!='16'" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
<!-- 运行图加载 -->
<!-- notScript && -->
<el-button v-if="running" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
<!-- notScript && -->
<el-button v-if="!running && $route.query.lineCode!='16'" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
<el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goCtc">CTC</el-button>
<el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goRpManage">管理终端</el-button>
<el-button v-if="isLocalStation && $route.query.lineCode!='08' && $route.query.lineCode!='16'" size="small" @click="goIbp">IBP盘</el-button>
<el-button v-if="isScheduling && isDepot" size="small" type="primary" @click="runPlanEditShow">运行图编辑</el-button>
<!-- 加载剧本 -->
<el-button v-if="isDemon && !isScheduling && !isContest && !isDepoltSim && $route.query.lineCode!='16'" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
<!-- 运行图加载 -->
<!-- notScript && -->
<el-button v-if="running" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
<!-- notScript && -->
<el-button v-if="!running && $route.query.lineCode!='16'" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
</el-button-group>
<el-button v-if="!isScheduling && project !== 'bjd'" size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式[Tab]':'切换到故障模式[Tab]' }}</el-button>
<el-button v-if="running&&project == 'bjd'" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
@ -37,7 +35,7 @@
<run-plan-view ref="runPlanView" :group="group" />
<!-- 加载剧本列表弹窗 -->
<add-quest ref="addQuest" @selectQuest="selectQuest" />
<line-board ref="lineBoard" />
<line-board ref="lineBoard" />
<!-- <run-plan-edit v-if="isScheduling && isDepot" ref="runPlanEdit" /> -->
</div>
</template>
@ -68,7 +66,7 @@ export default {
AddQuest,
// RunPlanEdit,
SelectStation,
LineBoard
LineBoard
},
props: {
offset: {
@ -101,9 +99,9 @@ export default {
notScript() {
return this.$route.params.mode !== 'script';
},
isCtc() {
return !!this.$route.query.ctc;
},
isCtc() {
return !!this.$route.query.ctc;
},
isScript() {
return this.$route.params.mode === 'script';
},
@ -198,6 +196,9 @@ export default {
this.changeOperateMode();
}
});
EventBus.$on('showLineBoard', () => {
this.showLineBoard();
});
},
methods: {
loadRunData() {
@ -215,28 +216,28 @@ export default {
}
});
},
showLineBoard() {
this.$refs.lineBoard.doShow();
},
goCtc() {
const routeData = this.$router.resolve({
path:'/displayNew/demon',
query:{
lineCode:this.$route.query.lineCode,
group: this.$route.query.group,
prdType: this.$route.query.prdType,
mapId:this.$route.query.mapId,
project: this.project,
newApi: this.$route.query.newApi,
ctc: true,
try: this.$route.query.try,
token:getToken(),
noPreLogout: true
}
});
window.open(routeData.href, '_blank');
},
goRpManage(){
showLineBoard() {
this.$refs.lineBoard.doShow();
},
goCtc() {
const routeData = this.$router.resolve({
path:'/displayNew/demon',
query:{
lineCode:this.$route.query.lineCode,
group: this.$route.query.group,
prdType: this.$route.query.prdType,
mapId:this.$route.query.mapId,
project: this.project,
newApi: this.$route.query.newApi,
ctc: true,
try: this.$route.query.try,
token:getToken(),
noPreLogout: true
}
});
window.open(routeData.href, '_blank');
},
goRpManage() {
const routeData = this.$router.resolve({
path:'/bigTrainRunplanManage',
query:{