Merge remote-tracking branch 'origin/test_dispaly' into test

This commit is contained in:
joylink_zhangsai 2023-02-13 10:59:06 +08:00
commit 57d5bb0674
122 changed files with 6138 additions and 1165 deletions

View File

@ -222,7 +222,7 @@ export function getPaperDetail(pcId) {
*/
export function getQuestionAmount(data) {
return request({
url: `/api/v2/paper/${data.orgId}/question/count`,
url: `/api/v2/paper/question/count`,
method: 'POST',
data
});

View File

@ -228,22 +228,22 @@ export function handlerIbpEvent(group, button, stationCode, buttonCode) {
});
}
/** 处理ibp盘事件(按下) */
export function handleIbpPress(group, stationCode, buttonCode) {
return request({
url: `/simulation/${group}/ibp/press/${stationCode}/${buttonCode}`,
method: 'put'
});
}
/** 处理ibp盘事件(松开) */
export function handleIbpRelease(group, stationCode, buttonCode) {
return request({
url: `/simulation/${group}/ibp/release/${stationCode}/${buttonCode}`,
method: 'put'
});
}
// /** 处理ibp盘事件(按下) */
//
// export function handleIbpPress(group, stationCode, buttonCode) {
// return request({
// url: `/simulation/${group}/ibp/press/${stationCode}/${buttonCode}`,
// method: 'put'
// });
// }
// /** 处理ibp盘事件(松开) */
//
// export function handleIbpRelease(group, stationCode, buttonCode) {
// return request({
// url: `/simulation/${group}/ibp/release/${stationCode}/${buttonCode}`,
// method: 'put'
// });
// }
/** 预览脚本仿真(新版)*/
export function scriptDraftRecordNotifyNew(scriptId) {
@ -349,6 +349,15 @@ export function simulationLoadRunPlan(group, templateId) {
method: 'put'
});
}
/** 仿真里加载草稿运行图 */
export function simulationLoadDraftRunPlan(group, draftRunPlanId) {
return request({
url:`/simulation/${group}/load/draftRunPlan/${draftRunPlanId} `,
method: 'put'
});
}
/** 根据车次号获取列车信息 */
export function getTrainDetailBytripNumber(group, params) {
return request({

View File

@ -0,0 +1,8 @@
import Vue from 'vue';
import install from './verticalDrag';
const verticalDrag = function(Vue) {
Vue.directive('verticalDrag', install);
};
Vue.use(verticalDrag);

View File

@ -0,0 +1,101 @@
/* 垂直拖拽 */
export default {
bind(el) {
const dialogHeaderEl = el.querySelector('.verticalDrag__header');
const dialogFooterEl = el.querySelector('.verticalDrag__footer');
const dragDom = el;
dialogHeaderEl.style.cursor = 'move';
dialogFooterEl.style.cursor = 'move';
const vD = 5;
/** 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);*/
const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
dialogHeaderEl.onmousedown = (e) => {
e.stopPropagation();
/** 鼠标按下,计算当前元素距离可视区的距离*/
const disY = e.clientY;
const oY = dialogHeaderEl.offsetHeight;
const bY = dragDom.offsetHeight;
/** 获取到的值带px 正则匹配替换*/
let styT;
/** 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px*/
if (sty.top.includes('%')) {
styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
} else {
styT = +sty.top.replace(/\px/g, '');
}
document.onmousemove = function (e) {
e.preventDefault();
e.stopPropagation();
let cY = e.clientY;
if (cY < oY + vD) {
cY = oY + vD;
}
if (cY > document.body.clientHeight - bY - vD) {
cY = document.body.clientHeight - bY - vD;
}
/** 通过事件委托,计算移动的距离*/
const t = cY - disY;
/** 移动当前元素*/
dragDom.style.top = `${t + styT}px`;
/** 将此时的位置传出去*/
// binding.value({ x: e.pageX, y: e.pageY });
};
document.onmouseup = function () {
e.stopPropagation();
document.onmousemove = null;
document.onmouseup = null;
};
};
dialogFooterEl.onmousedown = (e) => {
e.stopPropagation();
/** 鼠标按下,计算当前元素距离可视区的距离*/
const disY = e.clientY;
const oY = dialogFooterEl.offsetHeight;
const bY = dragDom.offsetHeight;
/** 获取到的值带px 正则匹配替换*/
let styT;
/** 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px*/
if (sty.top.includes('%')) {
styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
} else {
styT = +sty.top.replace(/\px/g, '');
}
document.onmousemove = function (e) {
e.preventDefault();
e.stopPropagation();
let cY = e.clientY;
if (cY < bY + vD) {
cY = bY + vD;
}
if (cY > document.body.clientHeight - oY - vD) {
cY = document.body.clientHeight - oY - vD;
}
/** 通过事件委托,计算移动的距离*/
const t = cY - disY;
/** 移动当前元素*/
dragDom.style.top = `${t + styT}px`;
/** 将此时的位置传出去*/
// binding.value({ x: e.pageX, y: e.pageY });
};
document.onmouseup = function () {
e.stopPropagation();
document.onmousemove = null;
document.onmouseup = null;
};
};
}
};

View File

@ -254,7 +254,7 @@ class SkinCode extends defaultStyle {
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
// 是否显示s
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -265,7 +265,8 @@ class SkinCode extends defaultStyle {
radiusR: 6, // 控制灯大小
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
lightUpColor: '#FF0000' // 点亮灯颜色
}
},
mouseOverStyle: true
};
// 供电线路

View File

@ -586,7 +586,8 @@ class SkinCode extends defaultStyle {
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#FFFF00' // 控制灯颜色
}
},
mouseOverStyle: {}
};
this[deviceType.PowerSupply] = {
text: {
@ -808,14 +809,21 @@ class SkinCode extends defaultStyle {
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
distance: 5, // 灯跟文字距离
lightHighColor: '#0000FF', // 高亮颜色
flashColor: '#0000FF' // 闪烁颜色
},
lamp: {
fill: 'rgba(0,0,0,0)', // 填充色
radiusR: 6, // 控制灯大小
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
lightUpColor: '#FF0000' // 点亮灯颜色
}
lightUpColor: '#FF0000', // 点亮灯颜色
lightHighColor: '#00FFFF', // 高亮颜色
flashColor: '#0000FF' // 闪烁颜色
},
mouseOverStyle: true,
lightHigh: true, // 鼠标悬浮高亮
selectFlash: true // 选中闪烁
};
this[deviceType.TrainWindow] = {
@ -929,6 +937,7 @@ class SkinCode extends defaultStyle {
trainTip:true // 鼠标悬停列车状态信息框是否显示
},
trainStatusStyle: {
runLineHide: true,
trainTypeStatus: [
{type: '03', serviceNumberColor: '#FFF000', groupNumberColor: '#FFF000'},
{type: '02', trainNumberColor: '#FFF000', groupNumberColor: '#FFF000'}

View File

@ -437,6 +437,7 @@ class Jlmap {
this.$painter.$transformHandle.revisibleAll();
}
updatePicture(list = []) {
const trainList = [];
list.forEach(item => {
const device = this.mapDevice[item];
if (device && device._type !== deviceType.Switch && device._type !== deviceType.Train) {
@ -450,8 +451,13 @@ class Jlmap {
this.$painter.updatePicture(this.mapDevice[device.switch.code]);
}
} catch (e) { console.error(e); }
} else if (device._type === deviceType.Train) {
trainList.push(device);
}
});
trainList.forEach(device => {
this.$painter.update(device);
});
}
handleResetPoint(points) {
return (points[points.length - 1].x >= points[0].x);

View File

@ -124,7 +124,13 @@ export function parser(data, skinCode, showConfig) {
zrUtil.each(data.totalGuideLockButtonVOList || [], elem => { // 引导总锁列表
mapDevice[elem.code] = createDevice(deviceType.GuideLock, elem, propConvert, showConfig);
if (!elem.direction) {
mapDevice[elem.stationCode].guideLockCode = elem.code; // 保证处理车站列表在处理引导总锁列表之前
} else if (elem.direction === 'S') {
mapDevice[elem.stationCode].sGuideLockCode = elem.code;
} else if (elem.direction === 'X') {
mapDevice[elem.stationCode].xGuideLockCode = elem.code;
}
}, this);
zrUtil.each(data.automaticRouteButtonList || [], elem => { // 自动进路列表

View File

@ -28,26 +28,20 @@ export default class EMouse extends Group {
this.text.hide();
}
mouseover(e) {
if (e &&
e.target &&
e.target._subType == 'Text') {
if (e && e.target && e.target._subType == 'Text') {
this.text.show();
} else {
// this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor);
// this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor);
} else if (this.device.style.GuideLock.lightHigh && !this.device.__down) {
this.device.control.setStyle({ fill: this.device.style.GuideLock.lamp.lightHighColor });
this.device.text.setStyle({ textFill: this.device.style.GuideLock.text.lightHighColor, textBackgroundColor: '#fff' });
}
}
mouseout(e) {
if (!this.device.__down) {
if (e &&
e.target &&
e.target._subType == 'Text') {
if (e && e.target && e.target._subType == 'Text' && !this.device.__down) {
this.text.hide();
} else {
// this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor);
// this.device.control.setTextColor('#FFFFFF');
}
} else if (this.device.style.GuideLock.lightHigh && !this.device.__down) {
this.device.control.setStyle({ fill: this.device.guideLock ? this.device.style.GuideLock.lamp.lightUpColor : this.device.style.GuideLock.lamp.controlColor });
this.device.text.setStyle({ textFill: '#FFFFFF', textBackgroundColor: '#000' });
}
}
}

View File

@ -23,6 +23,7 @@ export default class GuideLock extends Group {
}
this.model = model;
this.style = style;
this.guideLock = false;
this.create();
this.createMouseEvent();
this.setState(model);
@ -34,6 +35,7 @@ export default class GuideLock extends Group {
_subType: 'Control',
zlevel: this.zlevel,
z: this.z,
cursor: 'crosshair',
shape: {
cx: this.computedPosition.x,
cy: this.computedPosition.y,
@ -87,10 +89,14 @@ export default class GuideLock extends Group {
this.add(this.text);
}
recover() {
this.control && this.control.stopAnimation(false);
this.text && this.text.stopAnimation(false);
this.control && this.control.show();
this.text && this.text.show();
this.subtitleText && this.subtitleText.show();
this.control && this.control.setStyle({ fill: this.style.GuideLock.lamp.controlColor });
this.text && this.text.setStyle({ textFill: '#fff', textBackgroundColor: '#000' });
this.__down = false;
}
handleSignal() {
this.control.setStyle({ fill: this.style.GuideLock.lamp.lightUpColor });
@ -99,7 +105,24 @@ export default class GuideLock extends Group {
setAshShow() {
this.control && this.control.setStyle({fill:'#FFF'});
}
handleSelect() {
this.control && this.control.animateStyle(true)
.when(500, { fill: this.style.GuideLock.lamp.flashColor })
.when(1000, { fill: this.style.GuideLock.lamp.controlColor })
.start();
this.text && this.text.animateStyle(true)
.when(500, { textFill: this.style.GuideLock.text.flashColor })
.when(1000, { textFill: '#fff' })
.start();
this.__down = true;
setTimeout(() => {
this.control && this.control.stopAnimation(false);
this.text && this.text.stopAnimation(false);
this.control && this.control.setStyle({ fill: this.guideLock ? this.style.GuideLock.lamp.lightUpColor : this.style.GuideLock.lamp.controlColor });
this.text && this.text.setStyle({ textFill: '#fff', textBackgroundColor: '#000' });
this.__down = false;
}, 15000);
}
// 设置状态
setState(model) {
// 只响应前端自定义类型的状态变化
@ -113,13 +136,17 @@ export default class GuideLock extends Group {
this.setAshShow();
} else {
model.totalGuideLock && this.handleSignal();
model.hasSelected && this.handleSelect();
this.handleGuideLock(this.guideLock);
}
}
}
handleGuideLock(flag) {
this.guideLock = flag;
this.control && this.control.setStyle({ fill: flag ? this.style.GuideLock.lamp.lightUpColor : this.style.GuideLock.lamp.controlColor });
}
createMouseEvent() {
if (this.style.LcControl.mouseOverStyle) {
if (this.style.GuideLock.mouseOverStyle) {
this.mouseEvent = new EMouse(this);
this.add(this.mouseEvent);
this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); });

View File

@ -978,6 +978,7 @@ export default class Station extends Group {
model.emergencyController != undefined && this.handleEmergencyChange(model.emergencyController);
model.controlApplicant && this.handleControlApplicant(model);
model.allowAutonomy && this.handleAllowAutonomy();
this.handleGuideLock(model);
if (this.style.Station.syncCentralizeStation && (model.controlMode || model.controller || model.emergencyController != undefined) && model.centralized) {
model.chargeStationCodeList.forEach(item => {
const device = store.getters['map/getDeviceByCode'](item);
@ -1018,6 +1019,12 @@ export default class Station extends Group {
}
}
handleGuideLock(model) {
const sGuideLock = store.getters['map/getDeviceByCode'](model.sGuideLockCode);
const xGuideLock = store.getters['map/getDeviceByCode'](model.xGuideLockCode);
sGuideLock && sGuideLock.instance && sGuideLock.instance.handleGuideLock(model.sguideMasterLock);
xGuideLock && xGuideLock.instance && xGuideLock.instance.handleGuideLock(model.xguideMasterLock);
}
handlePreResetLamp() {
this.controlPreReset && this.controlPreReset.setColor('#f00');
}

View File

@ -57,7 +57,7 @@ class ESwLocal extends Group {
}
addHover(style) {
this.__zr && this.__zr.addHover(this.locShelter, style)
this.__zr && this.__zr.addHover(this.locShelter, style);
}
removeHover() {

View File

@ -252,7 +252,7 @@ export default {
},
cancel() {
const operate = {
over: true,
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.cancel.menu.operation
};

View File

@ -210,7 +210,7 @@ export default {
}
},
dispatchCommandState(obj) {
Object.values(obj.cpStateMap).forEach(item => {
obj && Object.values(obj.cpStateMap).forEach(item => {
if (item.cpId) {
if (!this.queryResData.companyStateMap) {
this.queryResData.companyStateMap = {};
@ -218,6 +218,9 @@ export default {
this.$set(this.queryResData.companyStateMap, item.cpId, item);
}
});
},
'$store.state.socket.simulationReset':function(val) {
this.cmdTableData = [];
}
},
beforeDestroy() {},

View File

@ -329,7 +329,9 @@ export default {
} else if (this.operation == OperationEvent.MixinCommand.cancelStoppage.menu.operation) {
this.cancelCommand();
} else if (this.operation == OperationEvent.MixinCommand.collocation.menu.operation) {
this.handleCollocation();
this.handleTrainDrive();
} else if (this.operation == OperationEvent.MixinCommand.trainDrive.menu.operation) {
this.handleTrainDrive();
}
}
});
@ -362,11 +364,11 @@ export default {
}
this.sendCommand(setp);
},
handleCollocation() { //
handleTrainDrive() { //
const setp = {
over: true,
operation: menuOperate.Common.collocation.operation,
cmdType: menuOperate.Common.collocation.cmdType,
operation: menuOperate.Common.trainDrive.operation,
cmdType: menuOperate.Common.trainDrive.cmdType,
param: {
groupNumber: this.groupNumber,
param: {
@ -378,6 +380,22 @@ export default {
};
this.sendCommand(setp);
},
// handleCollocation() { //
// const setp = {
// over: true,
// operation: menuOperate.Common.collocation.operation,
// cmdType: menuOperate.Common.collocation.cmdType,
// param: {
// groupNumber: this.groupNumber,
// param: {
// speedLimit: this.formModel.speedLimit,
// through: this.formModel.through,
// targetDeviceCode: this.formModel.targetDeviceCode
// }
// }
// };
// this.sendCommand(setp);
// },
sendCommand(setp) {
this.loading = true;
this.$store.dispatch('trainingNew/next', setp).then(({ valid }) => {

View File

@ -0,0 +1,44 @@
<template>
<div class="menus">
<menu-train ref="menuTrain" :selected="selected" :work="'driverAtsWork'" />
</div>
</template>
<script>
import MenuTrain from './menuTrain';
export default {
name: 'DriverAtsWorkMenuBar',
components: {
MenuTrain
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
};
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
});
},
methods: {
}
};
</script>
<style>
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
</style>

View File

@ -0,0 +1,103 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<set-fault ref="setFault" pop-class="fuzhou-01__systerm" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import { DeviceMenu } from '@/scripts/ConstDic';
export default {
name: 'MenuTrain',
components: {
PopMenu,
SetFault
},
props: {
selected: {
type: Object,
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu:[],
menuNormal: [
{
label: '换端',
handler: this.handleTurnDirection
},
{
label: '驾驶',
handler: this.handleDriveTo
},
{
label: '回库',
handler: this.setInbound
}
]
};
},
watch: {
'$store.state.menuOperation.menuCount': function () {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Train) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
initMenu() {
//
this.menu = [...this.menuNormal];
},
//
handleTurnDirection() {
commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
setInbound() {
commitOperate(menuOperate.Driver.inbound, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.collocation, this.selected, true);
}
});
},
doShow(point) {
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
// this.$store.dispatch('map/setTrainWindowShow', false);
}
}
}
};
</script>

View File

@ -415,6 +415,11 @@ export const menuOperate = {
operation: OperationEvent.MixinCommand.collocation.menu.operation,
cmdType: CMD.Train.CMD_TRAIN_TRUST
},
// 机器人司机模拟驾驶 Train_Drive
trainDrive: {
operation: OperationEvent.MixinCommand.trainDrive.menu.operation,
cmdType: CMD.Train.CMD_TRAIN_DRIVE
},
// 设置连挂
setLink: {
operation: OperationEvent.MixinCommand.setLink.menu.operation,
@ -901,6 +906,16 @@ export const menuOperate = {
railQueryRegister: {
operation: OperationEvent.RailCommand.railQueryRegister.menu.operation,
cmdType: CMD.RAIL.CMD_RAIL_QUERY_REGISTER
},
// 行车设备施工登记簿 保存
equipmentConstructionFill:{
operation: OperationEvent.RailCommand.equipmentConstructionFill.menu.operation,
cmdType: CMD.RAIL.CMD_RAIL_EQUIPMENT_CONSTRUCTION_INFO_SAVE
},
// 行车设备施工登记簿 列表
equipmentConstructionQuery:{
operation: OperationEvent.RailCommand.equipmentConstructionQuery.menu.operation,
cmdType: CMD.RAIL.CMD_RAIL_EQUIPMENT_CONSTRUCTION_INFO_QUERY
}
},
Conversation: {

View File

@ -61,6 +61,7 @@
<script>
import { mapGetters } from 'vuex';
import { UserOperationType } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl';
@ -252,7 +253,7 @@ export default {
},
cancel() {
const operate = {
over: true,
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.cancel.menu.operation
};

View File

@ -1,6 +1,6 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<div class="title">{{ `哈尔滨局CTC3.0(车务终端A机)--王岗:${this.dateString}第一班 18:00 管理员代--` }}</div>
<div class="title">{{ `哈尔滨局CTC3.0(车务终端A机)--王岗:${dateString}第一班 18:00 管理员代--` }}</div>
<menu-bar ref="menuBar" :selected="selected" />
<div style="position: absolute; top: 64px;z-index: 10;background: #F0F0F0;padding: 2px;height: 65px;width: 100%;">
<div style="display: flex;">
@ -42,7 +42,7 @@
<menu-station ref="menuStation" :selected="selected" :work="'ctcWork'" />
<passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" />
<runplan-pane ref="runplanPane" />
<bottom-table ref="bottomTable" />
<!-- <bottom-table ref="bottomTable" /> -->
<menu-panel ref="menuPanel" />
<stage-runplan ref="stageRunplan" @closeFlash="closeStageFlash" @noticeInfo="noticeInfo" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
@ -69,7 +69,7 @@ import StageRunplan from './dialog/stageRunplan';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import { timestampFormat } from '@/utils/date';
import BottomTable from './bottomTable';
// import BottomTable from './bottomTable';
import MenuPanel from './menuPanel';
import CtcBarIcon1 from '@/assets/ctc_icon/pic1.png';
import CtcBarIcon2 from '@/assets/ctc_icon/pic2.png';
@ -110,7 +110,7 @@ export default {
StageRunplan,
NoticeInfo,
// DispatcherLoger,
BottomTable,
// BottomTable,
MenuPanel,
cmdManage,
signedCmd

View File

@ -177,6 +177,9 @@ export default {
'stationList'
])
},
beforeDestroy() {
EventBus.$emit('bottomTableShowOrHidden', false);
},
methods: {
initStationList() {
const list = [];
@ -228,7 +231,7 @@ export default {
this.$refs.trainFixedPathPane.doShow(stationCode);
},
bottomTableShowOrHidden() {
EventBus.$emit('bottomTableShowOrHidden');
EventBus.$emit('bottomTableShowOrHidden', true);
},
undeveloped() {
this.$refs.menuBar.doClose();

View File

@ -180,7 +180,6 @@ export default {
},
cancel() {
const operate = {
over: true,
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.cancel.menu.operation
};

View File

@ -130,7 +130,7 @@ export default {
},
cancel() {
const operate = {
over: true,
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {

View File

@ -137,7 +137,6 @@ export default {
},
cancel() {
const operate = {
over: true,
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.cancel.menu.operation
};

View File

@ -237,7 +237,6 @@ export default {
},
cancel() {
const operate = {
over: true,
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.cancel.menu.operation
};

View File

@ -188,7 +188,6 @@ export default {
},
cancel() {
const operate = {
over: true,
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.cancel.menu.operation
};

View File

@ -123,7 +123,6 @@ export default {
},
cancel() {
const operate = {
over: true,
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.cancel.menu.operation
};

View File

@ -8,7 +8,7 @@
<menu-train ref="menuTrain" :selected="selected" :work="'dispatchWork'" />
<menu-station ref="menuStation" :selected="selected" :work="'dispatchWork'" />
<passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" />
<bottom-table ref="bottomTable" />
<!-- <bottom-table ref="bottomTable" /> -->
<div id="playBtn" />
</div>
</template>
@ -26,7 +26,7 @@ import MenuStation from './menuStation';
import MenuBar from './dispatchWorkMenuBar';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import { timestampFormat } from '@/utils/date';
import BottomTable from './bottomTable';
// import BottomTable from './bottomTable';
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
export default {
@ -39,8 +39,8 @@ export default {
MenuStationStand,
MenuStation,
MenuTrain,
PassiveContorl,
BottomTable
PassiveContorl
// BottomTable
},
props: {
selected: {

View File

@ -25,7 +25,7 @@
<menu-train ref="menuTrain" :selected="selected" :work="'localWork'" />
<menu-station ref="menuStation" :selected="selected" :work="'localWork'" />
<passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" />
<bottom-table ref="bottomTable" />
<!-- <bottom-table ref="bottomTable" /> -->
<div id="playBtn" />
</div>
</template>
@ -43,7 +43,7 @@ import MenuTrain from './menuTrain';
import MenuStation from './menuStation';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import { timestampFormat } from '@/utils/date';
import BottomTable from './bottomTable';
// import BottomTable from './bottomTable';
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
export default {
@ -56,8 +56,8 @@ export default {
MenuStationStand,
MenuStation,
MenuTrain,
PassiveContorl,
BottomTable
PassiveContorl
// BottomTable
},
props: {
selected: {

View File

@ -1,7 +1,6 @@
<template>
<div id="menuButtons_box" class="menu menuButton" style="height:40px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
<!-- backgroundColor: xGuideMasterLock? guideColorDown: guideColorUp -->
<button :id="Station.stationMasterLock.rightButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="guideLockRightButtonDown()">
<button :id="Station.stationMasterLock.rightButton.domId" class="button_box" :style="{width: width+'px', backgroundColor: xGuideMasterLock? guideColorDown: guideColorUp}" @click="guideLockRightButtonDown()">
<span style="color: #800000">
<center><b>X引导总锁</b></center>
</span>
@ -387,7 +386,7 @@ export default {
if (valid) {
//
operate.nextCmdType = this.sGuideMasterLock ? CMD.Station.CMD_STATION_MASTER_UNLOCK : CMD.Station.CMD_STATION_MASTER_LOCK;
operate.param = {throat: 'S', stationCode: this.$store.state.map.showCentralizedStationCode};
operate.param = {throat: 'S', stationCode: this.$store.state.training.roleDeviceCode};
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate, 'S引导总锁');
@ -404,7 +403,7 @@ export default {
if (valid) {
//
operate.nextCmdType = this.xGuideMasterLock ? CMD.Station.CMD_STATION_MASTER_UNLOCK : CMD.Station.CMD_STATION_MASTER_LOCK;
operate.param = {throat: 'X', stationCode: this.$store.state.map.showCentralizedStationCode};
operate.param = {throat: 'X', stationCode: this.$store.state.training.roleDeviceCode};
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate, 'X引导总锁');

View File

@ -24,7 +24,7 @@
<center><b></b><b></b></center>
</span>
</button>
<button :id="Station.guideLock.button.domId" :disabled="true" class="button_box" @click="buttonDown(Station.guideLock.button.operation, ['Button'])">
<button :id="Station.guideLock.button.domId" class="button_box" @click="buttonDown(Station.guideLock.button.operation, ['GuideLock'])">
<span :style="{color: operation === Station.guideLock.button.operation?'#ccc':'#800000'}">
<center><b></b><b></b></center>
<center><b></b><b></b></center>
@ -60,7 +60,7 @@
<center><b></b><b></b></center>
</span>
</button>
<button :id="MixinCommand.block.button.domId" class="button_box" @click="buttonDown(MixinCommand.lock.button.operation, ['Switch', 'Signal'])">
<button :id="MixinCommand.block.button.domId" class="button_box" @click="buttonDown(MixinCommand.block.button.operation, ['Switch', 'Signal'])">
<span :style="{color: operation === MixinCommand.block.button.operation ? '#ccc':'black'}">
<center><b></b><b></b></center>
<center><b></b><b></b></center>
@ -78,8 +78,8 @@
<center><b></b><b></b></center>
</span>
</button>
<button :id="222" :disabled="true" class="button_box" @click="buttonDown()">
<span style="color: black;">
<button :id="Section.defectiveShunting.button.domId" class="button_box" @click="buttonDown(Section.defectiveShunting.button.operation, ['Section','Switch'])">
<span :style="{color: operation === Section.defectiveShunting.button.operation ? '#ccc':'black'}">
<center><b></b><b></b></center>
<center><b></b><b></b></center>
</span>
@ -130,7 +130,6 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
import { MouseEvent, DeviceMenu } from '@/scripts/ConstDic';
import { EventBus } from '@/scripts/event-bus';
import {UserOperationType} from '../../../../scripts/ConstDic';
export default {
name: 'MapButtonMenu',
components: {
@ -243,6 +242,8 @@ export default {
return CMD.Signal.CMD_SIGNAL_SET_ROUTE;
case this.Signal.guide.button.operation: //
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
case this.Signal.lock.button.operation: //
return CMD.Signal.CMD_SIGNAL_BLOCK;
}
return '';
}
@ -252,7 +253,6 @@ export default {
this.updateButtonShow(val, old);
},
'$store.state.menuOperation.selectedCount': function (val) {
// debugger;
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
if (!station || station.controlMode === 'Interlock') { return; }
this.selectedChange();
@ -311,9 +311,9 @@ export default {
this.Switch.lock.button.operation,
this.Switch.unlock.button.operation,
this.Switch.locate.button.operation,
this.Switch.reverse.button.operation,
this.Switch.block.button.operation,
this.Switch.unblock.button.operation
this.Switch.reverse.button.operation
// this.Switch.block.button.operation,
// this.Switch.unblock.button.operation
];
EventBus.$on('setMenuButtonPosition', (offset) => {
this.point.y = offset;
@ -345,6 +345,9 @@ export default {
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (operate.operationPre === this.Station.guideLock.button.operation) {
this.$refs.password.doShow({userOperationType: UserOperationType.LEFTCLICK, operation: operate.operation, operateNext: this.Command.close.password.operation });
}
}
}).catch(e => {
console.error(e);
@ -371,38 +374,6 @@ export default {
}
}
},
// S
guideLockLeftButtonDown() {
const operate = {
userOperationType: UserOperationType.LEFTCLICK,
operation: this.Switch.guideLock.leftButton.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate.nextCmdType = CMD.Switch.CMD_SWITCH_MASTER_UNBLOCK;
operate.param = {right: false};
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
}
});
},
// X
guideLockRightButtonDown() {
const operate = {
userOperationType: UserOperationType.LEFTCLICK,
operation: this.Switch.guideLock.rightButton.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate.nextCmdType = CMD.Switch.CMD_SWITCH_MASTER_UNBLOCK;
operate.param = {right: true};
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
}
});
},
buttonDown(operation, commandTypeList) {
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
if (!station || station.controlMode === 'Interlock') { return; }
@ -420,7 +391,8 @@ export default {
const operationList = [
this.Signal.humanTrainRoute.button.operation,
this.Section.fault.button.operation,
this.Signal.guide.button.operation
this.Signal.guide.button.operation,
this.Station.guideLock.button.operation
];
if (operationList.includes(operation)) {
operate['operateNext'] = this.Command.close.password.operation;
@ -546,6 +518,7 @@ export default {
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.deviceList.push(model);
this.$store.dispatch('training/updateMapState', [{code: model.code, _type: model._type, hasSelected: 1}]);
}
});
@ -586,35 +559,72 @@ export default {
return false;
}
},
handleSignalBlockOrUnblock(model) {
const buttonOperation = this.$store.state.menuOperation.buttonOperation;
handleSignalBlock(model) {
const operate = {
over: true,
code: model.code,
operation: buttonOperation,
cmdType: '',
param: {}
operation: this.Signal.lock.button.operation,
userOperationType: UserOperationType.LEFTCLICK,
val: model.code,
param: {signalCode: model.code}
};
this.$store.dispatch('trainingNew/next', operate);
},
handleSwitchBlock(model) {
const operate = {
code: model.code,
operation: this.Switch.block.button.operation,
userOperationType: UserOperationType.LEFTCLICK,
val: model.code,
param: {switchCode: model.code}
};
this.$store.dispatch('trainingNew/next', operate);
},
// handleSignalLockOrUnlock(model) {
// const buttonOperation = this.$store.state.menuOperation.buttonOperation;
// const operate = {
// over: true,
// code: model.code,
// operation: buttonOperation,
// cmdType: '',
// param: {}
// };
// if (model._type === 'Signal' && !this.checkHasTrainButton(model)) {
// if (buttonOperation === this.Signal.lock.button.operation) {
// operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
// operate.param = {signalCode: model.code};
// } else if (buttonOperation === this.Signal.unlock.button.operation) {
// operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
// operate.param = {signalCode: model.code};
// }
// } else if (model._type === 'SignalButton' && model.type === 'PICK') {
// if (buttonOperation === this.Signal.lock.button.operation) {
// operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
// operate.param = {signalCode: model.signalCode};
// } else if (buttonOperation === this.Signal.unlock.button.operation) {
// operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
// operate.param = {signalCode: model.signalCode};
// }
// }
// this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
// if (valid) {
// this.clearOperate();
// }
// }).catch(e => {
// console.error(e);
// this.$refs.noticeInfo.doShow();
// this.clearOperate();
// });
// },
handleGuideLock(model) {
const operate = {
code: model.code,
operation: this.Station.guideLock.button.operation,
userOperationType: UserOperationType.LEFTCLICK,
param: {stationCode: model.stationCode, throat: model.direction}
};
if (model._type === 'Signal' && !this.checkHasTrainButton(model)) {
if (buttonOperation === this.Signal.lock.button.operation) {
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
operate.param = {signalCode: model.code};
} else if (buttonOperation === this.Signal.unlock.button.operation) {
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
operate.param = {signalCode: model.code};
}
} else if (model._type === 'SignalButton' && model.type === 'PICK') {
if (buttonOperation === this.Signal.lock.button.operation) {
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
operate.param = {signalCode: model.signalCode};
} else if (buttonOperation === this.Signal.unlock.button.operation) {
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
operate.param = {signalCode: model.signalCode};
}
}
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.clearOperate();
this.$store.dispatch('training/updateMapState', [{code: model.code, _type: model._type, hasSelected: 1}]);
}
}).catch(e => {
console.error(e);
@ -622,15 +632,6 @@ export default {
this.clearOperate();
});
},
handleGuideLock(model) {
const operate = {
code: model.code,
operation: this.Signal.guide.button.operation,
userOperationType: UserOperationType.LEFTCLICK,
param: {signalCode: model.signalCode}
};
this.$store.dispatch('trainingNew/next', operate);
},
handleFaultSection(model) {
if (model._type === 'Section') {
const operate = {
@ -659,6 +660,7 @@ export default {
return;
}
const buttonOperation = this.$store.state.menuOperation.buttonOperation;
console.log(model._type, buttonOperation, this.commandTypeList.includes(model._type), this.commandTypeList);
if (buttonOperation && this.commandTypeList.includes(model._type)) {
if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
this.handleTotalCancel(model);
@ -666,16 +668,26 @@ export default {
this.handleTotalHumanSolution(model);
} else if (this.switchOperation.includes(buttonOperation)) {
this.handleSwitchOperate(model);
} else if (buttonOperation === this.Signal.lock.button.operation || buttonOperation === this.Signal.unlock.button.operation) {
this.handleSignalBlockOrUnblock(model);
} else if (buttonOperation === this.MixinCommand.block.button.operation) {
if (model._type == 'Signal') {
this.handleSignalBlock(model);
this.operation = this.Signal.lock.button.operation;
} else if (model._type == 'Switch') {
this.handleSwitchBlock(model);
this.operation = this.Switch.block.button.operation;
}
} else if (buttonOperation === this.Section.fault.button.operation) {
this.handleFaultSection(model);
} else if (buttonOperation === this.Section.defectiveShunting.button.operation) {
this.handelDefectiveShunting(model);
} else if (buttonOperation === this.Signal.reopenSignal.button.operation) {
this.handleReopenSignal(model);
} else if (buttonOperation === this.Signal.arrangementRoute.button.operation) {
this.arrangementRouteOperation(model);
} else if (buttonOperation === this.Signal.guide.button.operation ) {
this.handleGuideSignal(model);
} else if (buttonOperation === this.Station.guideLock.button.operation ) {
this.handleGuideLock(model);
} else if (buttonOperation === this.MixinCommand.functionButton.button.operation) {
const signalButtonList = ['ASSIST', 'CHANGE_DIRECTION', 'PICK_ASSIST', 'DEPART_ASSIST', 'OCCLUSION', 'RECOVERY', 'ACCIDENT'];
if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) {
@ -702,6 +714,7 @@ export default {
if (this.deviceList && this.deviceList[1]) {
deviceState.push({code: this.deviceList[1].code, _type: this.deviceList[0]._type, hasSelected: 0});
}
this.operation = '';
this.$store.dispatch('training/updateMapState', deviceState);
this.deviceList = [];
this.menuSignal = null;
@ -751,14 +764,27 @@ export default {
operate.userOperationType = UserOperationType.LEFTCLICK;
operate.over = true;
operate.cmdType = this.cmdType;
} else if (this.operation === OperationEvent.Signal.lock.button.operation) {
operate.userOperationType = UserOperationType.LEFTCLICK;
operate.over = true;
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
} else if (this.operation === OperationEvent.Switch.block.button.operation) {
operate.userOperationType = UserOperationType.LEFTCLICK;
operate.over = true;
operate.cmdType = CMD.Switch.CMD_SWITCH_BLOCK;
} else if (this.operation === OperationEvent.Station.guideLock.button.operation) {
operate.userOperationType = UserOperationType.LEFTCLICK;
operate.over = true;
operate.cmdType = CMD.Station.CMD_STATION_MASTER_LOCK;
}
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.clearOperate();
}
}).catch(e => {
console.error(e);
this.$refs.noticeInfo.doShow();
}).finally(() => {
if (this.operation === OperationEvent.Station.guideLock.button.operation) {
this.$store.dispatch('training/updateMapState', [{code: this.selected.code, _type: this.selected._type, hasSelected: 0}]);
}
this.clearOperate();
});
}
@ -766,6 +792,42 @@ export default {
commandClear() {
this.clearOperate();
},
//
handelDefectiveShunting(model) {
// CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING;
if (model._type == 'Section') {
const operate = {
over: true,
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
operation: OperationEvent.Section.defectiveShunting.menu.operation,
userOperationType: UserOperationType.LEFTCLICK,
param:{
sectionCode: model.code,
shuntingTypeList:['SECTION_SHUNTING']
}
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
// if (valid) {
// }
});
} else if (model._type == 'Switch') {
const operate = {
over: true,
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
operation: OperationEvent.Section.defectiveShunting.menu.operation,
userOperationType: UserOperationType.LEFTCLICK,
param:{
sectionCode: model.sectionACode,
shuntingTypeList:['SWITCH_FRONT_SHUNTING']
}
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
// if (valid) {
// }
});
}
this.clearOperate();
},
assistOperateOrChange(model) {
// mode.type==
const modelTypeMap = {

View File

@ -34,7 +34,7 @@ import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate} from '../../../components/utils/menuOperate';
import NoticeInfo from '../../../components/menus/childDialog/noticeInfo';
import PasswordBox from '../dialog/childDialog/passwordInputBox.vue';
import {UserOperationType} from "../../../../../scripts/ConstDic";
import {UserOperationType} from '../../../../../scripts/ConstDic';
export default {
name: 'RouteCancel',
components: {
@ -116,7 +116,6 @@ export default {
},
cancel() {
const operate = {
over: true,
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {

View File

@ -26,7 +26,7 @@ import PasswordBox from '@/jmapNew/theme/components/menus/childDialog/passwordIn
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import DrawSelect from './dialog/drawSelect';
import { EventBus } from '@/scripts/event-bus';
import {UserOperationType} from "../../../../scripts/ConstDic";
import {UserOperationType} from '../../../../scripts/ConstDic';
export default {
name: 'SignalMenu',
@ -62,34 +62,40 @@ export default {
label: '办理 通过进路',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork'
isDisabled: (signal, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => { return work === 'ctcWork' && section.type !== 'SHUNTING2'; }
},
{
type: 'separator'
type: 'separator',
isShow: (section, work) => work === 'ctcWork'
},
{
label: '列车 办理进路',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork'
isDisabled: (signal, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
},
{
label: '取消进路',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork'
isDisabled: (signal, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
},
{
label: '信号重开',
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL,
isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork'
isDisabled: (signal, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
},
{
label: '封锁/解封',
handler: this.lockOrUnlock,
cmdType: '',
isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork'
isDisabled: (signal, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
// cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
},
@ -97,22 +103,26 @@ export default {
label: '总人解',
handler: this.humanTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE,
isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork'
isDisabled: (signal, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
},
{
type: 'separator'
type: 'separator',
isShow: (section, work) => work === 'ctcWork'
},
{
label: '引导',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork'
isDisabled: (signal, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
},
{
label: '坡道解锁',
handler: '',
cmdType: '',
isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork'
isDisabled: (signal, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
}
],
menuForce: [

View File

@ -25,6 +25,8 @@ import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import RouteCancel from './menuDialog/routeCancel';
import { UserOperationType } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'SwitchMenu',
@ -63,72 +65,109 @@ export default {
label: '定操',
handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION,
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork'
isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
},
{
label: '反操',
handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION,
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork'
isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
},
{
label: '单锁',
handler: this.lock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK,
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork'
isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
},
{
label: '单解',
handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK,
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork'
isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
},
{
label: '道岔钩锁',
handler: this.hookLock,
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK,
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork'
isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
},
{
label: '封锁/解封',
handle: ''
handler: this.blockOrUnblock,
cmdType: CMD.Switch.CMD_SWITCH_BLOCK,
isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
},
{
label: '区故解',
handle: ''
handler: this.fault,
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK,
isDisabled: (_section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
},
{
label: '岔前 分路不良',
handle: ''
handler: this.beforeForkDirective,
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
},
{
label: '定位 分路不良',
handle: ''
handler: this.locateForkDirective,
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
},
{
label: '反位 分路不良',
handle: ''
handler: this.reverseForkDirective,
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
},
{
label: '接触网定位无电',
handle: ''
},
{
label: '接触网反位无电',
handle: ''
},
{
label: '添加调机号',
handle: ''
},
{
label: '删除调机号',
handle: ''
},
{
label: '修改调机号',
handle: ''
label: '空闲',
handler: this.cancleForkDirective,
cmdType: CMD.Section.CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING,
isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
}
// {
// label: '',
// handle: '',
// isDisabled: (section, station, work) => station.controlMode !== 'Local',
// isShow: (section, work) => work === 'ctcWork'
// },
// {
// label: '',
// handle: '',
// isDisabled: (section, station, work) => station.controlMode !== 'Local',
// isShow: (section, work) => work === 'ctcWork'
// },
// {
// label: '',
// handle: '',
// isDisabled: (section, station, work) => station.controlMode !== 'Local',
// isShow: (section, work) => work === 'ctcWork'
// },
// {
// label: '',
// handle: '',
// isDisabled: (section, station, work) => station.controlMode !== 'Local',
// isShow: (section, work) => work === 'ctcWork'
// },
// {
// label: '',
// handle: '',
// isDisabled: (section, station, work) => station.controlMode !== 'Local',
// isShow: (section, work) => work === 'ctcWork'
// }
],
menuForce: [
{
@ -238,27 +277,37 @@ export default {
}
});
},
blockOrUnblock() {
if (this.selected.blockade) {
this.unblock();
} else {
this.block();
}
},
//
block() {
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
// this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
unblock() {
commitOperate(menuOperate.Switch.unblock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
commitOperate(menuOperate.Switch.unblock, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
// this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
// /
fault() {
commitOperate(menuOperate.Switch.fault, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
commitOperate(menuOperate.Switch.fault, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
// this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
@ -287,6 +336,70 @@ export default {
}
});
},
//
beforeForkDirective() {
const operate = {
over: true,
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_FRONT,
operation: OperationEvent.Switch.defectiveShunting.before.operation,
userOperationType: UserOperationType.RIGHTCLICK,
param:{
sectionCode:this.selected.sectionACode
}
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
// if (valid) {
// }
});
},
//
locateForkDirective() {
const operate = {
over: true,
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_FIXED,
operation: OperationEvent.Switch.defectiveShunting.locate.operation,
userOperationType: UserOperationType.RIGHTCLICK,
param:{
sectionCode:this.selected.sectionACode
}
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
// if (valid) {
// }
});
},
//
reverseForkDirective() {
const operate = {
over: true,
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_REVERSE,
operation: OperationEvent.Switch.defectiveShunting.reverse.operation,
userOperationType: UserOperationType.RIGHTCLICK,
param:{
sectionCode:this.selected.sectionACode
}
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
// if (valid) {
// }
});
},
//
cancleForkDirective() {
const operate = {
over: true,
cmdType:CMD.Section.CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING,
operation: OperationEvent.Switch.cancelDefectiveShunting.menu.operation,
userOperationType: UserOperationType.RIGHTCLICK,
param:{
sectionCode:this.selected.sectionACode
}
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
// if (valid) {
// }
});
},
//
hookLock() {
this.$refs.switchHookLock.doShow(this.selected);

View File

@ -21,7 +21,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { menuOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
import TrainStop from '@/jmapNew/theme/components/menus/dialog/trainStop';
import {UserOperationType} from "../../../../scripts/ConstDic";
import {UserOperationType} from '../../../../scripts/ConstDic';
export default {
name: 'MenuTrain',
@ -63,13 +63,13 @@ export default {
label: '删车次号',
handler: this.removeTripNumber,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE,
isShow: (train, work) => work === 'localWork'
isShow: (train, work) => work === 'localWork' || work === 'ctcWork'
},
{
label: '换端',
handler: this.turnDirection,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE,
isShow: (train, work) => work === 'localWork'
isShow: (train, work) => work === 'localWork' || work === 'ctcWork'
}
],
menuForce: [
@ -139,7 +139,7 @@ export default {
},
watch: {
'$store.state.menuOperation.menuCount': function () {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Train) && (!this.buttonOperation || this.$route.query.ctc)) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Train) && (!this.buttonOperation || this.work == 'ctcWork')) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
@ -317,15 +317,14 @@ export default {
const operate = {
start: true,
userOperationType: UserOperationType.LEFTCLICK,
operation: menuOperate.Driver.changePreselectionMode.operation,
cmdType: menuOperate.Driver.changePreselectionMode.cmdType,
operation: menuOperate.Common.trainDrive,
param: {
code: this.selected.code
}
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.collocation, this.selected, true);
this.$refs.setFault.doShow(menuOperate.Common.trainDrive, this.selected, true);
}
});
},

View File

@ -31,6 +31,7 @@
</template>
<script>
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { UserOperationType } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
@ -109,7 +110,7 @@ export default {
},
cancel() {
const operate = {
over: true,
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.cancel.menu.operation
};

View File

@ -67,6 +67,7 @@ import ConfirmControl from './childDialog/confirmControl';
import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { UserOperationType } from '@/scripts/ConstDic';
export default {
name: 'RouteHandControl',
@ -252,7 +253,7 @@ export default {
},
cancel() {
const operate = {
over: true,
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.cancel.menu.operation
};

View File

@ -33,6 +33,7 @@
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { UserOperationType } from '@/scripts/ConstDic';
export default {
name: 'DefectiveShunting',
components: {
@ -109,7 +110,7 @@ export default {
},
cancel() {
const operate = {
over: true,
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.cancel.menu.operation
};

View File

@ -67,6 +67,7 @@ import ConfirmControl from './childDialog/confirmControl';
import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { UserOperationType } from '@/scripts/ConstDic';
export default {
name: 'RouteHandControl',
@ -252,7 +253,7 @@ export default {
},
cancel() {
const operate = {
over: true,
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.cancel.menu.operation
};

View File

@ -114,6 +114,10 @@ class Theme {
loadLocalWorkMenuComponent(code) {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/localWorkMenu`).default);
}
// 加载司机ats工作站菜单组件
loadDriverAtsWorkMenuComponent(code) {
return Object.assign({}, require(`./components/menus/driverAtsWorMenu`).default);
}
loadCtcWorkMenuComponent(code) {
if (code == '16') {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/ctcWorkMenu`).default);

View File

@ -84,6 +84,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { mapGetters } from 'vuex';
import ConstConfig from '@/scripts/ConstConfig';
import { UserOperationType } from '@/scripts/ConstDic';
export default {
name: 'StandBackStrategy',
@ -218,7 +219,7 @@ export default {
},
cancel() {
const operate = {
over: true,
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.cancel.menu.operation
};

View File

@ -128,18 +128,18 @@ export default {
title: this.$t('menu.menuBar.controlModeSwitch'),
operate: OperationEvent.Command.mBar.remoteControl,
children: [
{
title: this.$t('menu.menuBar.toStationControl'),
click: this.turnToStationControl,
operate: OperationEvent.StationControl.requestStationControl.mbar,
force: true
},
{
title: this.$t('menu.menuBar.forcedStationControl'),
click: this.mandatoryStationControl,
operate: OperationEvent.StationControl.forcedStationControl.password,
force: true
},
// {
// title: this.$t('menu.menuBar.toStationControl'),
// click: this.turnToStationControl,
// operate: OperationEvent.StationControl.requestStationControl.mbar,
// force: true
// },
// {
// title: this.$t('menu.menuBar.forcedStationControl'),
// click: this.mandatoryStationControl,
// operate: OperationEvent.StationControl.forcedStationControl.password,
// force: true
// },
{
title: this.$t('menu.menuBar.toCentralControl'),
click: this.conterStationControl,

View File

@ -101,13 +101,13 @@ export default {
title: this.$t('menu.menuBar.forcedStationControl'),
click: this.mandatoryStationControl,
operate: OperationEvent.StationControl.forcedStationControl.password
},
{
title: this.$t('menu.menuBar.toCentralControl'),
click: this.conterStationControl,
operate: OperationEvent.StationControl.requestCentralControl.mbar,
force: true
}
// {
// title: this.$t('menu.menuBar.toCentralControl'),
// click: this.conterStationControl,
// operate: OperationEvent.StationControl.requestCentralControl.mbar,
// force: true
// }
]
},
{

View File

@ -24,6 +24,7 @@ import '@/directive/dialogLoading/index.js';
import '@/directive/drag/index.js';
import '@/directive/focus/index.js';
import '@/directive/quickMenuDrag/index.js';
import '@/directive/verticalDrag/index.js';
import '@/directive/waves/index.js';
import messages from '@/i18n/index';

View File

@ -249,24 +249,6 @@ export const admin = '04'; // 管理员
export const superAdmin = '05'; // 超级管理员
// export const referee = '07'; // 裁判员
export const projectTrain = '011'; // 城市轨道项目
export const projectXian = '012'; // 西安地铁项目
export const projectXty = '013'; // 西铁院
export const projectGzzb = '014'; // 贵州装备
export const projectJsxt = '015'; // 竞赛系统
export const projectJyd = '017'; // 竞业达
export const projectTky = '018'; // 铁科院
export const projectHeb = '019'; // 哈盈达
export const projectDrts = '020'; // 行调实训
export const projectSdy = '021';// 苏电院
export const projectRichor = '022';// 中航锐创
export const projectRichorJoint = '023'; // 中航锐创(实训室)
export const projectSrsandbox = '024'; // 上饶沙盘
export const projectJxgm = '025'; // 江西工贸
export const projectSay = '026'; // 江苏安全
export const projectRichorhhcj = '027'; // 红河财经
export const projectTeaching = '028'; // 教学通用
export const userTrainingPlatform = '016'; // 实训系统
// export const refereePlatform = '017'; // 裁判系统
@ -292,17 +274,6 @@ export const constantRoutes = [
component: Login,
hidden: true
},
// 设计平台登录
{
path: '/design',
redirect: '/design/login',
hidden: true
},
{
path: '/design/login',
component: Login,
hidden: true
},
{
path: '/authorization',
component: Authorization,
@ -2115,198 +2086,6 @@ export const asyncRouter = [
]
}
];
/* merge 是否再路由处理中与asyncRouter进行合并 mergeIndex合并进入asyncRouter【mergeIndex】 慎重调整asyncRouter顺序 */
export const projectRoute = {
designgzb: [
{ // 系统管理
path: '/system',
component: Layout,
merge: true,
mergeIndex: 4,
meta: {
i18n: 'router.systemManage',
roles: [admin]
},
children: [
{
path: 'deviceManage',
component: DeviceManage,
meta: {
i18n: 'router.deviceManage'
}
}
]
}
],
designxty: [
{ // 系统管理
path: '/system',
component: Layout,
merge: true,
mergeIndex: 4,
meta: {
i18n: 'router.systemManage',
roles: [admin]
},
children: [
{
path: 'deviceManage',
component: DeviceManage,
meta: {
i18n: 'router.deviceManage'
}
}
]
}
],
designheb: [
{ // 系统管理
path: '/system',
component: Layout,
merge: true,
mergeIndex: 4,
meta: {
i18n: 'router.systemManage',
roles: [admin]
},
children: [
{
path: 'deviceManage',
component: DeviceManage,
meta: {
i18n: 'router.deviceManage'
}
}
]
}
],
designsdy: [
{ // 系统管理
path: '/system',
component: Layout,
merge: true,
mergeIndex: 4,
meta: {
i18n: 'router.systemManage',
roles: [admin]
},
children: [
{
path: 'deviceManage',
component: DeviceManage,
meta: {
i18n: 'router.deviceManage'
}
}
]
}
],
designrichorjoint: [
{ // 系统管理
path: '/system',
component: Layout,
merge: true,
mergeIndex: 4,
meta: {
i18n: 'router.systemManage',
roles: [admin]
},
children: [
{
path: 'deviceManage',
component: DeviceManage,
meta: {
i18n: 'router.deviceManage'
}
}
]
}
],
designsrsandbox: [
{ // 系统管理
path: '/system',
component: Layout,
merge: true,
mergeIndex: 4,
meta: {
i18n: 'router.systemManage',
roles: [admin]
},
children: [
{
path: 'deviceManage',
component: DeviceManage,
meta: {
i18n: 'router.deviceManage'
}
}
]
}
],
designjxgm: [
{ // 系统管理
path: '/system',
component: Layout,
merge: true,
mergeIndex: 4,
meta: {
i18n: 'router.systemManage',
roles: [admin]
},
children: [
{
path: 'deviceManage',
component: DeviceManage,
meta: {
i18n: 'router.deviceManage'
}
}
]
}
],
designsay: [
{ // 系统管理
path: '/system',
component: Layout,
merge: true,
mergeIndex: 4,
meta: {
i18n: 'router.systemManage',
roles: [admin]
},
children: [
{
path: 'deviceManage',
component: DeviceManage,
meta: {
i18n: 'router.deviceManage'
}
}
]
}
],
designrichorhhcj: [
{ // 系统管理
path: '/system',
component: Layout,
merge: true,
mergeIndex: 4,
meta: {
i18n: 'router.systemManage',
roles: [admin]
},
children: [
{
path: 'deviceManage',
component: DeviceManage,
meta: {
i18n: 'router.deviceManage'
}
}
]
}
]
};
const createRouter = () => new Router({
base: process.env.VUE_APP_PRO == 'local' ? '/' : '/cbtc/',
mode: 'history', // require service support

View File

@ -62,6 +62,7 @@ export default {
{ label: '通号', value: 'MAINTAINER', enLabel: 'Repairman ' },
{ label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher ' },
{ label: '电力调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher' },
{ label: '电力工务', value: 'STATION_ELECTRIC_WORKER', enLabel: 'Station electric worker' },
{ label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher ' },
{ label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department' },
{ label: '车辆段/停车场信号楼', value: 'SIGNAL_BUILDING', enLabel: 'Signal Building' },
@ -91,6 +92,7 @@ export default {
{label: '车站工务工', value: 'STATION_WORKER'},
{label: '车务段段长', value: 'TRAIN_MASTER'},
{label: '工电调度', value: 'ELECTRIC_DISPATCHER'},
{ label: '电力工务', value: 'STATION_ELECTRIC_WORKER'},
{label: '上级部分', value: 'PARENT_DEPARTMENT'},
{label: '派班员', value: 'SCHEDULING'},
{label: '设备管理员', value: 'DEVICE_MANAGER'},

View File

@ -201,7 +201,16 @@ export default {
/** 增加备用车 大铁线路使用*/
CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN: {value: 'Train_Load_Trip_Number_Train', label: '增加备用车'},
/** 分路不良 大铁线路使用*/
CMD_SECTION_DEFECTIVE_SHUNTING: {value: 'Section_Defective_Shunting', label: '分路不良'}
CMD_SECTION_DEFECTIVE_SHUNTING: {value: 'Section_Defective_Shunting', label: '分路不良'},
/** 岔前分路不良 大铁线路使用*/
CMD_SECTION_DEFECTIVE_SHUNTING_FRONT: {value: 'Section_Defective_Shunting_Front', label: '岔前分路不良'},
/** 定位分路不良 大铁线路使用*/
CMD_SECTION_DEFECTIVE_SHUNTING_FIXED: {value: 'Section_Defective_Shunting_Fixed', label: '定位分路不良'},
/** 反位分路不良 大铁线路使用*/
CMD_SECTION_DEFECTIVE_SHUNTING_REVERSE:{value: 'Section_Defective_Shunting_Reverse', label: '反位分路不良'},
/** 区段确认空闲,取消分路不良 */
CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING:{value: 'Section_Cancel_Defective_Shunting', label: '区段确认空闲'}
},
// 站台
@ -334,6 +343,7 @@ export default {
CMD_TRAIN_CHANGE_DESTINATION_CODE: {value:'Train_Change_Destination_Code', label: '更改目的地码'},
CMD_TRAIN_TRUST: {value: 'Train_Trust', label: '设置托管'},
CMD_TRAIN_LINK: {value: 'Train_Link', label: '设置连挂'},
CMD_TRAIN_DRIVE: {value: 'Train_Drive', label: '机器人司机模拟驾驶'},
/** 下令停车 */
CMD_TRAIN_ORDER_STOP: {value: 'Train_Order_Stop', label:'下令停车'},
/** 取消停车命令 */
@ -489,10 +499,19 @@ export default {
CMD_RAIL_QUERY_TICKET: {value: 'RAIL_QUERY_TICKET', label: '查询票据'},
CMD_RAIL_FILL_IN_REGISTER: {value: 'RAIL_FILL_IN_REGISTER', label: '填写行车簿册'},
CMD_RAIL_QUERY_REGISTER: {value: 'RAIL_QUERY_REGISTER', label: '查询行车簿册'},
CMD_RAIL_GIVE_TICKET_TO: {value: 'RAIL_GIVE_TICKET_TO', label: '给出票据'}
CMD_RAIL_GIVE_TICKET_TO: {value: 'RAIL_GIVE_TICKET_TO', label: '给出票据'},
CMD_RAIL_EQUIPMENT_CONSTRUCTION_INFO_SAVE:{value: 'EQUIPMENT_CONSTRUCTION_INFO_SAVE', label: '填写施工登记簿册'},
CMD_RAIL_EQUIPMENT_CONSTRUCTION_INFO_QUERY:{value: 'EQUIPMENT_CONSTRUCTION_INFO_QUERY', label: '查询施工登记簿册'}
},
Conversation: {
CMD_Conversation_Chat_Text: {value: 'Conversation_Chat_Text', label: '发送文本消息'},
CMD_Conversation_Chat_Audio_Base64: {value: 'Conversation_Chat_Audio_Base64', label: '发送语音消息'}
},
PSL: {
CMD_PSL_PRESS_BUTTON: {value: 'PSL_PRESS_BUTTON', label: 'PSL按钮操作'}
},
IBP: {
CMD_IBP_PRESS_BUTTON: {value: 'IBP_PRESS_BUTTON', label: 'IBP按钮按下'},
CMD_IBP_RELEASE_BUTTON: {value: 'IBP_RELEASE_BUTTON', label: 'IBP按钮抬起'}
}
};

View File

@ -1297,7 +1297,20 @@ export const OperationEvent = {
menu: {
operation: '11c',
domId: '_Tips-Switch-DefectiveShunting-Menu{TOP}'
},
locate:{
operation: '11e',
domId: '_Tips-Switch-DefectiveShunting-Locate{TOP}'
},
reverse:{
operation: '11f',
domId: '_Tips-Switch-DefectiveShunting-Reverse{TOP}'
},
before:{
operation: '11g',
domId: '_Tips-Switch-DefectiveShunting-Before{TOP}'
}
},
// 取消分路不良
cancelDefectiveShunting:{
@ -2448,6 +2461,10 @@ export const OperationEvent = {
shuntingTypeListChange: {
operation: '4282',
domId: '_Tips-Section-Defective-Shunting-Change'
},
menu:{
operation: '4283',
domId: '_Tips-Section-Defective-Shunting-Menu'
}
// menuButton: {
// operation: '428',
@ -3746,6 +3763,13 @@ export const OperationEvent = {
domId: '_Tips-Collocation-Menu{TOP}'
}
},
// 机器人司机模拟驾驶 Train_Drive
trainDrive:{
menu: {
operation: '299d',
domId: '_Tips-trainDrive-Menu{TOP}'
}
},
// 设置连挂
setLink: {
menu: {
@ -4194,6 +4218,710 @@ export const OperationEvent = {
// CTC_ZONE_SAVE_TRIP_NUMBER
// CTC_ZONE_SAVE_STATION
},
TicketOrRegister: {
attachmentType: {
typeChange: {
operation: 'b000',
domId: '_Tips-TicketOrRegister-AttachmentType-TypeChange'
}
},
ticketInput: {
nextStation: {
operation: 'b001',
domId: '_Tips-TicketOrRegister-TicketInput-NextStation'
},
number: {
operation: 'b002',
domId: '_Tips-TicketOrRegister-TicketInput-Number'
},
tripNumber: {
operation: 'b003',
domId: '_Tips-TicketOrRegister-TicketInput-TripNumber'
},
no: {
operation: 'b004',
domId: '_Tips-TicketOrRegister-TicketInput-No'
},
memberId: {
operation: 'b005',
domId: '_Tips-TicketOrRegister-TicketInput-memberId'
},
licenseTripNumber: {
operation: 'b006',
domId: '_Tips-TicketOrRegister-TicketInput-LicenseTripNumber'
},
licenseStation: {
operation: 'b007',
domId: '_Tips-TicketOrRegister-TicketInput-LicenseStation'
},
licenseNextStation: {
operation: 'b008',
domId: '_Tips-TicketOrRegister-TicketInput-LicenseNextStation'
},
licenseHour: {
operation: 'b009',
domId: '_Tips-TicketOrRegister-TicketInput-LicenseHour'
},
licenseMinute: {
operation: 'b010',
domId: '_Tips-TicketOrRegister-TicketInput-LicenseMinute'
},
licenseTripNumber2: {
operation: 'b011',
domId: '_Tips-TicketOrRegister-TicketInput-LicenseTripNumber2'
},
licenseReceived: {
operation: 'b012',
domId: '_Tips-TicketOrRegister-TicketInput-LicenseReceived'
},
noticeTripNumber: {
operation: 'b013',
domId: '_Tips-TicketOrRegister-TicketInput-NoticeTripNumber'
},
noticeHour1: {
operation: 'b014',
domId: '_Tips-TicketOrRegister-TicketInput-NoticeHour1'
},
noticeMinute1: {
operation: 'b015',
domId: '_Tips-TicketOrRegister-TicketInput-NoticeMinute1'
},
noticeTripNumber1: {
operation: 'b016',
domId: '_Tips-TicketOrRegister-TicketInput-NoticeTripNumber1'
},
noticeHour2: {
operation: 'b017',
domId: '_Tips-TicketOrRegister-TicketInput-NoticeHour2'
},
noticeMinute2: {
operation: 'b018',
domId: '_Tips-TicketOrRegister-TicketInput-NoticeMinute2'
},
noticeTripNumber2: {
operation: 'b019',
domId: '_Tips-TicketOrRegister-TicketInput-NoticeTripNumber2'
},
signature: {
operation: 'b020',
domId: '_Tips-TicketOrRegister-TicketInput-Signature'
},
year: {
operation: 'b021',
domId: '_Tips-TicketOrRegister-TicketInput-Year'
},
moon: {
operation: 'b022',
domId: '_Tips-TicketOrRegister-TicketInput-Moon'
},
day: {
operation: 'b023',
domId: '_Tips-TicketOrRegister-TicketInput-Day'
},
reason: {
operation: 'b024',
domId: '_Tips-TicketOrRegister-TicketInput-Reason'
},
line: {
operation: 'b025',
domId: '_Tips-TicketOrRegister-TicketInput-Line'
}
},
registerInput: {
addData: {
operation: 'b100',
domId: '_Tips_TicketOrRegister-RegisterInput-AddData'
},
moonDay: {
operation: 'b101',
domId: '_Tips-TicketOrRegister-RegisterInput-MoonDay'
},
hourMinute: {
operation: 'b102',
domId: '_Tips-TicketOrRegister-RegisterInput-HourMinute'
},
result: {
operation: 'b103',
domId: '_Tips-TicketOrRegister-RegisterInput-Result'
},
noticeTimeMoonDay: {
operation: 'b104',
domId: '_Tips-TicketOrRegister-RegisterInput-NoticeTimeMoonDay'
},
noticeTimeHourMinute: {
operation: 'b105',
domId: '_Tips-TicketOrRegister-RegisterInput-NoticeTimeHourMinute'
},
noticeTimeInfo: {
operation: 'b106',
domId: '_Tips-TicketOrRegister-RegisterInput-NoticeTimeInfo'
},
arriveTimeMoonDay: {
operation: 'b107',
domId: '_Tips-TicketOrRegister-RegisterInput-ArriveTimeMoonDay'
},
arriveTimeHourMinute: {
operation: 'b108',
domId: '_Tips-TicketOrRegister-RegisterInput-ArriveTimeHourMinute'
},
arriveTimeInfo: {
operation: 'b109',
domId: '_Tips-TicketOrRegister-RegisterInput-ArriveTimeInfo'
},
endTimeMoonDay: {
operation: 'b110',
domId: '_Tips-TicketOrRegister-RegisterInput-EndTimeMoonDay'
},
endTimeHourMinute: {
operation: 'b111',
domId: '_Tips-TicketOrRegister-RegisterInput-EndTimeHourMinute'
},
endTimeInfo: {
operation: 'b112',
domId: '_Tips-TicketOrRegister-RegisterInput-EndTimeInfo'
},
tabs: {
operation: 'b113',
domId: '_Tips-TicketOrRegister-RegisterInput-tabs'
}
}
},
AbnormalTrainRegister: { // 薄册--非正常情况接发列车关键环节控制表
tabType: {
typeChange: {
operation: 'c000',
domId: '_Tips-AbnormalTrainRegister-tabType-typeChange'
}
},
formInput: {
submit: {
operation: 'c001',
domId: '_Tips-AbnormalTrainRegister-formInput-submit{BOTTOM}'
},
supervisor: {
operation: 'c002',
domId: '_Tips-AbnormalTrainRegister-formInput-supervisor'
},
cadresPost: {
operation: 'c003',
domId: '_Tips-AbnormalTrainRegister-formInput-cadresPost'
},
monitorCadres: {
operation: 'c004',
domId: '_Tips-AbnormalTrainRegister-formInput-monitorCadres'
},
weather: {
operation: 'c005',
domId: '_Tips-AbnormalTrainRegister-formInput-weather'
},
registerDate: {
operation: 'c006',
domId: '_Tips-AbnormalTrainRegister-formInput-registerDate'
},
noticeCadresTimeHour: {
operation: 'c007',
domId: '_Tips-AbnormalTrainRegister-formInput-noticeCadresTimeHour'
},
noticeCadresTimeMinute: {
operation: 'c008',
domId: '_Tips-AbnormalTrainRegister-formInput-noticeCadresTimeMinute'
},
reportDispatcherTimeHour: {
operation: 'c009',
domId: '_Tips-AbnormalTrainRegister-formInput-reportDispatcherTimeHour'
},
reportDispatcherTimeMinute: {
operation: 'c0010',
domId: '_Tips-AbnormalTrainRegister-formInput-reportDispatcherTimeMinute'
},
reportCommandCentreTimeHour: {
operation: 'c0011',
domId: '_Tips-AbnormalTrainRegister-formInput-reportCommandCentreTimeHour'
},
reportCommandCentreTimeMinute: {
operation: 'c0012',
domId: '_Tips-AbnormalTrainRegister-formInput-reportCommandCentreTimeMinute'
},
monitorArriveTimeHour: {
operation: 'c0013',
domId: '_Tips-AbnormalTrainRegister-formInput-monitorArriveTimeHour'
},
monitorArriveTimeMinute: {
operation: 'c0014',
domId: '_Tips-AbnormalTrainRegister-formInput-monitorArriveTimeMinute'
},
departmentName0: {
operation: 'c0015',
domId: '_Tips-AbnormalTrainRegister-formInput-departmentName0'
},
registration0: {
operation: 'c0016',
domId: '_Tips-AbnormalTrainRegister-formInput-registration0'
},
reportSign0: {
operation: 'c0017',
domId: '_Tips-AbnormalTrainRegister-formInput-reportSign0'
},
reportDispatcher0: {
operation: 'c0018',
domId: '_Tips-AbnormalTrainRegister-formInput-reportDispatcher0'
},
centerDispatchCommandCheck0: {
operation: 'c0019',
domId: '_Tips-AbnormalTrainRegister-formInput-centerDispatchCommandCheck0'
},
monitorArrive0: {
operation: 'c0020',
domId: '_Tips-AbnormalTrainRegister-formInput-monitorArrive0'
},
writeOff0: {
operation: 'c0021',
domId: '_Tips-AbnormalTrainRegister-formInput-writeOff0'
},
workerDispatchCommandCheck0: {
operation: 'c0022',
domId: '_Tips-AbnormalTrainRegister-formInput-workerDispatchCommandCheck0'
},
departmentName1: {
operation: 'c0023',
domId: '_Tips-AbnormalTrainRegister-formInput-departmentName1'
},
registration1: {
operation: 'c0024',
domId: '_Tips-AbnormalTrainRegister-formInput-registration1'
},
reportSign1: {
operation: 'c0025',
domId: '_Tips-AbnormalTrainRegister-formInput-reportSign1'
},
reportDispatcher1: {
operation: 'c0026',
domId: '_Tips-AbnormalTrainRegister-formInput-reportDispatcher1'
},
centerDispatchCommandCheck1: {
operation: 'c0027',
domId: '_Tips-AbnormalTrainRegister-formInput-centerDispatchCommandCheck1'
},
monitorArrive1: {
operation: 'c0028',
domId: '_Tips-AbnormalTrainRegister-formInput-monitorArrive1'
},
writeOff1: {
operation: 'c0029',
domId: '_Tips-AbnormalTrainRegister-formInput-writeOff1'
},
workerDispatchCommandCheck1: {
operation: 'c0030',
domId: '_Tips-AbnormalTrainRegister-formInput-workerDispatchCommandCheck1'
},
departmentName2: {
operation: 'c0031',
domId: '_Tips-AbnormalTrainRegister-formInput-departmentName2'
},
registration2: {
operation: 'c0032',
domId: '_Tips-AbnormalTrainRegister-formInput-registration2'
},
reportSign2: {
operation: 'c0033',
domId: '_Tips-AbnormalTrainRegister-formInput-reportSign2'
},
reportDispatcher2: {
operation: 'c0034',
domId: '_Tips-AbnormalTrainRegister-formInput-reportDispatcher2'
},
centerDispatchCommandCheck2: {
operation: 'c0035',
domId: '_Tips-AbnormalTrainRegister-formInput-centerDispatchCommandCheck2'
},
monitorArrive2: {
operation: 'c0036',
domId: '_Tips-AbnormalTrainRegister-formInput-monitorArrive2'
},
writeOff2: {
operation: 'c0037',
domId: '_Tips-AbnormalTrainRegister-formInput-writeOff2'
},
workerDispatchCommandCheck2: {
operation: 'c0038',
domId: '_Tips-AbnormalTrainRegister-formInput-workerDispatchCommandCheck2'
},
departmentName3: {
operation: 'c0039',
domId: '_Tips-AbnormalTrainRegister-formInput-departmentName3'
},
registration3: {
operation: 'c0040',
domId: '_Tips-AbnormalTrainRegister-formInput-registration3'
},
reportSign3: {
operation: 'c0041',
domId: '_Tips-AbnormalTrainRegister-formInput-reportSign3'
},
reportDispatcher3: {
operation: 'c0042',
domId: '_Tips-AbnormalTrainRegister-formInput-reportDispatcher3'
},
centerDispatchCommandCheck3: {
operation: 'c0043',
domId: '_Tips-AbnormalTrainRegister-formInput-centerDispatchCommandCheck3'
},
monitorArrive3: {
operation: 'c0044',
domId: '_Tips-AbnormalTrainRegister-formInput-monitorArrive3'
},
writeOff3: {
operation: 'c0045',
domId: '_Tips-AbnormalTrainRegister-formInput-writeOff3'
},
workerDispatchCommandCheck3: {
operation: 'c0046',
domId: '_Tips-AbnormalTrainRegister-formInput-workerDispatchCommandCheck3'
},
departmentName4: {
operation: 'c0047',
domId: '_Tips-AbnormalTrainRegister-formInput-departmentName4'
},
registration4: {
operation: 'c0048',
domId: '_Tips-AbnormalTrainRegister-formInput-registration4'
},
reportSign4: {
operation: 'c0049',
domId: '_Tips-AbnormalTrainRegister-formInput-reportSign4'
},
reportDispatcher4: {
operation: 'c0050',
domId: '_Tips-AbnormalTrainRegister-formInput-reportDispatcher4'
},
centerDispatchCommandCheck4: {
operation: 'c0051',
domId: '_Tips-AbnormalTrainRegister-formInput-centerDispatchCommandCheck4'
},
monitorArrive4: {
operation: 'c0052',
domId: '_Tips-AbnormalTrainRegister-formInput-monitorArrive4'
},
writeOff4: {
operation: 'c0053',
domId: '_Tips-AbnormalTrainRegister-formInput-writeOff4'
},
workerDispatchCommandCheck4: {
operation: 'c0054',
domId: '_Tips-AbnormalTrainRegister-formInput-workerDispatchCommandCheck4'
},
departmentName5: {
operation: 'c0055',
domId: '_Tips-AbnormalTrainRegister-formInput-departmentName5'
},
registration5: {
operation: 'c0056',
domId: '_Tips-AbnormalTrainRegister-formInput-registration5'
},
reportSign5: {
operation: 'c0057',
domId: '_Tips-AbnormalTrainRegister-formInput-reportSign5'
},
reportDispatcher5: {
operation: 'c0058',
domId: '_Tips-AbnormalTrainRegister-formInput-reportDispatcher5'
},
centerDispatchCommandCheck5: {
operation: 'c0059',
domId: '_Tips-AbnormalTrainRegister-formInput-centerDispatchCommandCheck5'
},
monitorArrive5: {
operation: 'c0060',
domId: '_Tips-AbnormalTrainRegister-formInput-monitorArrive5'
},
writeOff5: {
operation: 'c0061',
domId: '_Tips-AbnormalTrainRegister-formInput-writeOff5'
},
workerDispatchCommandCheck5: {
operation: 'c0062',
domId: '_Tips-AbnormalTrainRegister-formInput-workerDispatchCommandCheck5'
},
faultContent: {
operation: 'c0063',
domId: '_Tips-AbnormalTrainRegister-formInput-faultContent'
},
sectionContent: {
operation: 'c0064',
domId: '_Tips-AbnormalTrainRegister-formInput-sectionContent'
},
pickRoutePrepareContent: {
operation: 'c0065',
domId: '_Tips-AbnormalTrainRegister-formInput-pickRoutePrepareContent'
},
pickSignal: {
operation: 'c0066',
domId: '_Tips-AbnormalTrainRegister-formInput-pickSignal'
},
departRoutePrepareContent: {
operation: 'c0067',
domId: '_Tips-AbnormalTrainRegister-formInput-departRoutePrepareContent'
},
otherKeyLinkContent: {
operation: 'c0068',
domId: '_Tips-AbnormalTrainRegister-formInput-otherKeyLinkContent'
}
}
},
FloodSafetyRegister: { // 薄册--防洪安全上岗签到表
tabType: {
typeChange: {
operation: 'd000',
domId: '_Tips-FloodSafetyRegister-tabType-typeChange'
}
},
formInput: {
submit: {
operation: 'd001',
domId: '_Tips-FloodSafetyRegister-formInput-submit'
},
update: {
operation: 'd002',
domId: '_Tips-FloodSafetyRegister-formInput-update'
},
stationCode: {
operation: 'd003',
domId: '_Tips-FloodSafetyRegister-formInput-stationCode'
},
supervisor: {
operation: 'd004',
domId: '_Tips-FloodSafetyRegister-formInput-supervisor'
},
signDateStr: {
operation: 'd005',
domId: '_Tips-FloodSafetyRegister-formInput-signDateStr'
},
supervisorNoticeInfoReporter: {
operation: 'd006',
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoReporter'
},
supervisorNoticeInfoNoticeStationTime: {
operation: 'd007',
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoNoticeStationTime'
},
supervisorNoticeInfoNoticeModel: {
operation: 'd008',
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoNoticeModel'
},
supervisorNoticeInfoHazardCategory: {
operation: 'd009',
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoHazardCategory'
},
supervisorNoticeInfoRainfallLevel: {
operation: 'd0010',
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoRainfallLevel'
},
supervisorNoticeInfoNoticeStationMasterTime: {
operation: 'd0011',
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoNoticeStationMasterTime'
},
supervisorNoticeInfoStationMasterArrivalTime: {
operation: 'd0012',
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoStationMasterArrivalTime'
},
supervisorNoticeInfoStationMasterSign: {
operation: 'd0013',
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoStationMasterSign'
},
supervisorNoticeInfoOccurredSite: {
operation: 'd0014',
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoOccurredSite'
},
supervisorNoticeInfoDrivingRequirement: {
operation: 'd0015',
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoDrivingRequirement'
},
stationMasterNoticeListDepartment0: {
operation: 'd0016',
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListDepartment0'
},
stationMasterNoticeListReceiver0: {
operation: 'd0017',
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListReceiver0'
},
stationMasterNoticeListNoticeTime0: {
operation: 'd0018',
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeTime0'
},
stationMasterNoticeListNoticeModel0: {
operation: 'd0019',
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeModel0'
},
stationMasterNoticeListRemark0: {
operation: 'd0020',
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListRemark0'
},
stationMasterNoticeListDepartment1: {
operation: 'd0021',
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListDepartment1'
},
stationMasterNoticeListReceiver1: {
operation: 'd0022',
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListReceiver1'
},
stationMasterNoticeListNoticeTime1: {
operation: 'd0023',
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeTime1'
},
stationMasterNoticeListNoticeModel1: {
operation: 'd0024',
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeModel1'
},
stationMasterNoticeListRemark1: {
operation: 'd0025',
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListRemark1'
},
stationMasterNoticeListDepartment2: {
operation: 'd0026',
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListDepartment2'
},
stationMasterNoticeListReceiver2: {
operation: 'd0027',
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListReceiver2'
},
stationMasterNoticeListNoticeTime2: {
operation: 'd0028',
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeTime2'
},
stationMasterNoticeListNoticeModel2: {
operation: 'd0029',
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeModel2'
},
stationMasterNoticeListRemark2: {
operation: 'd0030',
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListRemark2'
},
workerSignInfoListDepartment0: {
operation: 'd0031',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListDepartment0'
},
workerSignInfoListArriveTime0: {
operation: 'd0032',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListArriveTime0'
},
workerSignInfoListAppointment0: {
operation: 'd0033',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListAppointment0'
},
workerSignInfoListTelephone0: {
operation: 'd0034',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListTelephone0'
},
workerSignInfoListSign0: {
operation: 'd0035',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListSign0'
},
workerSignInfoListReturnTime0: {
operation: 'd0036',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListReturnTime0'
},
workerSignInfoListDepartment1: {
operation: 'd0037',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListDepartment1'
},
workerSignInfoListArriveTime1: {
operation: 'd0038',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListArriveTime1'
},
workerSignInfoListAppointment1: {
operation: 'd0039',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListAppointment1'
},
workerSignInfoListTelephone1: {
operation: 'd0040',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListTelephone1'
},
workerSignInfoListSign1: {
operation: 'd0041',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListSign1'
},
workerSignInfoListReturnTime1: {
operation: 'd0042',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListReturnTime1'
},
workerSignInfoListDepartment2: {
operation: 'd0043',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListDepartment2'
},
workerSignInfoListArriveTime2: {
operation: 'd0044',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListArriveTime2'
},
workerSignInfoListAppointment2: {
operation: 'd0045',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListAppointment2'
},
workerSignInfoListTelephone2: {
operation: 'd0046',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListTelephone2'
},
workerSignInfoListSign2: {
operation: 'd0047',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListSign2'
},
workerSignInfoListReturnTime2: {
operation: 'd0048',
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListReturnTime2'
}
}
},
Psl: {
standChange: {
change: {
operation: 'e001',
domId: '_Tips-Psl-standChange-Change'
}
},
pslOperation: {
turn: {
operation: 'e002',
domId: '_Tips-Psl-pslOperation-Turn'
}
},
hsjcOperation: {
turn: {
operation: 'e003',
domId: '_Tips-Psl-hsjcOperation-Turn'
}
},
openDoor: {
button: {
operation: 'e004',
domId: '_Tips-Psl-openDoor-Button'
}
},
closeDoor: {
button: {
operation: 'e005',
domId: '_Tips-Psl-closeDoor-Button'
}
},
testLamp: {
button: {
operation: 'e006',
domId: '_Tips-Psl-testLamp-Button'
}
}
},
Ibp: {
buttonPressed: {
button: {
operation: 'f001',
domId: '_Tips-Ibp-buttonPressed-Button'
}
},
buttonRelease: {
button: {
operation: 'f002',
domId: '_Tips-Ibp-buttonRelease-Button'
}
}
},
RailCommand: {
railFillInTicket: {
menu: {
@ -4224,6 +4952,62 @@ export const OperationEvent = {
operation: '1205',
domId: '_Tips-Rail-railGiveTicketTo'
}
},
equipmentConstructionFill: {
menu: {
operation: '1206',
domId: '_Tips-Rail-equipmentConstructionFill-Menu'
},
constructionInput:{
operation: '1207',
domId: '_Tips-Rail-equipmentConstructionFill-Input'
},
num:{
operation: '1208',
domId: '_Tips-Rail-equipmentConstructionFill-num'
},
projectName:{
operation: '1209',
domId: '_Tips-Rail-equipmentConstructionFill-projectName'
},
requestDate:{
operation: '120a',
domId: '_Tips-Rail-equipmentConstructionFill-requestDate'
},
requestDetails:{
operation: '120b',
domId: '_Tips-Rail-equipmentConstructionFill-requestDetails'
},
planSpendTime:{
operation: '120c',
domId: '_Tips-Rail-equipmentConstructionFill-planSpendTime'
},
acceptDetail:{
operation: '120d',
domId: '_Tips-Rail-equipmentConstructionFill-acceptDetail'
},
confirmReviewDate:{
operation: '120e',
domId: '_Tips-Rail-equipmentConstructionFill-confirmReviewDate'
},
confirmReviewDetail:{
operation: '120f',
domId: '_Tips-Rail-equipmentConstructionFill-confirmReviewDetail'
},
constructionOpenDetail:{
operation: '1207g',
domId: '_Tips-Rail-equipmentConstructionFill-constructionOpenDetail'
},
remark:{
operation: '1207h',
domId: '_Tips-Rail-equipmentConstructionFill-remark'
}
},
equipmentConstructionQuery: {
menu: {
operation: '120I',
domId: '_Tips-Rail-equipmentConstructionQuery'
}
}
},
Driver: {
@ -4407,6 +5191,22 @@ export const OperationEvent = {
signCmdFalse: {
operation: '1708',
domId: '_Tips-DispatchCmd-menuButton-signCmdFalse{BOTTOM}'
},
findTrain: {
operation: '1709',
domId: '_Tips-DispatchCmd-menuButton-findTrain{BOTTOM}'
},
permissionAddWireless: {
operation: '1710',
domId: '_Tips-DispatchCmd-menuButton-permissionAddWireless{BOTTOM}'
},
trainAllographCmd: {
operation: '1711',
domId: '_Tips-DispatchCmd-menuButton-trainAllographCmd{BOTTOM}'
},
deleteTrainTable: {
operation: '1712',
domId: '_Tips-DispatchCmd-menuButton-deleteTrainTable{BOTTOM}'
}
}
}

View File

@ -101,21 +101,9 @@ class Handler {
isLastVoiceStep() {
return store.state.trainingNew.voiceStepList.length <= store.state.trainingNew.voiceStepIndex + 1;
}
// 计算当前步骤得分
computedScoring() {
const stepInfo = store.state.trainingNew.stepInfo;
const MyMemberId = store.state.training.myMemberId;
const scoringRules = store.state.trainingNew.scoringRules;
const scoringRule = scoringRules.find(rule => rule.memberId == MyMemberId);
if (scoringRule) {
const scoring = scoringRule.details.find(item => item.elementId == stepInfo.id);
store.dispatch('trainingNew/pushScoreList', scoring);
}
}
nextStep() {
const group = router.currentRoute.query.group;
const stepInfo = store.state.trainingNew.stepInfo;
this.computedScoring();
endTrainingStep(group, stepInfo.id).then(resp => {
store.dispatch('trainingNew/clearOperateOrder');
}).catch(e => {

View File

@ -22,6 +22,28 @@ class ValidateHandler {
valid = false;
} return valid;
}
checkDeviceCodeConsistent(deviceCode1, deviceCode2) {
const linkDeviceCode1 = store.state.map.linkSwitchMap[deviceCode1];
console.log(deviceCode1, deviceCode2, linkDeviceCode1, linkDeviceCode1 === deviceCode2);
return deviceCode1 === deviceCode2 || linkDeviceCode1 === deviceCode2;
}
checkParamConsistent(param1, param2) {
const linkParam = {};
let linkDataFlag = false;
for (const key in param1) {
linkParam[key] = param1[key];
if (store.state.map.linkSwitchMap[param1[key]]) {
linkDataFlag = true;
linkParam[key] = store.state.map.linkSwitchMap[param1[key]];
}
}
console.log(linkDataFlag, linkParam, param2, objectIsEqual(linkParam, param2));
if (linkDataFlag) {
return objectIsEqual(param1, param2) || objectIsEqual(linkParam, param2);
} else {
return objectIsEqual(param1, param2);
}
}
// 判断实训操作正确性
judgeTraining(operate) {
let stepOperation = {};
@ -36,7 +58,7 @@ class ValidateHandler {
valid = (cmd === stepOperation.operationType) && valid;
}
if (operate.code || stepOperation.deviceCode) {
valid = (operate.code === stepOperation.deviceCode) && valid;
valid = this.checkDeviceCodeConsistent(operate.code, stepOperation.deviceCode) && valid;
}
if (stepOperation.subType) {
valid = (operate.subType === stepOperation.subType) && valid;
@ -54,18 +76,23 @@ class ValidateHandler {
const opParam = operate.param === undefined ? {} : operate.param;
if ((opParam || stepOperation.params) && !opParam.hasOwnProperty('fileBase64Str')) {
valid = objectIsEqual(opParam, stepOperation.params) && valid;
valid = this.checkParamConsistent(opParam, stepOperation.params) && valid;
}
if (valid && store.state.trainingNew.voiceStepIndex > -1) {
!Handler.isLastVoiceStep() && store.dispatch('trainingNew/voiceStepIndexIncrease');
} else if (valid && Handler.isLastOperation()) {
store.dispatch('trainingNew/handleStepRecord', { type:'OVER', stepOperation, operate });
Handler.nextStep();
} else if (valid) {
store.dispatch('trainingNew/operateOrderIncrease');
store.dispatch('trainingNew/handleStepRecord', { type:'CONTINUE', stepOperation, operate });
Handler.judgeIsTextSendOperation();
} else {
console.log(operate, stepOperation, '----------');
if (store.state.trainingNew.voiceStepIndex < 0) {
store.dispatch('trainingNew/handleStepRecord', { type:'ERROR', stepOperation, operate });
}
console.error('校验失败;');
}
return valid;

View File

@ -259,7 +259,8 @@ const map = {
pictureDeviceMap: {}, // 画面设备修正map
picture:'', // 当前的客户端
domConfig: null, // 仿真配置
initClient: '' // 仿真初始客户端
initClient: '', // 仿真初始客户端
linkSwitchMap: {} // 联动道岔数据
},
getters: {
@ -1147,6 +1148,9 @@ const map = {
},
setPicture: (state, picture) => {
state.picture = picture;
},
setLinkSwitchMap: (state, linkSwitchMap) => {
state.linkSwitchMap = linkSwitchMap;
}
},
@ -1334,13 +1338,13 @@ const map = {
initClearTrainData: ({ commit, state}) => {
if (Vue.prototype.$jlmap) {
Vue.prototype.$jlmap.initClearTrainData();
}
let showConfig = {};
if (Vue.prototype.$jlmap && typeof Vue.prototype.$jlmap.getShowConfig === 'function') {
showConfig = Vue.prototype.$jlmap.getShowConfig();
}
const parser = parserFactory(ParserType.Graph.value);
parser.parserTrainData(state.mapDevice, state.map.trainList, state.map.skinVO.code, showConfig);
}
},
setTrainWindowShow: ({ commit, state }, show) => {
if (state.map) {
@ -1429,6 +1433,9 @@ const map = {
},
setPicture: ({ commit }, picture) => {
commit('setPicture', picture);
},
setLinkSwitchMap: ({ commit }, linkSwitchMap) => {
commit('setLinkSwitchMap', linkSwitchMap);
}
}
};

View File

@ -1,7 +1,5 @@
import { publicAsyncRoute, asyncRouter, constantRoutes, user, projectTrain, projectXian, projectXty, projectGzzb, projectJsxt, projectRichorJoint,
projectJyd, projectRichor, projectTky, projectHeb, superAdmin, admin, userTrainingPlatform, JSXT, projectRoute, projectDrts, projectSdy,
projectSrsandbox, projectJxgm, projectSay, projectRichorhhcj, projectTeaching } from '@/router/index';
import { loginInfo } from '@/scripts/ProjectConfig';
// import { loginInfo } from '@/scripts/ProjectConfig';
import { userTrainingPlatform, admin, publicAsyncRoute, asyncRouter, constantRoutes, superAdmin, user } from '@/router/index';
import { getSessionStorage } from '@/utils/auth';
import store from '@/store/index';
@ -40,32 +38,9 @@ function hasPermission(roles, route, parentsRoles) {
* 根据项目重置 路由
* @param systemType 项目类型
*/
function resetAsyncRouter({ systemType }) {
function resetAsyncRouter() {
let list = publicAsyncRoute;
const projectList = [projectTrain, projectXian, projectJyd, projectTky, projectDrts, projectRichor];
const specialProjects = [projectXty, projectGzzb, projectHeb, projectSdy, projectRichorJoint, projectSrsandbox, projectJxgm, projectSay, projectRichorhhcj, projectTeaching];
const specialProjectEnum = {[projectXty]:'designxty', [projectGzzb]:'designgzb', [projectHeb]:'designheb',
[projectSdy]:'designsdy', [projectRichorJoint]:'designrichorjoint', [projectSrsandbox]: 'designsrsandbox', [projectJxgm]: 'designjxgm',
[projectSay]: 'designsay', [projectRichorhhcj]: 'designrichorhhcj', [projectTeaching]: 'designteaching' };
if (projectList.includes(systemType)) {
list = [...list, ...asyncRouter];
} else if (specialProjects.includes(systemType) ) {
if (projectRoute) {
const proRoute = projectRoute[specialProjectEnum[systemType]];
if (proRoute && proRoute.length) {
proRoute.forEach(item => {
if (item.merge) {
asyncRouter[item.mergeIndex].children = [...asyncRouter[item.mergeIndex].children, ...item.children];
} else {
list.push(item);
}
});
}
}
list = [...list, ...asyncRouter];
} else if (systemType == projectJsxt) {
list = [...list, ...JSXT];
}
return list;
}
@ -113,7 +88,8 @@ const permission = {
if (roles.includes(admin) && !roles.includes(user)) { // 只拥有管理员 不拥有普通用户权限 则增加用户权限
roles.push(user);
}
const routeList = resetAsyncRouter(loginInfo[getSessionStorage('project') || 'login']);
// loginInfo[getSessionStorage('project') || 'login']
const routeList = resetAsyncRouter();
const accessedRouters = filterAsyncRouter(routeList, roles);
accessedRouters.forEach(route => {

View File

@ -604,6 +604,9 @@ const socket = {
setDispatchCommandMsg: ({ commit }, data) => {
commit('setDispatchCommandMsg', data);
},
clearDispatchCommandMsg: ({ commit }, data) => {
commit('clearDispatchCommandMsg');
},
setDispatchCommandState: ({ commit }, data) => {
commit('setDispatchCommandState', data);
},

View File

@ -16,10 +16,11 @@ const training = {
scoringRules: [], // 当前实训评分规则
operateOrder: 0, // 操作order
operateErrMsg: '',
scoreList: [], // 实训得分
draftStepList: null, // 显示的步骤列表
voiceStepList: [], // 实训特殊语音步骤列表
voiceStepIndex: -1
voiceStepIndex: -1,
examSwitch: false, // 考试开始结束标注
stepRecord: [] // 操作记录
},
getters: {
teachMode: (state) => {
@ -50,7 +51,7 @@ const training = {
state.trainingSwitch = flag;
state.stepInfo = {};
state.operateOrder = 0;
state.scoreList = [];
state.stepRecord = [];
},
setTrainingOperate: (state, trainingOperate) => {
state.trainingOperate = trainingOperate;
@ -75,6 +76,9 @@ const training = {
},
setStepInfo: (state, stepInfo) => {
state.stepInfo = state.stepList.find(step => step.id === stepInfo.stepId);
if (store.state.training.myMemberId == state.stepInfo.memberId) {
state.stepRecord.push({ stepId: state.stepInfo.id, success: false, clientOperations: [] });
}
Handler.judgeIsTextSendOperation();
},
clearStepInfo: (state, stepInfo) => {
@ -91,10 +95,7 @@ const training = {
state.operateOrder = 0;
state.operateErrMsg = '';
state.scoringRules = [];
state.scoreList = [];
},
pushScoreList: (state, scoring) => {
state.scoreList.push(scoring);
state.stepRecord = [];
},
editDraftStepList: (state, draftStepList) => {
state.draftStepList = draftStepList;
@ -110,6 +111,18 @@ const training = {
clearVoiceStepList: (state) => {
state.voiceStepIndex = -1;
state.voiceStepList = [];
},
setExamSwitch: (state, flag) => {
state.examSwitch = flag;
},
handleStepRecord: (state, { type, stepOperation, operate }) => {
const step = state.stepRecord[state.stepRecord.length - 1];
if (!step.clientOperations.length || step.clientOperations[step.clientOperations.length - 1].id !== stepOperation.id) {
step.clientOperations.push({ id: stepOperation.id });
}
if (type === 'OVER') {
step.success = true;
}
}
},
actions: {
@ -172,9 +185,6 @@ const training = {
clearTrainingData: ({ commit }) => {
commit('clearTrainingData');
},
pushScoreList: ({ commit }, scoring) => {
commit('pushScoreList', scoring);
},
editDraftStepList: ({ commit }, draftStepList) => {
commit('editDraftStepList', draftStepList);
},
@ -204,6 +214,12 @@ const training = {
commit('setOperateErrMsg', errorMsg);
Handler.handleVoiceStepList();
}
},
setExamSwitch: ({ commit }, flag) => {
commit('setExamSwitch', flag);
},
handleStepRecord: ({ commit }, { type, stepOperation, operate }) => {
commit('handleStepRecord', { type, stepOperation, operate });
}
}
};

View File

@ -75,7 +75,7 @@ export function getDomOffset(dom) {
pol = dom.offsetLeft;
}
if (pot != dom.offsetTop) {
offsetTop += dom.offsetTop;
offsetTop += (dom.offsetTop - dom.scrollTop);
pot = dom.offsetTop;
}
dom = dom.offsetParent;

View File

@ -15,7 +15,7 @@ export function covertMemberData (activeTrainList, resp) {
lastData = JSON.parse(lastData);
const lastMemberList = [];
// const electricDispatcherList = [];
const deviceListData = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []];
const deviceListData = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []];
const driverList = [];
lastData.forEach((member, index)=>{
if (member.userId && member.userId == store.state.user.id) {
@ -37,7 +37,7 @@ export function covertMemberData (activeTrainList, resp) {
member.label = member.type + name + userName;
member.normalName = member.type + name;
}
const deviceType = ['行调', '通号', '行值', '司机', '车辆段/停车场调度', '上级部门', '电力调度', '车辆段/停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员', '车务段段长'];
const deviceType = ['行调', '通号', '行值', '司机', '车辆段/停车场调度', '上级部门', '电力调度', '车辆段/停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员', '车务段段长', '电力工务'];
/**
* 车站助理

View File

@ -79,10 +79,12 @@ export function creatSubscribe(topic, header, callbackFun) {
if (!Vue.prototype.$stomp) {
Vue.prototype.$stomp = new StompClient();
}
if (!Vue.prototype.$stomp.subscribeMap[topic]) {
if (!Vue.prototype.$stomp.subscribeMap.has(topic)) {
Vue.prototype.$stomp.subscribe(topic, callbackFun || callback, header);
} else {
Vue.prototype.$stomp.subscribeMap[topic].count++;
// Vue.prototype.$stomp.subscribeMap[topic].count++;
const obj = Vue.prototype.$stomp.subscribeMap.get(topic);
obj.count++;
}
} catch (error) {
console.error('websocket订阅失败', error, topic, header);

View File

@ -636,7 +636,7 @@ export default {
this.DisStationId = obj.deviceCode ? obj.deviceCode : 'DisStation1986';
},
dispatchCommandState(obj) {
Object.values(obj.cpStateMap).forEach(item => {
obj && Object.values(obj.cpStateMap).forEach(item => {
if (item.cpId) {
if (!this.queryResData.companyStateMap) {
this.queryResData.companyStateMap = {};

View File

@ -20,7 +20,6 @@ import Vue from 'vue';
import IbpPan from '@/ibp/ibpPan';
import { parser } from '@/ibp/utils/parser';
import { mapGetters } from 'vuex';
import { handleIbpPress, handleIbpRelease } from '@/api/simulation';
import { IbpOperation } from '@/scripts/ConstDic';
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
import { getToken } from '@/utils/auth';
@ -29,6 +28,8 @@ import { getSimulationInfoNew, getIbpInitialState } from '@/api/simulation';
import BuzzerAudio from '@/assets/buzzer.mp3';
import { getStationList } from '@/api/runplan';
import { EventBus } from '@/scripts/event-bus';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
const pressedKeys = new Set();
export default {
@ -242,24 +243,74 @@ export default {
onKeyboardAction(e) {
if (this.preResetBtn) {
if (e.type === 'keydown' && e.key === 'Control') {
// pressedKeys.add(e.key);
// this.preResetBtn.press();
// handleIbpPress(this.$route.query.group, this.stationCode, this.preResetBtn._code).catch(error => { this.$message.error(error.message); });
const operate = {
start: true,
send: true,
operation: OperationEvent.Ibp.buttonPressed.operation,
cmdType: CMD.IBP.CMD_IBP_PRESS_BUTTON,
param: {
stationCode: this.stationCode,
buttonCode: this.preResetBtn._code
}
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
pressedKeys.add(e.key);
this.preResetBtn.press();
handleIbpPress(this.$route.query.group, this.stationCode, this.preResetBtn._code).catch(error => { this.$message.error(error.message); });
}).catch(error => { this.$message.error(error.message); });
} else if (e.type === 'keyup' && e.key === 'Control') {
// pressedKeys.delete(e.key);
// this.preResetBtn.release();
// handleIbpRelease(this.$route.query.group, this.stationCode, this.preResetBtn._code).catch(error => { this.$message.error(error.message); });
const operate = {
start: true,
send: true,
operation: OperationEvent.Ibp.buttonRelease.operation,
cmdType: CMD.IBP.CMD_IBP_RELEASE_BUTTON,
param: {
stationCode: this.stationCode,
buttonCode: this.preResetBtn._code
}
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
pressedKeys.delete(e.key);
this.preResetBtn.release();
handleIbpRelease(this.$route.query.group, this.stationCode, this.preResetBtn._code).catch(error => { this.$message.error(error.message); });
}).catch(error => { this.$message.error(error.message); });
}
}
},
onMouseDown(em) {
if (['SquareButton', 'Key'].includes(em.deviceType)) {
handleIbpPress(this.$route.query.group, this.stationCode, em.deviceCode).catch(error => { this.$message.error(error.message); });
const operate = {
start: true,
send: true,
operation: OperationEvent.Ibp.buttonPressed.operation,
cmdType: CMD.IBP.CMD_IBP_PRESS_BUTTON,
param: {
stationCode: this.stationCode,
buttonCode: em.deviceCode
}
};
this.$store.dispatch('trainingNew/next', operate).catch(error => { this.$message.error(error.message); });
// handleIbpPress(this.$route.query.group, this.stationCode, em.deviceCode).catch(error => { this.$message.error(error.message); });
}
},
onMouseUp(em) {
if (['SquareButton'].includes(em.deviceType)) {
handleIbpRelease(this.$route.query.group, this.stationCode, em.deviceCode).catch(error => { this.$message.error(error.message); });
const operate = {
start: true,
send: true,
operation: OperationEvent.Ibp.buttonRelease.operation,
cmdType: CMD.IBP.CMD_IBP_RELEASE_BUTTON,
param: {
stationCode: this.stationCode,
buttonCode: em.deviceCode
}
};
this.$store.dispatch('trainingNew/next', operate).catch(error => { this.$message.error(error.message); });
// handleIbpRelease(this.$route.query.group, this.stationCode, em.deviceCode).catch(error => { this.$message.error(error.message); });
}
},
//

View File

@ -47,6 +47,7 @@ export default {
return ['iscs', (Math.random().toFixed(5)) * 100000].join('_');
}
},
watch: {
'$store.state.iscs.alarmList': function(list) {
if (list.length) {
@ -60,6 +61,9 @@ export default {
document.querySelector('#teleRing').pause();
this.$store.commit('iscs/setCloseMusic', 0);
}
},
'$store.state.socket.iscsStateMessages': function (list) {
this.$store.dispatch('iscs/updateIscsState', list);
}
},
methods:{

View File

@ -46,6 +46,12 @@ export default {
}
},
watch: {
'stationId': function (newVal, oldVal) {
this.clearSubscribe(oldVal);
this.subscribe(newVal);
}
},
beforeDestroy() {
this.clearSubscribe(this.stationId);
},
@ -72,7 +78,6 @@ export default {
viewLoaded() {
},
subscribe(stationCode) {
this.clearSubscribe();
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
creatSubscribe(getTopic('ISCSPSD', this.$route.query.group, {stationCode} ), header);
this.$store.dispatch('app/animationsClose');

View File

@ -397,6 +397,7 @@ export default {
const stationWorker = {};
const deviceManager = {};
const trainMaster = {};
const stationElectricWorker = {};
val.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
this.memberData[item.id]['active'] = false;
@ -492,6 +493,13 @@ export default {
this.memberData[item.id].labelName = '车务段段长-' + (item.name || '');
trainMaster[item.id] = this.memberData[item.id];
break;
case 'STATION_ELECTRIC_WORKER':
// + device.name
// + device.name
this.memberData[item.id].label = '电力工务-' + (item.name || '');
this.memberData[item.id].labelName = '电力工务-' + (item.name || '');
stationElectricWorker[item.id] = this.memberData[item.id];
break;
}
});
// { label: '', value: 'allConcentrateStation', active: false, sign: 'DEVICE_STATION' },
@ -591,9 +599,16 @@ export default {
},
{
label: '车务段段长',
id: 'trainMaster',
id: 'stationElectricWorker',
type: 'role',
children: trainMaster
children: stationElectricWorker
},
{
label: '电力工务',
id: 'stationElectricWorker',
type: 'role',
children: stationElectricWorker
}
];
this.initCommonMemberList();
@ -1152,6 +1167,7 @@ export default {
const temStationWorkerList = [];
const temDeviceManagerList = [];
const temTrainMasterList = [];
const temStationElectricWorkerList = [];
this.$store.state.training.memberList.forEach(item =>{
switch (item.type) {
case 'DISPATCHER':
@ -1196,11 +1212,14 @@ export default {
case 'TRAIN_MASTER':
temTrainMasterList.push({memberId: item.id, connect:true });
break;
case 'STATION_ELECTRIC_WORKER':
temStationElectricWorkerList.push({memberId: item.id, connect:true });
break;
}
});
this.commonMemberList = [...temDispatcherList, ...temStationSupervisorList, ...temMaintainerList, ...temDriverList, ...temDepotDispatcherList,
...temStationAssistList, ...temStationMasterList, ...temStationSignalerList, ...temStationPassengerList, ...temStationSwitchManList,
...temStationFacilitatorList, ...temStationWorkerList, ...temDeviceManagerList, ...temTrainMasterList];
...temStationFacilitatorList, ...temStationWorkerList, ...temDeviceManagerList, ...temTrainMasterList, ...temStationElectricWorkerList];
if (this.userRole == 'AUDIENCE' || this.commonConversation) {
this.conversitionMemberList = [];
this.messageList = [...this.commonMessageList];

View File

@ -54,7 +54,7 @@ import { getSimulationMemberList} from '@/api/simulation';
import { getUserListCommon } from '@/api/rtSimulation';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import {UserOperationType} from "../../../scripts/ConstDic";
import {UserOperationType} from '../../../scripts/ConstDic';
export default {
name: 'NewChatBox',
components:{
@ -307,6 +307,7 @@ export default {
const stationWorker = {};
const deviceManager = {};
const trainMaster = {};
const stationElectricWorker = {};
val.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
this.memberData[item.id]['active'] = false;
@ -402,6 +403,11 @@ export default {
this.memberData[item.id].labelName = '车务段段长-' + (item.name || '');
trainMaster[item.id] = this.memberData[item.id];
break;
case 'STATION_ELECTRIC_WORKER':
this.memberData[item.id].label = '电力工务' + (item.name || '');
this.memberData[item.id].labelName = '电力工务' + (item.name || '');
stationElectricWorker[item.id] = this.memberData[item.id];
break;
}
});
// { label: '', value: 'allConcentrateStation', active: false, sign: 'DEVICE_STATION' },
@ -504,6 +510,12 @@ export default {
id: 'trainMaster',
type: 'role',
children: trainMaster
},
{
label: '电力工务',
id: 'stationElectricWorker',
type: 'role',
children: stationElectricWorker
}
];
this.initCommonMemberList();
@ -909,6 +921,7 @@ export default {
const temStationWorkerList = [];
const temDeviceManagerList = [];
const temTrainMasterList = [];
const temStationElectricWorkerList = [];
this.$store.state.training.memberList.forEach(item =>{
switch (item.type) {
case 'DISPATCHER':
@ -953,11 +966,15 @@ export default {
case 'TRAIN_MASTER':
temTrainMasterList.push({memberId: item.id, connect:true });
break;
case 'STATION_ELECTRIC_WORKER':
temStationElectricWorkerList.push({memberId: item.id, connect:true });
break;
}
});
this.commonMemberList = [...temDispatcherList, ...temStationSupervisorList, ...temMaintainerList, ...temDriverList, ...temDepotDispatcherList,
...temStationAssistList, ...temStationMasterList, ...temStationSignalerList, ...temStationPassengerList, ...temStationSwitchManList,
...temStationFacilitatorList, ...temStationWorkerList, ...temDeviceManagerList, ...temTrainMasterList];
...temStationFacilitatorList, ...temStationWorkerList, ...temDeviceManagerList, ...temTrainMasterList, ...temStationElectricWorkerList];
if (this.userRole == 'AUDIENCE' || this.commonConversation) {
this.conversitionMemberList = [];
this.messageList = [...this.commonMessageList];

View File

@ -0,0 +1,331 @@
<template>
<div v-show="showTable" style="background: #F0F0F0;z-index: 10;position: absolute;left: 0;bottom: 0;width: 100%;font-size: 14px;">
<i class="el-icon-close close_icon" @click.stop="doClose" />
<el-row>
<el-col :span="11" style="padding: 0 10px;">
<div style="border: 1px solid #C7C7C7;margin-top: 10px;">
<div style="position: relative; top: -8px;left: 15px;width: 130px;background: #f0f0f0;">列车进路序列 可修改</div>
<div style="width: 100%;background: #9F9F9F">
<el-table
ref="sequenceTable"
:data="sequenceList"
height="90"
:row-class-name="tableRowClassName"
border
style="width: 650px"
:cell-style="{padding: 0}"
:default-sort="{prop: 'startTime', order: 'ascending'}"
>
<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">
<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">
<el-checkbox v-model="scope.row.autoTrigger" @change="triggerChange(scope.row)" />
</template>
</el-table-column>
<el-table-column property="direction" label="方向" width="100" label-class-name="bottom-table-label-header" />
<el-table-column property="startTime" label="开始" width="80" label-class-name="bottom-table-label-header" />
<el-table-column property="planTime" label="计划" width="90" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="状态" width="90" label-class-name="bottom-table-label-header">
<template slot-scope="scope">
<span>{{ getRouteStatus(scope.row.status) }}</span>
</template>
</el-table-column>
<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>
<div style="display: flex;align-items: center;">
<div style="margin-right: 10px;">车站</div>
<el-select v-model="stationCode" size="mini" @change="stationChange">
<el-option
v-for="item in showStationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<div style="border: 1px outset #C7C7C7;margin-left: 20px;padding: 3px;">释放权限</div>
<div style="margin-left: 10px;">字体</div>
<div style="margin-left: 10px;border: 1px inset #C7C7C7;padding: 3px;">常规</div>
</div>
</el-col>
<el-col :span="13">
<div style="border: 1px solid #C7C7C7;margin-top: 10px;">
<div style="position: relative; top: -8px;left: 15px;width: 103px;background: #f0f0f0;">调车进路 可修改</div>
<el-row>
<el-col :span="12" style="padding: 0 10px;">
<div style="border: 1px solid #C7C7C7;">
<div style="position: relative; top: -8px;left: 15px;width: 86px;background: #f0f0f0;">调车进路序列</div>
<div style="width: 100%;background: #9F9F9F">
<el-table :data="tableData" height="55" border style="width: 465px" :cell-style="{padding: 0}">
<el-table-column type="index" label="顺序" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="勾序" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="进路及方向" width="95" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="自触" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="状态" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="触发时间" width="80" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="占用时间" label-class-name="bottom-table-label-header" />
</el-table>
</div>
</div>
</el-col>
<el-col :span="12" style="padding: 0 10px;">
<div style="border: 1px solid #C7C7C7;">
<div style="position: relative; top: -8px;left: 15px;width: 44px;background: #f0f0f0;">勾序列</div>
<div style="width: 100%;background: #9F9F9F">
<el-table :data="tableData" height="55" style="width: 360px" border :cell-style="{padding: 0}">
<el-table-column type="index" label="钩计划" width="70" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="股道" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="操作" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="状态" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="记事" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="作业时间" label-class-name="bottom-table-label-header" />
</el-table>
</div>
</div>
</el-col>
</el-row>
</div>
<el-row>
<div style="display: flex;align-items: center;">
<div>作业单</div>
<el-select v-model="sheetValue" size="mini" style="margin-left: 10px;width: 500px;">
<el-option
v-for="item in sheetList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div style="border: 1px outset #C7C7C7;margin-left: 20px;padding: 3px;">单头信息</div>
<div style="border: 1px outset #C7C7C7;margin-left: 20px;padding: 3px;">删除</div>
<div style="border: 1px outset #C7C7C7;margin-left: 20px;padding: 3px;">发送</div>
</div>
</el-row>
<el-row>
<div style="display: flex;">
<div>历史进路</div>
<div style="margin-left: 300px;">状态</div>
</div>
</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'; // 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: {},
menu: [{label: '人工触发', handler: this.artificialTrigger, disabled: false}, {label: '删除', handler: this.artificialTrigger, disabled: true}],
showStationList: []
};
},
computed: {
...mapGetters('map', [
'stationList'
])
},
watch: {
'showTable': function (val) {
const offset = val ? 162 : 0;
EventBus.$emit('setMenuButtonPosition', offset);
},
'$store.state.socket.simulationReset': function (val) {
this.sequenceMap = {};
this.sequenceList = [];
},
'$store.state.socket.railCtcStatusMsg': function (val) {
this.handlerRailCtcStatusMsg(val);
},
'$store.state.map.showCentralizedStationCode': function (val) {
this.initShowStationList(val);
}
},
mounted() {
EventBus.$on('bottomTableShowOrHidden', (val) => {
this.showTable = typeof val == 'boolean' ? val : !this.showTable;
});
},
beforeDestroy() {
EventBus.$off('bottomTableShowOrHidden');
},
// created() {
// this.$store.state.socket.railCtcStatusMsgList.forEach(item => {
// this.handlerRailCtcStatusMsg(item);
// });
// },
methods: {
handlerRailCtcStatusMsg(val) {
if (val && val.length) {
val.forEach(item => {
if (item && item.routeSequence && item.routeSequence.lines && item.routeSequence.lines.length) {
item.routeSequence.lines.forEach(elem => {
if (!this.sequenceMap[elem.id]) {
this.sequenceMap[elem.id] = Object.assign(elem, { stationCode: item.stationCode, readOnly: item.readOnly });
} else {
this.sequenceMap[elem.id] = Object.assign(this.sequenceMap[elem.id], elem, { stationCode: item.stationCode, readOnly: item.readOnly });
}
});
}
if (item && item.routeSequence && item.routeSequence.deletedLineIds && item.routeSequence.deletedLineIds.length) {
item.routeSequence.deletedLineIds.forEach(elem => {
delete this.sequenceMap[elem];
});
}
});
this.sequenceList = [];
for (const key in this.sequenceMap) {
if (this.sequenceMap[key].stationCode === this.stationCode) {
this.sequenceList.push(this.sequenceMap[key]);
}
}
}
},
doShow() {
this.initShowStationList(this.$store.state.map.showCentralizedStationCode);
this.showTable = true;
},
doClose() {
this.showTable = false;
},
initShowStationList(val) {
if (val) {
const centralizedStation = this.$store.getters['map/getDeviceByCode'](val);
if (centralizedStation) {
const sn = centralizedStation.sn;
this.showStationList = [centralizedStation];
this.stationCode = centralizedStation.code;
this.stationList.forEach(station => {
if (station.sn === sn - 1) {
this.showStationList.unshift(station);
} else if (station.sn === sn + 1) {
this.showStationList.push(station);
}
});
}
}
},
getRouteStatus(status) {
if (status === '2') {
return '触发完成';
} else if (status === '1') {
return '正在触发';
} else {
return '等待中';
}
},
triggerChange(row) {
const triggerParam = { stationCode: this.stationCode, tripNumber: row.tripNumber, routeCode: row.routeCode, trigger: row.autoTrigger };
if (row.autoTrigger) {
this.setTrigger(triggerParam, row);
} else {
this.cancelTrigger(triggerParam, row);
}
},
stationChange(stationCode) {
this.sequenceList = [];
for (const key in this.sequenceMap) {
if (this.sequenceMap[key].stationCode === stationCode) {
this.sequenceList.push(this.sequenceMap[key]);
}
}
},
tableRowClassName({row, rowIndex}) {
if (row.status === '0') {
return 'bottom-table-route-wait';
} else if (row.tripNumber) {
return 'bottom-table-route-green';
} else {
return 'bottom-table-route-gray';
}
},
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) {
this.$message.success('设置自动触发成功!');
}
}).catch((e) => {
console.error(e);
row.autoTrigger = false;
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) {
this.$message.success('取消自动触发成功!');
}
}).catch((e) => {
console.error(e);
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('人工触发失败!');
});
}
}
};
</script>
<style scoped>
</style>
<style>
.bottom-table-label-header{
background: #FFF3EE;
}
.bottom-table-route-wait {
background: #ff0 !important;
}
.bottom-table-route-gray{
background: #c0c0c0 !important;
}
.bottom-table-route-green{
background: #0f0 !important;
}
</style>

View File

@ -10,7 +10,7 @@
</div>
</div>
<div class="chat-box-content">
<div v-for="(content,index) in messageList" :key="index" style="width: 100%;height: 65px;">
<div v-for="(content,index) in messageList" :key="index" class="eachChatContent">
<div :class="content.memberId == myMemberId?'rightUser':'leftUser'">
<div class="userHeader">
<div class="userName">{{ covertName(content.memberId) }}</div>
@ -101,8 +101,10 @@ export default {
}
},
watch: {
'$store.state.socket.simulationReset': function () { // 仿
'$store.state.socket.simulationReset': function (val) { // 仿
if (val) {
this.messageList = [];
}
},
'$store.state.training.domConfig': function(val) {
this.trainingDesign = val.trainingDesign;
@ -144,8 +146,13 @@ export default {
playAllAudio() {
this.$nextTick(function() {
this.currentMessage = this.currentAudioList.shift();
console.log(this.currentMessage, '************');
if (this.currentMessage.type === 'Text') {
return;
}
document.querySelector('#audioPlay').src = this.currentMessage.audioPath;
document.querySelector('#audioPlay').play();
console.log(document.querySelector('#audioPlay'), '--------------');
this.$set(this.currentMessage, 'activeAuto', true);
this.play = true;
document.querySelector('#audioPlay').onended = () => {
@ -454,6 +461,7 @@ export default {
top: 0;
border-radius: 50%;
}
.eachChatContent{width: 100%;min-height: 65px;display:inline-block;}
.chat-box-footer-send.disbled{
cursor: no-drop;
}

View File

@ -1,5 +1,5 @@
<template>
<div class="examPanel" v-if="show">
<div v-if="show" class="examPanel">
<div class="header">
<div>满分: {{ composition.fullScore }}</div>
<div>考试时间: {{ composition.validDuration }}分钟</div>
@ -17,14 +17,14 @@
<div>理论题</div>
<div class="questionList">
<div
class="item theory"
v-for="(question, index) in questionList[0]"
:key="index"
@click="questionSelect(index, 1)"
class="item theory"
:class="{
current: currentQuestionIndex === index && currentQuestionType === 1,
submited: questionStateList[0][index],
}"
@click="questionSelect(index, 1)"
>
{{ index + 1 }}
</div>
@ -32,26 +32,26 @@
<div>实训题</div>
<div class="questionList">
<div
class="item training"
v-for="(question, index) in questionList[1]"
:key="index"
@click="questionSelect(index, 2)"
class="item training"
:class="{ current: currentQuestionIndex === index && currentQuestionType === 2 }"
@click="questionSelect(index, 2)"
>
{{ index + 1 }}
</div>
</div>
<div class="footer">
<el-button @click="submitExam" size="small" type="primary">交卷</el-button>
<el-button size="small" type="primary" @click="submitExam">交卷</el-button>
</div>
<TheoryQuestion
ref="theoryQuestion"
:question-info="
questionList[0][currentQuestionIndex]
questionList[currentQuestionType - 1][currentQuestionIndex]
? {
...questionList[0][currentQuestionIndex],
...questionList[currentQuestionType - 1][currentQuestionIndex],
index: currentQuestionIndex,
total: questionList[0].length,
total: questionList[currentQuestionType - 1].length,
}
: {}
"
@ -62,8 +62,11 @@
</template>
<script>
import TheoryQuestion from './theoryQuestion'
import { submitPaper } from '@/api/management/exam'
import TheoryQuestion from './theoryQuestion';
import { submitPaper, submitAnswer } from '@/api/management/exam';
import { getPublishTrainingDetail, loadPublishTraining } from '@/api/jmap/training';
import { EventBus } from '@/scripts/event-bus';
import { assignUsersPlayRoles } from '@/api/jointSimulation';
export default {
name: 'ExamPanel',
emits: ['select'],
@ -76,46 +79,96 @@ export default {
questionList: [[], []],
questionStateList: [[], []],
currentQuestionIndex: 0,
currentQuestionType: 0, //1-, 2-
currentQuestionType: 1, // 1-, 2-
examSceneRuleMap: {}
};
},
beforeDestroy() {
this.$store.dispatch('trainingNew/setExamSwitch', false);
},
mounted() {
EventBus.$on('trainExamSubmit', (data) => {
const questionInfo = this.questionList[1][this.currentQuestionIndex];
const postData = {
puId: questionInfo.puId,
pqId: questionInfo.questionId,
type: 2,
subType: data.subType,
trainAnswerDetail: {
cosplayMemberId: data.cosplayMemberId,
trainDetail: data.trainDetail
}
};
submitAnswer(postData).then(resp => {}).catch(() => { this.$message.error('记录数据失败!'); });
});
},
methods: {
init(data) {
this.show = true
this.currentQuestionIndex = -1
this.composition = data.composition
this.paper = data.paper
this.show = true;
this.currentQuestionIndex = -1;
this.composition = data.composition;
this.examSceneRuleMap = {};
this.composition && this.composition.ruleList && this.composition.ruleList.forEach(rule => {
if (rule.sceneInfo && rule.sceneInfo.length) {
rule.sceneInfo.forEach(item => {
this.examSceneRuleMap[item.publishTrainId] = item.cosplayId;
});
}
});
this.paper = data.paper;
this.questionList = [
data.questionList.filter(e => e.type === 1),
data.questionList.filter(e => e.type === 2),
]
data.questionList.filter(e => e.type === 2)
];
this.questionStateList = [
Array.from(this.questionList[0], () => false),
Array.from(this.questionList[1], () => false),
]
Array.from(this.questionList[1], () => false)
];
this.$store.dispatch('trainingNew/setExamSwitch', true);
},
questionSelect(index, type) {
this.currentQuestionIndex = index
this.currentQuestionType = type
async questionSelect(index, type) {
if (this.$store.state.trainingNew.trainingSwitch) {
this.$message.error('请先结束当前实训后再加载新的实训!');
return;
}
this.currentQuestionIndex = index;
this.currentQuestionType = type;
if (type === 1) {
this.$refs.theoryQuestion.doShow()
this.$refs.theoryQuestion.doShow();
this.$store.dispatch('trainingNew/setTrainingDetail', null);
} else if (type === 2) {
try {
const training = this.questionList[1][this.currentQuestionIndex];
const detailResp = await getPublishTrainingDetail(training.questionId);
this.training = detailResp.data;
if (detailResp.data.mapLocationJson) {
const mapLocation = JSON.parse(detailResp.data.mapLocationJson);
this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y});
}
this.$store.dispatch('trainingNew/setTrainingDetail', detailResp.data);
await loadPublishTraining(this.$route.query.group, training.questionId, {mode: ''});
await assignUsersPlayRoles([{userId: this.$store.state.user.id, memberId: this.examSceneRuleMap[training.questionId]}], this.$route.query.group);
this.$message.success('加载实训成功!');
} catch (e) {
this.$message.error('加载实训失败!');
}
}
},
recordSubmit(index) {
this.$set(this.questionStateList[0], index, true)
this.$set(this.questionStateList[0], index, true);
},
navigate(direction) {
if (direction === '+') {
this.currentQuestionIndex++
this.currentQuestionIndex++;
} else if (direction === '-') {
this.currentQuestionIndex--
this.currentQuestionIndex--;
}
},
submitExam() {
const execSubmit = () => {
submitPaper(this.paper.id).then(resp => {
const { score, passScore, commonScore, trainingScore } = resp.data
const pass = score >= passScore
const { score, passScore, commonScore, trainingScore } = resp.data;
const pass = score >= passScore;
this.$alert(
`${pass ? '恭喜您考试合格' : '考试不通过'}
总分: ${score}
@ -123,21 +176,22 @@ export default {
实训: ${trainingScore}`,
'考试结果'
).then(() => {
this.show = false
})
})
}
const finished = this.questionStateList.every(list => list.every(item => item === true))
this.show = false;
this.$store.dispatch('trainingNew/setExamSwitch', false);
});
});
};
const finished = this.questionStateList.every(list => list.every(item => item === true));
if (!finished) {
this.$confirm('您还有题目未答完, 确认交卷吗?').then(() => {
execSubmit()
})
execSubmit();
});
} else {
execSubmit()
execSubmit();
}
},
},
}
}
};
</script>
<style lang="scss" scoped>

View File

@ -16,36 +16,37 @@
class="options-container"
>
<component
class="option"
:is="type === 2 ? 'el-checkbox' : 'el-radio'"
v-for="el in questionData.options"
:key="el.value"
class="option"
:label="el.value"
>{{ el.label }}</component
>
>{{ el.label }}</component>
</component>
</div>
<div class="footer">
<el-button size="small" :disabled="index === 0" @click="navigate('-')">上一题</el-button>
<el-button type="danger" size="small" @click="navigate()">关闭</el-button>
<el-button size="small" :disabled="index >= questionInfo.total - 1" @click="navigate('+')"
>下一题</el-button
>
<el-button
size="small"
:disabled="index >= questionInfo.total - 1"
@click="navigate('+')"
>下一题</el-button>
</div>
</el-dialog>
</template>
<script>
const types = ['', '单选题', '多选题', '判断题']
import { loadQuestion, submitAnswer } from '@/api/management/exam'
const types = ['', '单选题', '多选题', '判断题'];
import { loadQuestion, submitAnswer } from '@/api/management/exam';
export default {
name: 'theoryQuestion',
name: 'TheoryQuestion',
emits: ['submit'],
props: {
questionInfo: {
type: Object,
require: true,
},
require: true
}
},
data() {
return {
@ -55,52 +56,52 @@ export default {
title: '',
typeString: '',
options: [],
answer: '',
},
answer: ''
}
};
},
computed: {
index() {
return this.questionInfo.index
return this.questionInfo.index;
},
puId() {
return this.questionInfo.puId
return this.questionInfo.puId;
},
questionId() {
return this.questionInfo.questionId
},
return this.questionInfo.questionId;
}
},
watch: {
index() {
if (this.questionId && this.questionInfo.puId) {
this.loadQuestion()
if (this.questionId && this.questionInfo.puId && this.questionInfo.type === 1) {
this.loadQuestion();
}
}
},
},
methods: {
doShow() {
this.show = true
this.show = true;
},
loadQuestion() {
loadQuestion({ /* 理论题 */ type: 1, questionId: this.questionId, puId: this.questionInfo.puId }).then(
loadQuestion({ /* 理论题 */ type: this.questionInfo.type, questionId: this.questionId, puId: this.questionInfo.puId }).then(
resp => {
const data = resp.data.common
const data = resp.data.common;
this.questionData = {
title: data.question,
typeString: types[data.type],
options: data.optionList.map(opt => ({ label: opt.content, value: opt.id })),
answer: data.type === 2 ? [] : NaN,
}
this.type = data.type
answer: data.type === 2 ? [] : NaN
};
this.type = data.type;
if (resp.data.tmpAnswer) {
const tmpAnswer = resp.data.tmpAnswer.split(',').map(s => Number(s))
this.questionData.answer = data.type === 2 ? tmpAnswer : tmpAnswer[0]
const tmpAnswer = resp.data.tmpAnswer.split(',').map(s => Number(s));
this.questionData.answer = data.type === 2 ? tmpAnswer : tmpAnswer[0];
}
}
)
);
},
doClose() {
this.show = false
this.show = false;
},
submit() {
const data = {
@ -108,23 +109,23 @@ export default {
pqId: this.questionId,
type: 1,
subType: this.type,
answer: this.type === 2 ? this.questionData.answer : [this.questionData.answer],
}
answer: this.type === 2 ? this.questionData.answer : [this.questionData.answer]
};
submitAnswer(data).then(resp => {
// console.log(resp)
})
});
},
navigate(direction) {
const selected = this.type === 2 ? !!this.questionData.answer.length : !isNaN(this.questionData.answer)
const selected = this.type === 2 ? !!this.questionData.answer.length : !isNaN(this.questionData.answer);
if (selected) {
this.submit()
this.$emit('submit', this.index, direction)
this.submit();
this.$emit('submit', this.index, direction);
}
this.$emit('navigate', direction)
if (!direction) this.doClose()
},
},
this.$emit('navigate', direction);
if (!direction) this.doClose();
}
}
};
</script>
<style lang="scss" scoped>

View File

@ -7,10 +7,12 @@
<simulation-menu ref="simulationMenu" :mode="mode" />
<training-tip ref="trainingTip" />
<training-position-tip ref="trainingPositionTip" />
<training-menu v-if="hasTraining || (trainingDesign && trainingDetail)" ref="trainingMenu" :offset-bottom="offsetBottom" />
<training-menu v-if="hasTraining || (trainingDesign && trainingDetail) || (examSwitch && trainingDetail)" ref="trainingMenu" :offset-bottom="offsetBottom" />
<training-design v-if="trainingDesign" ref="trainingDesign" />
<chat-box v-if="hasVoice" ref="chatBox" :group="group" />
<training-left-slider ref="trainingLeftSlider" @overallTranslation="overallTranslation" />
<lineBoard ref="lineBoard" />
<bottomTable ref="bottomTable" />
</div>
</template>
<script>
@ -29,6 +31,8 @@ import TrainingMenu from './trainingList/trainingMenu';
import TrainingDesign from './trainingDesign/designPane.vue';
import ChatBox from './chatBox';
import TrainingLeftSlider from './trainingList/trainingLeftSlider';
import LineBoard from './lineBoard';
import BottomTable from './bottomTable';
export default {
name: 'DisplayDraft',
components: {
@ -40,7 +44,9 @@ export default {
TrainingMenu,
TrainingDesign,
ChatBox,
TrainingLeftSlider
TrainingLeftSlider,
LineBoard,
BottomTable
},
data() {
return {
@ -76,6 +82,9 @@ export default {
},
trainingDetail() {
return this.$store.state.trainingNew.trainingDetail;
},
examSwitch() {
return this.$store.state.trainingNew.examSwitch;
}
},
watch:{
@ -104,7 +113,9 @@ export default {
} else {
exitSimulation(this.group);
}
this.$store.dispatch('socket/resetRailCtcRunplanInitMsg'); //
this.$store.dispatch('socket/clearDispatchCommandMsg'); //
this.$store.dispatch('map/setLinkSwitchMap', {});
},
methods:{
overallTranslation(flag) {
@ -123,6 +134,7 @@ export default {
if (resp && resp.data && !resp.data.dataError) {
this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan);
this.$store.dispatch('training/setDomConfig', resp.data.paramVO && resp.data.paramVO.domConfig ? resp.data.paramVO.domConfig : {});
this.$store.dispatch('map/setLinkSwitchMap', resp.data.linkSwitchMap || {});
loadMapDataById(this.mapId, 'simulation');
if (this.simType === 'METRO') {
this.loadRunPlan();

View File

@ -0,0 +1,670 @@
<template>
<el-dialog
title="车站股道图"
:visible="dialogVisible"
width="99%"
z-index="3000"
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 showStationList"
: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 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 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>xx</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">
<el-option
v-for="elem in sectionStatusList"
:key="elem.value"
:label="elem.label"
:value="elem.value"
/>
</el-select>
</div>
<div v-show="!item.noData" style="display: flex;width: 300px;">
<div v-show="item.receivingRouteCode" :style="{ background: item.receivingNotice ? '#29CA42': '#ccc' }" class="button-box-fir" @click="doShowRecDep(item,'rec')">接预</div>
<div
v-show="item.receivingRouteCode"
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 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;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;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;color: #f00;">
<el-row>{{ item.receivingDirection||'-' }}</el-row>
<el-row>{{ item.departureDirection||'-' }}</el-row>
</div>
<div /><!--起点--终点-->
<div v-show="!item.noData" style="display: flex;width: 300px;">
<div v-show="item.departureRouteCode" :style="{ background: item.departureNotice ? '#29CA42': '#ccc' }" class="button-box-fir" @click="doShowRecDep(item,'dep')">发预</div>
<div
v-show="item.departureRouteCode"
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 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;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;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;${readOnlyMap[selectCode1] ? '只读':'可修改'}&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="sequenceList"
style="width: 100%;margin-top: 10px;"
highlight-current-row
:row-style="{ background: '#ff0' }"
height="180"
:default-sort="{prop: 'startTime', order: 'ascending'}"
border
>
<el-table-column width="50" label="序号" align="center" type="index">
<!-- <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="departure" label="类型">
<template slot-scope="scope">
<span>{{ scope.row.departure ? '发车':'接车' }}</span>
</template>
</el-table-column>
<el-table-column property="status" label="状态">
<template slot-scope="scope">
<span>{{ getRouteStatus(scope.row.status) }}</span>
</template>
</el-table-column>
<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 showStationList"
: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 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';
import { EventBus } from '@/scripts/event-bus';
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: '',
arrowPic: ArrowPic,
picT3: PicT3,
controlPanelPic: ControlPanelPic,
controlPanel2Pic: ControlPanel2Pic,
t3Pic: T3Pic,
panelPic: PanelPic,
trainPic: TrainPic,
linkPic: LinkPic,
cameraPic: CameraPic,
unknowPic: UnknowPic,
searchTrain: '',
andDown: 'all',
unknow: '',
unknow1: '',
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'}
],
sequenceMap: {},
sequenceList: [],
readOnlyMap: {},
standTrackSectionMap: {},
trackList: [],
showStationList: []
};
},
computed: {
...mapGetters('map', [
'sectionList',
'stationList'
])
},
watch: {
'$store.state.socket.simulationReset': function (val) {
this.sequenceMap = {};
this.sequenceList = [];
this.readOnlyMap = {};
this.standTrackSectionMap = {};
this.trackList = [];
this.sectionList.forEach(item => {
if (item.standTrack) {
this.standTrackSectionMap[item.code] = { trackName: item.name, occupied: false, belongStation:item.belongStation, lineMap: {}};
}
});
},
'$store.state.socket.railCtcStatusMsg': function (val) {
if (val && val.length) {
val.forEach(item => {
if (item && item.routeSequence && item.routeSequence.lines && item.routeSequence.lines.length) {
item.routeSequence.lines.forEach(elem => {
if (!this.sequenceMap[elem.id]) {
this.sequenceMap[elem.id] = Object.assign(elem, { stationCode: item.stationCode, readOnly: item.readOnly });
} else {
this.sequenceMap[elem.id] = Object.assign(this.sequenceMap[elem.id], elem, { stationCode: item.stationCode, readOnly: item.readOnly });
}
});
this.readOnlyMap[item.stationCode] = item.readOnly;
}
if (item && item.routeSequence && item.routeSequence.deletedLineIds && item.routeSequence.deletedLineIds.length) {
item.routeSequence.deletedLineIds.forEach(elem => {
delete this.sequenceMap[elem];
});
}
if (item && item.trackView && item.trackView.trackLineMap) {
for (const key in item.trackView.trackLineMap) {
if (this.standTrackSectionMap[key] && item.trackView.trackLineMap[key]) {
for (const trainCode in item.trackView.trackLineMap[key]) {
if (this.standTrackSectionMap[key].lineMap[trainCode]) {
Object.assign(this.standTrackSectionMap[key].lineMap[trainCode], item.trackView.trackLineMap[key][trainCode]);
} else { this.standTrackSectionMap[key].lineMap[trainCode] = item.trackView.trackLineMap[key][trainCode]; }
}
}
}
}
if (item && item.trackView && item.trackView.deletedMap) {
for (const key in item.trackView.deletedMap) {
if (this.standTrackSectionMap[key] && item.trackView.deletedMap[key] && item.trackView.deletedMap[key].length) {
const sectionMap = this.standTrackSectionMap[key].lineMap;
item.trackView.deletedMap[key].forEach(trainCode => {
delete sectionMap[trainCode];
});
}
}
}
if (item && item.trackView && item.trackView.sectionOccupiedMap) {
for (const key in item.trackView.sectionOccupiedMap) {
if (this.standTrackSectionMap[key]) {
this.standTrackSectionMap[key].occupied = item.trackView.sectionOccupiedMap[key];
}
}
}
});
this.sequenceList = [];
for (const key in this.sequenceMap) {
if (this.sequenceMap[key].stationCode === this.selectCode1) {
this.sequenceList.push(this.sequenceMap[key]);
}
}
this.trackList = [];
let oddNumber = true;
for (const key in this.standTrackSectionMap) {
if (this.standTrackSectionMap[key].belongStation === this.selectCode) {
if ( JSON.stringify(this.standTrackSectionMap[key].lineMap) !== '{}') {
let flag = true;
const lineMap = this.standTrackSectionMap[key].lineMap;
for (const item in lineMap) {
this.trackList.push(Object.assign({}, lineMap[item], { trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, oddNumber: oddNumber, showTrack: flag }));
flag = false;
}
oddNumber = !oddNumber;
} else {
this.trackList.push({trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, noData: true, oddNumber: oddNumber, showTrack: true});
oddNumber = !oddNumber;
}
}
}
}
},
'$store.state.map.mapDataLoadedCount': function (val) { //
this.sectionList.forEach(item => {
if (item.standTrack) {
this.standTrackSectionMap[item.code] = { trackName: item.name, occupied: false, belongStation:item.belongStation, lineMap: {}};
}
});
},
'$store.state.map.showCentralizedStationCode': function (val) {
this.initShowStationList(val);
}
},
mounted() {
EventBus.$on('showLineBoard', () => {
this.doShow();
});
},
beforeDestroy() {
EventBus.$off('showLineBoard');
},
methods: {
handleClose() {
this.dialogVisible = false;
},
initShowStationList(val) {
if (val) {
const centralizedStation = this.$store.getters['map/getDeviceByCode'](val);
const sn = centralizedStation.sn;
this.showStationList = [centralizedStation];
this.stationList.forEach(station => {
if (station.sn === sn - 1) {
this.showStationList.unshift(station);
} else if (station.sn === sn + 1) {
this.showStationList.push(station);
}
});
}
},
doShow() {
this.dialogVisible = true;
this.initShowStationList(this.$store.state.map.showCentralizedStationCode);
if (this.showStationList && this.showStationList.length) {
this.selectStandCode(this.$store.state.map.showCentralizedStationCode);
this.selectStandCode1(this.$store.state.map.showCentralizedStationCode);
}
},
selectStandCode(code) {
this.selectCode = code;
this.trackList = [];
let oddNumber = true;
for (const key in this.standTrackSectionMap) {
if (this.standTrackSectionMap[key].belongStation === this.selectCode) {
if ( JSON.stringify(this.standTrackSectionMap[key].lineMap) !== '{}') {
let flag = true;
const lineMap = this.standTrackSectionMap[key].lineMap;
for (const item in lineMap) {
this.trackList.push(Object.assign({}, lineMap[item], { trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, oddNumber: oddNumber, showTrack: flag }));
flag = false;
}
oddNumber = !oddNumber;
} else {
this.trackList.push({trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, noData: true, oddNumber: oddNumber, showTrack: true});
oddNumber = !oddNumber;
}
}
}
},
getRouteStatus(status) {
if (status === '2') {
return '触发完成';
} else if (status === '1') {
return '正在触发';
} else {
return '等待中';
}
},
selectStandCode1(code) {
this.selectCode1 = code;
this.sequenceList = [];
for (const key in this.sequenceMap) {
if (this.sequenceMap[key].stationCode === this.selectCode1) {
this.sequenceList.push(this.sequenceMap[key]);
}
}
},
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 };
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>
/deep/ .el-dialog__header{
background: #B4B6B9;
}
/deep/ .el-dialog__body{
background: #8D939D;
padding: 10px;
}
/deep/ .el-table td{
padding: 0;
}
/deep/ .el-table th{
padding: 0;
background: #C5CBD0;
color: #1e2024;
}
/deep/ .el-input.is-disabled .el-input__inner {
color: #606266;
}
.img-box {
width: 30px;
height: 30px;
border: 1px solid #ccc;
border-radius: 4px;
margin: 10px 5px 5px 5px;
background: #FAFAFA;
}
.tab-box {
padding: 5px;
text-align: center;
width: 33% ;
font-size: 18px;
border: 2px solid #F5F5F5;
cursor: pointer;
border-radius: 5px;
margin-left: 5px;
}
.button-box-sec{
border: 1px solid #ccc;
border-radius: 4px;
font-size: 14px;
background: #ccc;
padding: 5px;
cursor: pointer;
margin-left: 10px;
width: 160px;
text-align: center;
}
.button-box-fir{
border: 1px solid #ccc;
border-radius: 4px;
font-size: 14px;
background: #ccc;
padding: 5px;
cursor: pointer;
}
.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>

View File

@ -189,6 +189,7 @@ export default {
const stationWorkerList = [];
const deviceManagerList = [];
const trainMasterList = [];
const stationElectricWorkerList = [];
val.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
switch (item.type) {
@ -260,6 +261,10 @@ export default {
case 'PARENT_DEPARTMENT':
this.memberData[item.id].labelName = '上级部门' + (item.name ? `-${item.name }` : '');
break;
case 'STATION_ELECTRIC_WORKER':
this.memberData[item.id].labelName = '电力工务' + (item.name || '');
stationElectricWorkerList.push(this.memberData[item.id]);
break;
// DEVICE_MANAGER:'' deviceManager
}
});
@ -335,6 +340,11 @@ export default {
labelName: '车务段段长 ',
id: 'trainMaster',
children: trainMasterList
},
{
labelName: '电力工务 ',
id: 'stationElectricWorker',
children: stationElectricWorkerList
}
];
EventBus.$emit('trainTicketMember', [...stationSupervisorList, ...stationAssistantList]);

View File

@ -67,8 +67,16 @@ export default {
{ label: '切换客流数据', name: 'changeFlowData', click: this.changeFlowData, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasLpf && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
{ label: '成员管理', name: 'memberManage', click: this.memberManage, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasMemberManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
{ label: '考试', name: 'exam', click: this.goExam, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasExam && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
{ label: '按计划行车', name: 'drivingPlan', click: this.drivingPlan, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, isShow: () => { return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && this.$route.query.client !== 'diagramEdit'; } },
{ label: '初始化', name: 'initialize', click: this.initializeSim, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, isShow: () => { return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && this.$route.query.client !== 'diagramEdit'; } },
{ label: '按计划行车', name: 'drivingPlan', click: this.drivingPlan, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; },
isShow: () => {
return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER &&
(this.$route.query.client !== 'diagramEdit' || (this.$route.query.client == 'diagramEdit' && this.$store.state.map.picture == 'testRunplan'));
} },
{ label: '初始化', name: 'initialize', click: this.initializeSim, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; },
isShow: () => {
return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER &&
(this.$route.query.client !== 'diagramEdit' || (this.$route.query.client == 'diagramEdit' && this.$store.state.map.picture == 'testRunplan'));
} },
{ label: '退出', name: 'quit', click: this.exitSim, isDisabled: () => { return false; }, isShow: () => { return true; } }
]
};
@ -94,6 +102,11 @@ export default {
'$store.state.training.simulationUserType': function (val) {
this.handleMenuShow();
},
'$store.state.map.picture': function (val) {
if (val == 'testRunplan') {
this.handleMenuShow();
}
},
'$store.state.socket.simulationOver':function(val) {
this.back();
},
@ -211,6 +224,7 @@ export default {
this.$store.dispatch('map/resetActiveTrainList', false);
this.$store.dispatch('map/setTrainWindowShow', false);
this.$store.dispatch('map/initSimulationButton');
this.$store.dispatch('socket/clearDispatchCommandMsg'); //
});
}).catch(() => {
this.loading = false;

View File

@ -112,11 +112,11 @@ export default {
$route() {
this.mapViewLoaded(true);
},
'$store.state.socket.simulationReset': function (val) { // 仿
if (val) {
this.simulationReset(val);
}
},
// '$store.state.socket.simulationReset': function (val) { // 仿
// if (val) {
// this.simulationReset(val);
// }
// },
'$store.state.training.rezoomCount': function () {
let code = this.$store.state.training.offsetStationCode; //
if (code && code.includes('Cycle')) { //
@ -283,14 +283,14 @@ export default {
break;
}
},
simulationReset() {
this.$store.dispatch('socket/setSimulationStart');// 仿-
this.$store.dispatch('map/initClearTrainData'); //
this.$store.dispatch('map/setTrainWindowShow', false); //
this.$store.dispatch('training/over'); // -
this.$store.dispatch('map/resetActiveTrainList'); //
this.$store.dispatch('training/setMapDefaultState'); //
},
// simulationReset() {
// this.$store.dispatch('socket/setSimulationStart');// 仿-
// this.$store.dispatch('map/initClearTrainData'); //
// this.$store.dispatch('map/setTrainWindowShow', false); //
// this.$store.dispatch('training/over'); // -
// this.$store.dispatch('map/resetActiveTrainList'); //
// this.$store.dispatch('training/setMapDefaultState'); //
// },
//
onDataZoom(dataZoom) {
this.dataZoom.offsetX = dataZoom.offsetX.toFixed(1) + '';

View File

@ -0,0 +1,365 @@
<template>
<div>
<table>
<tr>
<td colspan="10" align="center">非正常情况接发列车关键环节控制表</td>
</tr>
<tr>
<td colspan="2">
<div class="td-div">
<span>值班员</span>
<div class="td-div-input">
<el-input :id="formInput.supervisor.domId" v-model="form.supervisor" size="mini" :disabled="!isCreat" @blur="blurChange('supervisor')" />
</div>
</div>
</td>
<td colspan="2">
<div class="td-div">
<span>干部上岗是由</span>
<div class="td-div-input">
<el-input :id="formInput.cadresPost.domId" v-model="form.cadresPost" size="mini" :disabled="!isCreat" @blur="blurChange('cadresPost')" />
</div>
</div></td>
<td colspan="2">
<div class="td-div">
<span>监控干部</span>
<div class="td-div-input">
<el-input :id="formInput.monitorCadres.domId" v-model="form.monitorCadres" size="mini" :disabled="!isCreat" @blur="blurChange('monitorCadres')" />
</div>
</div></td>
<td colspan="2">
<div class="td-div">
<span>天气</span>
<div class="td-div-input">
<el-input :id="formInput.weather.domId" v-model="form.weather" size="mini" :disabled="!isCreat" @blur="blurChange('weather')" />
</div>
</div></td>
<td colspan="2">
<div class="td-div">
<span>日期</span>
<div class="td-div-input">
<el-date-picker :id="formInput.registerDate.domId" v-model="form.registerDate" type="date" size="mini" format="yyyy年MM月dd日" value-format="yyyy年MM月dd日" placeholder="选择日期" class="autoWidth" :disabled="!isCreat" @change="blurChange('registerDate')" />
</div>
</div></td>
</tr>
<tr>
<td colspan="2" align="center">
<p>通知干部上岗
<br>
<el-input :id="formInput.noticeCadresTimeHour.domId" v-model="form.noticeCadresTime.hour" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2); if(value > 23) value = 23" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('noticeCadresTime', 'hour')" />
<el-input :id="formInput.noticeCadresTimeMinute.domId" v-model="form.noticeCadresTime.minute" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2); if(value > 59) value = 59" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('noticeCadresTime', 'minute')" />
</p>
</td>
<td colspan="2" align="center">
<p>报告列车调度员
<br>
<el-input :id="formInput.reportDispatcherTimeHour.domId" v-model="form.reportDispatcherTime.hour" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2); if(value > 23) value = 23" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportDispatcherTime', 'hour')" />
<el-input :id="formInput.reportDispatcherTimeMinute.domId" v-model="form.reportDispatcherTime.minute" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2); if(value > 59) value = 59" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportDispatcherTime', 'minute')" />
</p>
</td>
<td colspan="2" align="center">
<p>报告指挥中心
<br>
<el-input :id="formInput.reportCommandCentreTimeHour.domId" v-model="form.reportCommandCentreTime.hour" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2); if(value > 23) value = 23" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportCommandCentreTime', 'hour')" />
<el-input :id="formInput.reportCommandCentreTimeMinute.domId" v-model="form.reportCommandCentreTime.minute" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2); if(value > 59) value = 59" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportCommandCentreTime', 'minute')" />
</p>
</td>
<td colspan="2" align="center">
<p>监控干部到岗
<br>
<el-input :id="formInput.monitorArriveTimeHour.domId" v-model="form.monitorArriveTime.hour" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2); if(value > 23) value = 23" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('monitorArriveTime', 'hour')" />
<el-input :id="formInput.monitorArriveTimeMinute.domId" v-model="form.monitorArriveTime.minute" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2); if(value > 59) value = 59" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('monitorArriveTime', 'minute')" />
</p>
</td>
<td colspan="2" align="center">
<p>安排工作人员
<br>
<span style="display: inline-block; width: 50px; text-align-last: justify;">岗人</span>
</p>
</td>
</tr>
<tr>
<td align="center">登记单位</td>
<td align="center">运统46登记</td>
<td align="center">运统46签认</td>
<td align="center">报告列车调度员</td>
<td colspan="2" align="center">调度命令核对接收</td>
<td colspan="2" align="center">运统46到点签认</td>
<td align="center">运统46销记签认</td>
<td align="center">调度命令核对接收</td>
</tr>
<tr v-for="(item, index) in form.registerInfoList" :key="index">
<td><el-input :id="formInput['departmentName' + index].domId" v-model="item.departmentName" size="mini" :disabled="!isCreat" @blur="listChange('departmentName', index)" /></td>
<td><el-input :id="formInput['registration' + index].domId" v-model="item.registration" size="mini" :disabled="!isCreat" @blur="listChange('registration', index)" /></td>
<td>
<el-button :id="formInput['reportSign' + index].domId" size="mini" :disabled="!isCreat" class="checkBtn" @click="clickListChange('reportSign', index)">
<i v-if="item.reportSign" class="el-icon-check" />
</el-button>
</td>
<td>
<el-button :id="formInput['reportDispatcher' + index].domId" size="mini" :disabled="!isCreat" class="checkBtn" @click="clickListChange('reportDispatcher', index)">
<i v-if="item.reportDispatcher" class="el-icon-check" />
</el-button>
</td>
<td colspan="2">
<el-button :id="formInput['centerDispatchCommandCheck' + index].domId" size="mini" :disabled="!isCreat" class="checkBtn" @click="clickListChange('centerDispatchCommandCheck', index)">
<i v-if="item.centerDispatchCommandCheck" class="el-icon-check" />
</el-button>
</td>
<td colspan="2">
<el-button :id="formInput['monitorArrive' + index].domId" size="mini" :disabled="!isCreat" class="checkBtn" @click="clickListChange('monitorArrive', index)">
<i v-if="item.monitorArrive" class="el-icon-check" />
</el-button>
</td>
<td>
<el-button :id="formInput['writeOff' + index].domId" size="mini" :disabled="!isCreat" class="checkBtn" @click="clickListChange('writeOff', index)">
<i v-if="item.writeOff" class="el-icon-check" />
</el-button>
</td>
<td>
<el-button :id="formInput['workerDispatchCommandCheck' + index].domId" size="mini" :disabled="!isCreat" class="checkBtn" @click="clickListChange('workerDispatchCommandCheck', index)">
<i v-if="item.workerDispatchCommandCheck" class="el-icon-check" />
</el-button>
</td>
</tr>
<tr>
<td colspan="10">1.以上内容只对涉及的项目监控后划2.车务发现或接到报告设备故障时可立即报告列车调度员然后登记有关单位签认</td>
</tr>
<tr>
<td colspan="10">故障施工天窗维修作业内容<el-input :id="formInput.faultContent.domId" v-model="form.faultContent" type="textarea" :autosize="{ minRows: 2 }" size="mini" :disabled="!isCreat" @blur="blurChange('faultContent')" /></td>
</tr>
<tr>
<td colspan="2">区间闭塞封闭情况</td>
<td colspan="8"><el-input :id="formInput.sectionContent.domId" v-model="form.sectionContent" size="mini" :disabled="!isCreat" @blur="blurChange('sectionContent')" /></td>
</tr>
<tr>
<td colspan="2">接车进路准备方式</td>
<td colspan="8"><el-input :id="formInput.pickRoutePrepareContent.domId" v-model="form.pickRoutePrepareContent" size="mini" :disabled="!isCreat" @blur="blurChange('pickRoutePrepareContent')" /></td>
</tr>
<tr>
<td colspan="2">接车信号</td>
<td colspan="8"><el-input :id="formInput.pickSignal.domId" v-model="form.pickSignal" size="mini" :disabled="!isCreat" @blur="blurChange('pickSignal')" /></td>
</tr>
<tr>
<td colspan="2">发车进路准备方式发车凭证</td>
<td colspan="8"><el-input :id="formInput.departRoutePrepareContent.domId" v-model="form.departRoutePrepareContent" size="mini" :disabled="!isCreat" @blur="blurChange('departRoutePrepareContent')" /></td>
</tr>
<tr>
<td colspan="2">其他关键环节</td>
<td colspan="8"><el-input :id="formInput.otherKeyLinkContent.domId" v-model="form.otherKeyLinkContent" size="mini" :disabled="!isCreat" @blur="blurChange('otherKeyLinkContent')" /></td>
</tr>
</table>
<div v-if="isCreat" class="footer">
<el-button :id="formInput.submit.domId" type="primary" size="mini" @click="submit">提交</el-button>
</div>
</div>
</template>
<script>
import { deepAssign } from '@/utils/index';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { sendCommandNew } from '@/api/jmap/training';
export default {
name: 'ControlTable',
props: {
info:{
type: Object,
default() {
return {};
}
},
isCreat: {
type: Boolean,
default() {
return false;
}
}
},
data() {
return {
form: {}
};
},
computed: {
group() {
return this.$route.query.group;
},
stationCode() {
return this.$store.state.training.roleDeviceCode;
},
formInput() {
return OperationEvent.AbnormalTrainRegister.formInput;
}
},
created() {
if (this.isCreat) {
this.initFormData();
} else {
this.getInfoData();
}
},
methods: {
listChange(key, index) {
const val = this.form.registerInfoList[index][key];
const operate = {
operation: this.formInput[key + index].operation,
param: {val: val}
};
this.$store.dispatch('trainingNew/next', operate);
},
clickListChange(key, index) {
const obj = this.form.registerInfoList[index];
this.$set(obj, key, !obj[key]);
this.listChange(key, index);
},
blurChange() {
const argList = [...arguments];
let key = '';
let val = '';
argList.forEach((item, index) => {
if (index == 0) {
val = this.form[item];
key = item;
} else {
val = val[item];
const n = item[0].toUpperCase() + item.substr(1);
key += n;
}
});
const operate = {
operation: this.formInput[key].operation,
param: {val: val}
};
this.$store.dispatch('trainingNew/next', operate);
},
initRegisterInfoData() {
const list = [];
const nameArr = ['车务电工', '工 务', '供 电', '通 信', '', '其他()'];
nameArr.forEach(name => {
const obj = {
departmentName: name,
registration: '',
reportSign: '',
reportDispatcher: '',
centerDispatchCommandCheck: '',
monitorArrive: '',
writeOff: '',
workerDispatchCommandCheck: ''
};
list.push(obj);
});
return list;
},
getInfoData() {
const obj = deepAssign({}, this.info);
this.form = obj;
},
submit() {
const obj = deepAssign({}, this.form);
delete obj.id;
obj.stationCode = this.stationCode;
// const list = [];
// obj.registerInfoList.forEach(item => {
// const s = Object.values(item).every(ii => {
// return !ii;
// });
// if (!s) {
// list.push(item);
// }
// });
// obj.registerInfoList = list;
const operate = {
operation: this.formInput.submit.operation,
param: obj
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
sendCommandNew(this.group, 'KEY_LINK_CONTROL_INFO_SAVE', obj).then((res) => {
console.log(res, '---res');
this.$message.success('提交成功!');
this.initFormData();
}).catch(error => {
this.$messageBox('提交失败:' + error.message);
});
}
});
},
initFormData() {
this.form = {
id: '',
stationCode: '',
supervisor: '',
cadresPost: '',
monitorCadres: '',
weather: '',
registerDate: '',
noticeCadresTime: { //
hour: '',
minute: ''
},
reportDispatcherTime: { //
hour: '',
minute: ''
},
reportCommandCentreTime: { //
hour: '',
minute: ''
},
monitorArriveTime: { //
hour: '',
minute: ''
},
registerInfoList: this.initRegisterInfoData(), //
faultContent: '',
sectionContent: '',
pickRoutePrepareContent: '',
pickSignal: '',
departRoutePrepareContent: '',
otherKeyLinkContent: ''
};
}
}
};
</script>
<style scoped lang="scss">
table {
table-layout: fixed;
border-collapse: collapse;
border-spacing: 0;
td {
padding: 5px;
border: 1px solid black !important;
}
}
.td-div {
white-space:nowrap;
display: flex;
align-items: center;
.td-div-input {
width: 100%;
}
}
.timeInput {
width: 40px;
/deep/ .el-input__inner {
padding: 0 10px !important;
border: none !important;
border-radius: 0px;
border-bottom: 1px solid #DCDFE6 !important;
}
}
.autoWidth {
width: 100%;
}
.checkBtn {
width: 100%;
height: 28px;
}
.footer {
height: 50px;
display: flex;
justify-content: center;
align-items: center;
}
</style>

View File

@ -0,0 +1,110 @@
<template>
<div>
<el-tabs :id="typeChange.domId" v-model="activeName" type="card" @tab-click="tabClick">
<el-tab-pane label="填写" name="write">
<div ref="writeTabPane" class="write-box" :style="{height: boxHeight + 'px'}">
<ControlTable :is-creat="true" />
</div>
</el-tab-pane>
<el-tab-pane label="查询" name="search">
<div v-if="activeName == 'search'" class="search-box" :style="{height: boxHeight + 'px'}">
<div v-for="(item, index) in searchList" :key="index" class="search-item">
<ControlTable :is-creat="false" :info="item" />
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import ControlTable from './controlTable';
import { sendCommandNew } from '@/api/jmap/training';
import { UserOperationType } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'AbnormalTrain',
components: {
ControlTable
},
data() {
return {
activeName: 'write',
searchList: []
};
},
computed: {
group() {
return this.$route.query.group;
},
typeChange() {
return OperationEvent.AbnormalTrainRegister.tabType.typeChange;
},
formInput() {
return OperationEvent.AbnormalTrainRegister.formInput;
},
boxHeight() {
const allH = this.$store.state.app.height;
let h = allH - 63 - 39 - 30 - 41 - 15 - 20;
h = h > 0 ? h : 0;
return h;
}
},
watch: {
activeName() {
if (this.activeName == 'search') {
this.getSearchList();
}
}
},
mounted() {
this.$refs.writeTabPane.addEventListener('scroll', this.handleScroll);
},
beforeDestroy() {
this.$refs.writeTabPane.removeEventListener('scroll', this.handleScroll);
},
methods: {
handleScroll() {
this.$nextTick(() => {
this.$store.dispatch('training/emitTipFresh');
});
},
tabClick() {
const operate = {
operation: this.typeChange.operation,
param: {val: this.activeName},
userOperationType: UserOperationType.LEFTCLICK
};
this.$store.dispatch('trainingNew/next', operate);
},
getSearchList() {
const params = { stationCode: this.$store.state.training.roleDeviceCode};
sendCommandNew(this.group, 'KEY_LINK_CONTROL_INFO_QUERY', params).then((res) => {
console.log(res, '-QUERY--res');
this.searchList = res.data;
}).catch(error => {
console.log('查询失败!', error);
});
}
}
};
</script>
<style scoped >
.write-box {
overflow: auto;
display: flex;
justify-content: center;
position: relative;
margin: 10px;
}
.search-box {
overflow: auto;
display: flex;
flex-direction: column;
align-items: center;
}
.search-item {
margin: 10px;
}
</style>

View File

@ -4,7 +4,7 @@
<div v-if="type=='generateRouting'">
<gernarate-plan ref="gernaratePlanTrain" :load-run-plan-id="loadRunPlanId" @close="closeDialog" @mapLoading="mapLoading" />
</div>
<jlmap-visual ref="jlmapVisual" v-loading="loadingMap" @onMenu="onContextmenu" @onSelect="clickEvent" />
<jlmap-visual ref="jlmapVisual" v-loading="loadingMap" type="routeMap" @onMenu="onContextmenu" @onSelect="clickEvent" />
<!-- :style="{height: $store.state.app.height-54+'px' }" -->
<div v-if="type=='routeMap'" class="routeMap">
<route-config ref="routeConfig" />
@ -113,7 +113,6 @@ export default {
width = this.$store.state.app.width - 500;
} else {
width = this.$store.state.app.width * 0.7;
}
const height = this.$store.state.app.height - 49;
this.$store.dispatch('config/resize', { width, height });

View File

@ -10,6 +10,7 @@
@loadingRunPlan="loadingRunPlan"
@modifyRunPlanName="modifyRunPlanName"
@refresh="refreshRunPlanList"
@pictureChange="pictureChange"
@refreshData="refresh"
/>
<!-- :plan-parser="PlanParser" -->
@ -90,6 +91,12 @@ export default {
MovePlaningTrain,
CreateEmptyPlan
},
props:{
planId: {
type: String,
required: true
}
},
data() {
return {
PlanParser: {},
@ -117,6 +124,10 @@ export default {
this.refreshRunPlanList(true);
generateRunPlanInfoSync(this.$route.query.mapId);
}
if (this.planId) {
this.loadRunPlanId = this.planId;
this.refresh();
}
},
beforeDestroy() {
},
@ -204,6 +215,9 @@ export default {
this.$refs.schedule.refreshRunPlanName(name);
this.refreshRunPlanList(this.loadRunPlanId);
this.$router.replace({ path: this.$route.path, query: { ...this.$route.query, planName: name }});
},
pictureChange(data) {
this.$emit('pictureChange', data);
}
}
};

View File

@ -138,6 +138,7 @@ import { planEffectiveCheck, clearPlaningData } from '@/api/runplan';
import { EventBus } from '@/scripts/event-bus';
import { publishRunPlanAllUser } from '@/api/designPlatform';
import { deleteRunPlan } from '@/api/runplan';
import { simulationLoadDraftRunPlan } from '@/api/simulation';
export default {
name: 'PlanMenuBar',
@ -285,11 +286,11 @@ export default {
{
title: this.$t('planMonitor.validityCheck'),
click: this.handlePlanEffectiveCheck
},
{
title: this.$t('planMonitor.testRunningDiagram'),
click: this.handleTestRunPlan
}
// {
// title: this.$t('planMonitor.testRunningDiagram'),
// click: this.handleTestRunPlan
// }
]
}
// {
@ -719,6 +720,16 @@ export default {
this.$messageBox(this.$t('tip.publishRunPlanFail'));
this.publishVisible = false;
});
},
//
handleTestRunPlan() {
if (this.loadRunPlanId) {
simulationLoadDraftRunPlan(this.$route.query.group, this.loadRunPlanId).then(resp => {
this.$emit('pictureChange', {name:'testRunplan', planId:this.loadRunPlanId});
});
} else {
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
}
}
}
};

View File

@ -160,9 +160,6 @@ export default {
handlePlanEffectiveCheck() {
const planId = this.loadRunPlanId;
if (planId) {
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
this.$messageBox(' 功能待完善');
} else {
planEffectiveCheck(planId).then(resp => {
this.$emit('dispatchDialog', {
name: 'systermOut',
@ -174,8 +171,6 @@ export default {
}).catch(error => {
this.$messageBox(error.message + ' ' + this.$t('tip.runGraphVerificationFailed'));
});
}
} else {
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
}

View File

@ -381,7 +381,7 @@
</div>
<div class="table">
<el-table ref="table" :data="getTableData" border style="width: 100%" :header-cell-class-name="cellClass" :height="tableHeight" highlight-current-row @select="selectionChange" @select-all="selectionChange" @row-click="tableRowChange">
<el-table-column type="selection" :selectable="selectableFn" width="50" />
<el-table-column type="selection" :selectable="selectableFn" width="40" />
<el-table-column prop="name" label="受令单位" width="160" />
<el-table-column prop="copyers" label="抄送" width="120" show-overflow-tooltip />
<el-table-column label="签收状态">
@ -409,9 +409,88 @@
</div>
</div>
</el-col>
<el-col :span="4">
<el-col :span="4" style="height: 100%;">
<div class="right">
常用词汇
<div class="right-top">
<el-tabs v-model="wordTab" type="border-card">
<el-tab-pane label="常用词汇" name="word">
<div class="word-box">
<div v-for="(item, index) in getTableData" :key="index">{{ item.name }}</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
<div class="right-middle">
<el-tabs v-model="wirelessTab" type="border-card">
<el-tab-pane label="无线受令列表" name="wireless">
<el-form ref="form" :model="wirelessObj" label-width="80px" :disabled="!permissionWireless">
<el-form-item label="命令类型">
<el-select v-model="wirelessObj.type" placeholder="请选择" style="width: 100%;">
<el-option label="调度命令" value="dispatchCmd" />
</el-select>
</el-form-item>
<el-form-item label="中转车站">
<el-select v-model="wirelessObj.transStationCode" placeholder="请选择" style="width: 100%;">
<el-option
v-for="item in transStationOption"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="车次">
<el-input v-model="wirelessObj.trainNum" />
</el-form-item>
<el-col :span="16">
<el-form-item label="机车">
<el-input v-model="wirelessObj.code" onkeyup="value=value.replace(/[^\d]/g,'')" />
</el-form-item>
</el-col>
<el-col :span="8">
<div class="midle-bottom">
<el-button :id="getDomObj('findTrain').domId" type="primary" :disabled="disabledSent || !permissionWireless" @click="findTrainToTable">查找机车</el-button>
</div>
</el-col>
</el-form>
</el-tab-pane>
<div class="table">
<el-table ref="table6" :data="trainTableData" border style="width: 100%" :header-cell-class-name="cellClass" :height="trainTableHeight" highlight-current-row @current-change="trainTableRowChange">
<el-table-column prop="trainNum" label="车次号" width="100" />
<el-table-column prop="code" label="机车号">
<template slot-scope="scope">
<span>{{ scope.row.code || 'XXXXXX' }}</span>
</template>
</el-table-column>
<el-table-column label="签收状态">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ getSignedStatus(getCurrentState(scope.row)) }}</span>
</template>
</el-table-column>
<el-table-column label="签收人">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ getSignedBy(getCurrentState(scope.row)) || '' }}</span>
</template>
</el-table-column>
<el-table-column label="签收时间" width="160">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ getCurrentState(scope.row).time || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="transStationCode" label="中转车站">
<template slot-scope="scope">
<span>{{ getTransStationName(scope.row.transStationCode) }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="midle-bottom">
<el-button :id="getDomObj('permissionAddWireless').domId" type="primary" :disabled="disabledSent || permissionWireless" @click="permissionAdd">增加</el-button>
<el-button :id="getDomObj('trainAllographCmd').domId" type="primary" :disabled="disabledTrainAllograph" @click="trainAllographCmd">代签</el-button>
<el-button :id="getDomObj('deleteTrainTable').domId" type="primary" :disabled="disabledSent || !trainRow" @click="deleteTrainTable">删除</el-button>
</div>
</el-tabs>
</div>
</div>
</el-col>
</el-row>
@ -430,8 +509,11 @@ export default {
operateTableHeight: 100,
searchTableHeight: 260,
tableHeight: 200,
trainTableHeight: 200,
activeTab: 'operate',
cmdTab: 'cmd',
wordTab: 'word',
wirelessTab: 'wireless',
textTab: 'text',
typeObj: {
Normal: '普通调度命令',
@ -527,15 +609,24 @@ export default {
{ value: '', label: '全部'},
{ value: true, label: '只显示签收完成的'},
{ value: false, label: '只显示未签收完成的'}
]
],
wirelessObj: {
type: 'dispatchCmd',
transStationCode: '',
trainNum: '',
code: ''
},
trainRow: null,
trainTableData: [],
permissionWireless: false
};
},
computed: {
...mapState('training', [
'memberList', 'memberData', 'simulationUserList', 'initTime'
'memberList', 'memberData', 'simulationUserList'
]),
...mapState('socket', [
'dispatchCommandState'
'dispatchCommandState', 'simulationTimeSync'
]),
currentStatus() {
let s = '编辑';
@ -559,6 +650,14 @@ export default {
}
return s;
},
disabledTrainAllograph() {
let s = false;
const sArr = ['Sent', 'Received', 'SrmReceived'];
if (!this.trainRow || !sArr.includes(this.getCurrentState(this.trainRow).state)) {
s = true;
}
return s;
},
typeOptions() {
const list = [];
Object.keys(this.typeObj).forEach(item => {
@ -570,7 +669,7 @@ export default {
return list;
},
getSimulationTime() {
const t = parseTime(this.initTime, '{h}:{i}:{s}');
const t = parseTime(this.simulationTimeSync, '{h}:{i}:{s}');
const tArr = t.split(':');
let s = ' ';
let h = tArr[0];
@ -613,6 +712,11 @@ export default {
},
DisStationId() {
return this.getActiveSender.deviceCode ? this.getActiveSender.deviceCode : '';
},
transStationOption() {
// const list = [...this.getTableData, {code:'', name: 'GSM-R'}];
const list = [...this.getTableData];
return list;
}
},
watch: {
@ -620,7 +724,7 @@ export default {
this.allographRow = null;
},
dispatchCommandState(obj) {
Object.values(obj.cpStateMap).forEach(item => {
obj && Object.values(obj.cpStateMap).forEach(item => {
if (item.cpId) {
if (!this.queryResData.companyStateMap) {
this.queryResData.companyStateMap = {};
@ -633,6 +737,12 @@ export default {
this.getOperateTableHeight();
this.getSearchTableHeight();
this.getTableHeight();
this.getTrainTableHeight();
},
'$store.state.socket.simulationReset': function (val) {
this.queryResData = {};
this.$store.dispatch('socket/setDispatchCommandState', null);
this.initData();
}
},
beforeDestroy() {},
@ -645,8 +755,180 @@ export default {
this.getOperateTableHeight();
this.getSearchTableHeight();
this.getTableHeight();
this.getTrainTableHeight();
},
methods:{
trainAllographCmd() {
if (!this.trainRow) { return; }
const test = `将为【${this.trainRow.trainNum}】次列车,代签 无线调度命令`;
const messageData = [test];
const h = this.$createElement;
messageData.push(h('p', null, '代签之前,请务必与本次列车司机联系确认!'));
messageData.push(h('p', null, '您确定要进行【无线调度命令 代签】操作吗?'));
this.$confirm('提示', {
title: '无线代签操作提示',
message: h('div', null, messageData),
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log('无线受令代签');
const rcId = this.getRcId(this.trainRow.code);
const params = {cmdId: this.command.cmdId, rcId: rcId, proxySign: true};
const operate = {
operation: this.getDomObj('trainAllographCmd').operation,
param: params,
userOperationType: UserOperationType.LEFTCLICK
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
sendCommandNew(this.group, 'CTC_SIGN_DIS_COMMAND', params).then((res) => {
console.log(res, '---res');
this.$message.success('无线受令代签成功!');
this.searchCmd();
this.initData();
}).catch(error => {
this.$messageBox('无线受令代签令失败:' + error.message);
});
}
});
}).catch((err) => {
console.log('取消无线受令代签', err);
});
},
getRcId(val) {
let id = '';
const find = this.command.rcvCompanies.find(item => {
return item.code == val;
});
if (find && find.id) {
id = find.id;
}
return id;
},
getTransStationName(code) {
let name = '';
const find = this.transStationOption.find(item => {
return item.code == code;
});
if (find) {
name = find.name;
}
return name;
},
permissionAdd() {
if (this.permissionWireless) { return; }
const operate = {
operation: this.getDomObj('permissionAddWireless').operation,
userOperationType: UserOperationType.LEFTCLICK
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.permissionWireless = true;
this.initWirelessData();
}
});
},
initWirelessData() {
this.wirelessObj = {
...this.resetWirelessData()
};
this.trainRow = null;
this.trainTableData = [];
},
resetWirelessData() {
return {
type: 'dispatchCmd',
transStationCode: '',
trainNum: '',
code: ''
};
},
findTrainToTable() {
if (!this.wirelessObj.trainNum) {
this.$messageBox('请选择车次号');
return;
}
const operate = {
operation: this.getDomObj('findTrain').operation,
param: {...this.wirelessObj},
userOperationType: UserOperationType.LEFTCLICK
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
sendCommandNew(this.group, 'Train_Query_Trip_Number_Online_Train', {tripNumber: this.wirelessObj.trainNum}).then((res) => {
const code = res.data;
this.wirelessObj.code = code;
const obj = {
name: '',
code: code,
cpType: 'Train',
rsCompany: true,
trainViaGsmR: !this.wirelessObj.transStationCode,
trainNum: this.wirelessObj.trainNum,
transStationCode: this.wirelessObj.transStationCode
};
const index = this.trainTableData.findIndex(item => {
return item.code == code;
});
if (index >= 0) {
this.trainTableData.splice(index, 1, obj);
} else {
this.trainTableData.push(obj);
}
const rcIndex = this.command.rcvCompanies.findIndex(item => {
return item.code == code;
});
if (rcIndex >= 0) {
this.command.rcvCompanies.splice(rcIndex, 1, obj);
} else {
this.command.rcvCompanies.push(obj);
}
}).catch(error => {
this.$messageBox('查找机车失败:' + error.message);
});
}
});
},
deleteTrainTable() {
const operate = {
operation: this.getDomObj('deleteTrainTable').operation,
param: this.trainRow,
userOperationType: UserOperationType.LEFTCLICK
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
const index = this.trainTableData.findIndex(item => {
return item == this.trainRow;
});
if (index >= 0) {
this.trainTableData.splice(index, 1);
}
const rcIndex = this.command.rcvCompanies.findIndex(item => {
return item == this.trainRow;
});
if (index >= 0) {
this.command.rcvCompanies.splice(rcIndex, 1);
}
this.trainRow = null;
}
});
},
trainTableRowChange(row) {
this.trainRow = row;
this.setCurrentRow(row, 'table6');
},
getTrainTableHeight() {
const allH = this.$store.state.app.height;
const rightTopH = 241;
const fH = 160;
const tabHeardH = 29;
const paddingH = 10;
const btnH = 40;
let h = allH - rightTopH - fH - tabHeardH - paddingH - btnH;
h = h > 0 ? h : 0;
this.trainTableHeight = h;
},
getDomObj(key) {
return OperationEvent.DispatchCmd.menuButton[key];
},
@ -746,9 +1028,9 @@ export default {
}
});
}
if (state == 'Signed') {
console.log(list, 'list');
}
// if (state == 'Signed') {
// console.log(list, 'list');
// }
return list.reverse();
},
findDisCmdObj(obj, val) {
@ -830,7 +1112,7 @@ export default {
return status;
},
setCurrentRow(obj, refName) {
const tableArr = ['table', 'table1', 'table2', 'table3', 'table4', 'table5'];
const tableArr = ['table', 'table1', 'table2', 'table3', 'table4', 'table5', 'table6'];
tableArr.forEach(key => {
if (key != refName) {
this.$refs[key] && this.$refs[key].setCurrentRow();
@ -849,12 +1131,20 @@ export default {
});
this.setCurrentRow(obj, refName);
this.$refs.table.clearSelection();
this.initWirelessData();
const infoList = this.command.rcvCompanies || [];
infoList.forEach(item => {
if (item.cpType == 'Train') {
this.trainTableData.push(item);
if (refName == 'table1') {
this.permissionWireless = true;
}
} else {
const findObj = this.getTableData.find(ii => {
return ii.code == item.code;
});
findObj && this.$refs.table.toggleRowSelection(findObj, true);
}
});
},
getSignedBy(info) {
@ -990,6 +1280,8 @@ export default {
this.command = {
...this.resetData()
};
this.initWirelessData();
this.permissionWireless = false;
// this.currentInfo = {};
this.$refs.table && this.$refs.table.clearSelection();
this.$refs.form && this.$refs.form.resetFields();
@ -1032,17 +1324,21 @@ export default {
console.log('tabClick');
},
selectionChange(selection) {
const arr = [];
selection.forEach(item => {
arr.push({
const find = this.command.rcvCompanies.find(every => {
return item.code == every.code;
});
if (!find) {
const obj = {
name: item.name,
rsCompany: true,
cpType: item.cpType,
code: item.code,
...item
};
this.command.rcvCompanies.push(obj);
}
});
});
this.command.rcvCompanies = arr;
},
getCompanyIdList(sum) {
return new Promise((resolve, reject) => {
@ -1125,7 +1421,8 @@ export default {
type: 'warning'
}).then(() => {
console.log('代签');
const params = {cmdId: this.command.cmdId, rcId: this.allographRow.cpId, proxySign: true};
const rcId = this.getRcId(this.allographRow.code);
const params = {cmdId: this.command.cmdId, rcId: rcId, proxySign: true};
const operate = {
operation: this.getDomObj('allographCmd').operation,
param: params,
@ -1143,8 +1440,8 @@ export default {
});
}
});
}).catch(() => {
console.log('取消代签');
}).catch((err) => {
console.log('取消代签', err);
});
},
sendCmd() {
@ -1152,7 +1449,8 @@ export default {
const messageData = [test];
const h = this.$createElement;
this.command.rcvCompanies.forEach((item, index) => {
const msg = `${index + 1}. ${item.name || ''}`;
const txtTrainNum = item.trainNum ? item.trainNum + '车次' : '';
const msg = `${index + 1}. ${item.name || ''} ${txtTrainNum}`;
messageData.push(h('p', null, msg));
});
this.$confirm('提示', {
@ -1302,7 +1600,7 @@ export default {
content: "";
position: absolute;
}
.middle, .left {
.middle, .left, .right {
.middle-padding {
padding-right: 5px;
}
@ -1324,6 +1622,19 @@ export default {
align-items: center;
}
}
.right {
height: 100%;
.right-top {
.word-box {
padding: 5px;
height: 200px;
overflow: auto;
}
}
.wirelessTab-footer {
height: 40px;
}
}
}
</style>
<style lang="scss">

View File

@ -7,9 +7,9 @@
<div id="deleteRunplan" class="dispatcherLogerClickBtn" @click="deleteRunplan">删除</div>
<div id="sendRunplan" class="dispatcherLogerClickBtn" @click="sendRunplan">发送计划</div>
</div>
<div class="closeDL">
<!-- <div class="closeDL">
<i class="el-icon-close close_icon" @click.stop="doClose" />
</div>
</div> -->
</div>
<div class="dispatcherLogerContent" :style="{'height':height+'px'}">
<el-table
@ -204,7 +204,7 @@ export default {
},
data() {
return {
height: this.$store.state.app.height - 37,
height: this.$store.state.app.height - 38,
filterSectionList:[],
mapStationDirectionData:[],
// filterSectionMap:{},
@ -254,6 +254,7 @@ export default {
this.group = this.$route.query.group;
this.loadFilterSectionMap();
this.mapStationDirectionData = Object.values(this.$store.state.map.mapStationDirectionData);
this.loadData();
},
beforeDestroy() {
this.rpMenuPopShow = false;

View File

@ -0,0 +1,65 @@
<template>
<div>
<component :is="menus" :selected="selected" />
<station-diagram ref="stationDiagram" @setSelected="setSelected" />
</div>
</template>
<script>
import StationDiagram from '../stationDiagram/index';
// import {mapGetters} from 'vuex';
import { clearSubscribe, getTopic} from '@/utils/stomp';
export default {
name: 'DriverAtsWork',
components: {
StationDiagram
},
data() {
return {
menus: null,
selected: null
};
},
computed: {
mapData() {
return this.$store.state.map.map;
},
group() {
return this.$route.query.group;
},
mapDevice() {
return this.$store.state.map.mapDevice;
}
},
watch: {
//
'$store.state.map.mapDataLoadedCount': function () {
const lineCode = this.$jlmap.lineCode;
if (lineCode) {
this.menus = this.$theme.loadDriverAtsWorkMenuComponent(lineCode);
}
},
'$store.state.map.initJlmapLoadedCount': function (val) {
this.handleDispatchWorkData();
}
},
beforeDestroy() {
clearSubscribe(getTopic('ATS_STATUS', this.group));
},
methods: {
setSelected(val) {
this.selected = val;
},
handleDispatchWorkData() {
const logicData = {routeData:this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData};
const repaint = this.$store.state.map.initJlmapLoadedCount === 1;
const width = this.$store.state.app.width;
const height = this.$store.state.app.height;
this.$store.dispatch('config/resize', { width, height });
this.$jlmap.resize({ width, height });
this.$nextTick(()=>{
this.$jlmap.setMap(this.mapData, this.mapDevice, logicData, repaint);
});
}
}
};
</script>

View File

@ -0,0 +1,272 @@
<template>
<div class="equipmentConstructionTable">
<div style="text-align: right;">
<el-button :id="constructionFill.constructionInput.domId" size="small" class="addConstruction" type="primary" @click="add">新增</el-button>
</div>
<el-table
:data="tableData"
style="width:100%"
:height="tableHeight"
>
<el-table-column label="请求施工(慢行及封锁)登记">
<el-table-column prop="no" label="本月施工编号" width="120">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="constructionFill.num.domId" v-model="scope.row.no" @blur="numChange(scope.row.no)" />
<span v-else>{{ scope.row.no }}</span>
</template>
</el-table-column>
<el-table-column prop="projectName" label="施工项目" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="constructionFill.projectName.domId" v-model="scope.row.projectName" @blur="projectNameChange(scope.row.projectName)" />
<span v-else>{{ scope.row.projectName }}</span>
</template>
</el-table-column>
<el-table-column prop="requestDate" :label="'月日\n时分'" width="80">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="constructionFill.requestDate.domId" v-model="scope.row.requestDate" @blur="requestDateChange(scope.row.requestDate)" />
<span v-else>{{ scope.row.requestDate }}</span>
</template>
</el-table-column>
<el-table-column prop="requestDetails" :label="'1影响使用范围需要的慢行或封锁条件 \n2施工负责人签名 \n3设备单位检查人签名 \n4车站值班员签名'" width="300">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="constructionFill.requestDetails.domId" v-model="scope.row.requestDetails" @blur="requestDetailsChange(scope.row.requestDetails)" />
<span v-else>{{ scope.row.requestDetails }}</span>
</template>
</el-table-column>
<el-table-column prop="planSpendTime" :label="'所需\n时分'" width="80">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="constructionFill.planSpendTime.domId" v-model="scope.row.planSpendTime" @blur="planSpendTimeChange(scope.row.planSpendTime)" />
<span v-else>{{ scope.row.planSpendTime }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="承认施工">
<el-table-column prop="acceptDetail" :label="'1命令号及发令时间\n2慢行及封锁起止时间\n3设备单位检查人签名\n4车站值班员签名'" width="200">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="constructionFill.acceptDetail.domId" v-model="scope.row.acceptDetail" @blur="acceptDetailChange(scope.row.acceptDetail)" />
<span v-else>{{ scope.row.acceptDetail }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="施工后开通检查确认、销记">
<el-table-column prop="confirmReviewDate" :label="'月日\n时分'" width="80">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="constructionFill.confirmReviewDate.domId" v-model="scope.row.confirmReviewDate" @blur="confirmReviewDateChange(scope.row.confirmReviewDate)" />
<span v-else>{{ scope.row.confirmReviewDate }}</span>
</template>
</el-table-column>
<el-table-column prop="confirmReviewDetail" :label="'1影响使用范围需要的慢行或封锁条件\n2施工负责人签名\n3设备单位检查人签名\n4车站值班员签名'" width="300">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="constructionFill.confirmReviewDetail.domId" v-model="scope.row.confirmReviewDetail" @blur="confirmReviewDetailChange(scope.row.confirmReviewDetail)" />
<span v-else>{{ scope.row.confirmReviewDetail }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="施工开通">
<el-table-column prop="constructionOpenDetail" :label="'1开通恢复常速命令号及开通时间\n2施工负责人签名\n3设备单位检查人签名\n4车站值班员签名'" width="300">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="constructionFill.constructionOpenDetail.domId" v-model="scope.row.constructionOpenDetail" @blur="constructionOpenDetailChange(scope.row.constructionOpenDetail)" />
<span v-else>{{ scope.row.constructionOpenDetail }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="备注" prop="remark">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="constructionFill.remark.domId" v-model="scope.row.remark" @blur="remarkChange(scope.row.remark)" />
<span v-else>{{ scope.row.remark }}</span>
</template>
</el-table-column>
<el-table-column label="" width="60">
<template slot-scope="scope">
<el-button v-if="dataIndex === scope.$index" :id="constructionFillIn.domId" type="text" size="small" @click="saveData(scope.row, scope.$index)">保存</el-button>
<!-- :id="railFillInRegister.domId" -->
<!-- <el-button v-else type="text" size="small" @click="modifyData(scope.row, scope.$index)">修改</el-button> -->
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { sendCommandNew } from '@/api/jmap/training';
export default {
name:'EquipmentConstructionTable',
data() {
return {
tableData:[],
isEditing:false, //
// isAdd:false, //
dataIndex: null
};
},
computed: {
group() {
return this.$route.query.group;
},
constructionFill() {
return OperationEvent.RailCommand.equipmentConstructionFill;
},
constructionFillIn() {
return OperationEvent.RailCommand.equipmentConstructionFill.menu;
},
tableHeight() {
const allH = this.$store.state.app.height;
let h = allH - 63 - 39 - 30 - 42;
h = h > 0 ? h : 0;
return h;
}
},
mounted() {
this.queryData();
},
methods:{
add() {
const operate = {
start: true,
operation: this.constructionFill.constructionInput.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (!this.isEditing) {
const data = {
no: '', //
projectName: '', //
requestDate: '', //
requestDetails: '', //
planSpendTime:'', //
acceptDetail:'', //
confirmReviewDate:'', //
confirmReviewDetail:'', //
constructionOpenDetail:'', //
remark:'' //
};
this.dataIndex = this.tableData.length || 0;
this.tableData.push(data);
this.isEditing = true;
this.isAdd = true;
}
});
},
queryData() {
const params = { stationCode: this.$store.state.training.roleDeviceCode};
sendCommandNew(this.group, 'EQUIPMENT_CONSTRUCTION_INFO_QUERY', params).then((res) => {
this.tableData = res.data;
this.dataIndex = null;
}).catch(() => {
this.$message.error('查询行车设备施工登记簿失败!');
});
},
numChange(val) {
const operate = {
operation: this.constructionFill.num.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
projectNameChange(val) {
const operate = {
operation: this.constructionFill.projectName.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
requestDateChange(val) {
const operate = {
operation: this.constructionFill.requestDate.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
requestDetailsChange(val) {
const operate = {
operation: this.constructionFill.requestDetails.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
planSpendTimeChange(val) {
const operate = {
operation: this.constructionFill.planSpendTime.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
acceptDetailChange(val) {
const operate = {
operation: this.constructionFill.acceptDetail.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
confirmReviewDateChange(val) {
const operate = {
operation: this.constructionFill.confirmReviewDate.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
confirmReviewDetailChange(val) {
const operate = {
operation: this.constructionFill.confirmReviewDetail.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
constructionOpenDetailChange(val) {
const operate = {
operation: this.constructionFill.constructionOpenDetail.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
remarkChange(val) {
const operate = {
operation: this.constructionFill.remark.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
saveData(data, index) {
// if (this.isAdd) {
const params = Object.assign({stationCode:this.$store.state.training.roleDeviceCode}, data);
const operate = {
operation: this.constructionFillIn.operation,
param: params
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
sendCommandNew(this.group, 'EQUIPMENT_CONSTRUCTION_INFO_SAVE', params).then((res) => {
this.$message.success('保存成功!');
this.queryData();
this.isEditing = false;
this.isAdd = false;
}).catch(() => {
this.$message.error('保存行车设备施工登记簿失败!');
});
}
});
// }
// }else{
// }
}
// modifyData(data, index) {
// this.dataIndex = index;
// // this.isAdd = false;
// }
}
};
</script>
<style lang="scss">
.equipmentConstructionTable{
width:91%;margin-left:15px
}
.el-table .cell {
white-space: pre-line;
}
.addConstruction{
margin-right: 20px;
margin-bottom: 10px;
}
</style>

View File

@ -0,0 +1,378 @@
<template>
<div>
<table>
<tr>
<td colspan="8" align="center">防洪安全上岗签到表</td>
</tr>
<tr>
<td colspan="2">
<div class="td-div">
<span>车站</span>
<div class="td-div-input">
<el-select :id="formInput.stationCode.domId" v-model="form.stationCode" size="mini" disabled placeholder="请选择" class="autoWidth" @change="blurChange('stationCode')">
<el-option
v-for="item in getStationList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</div>
</td>
<td colspan="4">
<div class="td-div">
<span>车站值班员</span>
<div class="td-div-input">
<el-input :id="formInput.supervisor.domId" v-model="form.supervisor" size="mini" :disabled="!isUpdate" @blur="blurChange('supervisor')" />
</div>
</div></td>
<td colspan="2">
<div class="td-div">
<span>日期</span>
<div class="td-div-input">
<el-date-picker :id="formInput.signDateStr.domId" v-model="form.signDateStr" type="date" size="mini" format="yyyy年MM月dd日" value-format="yyyy年MM月dd日" placeholder="选择日期" class="autoWidth" :disabled="!isUpdate" @change="blurChange('signDateStr')" />
</div>
</div></td>
</tr>
<tr>
<td colspan="8" align="center">车站值班员收发通知记录表</td>
</tr>
<tr>
<td align="center">汇报人姓名</td>
<td align="center">通知车站时间</td>
<td align="center">通知方式</td>
<td align="center">险情类别</td>
<td align="center">雨量值</td>
<td align="center">通知站长时间</td>
<td align="center">站长到岗时间</td>
<td align="center">站长签名</td>
</tr>
<tr>
<td> <el-input :id="formInput.supervisorNoticeInfoReporter.domId" v-model="form.supervisorNoticeInfo.reporter" size="mini" :disabled="!isUpdate" @blur="blurChange('supervisorNoticeInfo','reporter')" /> </td>
<td>
<el-date-picker :id="formInput.supervisorNoticeInfoNoticeStationTime.domId" v-model="form.supervisorNoticeInfo.noticeStationTime" type="datetime" size="mini" format="yyyy年MM月dd日 HH:mm:ss" value-format="yyyy年MM月dd日 HH:mm:ss" placeholder="选择日期时间" class="dateTime" :disabled="!isUpdate" @change="blurChange('supervisorNoticeInfo','noticeStationTime')" />
</td>
<td> <el-input :id="formInput.supervisorNoticeInfoNoticeModel.domId" v-model="form.supervisorNoticeInfo.noticeModel" size="mini" :disabled="!isUpdate" @blur="blurChange('supervisorNoticeInfo','noticeModel')" /> </td>
<td> <el-input :id="formInput.supervisorNoticeInfoHazardCategory.domId" v-model="form.supervisorNoticeInfo.hazardCategory" size="mini" :disabled="!isUpdate" @blur="blurChange('supervisorNoticeInfo','hazardCategory')" /> </td>
<td> <el-input :id="formInput.supervisorNoticeInfoRainfallLevel.domId" v-model="form.supervisorNoticeInfo.rainfallLevel" size="mini" :disabled="!isUpdate" @blur="blurChange('supervisorNoticeInfo','rainfallLevel')" /> </td>
<td>
<el-date-picker :id="formInput.supervisorNoticeInfoNoticeStationMasterTime.domId" v-model="form.supervisorNoticeInfo.noticeStationMasterTime" type="datetime" size="mini" format="yyyy年MM月dd日 HH:mm:ss" value-format="yyyy年MM月dd日 HH:mm:ss" placeholder="选择日期时间" class="dateTime" :disabled="!isUpdate" @change="blurChange('supervisorNoticeInfo','noticeStationMasterTime')" />
</td>
<td>
<el-date-picker :id="formInput.supervisorNoticeInfoStationMasterArrivalTime.domId" v-model="form.supervisorNoticeInfo.stationMasterArrivalTime" type="datetime" size="mini" format="yyyy年MM月dd日 HH:mm:ss" value-format="yyyy年MM月dd日 HH:mm:ss" placeholder="选择日期时间" class="dateTime" :disabled="!isUpdate" @change="blurChange('supervisorNoticeInfo','stationMasterArrivalTime')" />
</td>
<td> <el-input :id="formInput.supervisorNoticeInfoStationMasterSign.domId" v-model="form.supervisorNoticeInfo.stationMasterSign" size="mini" :disabled="!isUpdate" @blur="blurChange('supervisorNoticeInfo','stationMasterSign')" /> </td>
</tr>
<tr>
<td colspan="4">发生雨量值或险情地点<el-input :id="formInput.supervisorNoticeInfoOccurredSite.domId" v-model="form.supervisorNoticeInfo.occurredSite" type="textarea" :autosize="{ minRows: 2 }" size="mini" :disabled="!isUpdate" @blur="blurChange('supervisorNoticeInfo','occurredSite')" /></td>
<td colspan="4">行车要求<el-input :id="formInput.supervisorNoticeInfoDrivingRequirement.domId" v-model="form.supervisorNoticeInfo.drivingRequirement" type="textarea" :autosize="{ minRows: 2 }" size="mini" :disabled="!isUpdate" @blur="blurChange('supervisorNoticeInfo','drivingRequirement')" /></td>
</tr>
<tr>
<td colspan="8" />
</tr>
<tr>
<td colspan="8" align="center">站长通知战区防洪小组记录表</td>
</tr>
<tr>
<td align="center">序号</td>
<td colspan="2" align="center">通知单位名称</td>
<td align="center">接收人姓名</td>
<td align="center">通知时间</td>
<td align="center">通知方式</td>
<td colspan="2" align="center">备注</td>
</tr>
<tr v-for="(item, index) in form.stationMasterNoticeList" :key="index">
<td align="center"><span>{{ index + 1 }}</span></td>
<td colspan="2"><el-input :id="formInput['stationMasterNoticeListDepartment' + index].domId" v-model="item.department" size="mini" :disabled="!isUpdate" @blur="listChange('stationMasterNoticeList','department', index)" /></td>
<td><el-input :id="formInput['stationMasterNoticeListReceiver' + index].domId" v-model="item.receiver" size="mini" :disabled="!isUpdate" @blur="listChange('stationMasterNoticeList','receiver', index)" /></td>
<td>
<el-date-picker :id="formInput['stationMasterNoticeListNoticeTime' + index].domId" v-model="item.noticeTime" type="datetime" size="mini" format="yyyy年MM月dd日 HH:mm:ss" value-format="yyyy年MM月dd日 HH:mm:ss" placeholder="选择日期时间" class="dateTime" :disabled="!isUpdate" @change="listChange('stationMasterNoticeList','noticeTime', index)" />
</td>
<td><el-input :id="formInput['stationMasterNoticeListNoticeModel' + index].domId" v-model="item.noticeModel" size="mini" :disabled="!isUpdate" @blur="listChange('stationMasterNoticeList','noticeModel', index)" /></td>
<td colspan="2"><el-input :id="formInput['stationMasterNoticeListRemark' + index].domId" v-model="item.remark" size="mini" :disabled="!isUpdate" @blur="listChange('stationMasterNoticeList','remark', index)" /></td>
</tr>
<tr>
<td colspan="8" />
</tr>
<tr>
<td colspan="8" align="center">战区防洪人员签到记录表</td>
</tr>
<tr>
<td align="center">序号</td>
<td colspan="2" align="center">单位名称工区</td>
<td align="center">到达时间</td>
<td align="center">职务</td>
<td align="center">联系电话</td>
<td align="center">签名</td>
<td align="center">返回时间</td>
</tr>
<tr v-for="(item, index) in form.workerSignInfoList" :key="'workerSignInfoList' + index">
<td align="center"><span>{{ index + 1 }}</span></td>
<td colspan="2"><el-input :id="formInput['workerSignInfoListDepartment' + index].domId" v-model="item.department" size="mini" :disabled="!isUpdate" @blur="listChange('workerSignInfoList','department', index)" /></td>
<td>
<el-date-picker :id="formInput['workerSignInfoListArriveTime' + index].domId" v-model="item.arriveTime" type="datetime" size="mini" format="yyyy年MM月dd日 HH:mm:ss" value-format="yyyy年MM月dd日 HH:mm:ss" placeholder="选择日期时间" class="dateTime" :disabled="!isUpdate" @change="listChange('workerSignInfoList','arriveTime', index)" />
</td>
<td><el-input :id="formInput['workerSignInfoListAppointment' + index].domId" v-model="item.appointment" size="mini" :disabled="!isUpdate" @blur="listChange('workerSignInfoList','appointment', index)" /></td>
<td><el-input :id="formInput['workerSignInfoListTelephone' + index].domId" v-model="item.telephone" size="mini" :disabled="!isUpdate" @blur="listChange('workerSignInfoList','telephone', index)" /></td>
<td><el-input :id="formInput['workerSignInfoListSign' + index].domId" v-model="item.sign" size="mini" :disabled="!isUpdate" @blur="listChange('workerSignInfoList','sign', index)" /></td>
<td>
<el-date-picker :id="formInput['workerSignInfoListReturnTime' + index].domId" v-model="item.returnTime" type="datetime" size="mini" format="yyyy年MM月dd日 HH:mm:ss" value-format="yyyy年MM月dd日 HH:mm:ss" placeholder="选择日期时间" class="dateTime" :disabled="!isUpdate" @change="listChange('workerSignInfoList','returnTime', index)" />
</td>
</tr>
</table>
<div class="footer">
<el-button v-if="active == 'write'" :id="formInput.submit.domId" type="primary" size="mini" @click="submit">提交</el-button>
<el-button v-if="active == 'search'" :id="formInput.update.domId" :disabled="!isEdit" type="primary" size="mini" @click="update">更新</el-button>
<el-button v-if="active == 'search'" size="mini" @click="changeEdit">{{ isEdit ? '取消' : '编辑' }}</el-button>
</div>
</div>
</template>
<script>
import { deepAssign } from '@/utils/index';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { sendCommandNew } from '@/api/jmap/training';
export default {
name: 'ControlTable',
props: {
info:{
type: Object,
default() {
return {};
}
},
active: {
type: String,
default() {
return '';
}
}
},
data() {
return {
isEdit: false,
form: {}
};
},
computed: {
group() {
return this.$route.query.group;
},
stationCode() {
return this.$store.state.training.roleDeviceCode;
},
formInput() {
return OperationEvent.FloodSafetyRegister.formInput;
},
isUpdate() {
return (this.active == 'search' && this.isEdit) || this.active == 'write';
},
getStationList() {
const sList = [];
const filterArr = this.$store.state.training.memberList.filter(item => {
return item.type == 'STATION_SUPERVISOR';
});
filterArr.forEach(item => {
const name = this.getDeviceName(item.deviceCode);
sList.push({
value: item.deviceCode,
label: name
});
});
return sList;
}
},
created() {
if (this.active == 'write') {
this.initFormData();
} else {
this.getInfoData();
}
},
methods: {
getDeviceName(receiverId) {
let name = '';
if (receiverId) {
const device = this.$store.getters['map/getDeviceByCode'](receiverId);
name = device ? device.name : '';
}
return name;
},
listChange(listKey, key, index) {
const val = this.form[listKey][index][key];
const n = listKey + key[0].toUpperCase() + key.substr(1);
const operate = {
operation: this.formInput[n + index].operation,
param: {val: val}
};
this.$store.dispatch('trainingNew/next', operate);
},
blurChange() {
const argList = [...arguments];
let key = '';
let val = '';
argList.forEach((item, index) => {
if (index == 0) {
val = this.form[item];
key = item;
} else {
val = val[item];
const n = item[0].toUpperCase() + item.substr(1);
key += n;
}
});
const operate = {
operation: this.formInput[key].operation,
param: {val: val}
};
this.$store.dispatch('trainingNew/next', operate);
},
initNoticeData() {
const list = [];
const nameArr = ['', '', ''];
nameArr.forEach(name => {
const obj = {
department: '',
receiver: '',
noticeTime: '',
noticeModel: '',
remark: ''
};
list.push(obj);
});
return list;
},
initSignInfoData() {
const list = [];
const nameArr = ['', '', ''];
nameArr.forEach(name => {
const obj = {
department: '',
arriveTime: '',
appointment: '',
telephone: '',
sign: '',
returnTime: ''
};
list.push(obj);
});
return list;
},
getInfoData() {
const obj = deepAssign({}, this.info);
this.form = obj;
},
submit() {
const obj = deepAssign({}, this.form);
delete obj.id;
const operate = {
operation: this.formInput.submit.operation,
param: obj
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
sendCommandNew(this.group, 'CONTROL_FLOOD_SIGN_SAVE', obj).then((res) => {
console.log(res, '---res');
this.$message.success('提交成功!');
this.initFormData();
}).catch(error => {
this.$messageBox('提交失败:' + error.message);
});
}
});
},
update() {
const obj = deepAssign({}, this.form);
const operate = {
operation: this.formInput.update.operation,
param: obj
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
sendCommandNew(this.group, 'CONTROL_FLOOD_SIGN_UPDATE', obj).then((res) => {
console.log(res, '---res');
this.$message.success('更新成功!');
this.isEdit = false;
}).catch(error => {
this.$messageBox('更新失败:' + error.message);
});
}
});
},
changeEdit() {
if (this.isEdit) {
this.getInfoData();
}
this.isEdit = !this.isEdit;
},
initFormData() {
this.form = {
id: '',
stationCode: this.stationCode,
supervisor: '',
signDateStr: '',
supervisorNoticeInfo: { //
reporter:'',
noticeStationTime:'',
noticeModel:'',
hazardCategory:'',
rainfallLevel:'',
noticeStationMasterTime:'',
stationMasterArrivalTime:'',
stationMasterSign:'',
occurredSite:'',
drivingRequirement:''
},
stationMasterNoticeList: this.initNoticeData(), //
workerSignInfoList: this.initSignInfoData() //
};
}
}
};
</script>
<style scoped lang="scss">
table {
table-layout: fixed;
border-collapse: collapse;
border-spacing: 0;
td {
padding: 5px;
border: 1px solid black !important;
}
}
.td-div {
white-space:nowrap;
display: flex;
align-items: center;
.td-div-input {
width: 100%;
}
}
.timeInput {
width: 40px;
/deep/ .el-input__inner {
padding: 0 10px !important;
border: none !important;
border-radius: 0px;
border-bottom: 1px solid #DCDFE6 !important;
}
}
.autoWidth {
width: 100%;
}
.dateTime {
min-width: 200px;
}
.checkBtn {
width: 100%;
height: 28px;
}
.footer {
height: 50px;
display: flex;
justify-content: center;
align-items: center;
}
</style>

View File

@ -0,0 +1,110 @@
<template>
<div>
<el-tabs :id="typeChange.domId" v-model="activeName" type="card" @tab-click="tabClick">
<el-tab-pane label="填写" name="write">
<div ref="writeTabPane" class="write-box" :style="{height: boxHeight + 'px'}">
<ControlTable :active="activeName" />
</div>
</el-tab-pane>
<el-tab-pane label="查询" name="search">
<div v-if="activeName == 'search'" class="search-box" :style="{height: boxHeight + 'px'}">
<div v-for="(item, index) in searchList" :key="index" class="search-item">
<ControlTable :active="activeName" :info="item" />
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import ControlTable from './controlTable';
import { sendCommandNew } from '@/api/jmap/training';
import { UserOperationType } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'Index',
components: {
ControlTable
},
data() {
return {
activeName: 'write',
searchList: []
};
},
computed: {
group() {
return this.$route.query.group;
},
typeChange() {
return OperationEvent.FloodSafetyRegister.tabType.typeChange;
},
formInput() {
return OperationEvent.FloodSafetyRegister.formInput;
},
boxHeight() {
const allH = this.$store.state.app.height;
let h = allH - 63 - 39 - 30 - 41 - 15 - 20;
h = h > 0 ? h : 0;
return h;
}
},
watch: {
activeName() {
if (this.activeName == 'search') {
this.getSearchList();
}
}
},
mounted() {
this.$refs.writeTabPane.addEventListener('scroll', this.handleScroll);
},
beforeDestroy() {
this.$refs.writeTabPane.removeEventListener('scroll', this.handleScroll);
},
methods: {
handleScroll() {
this.$nextTick(() => {
this.$store.dispatch('training/emitTipFresh');
});
},
tabClick() {
const operate = {
operation: this.typeChange.operation,
param: {val: this.activeName},
userOperationType: UserOperationType.LEFTCLICK
};
this.$store.dispatch('trainingNew/next', operate);
},
getSearchList() {
const params = { stationCode: this.$store.state.training.roleDeviceCode};
sendCommandNew(this.group, 'CONTROL_FLOOD_SIGN_QUERY', params).then((res) => {
console.log(res, '-QUERY--res');
this.searchList = res.data;
}).catch(error => {
console.log('查询失败!', error);
});
}
}
};
</script>
<style scoped >
.write-box {
overflow: auto;
display: flex;
justify-content: center;
position: relative;
margin: 10px;
}
.search-box {
overflow: auto;
display: flex;
flex-direction: column;
align-items: center;
}
.search-item {
margin: 10px;
}
</style>

View File

@ -25,7 +25,7 @@
<train-ticket v-else-if="picture === 'trainTicket'" ref="trainTicket" />
<diagram-load v-else-if="picture === 'diagramLoad'" ref="diagramLoad" :group="group" />
<diagram-preview v-else-if="picture === 'diagramPreview'" ref="diagramPreview" />
<diagram-edit v-else-if="picture === 'diagramEdit'" ref="diagramEdit" />
<diagram-edit v-else-if="picture === 'diagramEdit'" ref="diagramEdit" :plan-id="loadPlanId" @pictureChange="pictureChangeAndPlan" />
<pis-terminal v-else-if="picture === 'pis'" ref="pisTerminal" />
<display-ba-si-di v-else-if="picture === 'baSiDi'" ref="displayBaSiDi" @pictureChange="pictureChange" />
<tro-work v-else-if="picture === 'troWork'" ref="troWork" />
@ -33,6 +33,10 @@
<jl3d-maintainer-select v-else-if="picture === 'maintainerSelect'" ref="jl3dMaintainerSelect" />
<interlock-work v-if="picture=='interlockWork'" ref="interlockWork" :centralized-station-map="centralizedStationMap" />
<test-runplan v-if="picture=='testRunplan'" ref="testRunplan" :plan-id="loadPlanId" @pictureChange="pictureChangeAndPlan" />
<driver-ats-work v-if="picture=='driverAtsWork'" ref="driverAtsWork" />
<!-- driverAtsWork -->
<terminal-menu
v-if="menuShow"
ref="terminalMenu"
@ -79,6 +83,8 @@ import DiagramEdit from './diagramEdit/index';
import DisplayBaSiDi from './displayBaSiDi/index';
import TroWork from './troWork';
import TroDetailWork from './troDetailWork';
import TestRunplan from './testRunplan';
import DriverAtsWork from './driverAtsWork';
export default {
name: 'Index',
@ -113,11 +119,14 @@ export default {
DiagramEdit,
DisplayBaSiDi,
TroDetailWork,
Jl3dMaintainerSelect
Jl3dMaintainerSelect,
TestRunplan,
DriverAtsWork
},
data() {
return {
picture: '',
loadPlanId:'',
centralizedStationList: [],
centralizedStationMap: {},
loading: false,
@ -176,6 +185,11 @@ export default {
this.showStationCode = device.code;
this.pictureChange('troDetailWork');
}
},
'$store.state.socket.simulationReset': function (val) { // 仿
if (val) {
this.simulationReset(val);
}
}
},
mounted() {
@ -247,6 +261,10 @@ export default {
loadingChange() {
this.loading = true;
},
pictureChangeAndPlan(data) {
this.pictureChange(data.name);
this.loadPlanId = data.planId;
},
pictureChange(val) {
this.picture = val;
this.$store.dispatch('map/setPicture', this.picture);
@ -302,6 +320,14 @@ export default {
mapViewLoaded(loading) {
this.loading = loading;
this.$store.dispatch('app/animationsClose');
},
simulationReset() {
this.$store.dispatch('socket/setSimulationStart');// 仿-
this.$store.dispatch('map/initClearTrainData'); //
this.$store.dispatch('map/setTrainWindowShow', false); //
this.$store.dispatch('training/over'); // -
this.$store.dispatch('map/resetActiveTrainList'); //
this.$store.dispatch('training/setMapDefaultState'); //
}
}
};

View File

@ -3,7 +3,7 @@
<div style="width: 50%;position: relative;left: 25%;">
<div class="psl-title">
<div>PSL</div>
<el-select v-model="standCode" style="margin-left: 10px;">
<el-select :id="psl.standChange.change.domId" v-model="standCode" style="margin-left: 10px;" @change="standCodeChange">
<el-option
v-for="item in standList"
:key="item.code"
@ -40,7 +40,7 @@
</div>
</div>
<div class="content-row">
<div class="cell btn">
<div :id="psl.pslOperation.turn.domId" class="cell btn">
<div class="btn-text">禁止</div>
<img
:src="getIcon('key')"
@ -49,7 +49,7 @@
>
<div class="btn-text-opt">允许</div>
</div>
<div class="cell btn">
<div :id="psl.hsjcOperation.turn.domId" class="cell btn">
<div class="btn-text">禁止</div>
<img
:src="getIcon('key')"
@ -60,17 +60,17 @@
</div>
</div>
<div class="content-row">
<div class="cell btn">
<div :id="psl.openDoor.button.domId" class="cell btn">
<div class="btn-text">开门按钮</div>
<img :src="getIcon('red', 'btn')" @click="btnClickHandler('KM')">
</div>
<div class="cell btn">
<div :id="psl.closeDoor.button.domId" class="cell btn">
<div class="btn-text">关门按钮</div>
<img :src="getIcon('green', 'btn')" @click="btnClickHandler('GM')">
</div>
</div>
<div class="content-row">
<div class="cell btn">
<div :id="psl.testLamp.button.domId" class="cell btn">
<div class="btn-text">试灯按钮</div>
<img
class="btn-sd btn-img"
@ -87,8 +87,10 @@
<script>
import icons from '@/assets/psl_images/psl_icons';
import { getPslStatus, pressPslButton } from '@/api/simulation';
import { getPslStatus } from '@/api/simulation';
import {mapGetters} from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'PSL',
data() {
@ -112,6 +114,9 @@ export default {
]),
group() {
return this.$route.query.group;
},
psl() {
return OperationEvent.Psl;
}
},
watch: {
@ -147,9 +152,23 @@ export default {
this.indicators = resp.data;
}
})
.catch(err => {});
.catch(() => {});
},
standCodeChange(val) {
const operate = {
start: true,
over: true,
operation: OperationEvent.Psl.standChange.change.operation,
param: {
standCode: val
}
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.initData(this.group, this.standCode);
}
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
@ -159,7 +178,25 @@ export default {
return status !== undefined ? icons[`${type}_${status}`] : icons[type];
},
btnClickHandler(btnType) {
pressPslButton(this.group, this.standCode, btnType);
const operationMap = {
YXJZ: this.psl.pslOperation.turn.operation,
HSJC: this.psl.hsjcOperation.turn.operation,
KM: this.psl.openDoor.button.operation,
GM: this.psl.closeDoor.button.operation,
SD: this.psl.testLamp.button.operation
};
const operate = {
start: true,
send: true,
operation: operationMap[btnType],
cmdType: CMD.PSL.CMD_PSL_PRESS_BUTTON,
param: {
standCode: this.standCode,
button: btnType
}
};
this.$store.dispatch('trainingNew/next', operate);
// pressPslButton(this.group, this.standCode, btnType);
}
}
};

View File

@ -1,47 +1,50 @@
<template>
<div>
<div style="height: 100%">
<div style="padding: 20px;font-size: 20px;text-align: center;">簿册</div>
<el-tabs :id="registerInput.tabs.domId" v-model="activeName" type="border-card" style="height: 100%" @tab-click="tabClick">
<el-tab-pane label="行车设备检查登记簿" name="first">
<div style="text-align: right;">
<el-button size="small" style="margin-right: 20px;margin-bottom: 10px;" type="primary" @click="add">新增</el-button>
<el-button :id="registerInput.addData.domId" size="small" style="margin-right: 20px;margin-bottom: 10px;" type="primary" @click="add">新增</el-button>
</div>
<el-table
:data="tableData"
style="width: 100%"
:height="tableHeight"
>
<el-table-column prop="date" label="月 日" width="95">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.moonDay" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.moonDay.domId" v-model="scope.row.moonDay" @blur="moonDayChange(scope.row.moonDay)" />
<span v-else>{{ scope.row.moonDay }}</span>
</template>
</el-table-column>
<el-table-column prop="time" label="时 分" width="95">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.hourMinute" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.hourMinute.domId" v-model="scope.row.hourMinute" @blur="hourMinuteChange(scope.row.hourMinute)" />
<span v-else>{{ scope.row.hourMinute }}</span>
</template>
</el-table-column>
<el-table-column prop="checkResult" label="检查试验结果,所发现的不良及破损程度" width="280">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.result" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.result.domId" v-model="scope.row.result" @blur="resultChange(scope.row.result)" />
<span v-else>{{ scope.row.result }}</span>
</template>
</el-table-column>
<el-table-column label="通 知 时 间">
<el-table-column prop="noticeDate" label="月 日" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.noticeTime.moonDay" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeMoonDay.domId" v-model="scope.row.noticeTime.moonDay" @blur="noticeTimeMoonDayChange(scope.row.noticeTime.moonDay)" />
<span v-else>{{ scope.row.noticeTime.moonDay }}</span>
</template>
</el-table-column>
<el-table-column prop="noticeTime" label="时 分" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.noticeTime.hourMinute" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeHourMinute.domId" v-model="scope.row.noticeTime.hourMinute" @blur="noticeTimeHourMinuteChange(scope.row.noticeTime.hourMinute)" />
<span v-else>{{ scope.row.noticeTime.hourMinute }}</span>
</template>
</el-table-column>
<el-table-column prop="noticeWay" label="通知到达的方式" width="130">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.noticeTime.info" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeInfo.domId" v-model="scope.row.noticeTime.info" @blur="noticeTimeInfoChange(scope.row.noticeTime.info)" />
<span v-else>{{ scope.row.noticeTime.info }}</span>
</template>
</el-table-column>
@ -49,19 +52,19 @@
<el-table-column label="到 达 时 间">
<el-table-column prop="arriveDate" label="月 日" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.arriveTime.moonDay" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeMoonDay.domId" v-model="scope.row.arriveTime.moonDay" @blur="arriveTimeMoonDayChange(scope.row.arriveTime.moonDay)" />
<span v-else>{{ scope.row.arriveTime.moonDay }}</span>
</template>
</el-table-column>
<el-table-column prop="arriveTime" label="时 分" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.arriveTime.hourMinute" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeHourMinute.domId" v-model="scope.row.arriveTime.hourMinute" @blur="arriveTimeHourMinuteChange(scope.row.arriveTime.hourMinute)" />
<span v-else>{{ scope.row.arriveTime.hourMinute }}</span>
</template>
</el-table-column>
<el-table-column prop="arriveSeal" label="该段的工作人员到达后盖章" width="200">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.arriveTime.info" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeInfo.domId" v-model="scope.row.arriveTime.info" @blur="arriveTimeInfoChange(scope.row.arriveTime.info)" />
<span v-else>{{ scope.row.arriveTime.info }}</span>
</template>
</el-table-column>
@ -69,47 +72,95 @@
<el-table-column label="销除不良及破损的时分及盖章">
<el-table-column prop="repairDate" label="月 日" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.endTime.moonDay" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.endTimeMoonDay.domId" v-model="scope.row.endTime.moonDay" @blur="endTimeMoonDayChange(scope.row.endTime.moonDay)" />
<span v-else>{{ scope.row.endTime.moonDay }}</span>
</template>
</el-table-column>
<el-table-column prop="repairTime" label="时 分" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.endTime.hourMinute" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.endTimeHourMinute.domId" v-model="scope.row.endTime.hourMinute" @blur="endTimeHourMinuteChange(scope.row.endTime.hourMinute)" />
<span v-else>{{ scope.row.endTime.hourMinute }}</span>
</template>
</el-table-column>
<el-table-column prop="repairReason" label="破损及不良的原因,采用何种办法进行修理的。工作人员及车站值班员盖章。">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.endTime.info" />
<el-input v-if="dataIndex === scope.$index" :id="registerInput.endTimeInfo.domId" v-model="scope.row.endTime.info" @blur="endTimeInfoChange(scope.row.endTime.info)" />
<span v-else>{{ scope.row.endTime.info }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="" width="60">
<template slot-scope="scope">
<el-button v-if="dataIndex === scope.$index" type="text" size="small" @click="saveData(scope.row, scope.$index)">保存</el-button>
<el-button v-if="dataIndex === scope.$index" :id="railFillInRegister.domId" type="text" size="small" @click="saveData(scope.row, scope.$index)">保存</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="行车设备施工登记簿" name="second">
<equipment-construction-table />
</el-tab-pane>
<el-tab-pane label="防洪安全上岗签到表" name="third">
<flood-control-safety-table />
</el-tab-pane>
<el-tab-pane label="非正常情况接发列车关键环节控制表" name="fourth">
<AbnormalTrain />
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import FloodControlSafetyTable from './floodControlSafetyTable/index';
import EquipmentConstructionTable from './equipmentConstructionTable';
import AbnormalTrain from './abnormalTrain/index';
import { sendCommandNew } from '@/api/jmap/training';
// key-link-control-table
export default {
name: 'Index',
components:{
EquipmentConstructionTable,
FloodControlSafetyTable,
AbnormalTrain
},
data() {
return {
activeName: 'first',
tableData: [],
dataIndex: null,
value: ''
};
},
computed: {
group() {
return this.$route.query.group;
},
registerInput() {
return OperationEvent.TicketOrRegister.registerInput;
},
railFillInRegister() {
return OperationEvent.RailCommand.railFillInRegister.menu;
},
tableHeight() {
const allH = this.$store.state.app.height;
let h = allH - 63 - 39 - 30 - 42;
h = h > 0 ? h : 0;
return h;
}
},
mounted() {
this.$store.dispatch('training/emitTipFresh');
this.queryData();
},
methods: {
tabClick() {
const operate = {
operation: this.registerInput.tabs.operation,
param: {val: this.activeName}
};
this.$store.dispatch('trainingNew/next', operate);
},
doClose() {
this.dataIndex = null;
},
@ -118,7 +169,7 @@ export default {
},
queryData() {
const params = { stationCode: this.$store.state.training.roleDeviceCode};
commitOperate(menuOperate.Rail.railQueryRegister, params, 3).then(({valid, operate, response})=>{
sendCommandNew(this.group, 'RAIL_QUERY_REGISTER', params).then((response) => {
this.tableData = response.data ? response.data.lines : [];
this.dataIndex = null;
}).catch(() => {
@ -127,13 +178,27 @@ export default {
},
saveData(data) {
const params = { stationCode: this.$store.state.training.roleDeviceCode, line: data };
commitOperate(menuOperate.Rail.railFillInRegister, params, 3).then(({valid, operate})=>{
const operate = {
operation: this.railFillInRegister.operation,
param: params
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
sendCommandNew(this.group, 'RAIL_FILL_IN_REGISTER', params).then((res) => {
this.$message.success('保存成功!');
this.queryData();
}).catch(() => {
this.$message.error('保存簿册失败!');
});
}
});
},
add() {
const operate = {
start: true,
operation: this.registerInput.addData.operation
};
this.$store.dispatch('trainingNew/next', operate).then(resp => {
const data = {
moonDay: '',
hourMinute: '',
@ -156,6 +221,91 @@ export default {
};
this.dataIndex = this.tableData.length || 0;
this.tableData.push(data);
});
},
moonDayChange(val) {
const operate = {
operation: this.registerInput.moonDay.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
hourMinuteChange(val) {
const operate = {
operation: this.registerInput.hourMinute.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
resultChange(val) {
const operate = {
operation: this.registerInput.result.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeTimeMoonDayChange(val) {
const operate = {
operation: this.registerInput.noticeTimeMoonDay.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeTimeHourMinuteChange(val) {
const operate = {
operation: this.registerInput.noticeTimeHourMinute.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeTimeInfoChange(val) {
const operate = {
operation: this.registerInput.noticeTimeInfo.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
arriveTimeMoonDayChange(val) {
const operate = {
operation: this.registerInput.arriveTimeMoonDay.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
arriveTimeHourMinuteChange(val) {
const operate = {
operation: this.registerInput.arriveTimeHourMinute.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
arriveTimeInfoChange(val) {
const operate = {
operation: this.registerInput.arriveTimeInfo.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
endTimeMoonDayChange(val) {
const operate = {
operation: this.registerInput.endTimeMoonDay.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
endTimeHourMinuteChange(val) {
const operate = {
operation: this.registerInput.endTimeHourMinute.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
},
endTimeInfoChange(val) {
const operate = {
operation: this.registerInput.endTimeInfo.operation,
val: val
};
this.$store.dispatch('trainingNew/next', operate);
}
}
};

View File

@ -1,7 +1,9 @@
<template>
<div>
<div v-if="isShow && terminalList.length" class="terminalList">
<div v-if="isShow && terminalList.length" v-verticalDrag class="terminalList">
<div class="drag-line verticalDrag__header" />
<div v-for="(eachTerminal,index) in terminalList" :key="index" :class="picture==eachTerminal.code?'eachTerminal active':'eachTerminal'" @click="eachTerminal.click(eachTerminal.code)">{{ eachTerminal.name }}</div>
<div class="drag-line verticalDrag__footer" />
</div>
</div>
</template>
@ -76,14 +78,14 @@ export default {
{
name: '路票',
code: 'trainTicket',
roleList: ['STATION_SUPERVISOR', 'STATION_ASSISTANT'],
roleList: ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'DRIVER'],
isShow: () => this.$route.query.simType === 'RAILWAY',
click: this.changePictureShow
},
{
name: '簿册',
code: 'registerBook',
roleList: ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER'],
roleList: ['STATION_SUPERVISOR', 'STATION_MASTER', 'STATION_WORKER', 'ELECTRIC_DISPATCHER', 'STATION_ELECTRIC_WORKER'],
isShow: () => this.$route.query.simType === 'RAILWAY',
click: this.changePictureShow
},
@ -94,6 +96,13 @@ export default {
isShow: () => this.$route.query.simType === 'METRO',
click: this.changePictureShow
},
{
name: '司机ATS工作站',
code: 'driverAtsWork',
roleList: ['DRIVER'],
isShow: () => this.$route.query.simType === 'METRO',
click: this.changePictureShow
},
{
name: '运行图预览',
code: 'diagramPreview',
@ -140,7 +149,7 @@ export default {
name: '司机视角',
code: 'drivingPlan',
roleList: ['DRIVER'],
isShow: () => this.$route.query.simType === 'METRO',
isShow: () => this.$route.query.simType === 'METRO' || this.$route.query.simType === 'RAILWAY',
click: this.changePictureShow
},
{
@ -260,11 +269,19 @@ export default {
initTerminalList() {
this.terminalList = [];
this.commonTerminal.forEach(item => {
if (item.roleList.includes(this.roles) && item.isShow()) {
if (item.roleList.includes(this.roles) && item.isShow() && this.checkClientSet(item)) {
this.terminalList.push(item);
}
});
},
checkClientSet(client) {
const clientSet = this.$store.state.map.map ? this.$store.state.map.map.clientSet : '';
if (clientSet) {
return clientSet.includes(client.code);
} else {
return true;
}
},
noEvent(code) {
this.$emit('pictureChange', code);
},
@ -287,14 +304,18 @@ export default {
this.changePictureShow('maintainerSelect');
} else if (this.roles === 'DRIVER') {
//
this.changePictureShow('drivingPlan');
this.changePictureShow('driverAtsWork');
}
},
changePictureShow(code) {
if (!this.$store.state.map.map.clientSet || this.$store.state.map.map.clientSet.includes(code)) {
this.$emit('loadingChange');
setTimeout(() => {
this.$emit('pictureChange', code);
}, 100);
} else if (this.terminalList[0]) {
this.$emit('pictureChange', this.terminalList[0].code);
}
}
}
};
@ -310,6 +331,10 @@ export default {
border-radius: 5px 0 0 5px;
z-index: 2000;
}
.drag-line {
width: 100%;
height: 5px;
}
.eachTerminal{
padding: 8px 0;
text-align: center;

View File

@ -0,0 +1,73 @@
<template>
<div>
<station-diagram ref="stationDiagram" @setSelected="setSelected" />
<el-button class="backTo" type="primary" size="medium" @click="backTo">返回运行图编制</el-button>
</div>
</template>
<script>
import StationDiagram from '../stationDiagram/index';
import { clearSubscribe, getTopic} from '@/utils/stomp';
export default {
name: 'TestRunplan',
components: {
StationDiagram
},
props:{
planId: {
type: String,
required: true
}
},
data() {
return {
selected: null
};
},
computed: {
mapData() {
return this.$store.state.map.map;
},
mapDevice() {
return this.$store.state.map.mapDevice;
},
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.map.initJlmapLoadedCount': function (val) {
this.handleDispatchWorkData();
}
},
beforeDestroy() {
clearSubscribe(getTopic('ATS_STATUS', this.group));
},
methods: {
setSelected(val) {
this.selected = val;
},
handleDispatchWorkData() {
const logicData = {routeData:this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData};
const repaint = this.$store.state.map.initJlmapLoadedCount === 1;
const width = this.$store.state.app.width;
const height = this.$store.state.app.height;
this.$store.dispatch('config/resize', { width, height });
this.$jlmap.resize({ width, height });
this.$nextTick(()=>{
console.log(this.$store.state.map.picture, this.$route.query.client, '88888888', this.mapData, width, height);
this.$jlmap.setMap(this.mapData, this.mapDevice, logicData, repaint);
});
},
backTo() {
this.$emit('pictureChange', {name:'diagramEdit', planId:this.planId});
}
}
};
</script>
<style lang="scss">
.backTo{
position: absolute;
right: 15px;
top: 15px;
}
</style>

View File

@ -3,36 +3,36 @@
<div style="text-align: center;font-size: 28px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div style="font-size: 14px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 20px;justify-content: end;">
<div></div>
<el-input v-model="greenLicenseForm.number" size="small" :disabled="switchFlag" style="width: 80px;" />
<el-input :id="ticketInput.number.domId" v-model="greenLicenseForm.number" size="small" :disabled="switchFlag" style="width: 80px;" @blur="numberChange" />
<div style="margin-right: 20px;"></div>
</div>
<div style="font-size: 16px;margin-top: 20px;">
<span style="margin-left: 36px;"></span>
<el-radio-group v-model="greenLicenseForm.reason" :disabled="switchFlag" style="display: inline;">
<el-radio-group :id="ticketInput.reason.domId" v-model="greenLicenseForm.reason" :disabled="switchFlag" style="display: inline;" @change="reasonChange">
<el-radio label="出站(进路)信号机故障">出站进路信号机故障</el-radio>
<el-radio label="未设出站信号机" style="margin-left: 5px;">未设出站信号机</el-radio>
<el-radio label="列车头部越过出站(进路)信号机" style="margin-left: 5px;">列车头部越过出站进路信号机</el-radio>
</el-radio-group>
<span>的情况下准许第</span>
<el-input v-model="greenLicenseForm.tripNumber" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.tripNumber.domId" v-model="greenLicenseForm.tripNumber" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="tripNumberChange" />
<span>次列车由</span>
<el-input v-model="greenLicenseForm.line" style="display: inline;" :disabled="switchFlag" size="small" class="inline-input" />
<el-input :id="ticketInput.line.domId" v-model="greenLicenseForm.line" style="display: inline;" :disabled="switchFlag" size="small" class="inline-input" @blur="lineChange" />
<span>线上发车</span>
</div>
<div style="font-size: 16px;margin-top: 60px;display: flex;align-items: center;justify-content: end;">
<div><span style="color: #f00;">{{ greenLicenseForm.stationSeal }}</span>站名印车站值班员签名</div>
<el-input v-model="greenLicenseForm.signature" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.signature.domId" v-model="greenLicenseForm.signature" :disabled="switchFlag" size="small" style="width: 80px;" @blur="signatureChange" />
</div>
<div style="font-size: 16px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 10px;justify-content: end;">
<el-input v-model="greenLicenseForm.year" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.year.domId" v-model="greenLicenseForm.year" :disabled="switchFlag" size="small" style="width: 80px;" @blur="yearChange" />
<div></div>
<el-input v-model="greenLicenseForm.moon" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.moon.domId" v-model="greenLicenseForm.moon" :disabled="switchFlag" size="small" style="width: 80px;" @blur="moonChange" />
<div></div>
<el-input v-model="greenLicenseForm.day" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.day.domId" v-model="greenLicenseForm.day" :disabled="switchFlag" size="small" style="width: 80px;" @blur="dayChange" />
<div>日填发</div>
</div>
<div v-if="switchFlag" style="text-align: center;">
<el-select v-model="memberId" size="small" style="width: 200px" placeholder="请选择">
<el-select :id="ticketInput.memberId.domId" v-model="memberId" size="small" style="width: 200px" placeholder="请选择" @change="memberIdChange">
<el-option
v-for="item in giveMemberList"
:key="item.id"
@ -47,6 +47,7 @@
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'GreenLicence',
props: {
@ -73,6 +74,9 @@ export default {
computed: {
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
},
ticketInput() {
return OperationEvent.TicketOrRegister.ticketInput;
}
},
methods: {
@ -81,6 +85,69 @@ export default {
this.$emit('giveTicket', { ticketId: this.greenLicenseForm.id, memberId: this.memberId });
this.memberId = '';
}
},
numberChange() {
const operate = {
operation: this.ticketInput.number.operation,
val: this.greenLicenseForm.number
};
this.$store.dispatch('trainingNew/next', operate);
},
reasonChange() {
const operate = {
operation: this.ticketInput.reason.operation,
val: this.greenLicenseForm.reason
};
this.$store.dispatch('trainingNew/next', operate);
},
tripNumberChange() {
const operate = {
operation: this.ticketInput.tripNumber.operation,
val: this.greenLicenseForm.tripNumber
};
this.$store.dispatch('trainingNew/next', operate);
},
lineChange() {
const operate = {
operation: this.ticketInput.line.operation,
val: this.greenLicenseForm.line
};
this.$store.dispatch('trainingNew/next', operate);
},
signatureChange() {
const operate = {
operation: this.ticketInput.signature.operation,
val: this.greenLicenseForm.signature
};
this.$store.dispatch('trainingNew/next', operate);
},
yearChange() {
const operate = {
operation: this.ticketInput.year.operation,
val: this.greenLicenseForm.year
};
this.$store.dispatch('trainingNew/next', operate);
},
moonChange() {
const operate = {
operation: this.ticketInput.moon.operation,
val: this.greenLicenseForm.moon
};
this.$store.dispatch('trainingNew/next', operate);
},
dayChange() {
const operate = {
operation: this.ticketInput.day.operation,
val: this.greenLicenseForm.day
};
this.$store.dispatch('trainingNew/next', operate);
},
memberIdChange() {
const operate = {
operation: this.ticketInput.memberId.operation,
val: this.memberId
};
this.$store.dispatch('trainingNew/next', operate);
}
}
};

View File

@ -3,7 +3,7 @@
<div style="padding: 20px;font-size: 20px;text-align: center;">路票</div>
<div style="display: flex;align-items: center;margin-bottom: 10px;">
<div>附件类型</div>
<el-select v-model="attachmentType" size="small" placeholder="请选择" @change="attachmentTypeChange">
<el-select :id="typeChange.domId" v-model="attachmentType" size="small" placeholder="请选择" @change="attachmentTypeChange">
<el-option
v-for="item in typeList"
:key="item.value"
@ -45,6 +45,7 @@
<script>
import { mapGetters } from 'vuex';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import RailTicket from './trainTicket';
import GreenLicence from './greenLicence';
import RedLicence from './redLicence';
@ -121,6 +122,12 @@ export default {
},
roleDeviceCode() {
return this.$store.state.training.roleDeviceCode;
},
typeChange() {
return OperationEvent.TicketOrRegister.attachmentType.typeChange;
},
activeTrains() {
return this.$store.state.map.activeTrainList;
}
},
watch: {
@ -135,6 +142,9 @@ export default {
},
'$store.state.training.memberList': function (val) {
this.initGiveMemberList(val);
},
'$store.state.map.activeTrainListChange': function () {
this.initGiveMemberList(this.$store.state.training.memberList);
}
},
mounted() {
@ -156,7 +166,7 @@ export default {
this.giveMemberList = [];
const memberData = this.$store.state.training.memberData;
memberList.forEach(item => {
if (item.type === 'STATION_ASSISTANT' || item.type === 'STATION_SUPERVISOR') {
if (item.type === 'STATION_ASSISTANT' || item.type === 'STATION_SUPERVISOR' || (item.type === 'DRIVER' && this.activeTrains.includes(item.deviceCode))) {
this.giveMemberList.push(memberData[item.id]);
}
});
@ -167,9 +177,15 @@ export default {
}
},
attachmentTypeChange() {
const operate = {
operation: this.typeChange.operation,
val: this.attachmentType
};
this.$store.dispatch('trainingNew/next', operate).then(resp => {
if (this.activeName === 'second') {
this.query();
}
});
},
clearData() {
const station = this.$store.getters['map/getDeviceByCode'](this.roleDeviceCode) || {};
@ -197,7 +213,7 @@ export default {
},
submit() {
let commitFlag = true;
const params = { ticket: { type: this.attachmentType }, stationCode: this.roleDeviceCode };
const params = { stationCode: this.roleDeviceCode, ticket: { type: this.attachmentType } };
if (this.attachmentType === 'RAIL_TICKET') {
if (!this.ticketForm.number || !this.ticketForm.tripNumber || !this.ticketForm.nextStation || !this.ticketForm.no) {
commitFlag = false;

View File

@ -3,24 +3,24 @@
<div style="text-align: center;font-size: 28px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div style="font-size: 14px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 20px;justify-content: end;">
<div></div>
<el-input v-model="redLicenseForm.number" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.number.domId" v-model="redLicenseForm.number" :disabled="switchFlag" size="small" style="width: 80px;" @blur="numberChange" />
<div style="margin-right: 20px;"></div>
</div>
<div style="font-size: 16px;margin-top: 10px;text-indent:36px;">
<span>现在一切电话中断准许第</span>
<el-input v-model="redLicenseForm.licenseTripNumber" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.licenseTripNumber.domId" v-model="redLicenseForm.licenseTripNumber" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="licenseTripNumberChange" />
<span>次列车自</span>
<el-input v-model="redLicenseForm.licenseStation" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.licenseStation.domId" v-model="redLicenseForm.licenseStation" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="licenseStationChange" />
<span>站至</span>
<el-input v-model="redLicenseForm.licenseNextStation" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.licenseNextStation.domId" v-model="redLicenseForm.licenseNextStation" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="licenseNextStationChange" />
<span>本列车前于</span>
<el-input v-model="redLicenseForm.licenseHour" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.licenseHour.domId" v-model="redLicenseForm.licenseHour" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="licenseHourChange" />
<span></span>
<el-input v-model="redLicenseForm.licenseMinute" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.licenseMinute.domId" v-model="redLicenseForm.licenseMinute" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="licenseMinuteChange" />
<span>分发出的第</span>
<el-input v-model="redLicenseForm.licenseTripNumber2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.licenseTripNumber2.domId" v-model="redLicenseForm.licenseTripNumber2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="licenseTripNumber2Change" />
<span>次列车邻站到达通知</span>
<el-radio-group v-model="redLicenseForm.licenseReceived" :disabled="switchFlag" style="display: inline;">
<el-radio-group :id="ticketInput.licenseReceived.domId" v-model="redLicenseForm.licenseReceived" :disabled="switchFlag" style="display: inline;" @change="licenseReceivedChange">
<el-radio :label="true"></el-radio>
<el-radio :label="false" style="margin-left: 5px;"></el-radio>
</el-radio-group>
@ -29,38 +29,38 @@
<div style="text-align: center;font-size: 28px;margin-top: 10px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div style="font-size: 16px;margin-top: 10px;text-indent: 36px;">
<span>1.</span>
<el-input v-model="redLicenseForm.noticeTripNumber" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.noticeTripNumber.domId" v-model="redLicenseForm.noticeTripNumber" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="noticeTripNumberChange" />
<span>次列车到达你站后准接你站发出的列车</span>
</div>
<div style="font-size: 16px;margin-top: 10px;text-indent: 36px;">
<span>2.</span>
<el-input v-model="redLicenseForm.noticeHour1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.noticeHour1.domId" v-model="redLicenseForm.noticeHour1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="noticeHour1Change" />
<span></span>
<el-input v-model="redLicenseForm.noticeMinute1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.noticeMinute1.domId" v-model="redLicenseForm.noticeMinute1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="noticeMinute1Change" />
<span>分发出第</span>
<el-input v-model="redLicenseForm.noticeTripNumber1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.noticeTripNumber1.domId" v-model="redLicenseForm.noticeTripNumber1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="noticeTripNumber1Change" />
<span>次列车并于</span>
<el-input v-model="redLicenseForm.noticeHour2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.noticeHour2.domId" v-model="redLicenseForm.noticeHour2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="noticeHour2Change" />
<span></span>
<el-input v-model="redLicenseForm.noticeMinute2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.noticeMinute2.domId" v-model="redLicenseForm.noticeMinute2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="noticeMinute2Change" />
<span>分再发出第</span>
<el-input v-model="redLicenseForm.noticeTripNumber2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<el-input :id="ticketInput.noticeTripNumber2.domId" v-model="redLicenseForm.noticeTripNumber2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" @blur="noticeTripNumber2Change" />
<span>次列车</span>
</div>
<div style="font-size: 16px;margin-top: 60px;display: flex;align-items: center;justify-content: end;">
<div><span style="color: #f00;">{{ redLicenseForm.stationSeal }}</span>站名印车站值班员签名</div>
<el-input v-model="redLicenseForm.signature" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.signature.domId" v-model="redLicenseForm.signature" :disabled="switchFlag" size="small" style="width: 80px;" @blur="signatureChange" />
</div>
<div style="font-size: 16px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 10px;justify-content: end;">
<el-input v-model="redLicenseForm.year" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.year.domId" v-model="redLicenseForm.year" :disabled="switchFlag" size="small" style="width: 80px;" @blur="yearChange" />
<div></div>
<el-input v-model="redLicenseForm.moon" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.moon.domId" v-model="redLicenseForm.moon" :disabled="switchFlag" size="small" style="width: 80px;" @blur="moonChange" />
<div></div>
<el-input v-model="redLicenseForm.day" :disabled="switchFlag" size="small" style="width: 80px;" />
<el-input :id="ticketInput.day.domId" v-model="redLicenseForm.day" :disabled="switchFlag" size="small" style="width: 80px;" @blur="dayChange" />
<div>日填发</div>
</div>
<div v-if="switchFlag" style="text-align: center;">
<el-select v-model="memberId" size="small" style="width: 200px" placeholder="请选择">
<el-select :id="ticketInput.memberId.domId" v-model="memberId" size="small" style="width: 200px" placeholder="请选择" @change="memberIdChange">
<el-option
v-for="item in giveMemberList"
:key="item.id"
@ -75,6 +75,7 @@
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'RedLicence',
props: {
@ -101,6 +102,9 @@ export default {
computed: {
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
},
ticketInput() {
return OperationEvent.TicketOrRegister.ticketInput;
}
},
methods: {
@ -109,6 +113,146 @@ export default {
this.$emit('giveTicket', { ticketId: this.redLicenseForm.id, memberId: this.memberId });
this.memberId = '';
}
},
numberChange() {
const operate = {
operation: this.ticketInput.number.operation,
val: this.redLicenseForm.number
};
this.$store.dispatch('trainingNew/next', operate);
},
licenseTripNumberChange() {
const operate = {
operation: this.ticketInput.licenseTripNumber.operation,
val: this.redLicenseForm.licenseTripNumber
};
this.$store.dispatch('trainingNew/next', operate);
},
licenseStationChange() {
const operate = {
operation: this.ticketInput.licenseStation.operation,
val: this.redLicenseForm.licenseStation
};
this.$store.dispatch('trainingNew/next', operate);
},
licenseNextStationChange() {
const operate = {
operation: this.ticketInput.licenseNextStation.operation,
val: this.redLicenseForm.licenseNextStation
};
this.$store.dispatch('trainingNew/next', operate);
},
licenseHourChange() {
const operate = {
operation: this.ticketInput.licenseHour.operation,
val: this.redLicenseForm.licenseHour
};
this.$store.dispatch('trainingNew/next', operate);
},
licenseMinuteChange() {
const operate = {
operation: this.ticketInput.licenseMinute.operation,
val: this.redLicenseForm.licenseMinute
};
this.$store.dispatch('trainingNew/next', operate);
},
licenseTripNumber2Change() {
const operate = {
operation: this.ticketInput.licenseTripNumber2.operation,
val: this.redLicenseForm.licenseTripNumber2
};
this.$store.dispatch('trainingNew/next', operate);
},
licenseReceivedChange() {
const operate = {
operation: this.ticketInput.licenseReceived.operation,
val: this.redLicenseForm.licenseReceived
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeTripNumberChange() {
const operate = {
operation: this.ticketInput.noticeTripNumber.operation,
val: this.redLicenseForm.noticeTripNumber
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeHour1Change() {
const operate = {
operation: this.ticketInput.noticeHour1.operation,
val: this.redLicenseForm.noticeHour1
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeMinute1Change() {
const operate = {
operation: this.ticketInput.noticeMinute1.operation,
val: this.redLicenseForm.noticeMinute1
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeTripNumber1Change() {
const operate = {
operation: this.ticketInput.noticeTripNumber1.operation,
val: this.redLicenseForm.noticeTripNumber1
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeHour2Change() {
const operate = {
operation: this.ticketInput.noticeHour2.operation,
val: this.redLicenseForm.noticeHour2
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeMinute2Change() {
const operate = {
operation: this.ticketInput.noticeMinute2.operation,
val: this.redLicenseForm.noticeMinute2
};
this.$store.dispatch('trainingNew/next', operate);
},
noticeTripNumber2Change(val) {
const operate = {
operation: this.ticketInput.noticeTripNumber2.operation,
val: this.redLicenseForm.noticeTripNumber2
};
this.$store.dispatch('trainingNew/next', operate);
},
signatureChange() {
const operate = {
operation: this.ticketInput.signature.operation,
val: this.redLicenseForm.signature
};
this.$store.dispatch('trainingNew/next', operate);
},
yearChange() {
const operate = {
operation: this.ticketInput.year.operation,
val: this.redLicenseForm.year
};
this.$store.dispatch('trainingNew/next', operate);
},
moonChange() {
const operate = {
operation: this.ticketInput.moon.operation,
val: this.redLicenseForm.moon
};
this.$store.dispatch('trainingNew/next', operate);
},
dayChange() {
const operate = {
operation: this.ticketInput.day.operation,
val: this.redLicenseForm.day
};
this.$store.dispatch('trainingNew/next', operate);
},
memberIdChange() {
const operate = {
operation: this.ticketInput.memberId.operation,
val: this.memberId
};
this.$store.dispatch('trainingNew/next', operate);
}
}
};

View File

@ -3,18 +3,18 @@
<div style="text-align: center;font-size: 28px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div style="display: flex;justify-content: center;align-items: center;font-size: 18px;margin-top: 10px;">
<div>电话记录&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<el-input v-model="ticketForm.number" :disabled="switchFlag" size="mini" style="width: 80px;" />
<el-input :id="ticketInput.number.domId" v-model="ticketForm.number" :disabled="switchFlag" size="mini" style="width: 80px;" @blur="numberChange" />
<div></div>
</div>
<div style="display: flex;justify-content: center;align-items: center;font-size: 18px;margin-top: 10px;">
<div style="margin-left: 80px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<el-input v-model="ticketForm.tripNumber" :disabled="switchFlag" size="mini" style="width: 80px;" />
<el-input :id="ticketInput.tripNumber.domId" v-model="ticketForm.tripNumber" :disabled="switchFlag" size="mini" style="width: 80px;" @blur="tripNumberChange" />
</div>
<div style="display: flex; justify-content: center;font-size: 40px;font-weight: bolder;margin-top: 25px;align-items: center;">
<div>{{ ticketForm.station }}</div>
<svg-icon icon-class="arrow" style="width: 100px" />
<div>
<el-select v-model="ticketForm.nextStation" size="small" :disabled="switchFlag" class="station-input" placeholder="请选择">
<el-select :id="ticketInput.nextStation.domId" v-model="ticketForm.nextStation" size="small" :disabled="switchFlag" class="station-input" placeholder="请选择" @change="nextStationChange">
<el-option
v-for="item in stationList"
:key="item.code"
@ -28,11 +28,11 @@
<div style="margin-left: 50px;"><span style="color: #f00">{{ ticketForm.stationSeal }}</span>站名印</div>
<div>
<span>编号</span>
<el-input v-model="ticketForm.no" size="small" :disabled="switchFlag" style="width: 80px;" />
<el-input :id="ticketInput.no.domId" v-model="ticketForm.no" size="small" :disabled="switchFlag" style="width: 80px;" @blur="noChange" />
</div>
</div>
<div v-if="switchFlag" style="text-align: center;">
<el-select v-model="memberId" size="small" style="width: 200px" placeholder="请选择">
<el-select :id="ticketInput.memberId.domId" v-model="memberId" size="small" style="width: 200px" placeholder="请选择" @change="memberIdChange">
<el-option
v-for="item in giveMemberList"
:key="item.id"
@ -47,6 +47,7 @@
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainTicket',
props: {
@ -77,6 +78,9 @@ export default {
computed: {
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
},
ticketInput() {
return OperationEvent.TicketOrRegister.ticketInput;
}
},
methods: {
@ -85,6 +89,41 @@ export default {
this.$emit('giveTicket', { ticketId: this.ticketForm.id, memberId: this.memberId });
this.memberId = '';
}
},
nextStationChange() {
const operate = {
operation: this.ticketInput.nextStation.operation,
val: this.ticketForm.nextStation
};
this.$store.dispatch('trainingNew/next', operate);
},
numberChange() {
const operate = {
operation: this.ticketInput.number.operation,
val: this.ticketForm.number
};
this.$store.dispatch('trainingNew/next', operate);
},
tripNumberChange() {
const operate = {
operation: this.ticketInput.tripNumber.operation,
val: this.ticketForm.tripNumber
};
this.$store.dispatch('trainingNew/next', operate);
},
noChange() {
const operate = {
operation: this.ticketInput.no.operation,
val: this.ticketForm.no
};
this.$store.dispatch('trainingNew/next', operate);
},
memberIdChange() {
const operate = {
operation: this.ticketInput.memberId.operation,
val: this.memberId
};
this.$store.dispatch('trainingNew/next', operate);
}
}
};

View File

@ -164,7 +164,7 @@ export default {
this.$refs.form.validate(valid => {
if (valid) {
const cpData = Object.assign({}, this.formModel);
cpData.client = this.tagForm.client;
cpData.client = this.formModel.type === 'SINGLE' ? this.tagForm.client : '';
cpData.labelJson = JSON.stringify(this.tagForm.dynamicTags);
let api = updateTraining;
let mes = '编辑';

View File

@ -52,6 +52,7 @@
<div style="width: 100px;margin-left: 40px;">更新时间</div>
<div>{{ bgSceneObj.systemTime || '' }}</div>
</div>
<div v-if="!isScene">
<el-divider content-position="center">实训定位</el-divider>
<el-button class="text-button-position" type="text" @click="updateMapLocation">定位</el-button>
<div style="display: flex;font-size: 14px;text-align: left;">
@ -66,6 +67,7 @@
<div style="width: 100px;margin-left: 40px;">缩放</div>
<div>{{ mapLocationObj.scale || '' }}</div>
</div>
</div>
<el-divider content-position="center">实训步骤</el-divider>
<div class="text-button-position">
<el-button type="text" @click="addStep">新增步骤</el-button>
@ -157,6 +159,13 @@ export default {
},
trainingSwitch() {
return this.$store.state.trainingNew.trainingSwitch;
},
isScene() {
let s = false;
if (this.editData && this.editData.type == 'SCENE') {
s = true;
}
return s;
}
},
watch: {
@ -170,7 +179,7 @@ export default {
},
editData() {
this.mapLocationObj = {};
if (this.editData['mapLocationJson']) {
if (this.editData['mapLocationJson'] && !this.isScene) {
this.mapLocationObj = JSON.parse(this.editData['mapLocationJson']);
}
this.bgSceneObj = {};

View File

@ -16,9 +16,12 @@
:value="item.id"
/>
</el-select>
<el-tooltip class="item" effect="dark" content="角色切换前需对编辑数据进行保存" placement="right-end">
<i class="el-icon-info" />
</el-tooltip>
</el-form-item>
<el-form-item label="总分:" prop="fullMarks" style="display:inline-block">
<el-input-number v-model="addModel.fullMarks" style="width:145px" :min="0" size="mini" :step="1" />
<el-input-number v-model="addModel.fullMarks" :disabled="true" style="width:145px" :min="0" size="mini" :step="1" />
</el-form-item>
</el-form>
<el-table
@ -43,14 +46,10 @@
width="200"
>
<template v-if="addModel.memberId == scope.row.memberId" slot-scope="scope">
<el-input-number v-model="currentStepMap[scope.row.id]" style="width:145px" :min="0" size="mini" :step="1" />
<el-input-number v-model="currentStepMap[scope.row.id]" style="width:145px" :min="0" size="mini" :step="1" @change="stepScoreChange" />
</template>
</el-table-column>
</el-table>
<div style="text-align: center;font-size: 12px;margin-top: 10px;">
<i class="el-icon-info" />
<span>角色切换前需对编辑数据进行保存</span>
</div>
</div>
</template>
@ -139,19 +138,15 @@ export default {
this.$emit('cancel', this.source);
},
commit() {
console.log('****');
const that = this;
this.$refs.form.validate((valid) => {
if (valid) {
const scoreDetails = [];
let totalScore = 0;
for (const key in this.currentStepMap) {
totalScore += this.currentStepMap[key];
scoreDetails.push({elementId: key, score: this.currentStepMap[key]});
}
if (totalScore !== this.addModel.fullMarks) {
this.$message.error('步骤分总和不等于总分!');
return;
} else if (this.addModel.fullMarks === 0) {
if (this.addModel.fullMarks === 0) {
this.$message.error('规则无评分项!');
return;
}
@ -168,6 +163,13 @@ export default {
});
}
});
},
stepScoreChange(val) {
let fullMarks = 0;
for (const stepKey in this.currentStepMap) {
fullMarks += this.currentStepMap[stepKey];
}
this.addModel.fullMarks = fullMarks;
}
}
};

View File

@ -68,8 +68,9 @@ export default {
const playerList = JSON.parse(this.trainingDetail.playerIdJson);
const memberData = this.$store.state.training.memberData;
const newMemberData = {};
const showRole = ['DISPATCHER', 'STATION_SUPERVISOR', 'STATION_SIGNALER'];
playerList.forEach(playerId => {
if (memberData[playerId] && (memberData[playerId].type === 'STATION_SUPERVISOR' || memberData[playerId].type === 'DISPATCHER')) {
if (memberData[playerId] && showRole.includes(memberData[playerId].type)) {
newMemberData[playerId] = memberData[playerId];
}
});

View File

@ -33,12 +33,13 @@ export default {
handleClose() {
this.dialogVisible = false;
},
doShow(scoreList, stepList, scoringRuleList) {
this.scoreList = scoreList;
this.stepList = stepList;
this.scoringRuleList = scoringRuleList;
doShow(score) {
this.tableData = [];
this.scoringRuleList.forEach(item => {
const MyMemberId = this.$store.state.training.myMemberId;
this.scoringRuleList = this.$store.state.trainingNew.scoringRules.find(rule => rule.memberId == MyMemberId );
console.log(this.scoringRuleList, this.$store.state.trainingNew.scoringRules);
this.stepList = this.$store.state.trainingNew.stepList;
this.scoringRuleList && this.scoringRuleList.details.forEach(item => {
const desc = this.handleStepInfo(item.elementId);
const score = this.handleScore(item.elementId);
this.tableData.push({ desc: desc, score: score, totalScore: item.score });
@ -50,8 +51,9 @@ export default {
return stepInfo ? stepInfo.description : '';
},
handleScore(stepId) {
const rule = this.scoreList.find(item => stepId == item.elementId);
return rule ? rule.score : 0;
const rule = this.scoringRuleList.details.find(item => stepId == item.elementId);
const record = this.$store.state.trainingNew.stepRecord.find(item => stepId == item.stepId);
return record && record.success ? rule.score : 0;
}
}
};

View File

@ -4,7 +4,7 @@
<div ref="drapBox" class="reminder-box">
<div class="tip-title">
<div style="display: flex;justify-content: center;align-items: center;">
<i v-if="!trainingDesign" class="icon el-icon-document" @click="trainingListShow" />
<i v-if="!trainingDesign && !examSwitch" class="icon el-icon-document" @click="trainingListShow" />
<i v-show="!isShrink && !trainingSwitch && trainingDetail" class="icon el-icon-video-play" @click="handlerStart" />
<i v-show="!isShrink && trainingSwitch" class="icon el-icon-switch-button" @click="handlerEnd" />
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
@ -26,7 +26,7 @@
<p class="list-item">
<span class="list-label">实训模式</span>
<span class="list-elem">
<el-radio-group v-model="demoMode" :disabled="trainingSwitch" class="mode" size="small" @change="changeMode">
<el-radio-group v-model="demoMode" :disabled="trainingSwitch || examSwitch" class="mode" size="small" @change="changeMode">
<el-radio :label="TrainingMode.TEACH" border>{{ $t('display.lesson.teachingMode') }}</el-radio>
<el-radio :label="TrainingMode.PRACTICE" border>{{ $t('display.lesson.practiceMode') }}</el-radio>
<el-radio :label="TrainingMode.TEST" border>{{ $t('display.lesson.testMode') }}</el-radio>
@ -44,11 +44,11 @@
<el-button v-if="trainingSwitch" size="small" type="danger" @click="handlerEnd">结束</el-button>
</span>
</p>
<p class="list-item">
<p v-if="!examSwitch" class="list-item">
<span class="list-label"> </span>
<span class="list-elem elem-span training-box" @click="loadTraining(previousTraining)">{{ previousTraining? previousTraining.name: '' }}</span>
</p>
<p class="list-item">
<p v-if="!examSwitch" class="list-item">
<span class="list-label"> </span>
<span class="list-elem elem-span training-box" @click="loadTraining(nextTraining)">{{ nextTraining? nextTraining.name:'' }}</span>
</p>
@ -112,6 +112,9 @@ export default {
},
mapId() {
return this.$route.query.mapId;
},
examSwitch() {
return this.$store.state.trainingNew.examSwitch;
}
},
watch: {
@ -124,6 +127,9 @@ export default {
this.trainingList = trainingList;
this.initAdjacentTraining();
});
if (this.examSwitch) {
this.demoMode = this.TrainingMode.TEST;
}
this.trainingDesign = this.$store.state.training.domConfig.trainingDesign;
},
methods: {
@ -150,7 +156,7 @@ export default {
this.$store.dispatch('trainingNew/changeTeachMode', this.demoMode);
},
handlerStart() {
if (this.trainingDetail.type === 'SCENE') {
if (this.trainingDetail.type === 'SCENE' && !this.examSwitch) {
this.$refs.scenePlayRole.doShow();
} else {
this.startTraining();
@ -165,15 +171,20 @@ export default {
});
},
handlerEnd() {
const scoreList = this.$store.state.trainingNew.scoreList;
if (this.demoMode === ScriptMode.TEST) {
const scoringRules = this.$store.state.trainingNew.scoringRules;
const scoringRule = scoringRules.find(rule => rule.memberId == this.$store.state.training.myMemberId);
this.$refs.testResult.doShow(scoreList, this.$store.state.trainingNew.stepList, scoringRule ? scoringRule.details : []);
endTraining(this.group, this.$store.state.trainingNew.stepRecord).then((resp) => {
if (this.examSwitch) {
const data = {
subType: this.trainingDetail.type === 'SCENE' ? 5 : 4,
cosplayMemberId: this.$store.state.training.myMemberId,
trainDetail: this.$store.state.trainingNew.stepRecord
};
EventBus.$emit('trainExamSubmit', data);
} else if (this.demoMode === ScriptMode.TEST) {
this.$refs.testResult.doShow(resp.data);
}
endTraining(this.group, scoreList).then((resp) => {
this.$store.dispatch('trainingNew/trainingEnd');
}).catch(() => {
}).catch((e) => {
console.log(e, '****');
this.$message.error('结束实训失败!');
});
},

View File

@ -55,6 +55,12 @@ export default {
default() {
return false;
}
},
type:{
type: String,
default() {
return '';
}
}
},
data() {
@ -212,7 +218,9 @@ export default {
EventBus.$off('viewProgressAt');
this.$store.dispatch('socket/clearSimulationRoleList');
this.$store.dispatch('menuOperation/resetRequestList');
if (this.type != 'routeMap') {
this.$store.dispatch('map/mapClear');
}
if (this.$jlmap) {
this.$jlmap.dispose();
Vue.prototype.$jlmap = null;

Some files were not shown because too many files have changed in this diff Show More