Merge remote-tracking branch 'origin/test'

This commit is contained in:
fan 2023-02-17 18:17:00 +08:00
commit 3e3d3622dc
229 changed files with 7711 additions and 3248 deletions

View File

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

View File

@ -228,22 +228,22 @@ export function handlerIbpEvent(group, button, stationCode, buttonCode) {
}); });
} }
/** 处理ibp盘事件(按下) */ // /** 处理ibp盘事件(按下) */
//
export function handleIbpPress(group, stationCode, buttonCode) { // export function handleIbpPress(group, stationCode, buttonCode) {
return request({ // return request({
url: `/simulation/${group}/ibp/press/${stationCode}/${buttonCode}`, // url: `/simulation/${group}/ibp/press/${stationCode}/${buttonCode}`,
method: 'put' // method: 'put'
}); // });
} // }
/** 处理ibp盘事件(松开) */ // /** 处理ibp盘事件(松开) */
//
export function handleIbpRelease(group, stationCode, buttonCode) { // export function handleIbpRelease(group, stationCode, buttonCode) {
return request({ // return request({
url: `/simulation/${group}/ibp/release/${stationCode}/${buttonCode}`, // url: `/simulation/${group}/ibp/release/${stationCode}/${buttonCode}`,
method: 'put' // method: 'put'
}); // });
} // }
/** 预览脚本仿真(新版)*/ /** 预览脚本仿真(新版)*/
export function scriptDraftRecordNotifyNew(scriptId) { export function scriptDraftRecordNotifyNew(scriptId) {
@ -349,6 +349,15 @@ export function simulationLoadRunPlan(group, templateId) {
method: 'put' method: 'put'
}); });
} }
/** 仿真里加载草稿运行图 */
export function simulationLoadDraftRunPlan(group, draftRunPlanId) {
return request({
url:`/simulation/${group}/load/draftRunPlan/${draftRunPlanId} `,
method: 'put'
});
}
/** 根据车次号获取列车信息 */ /** 根据车次号获取列车信息 */
export function getTrainDetailBytripNumber(group, params) { export function getTrainDetailBytripNumber(group, params) {
return request({ 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] = { this[deviceType.GuideLock] = {
// 是否显示 // 是否显示s
text: { text: {
fontSize: 11, // 字体大小 fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
@ -265,7 +265,8 @@ class SkinCode extends defaultStyle {
radiusR: 6, // 控制灯大小 radiusR: 6, // 控制灯大小
controlColor: '#b5b3b3', // 控制灯颜色 (灰色) controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
lightUpColor: '#FF0000' // 点亮灯颜色 lightUpColor: '#FF0000' // 点亮灯颜色
} },
mouseOverStyle: true
}; };
// 供电线路 // 供电线路

View File

@ -476,49 +476,49 @@ class SkinCode extends defaultStyle {
offset: { x: 0, y: 0 }, offset: { x: 0, y: 0 },
text: '分散自律', text: '分散自律',
lightColor: '#0f0', lightColor: '#0f0',
defaultColor: '#ccc' defaultColor: '#7F7F7F'
}, },
graphRoad: { graphRoad: {
show: true, show: true,
offset: { x: 0, y: 0 }, offset: { x: 0, y: 0 },
text: '按图排路', text: '按图排路',
lightColor: '#0f0', lightColor: '#ff0',
defaultColor: '#ccc' defaultColor: '#0f0'
}, },
planControl: { planControl: {
show: true, show: true,
offset: { x: 0, y: 0 }, offset: { x: 0, y: 0 },
text: '计划控制', text: '计划控制',
lightColor: '#0f0', lightColor: '#0f0',
defaultColor: '#ccc' defaultColor: '#7F7F7F'
}, },
centerCommunication: { centerCommunication: {
show: true, show: true,
offset: { x: 0, y: 30 }, offset: { x: 0, y: 30 },
text: '中心通信', text: '中心通信',
lightColor: '#0f0', lightColor: '#FF0000',
defaultColor: '#ccc' defaultColor: '#0f0'
}, },
selfDisciplineCommunication: { selfDisciplineCommunication: {
show: true, show: true,
offset: { x: 0, y: 30 }, offset: { x: 0, y: 30 },
text: '自律机通信', text: '自律机通信',
lightColor: '#0f0', lightColor: '#7F7F7F',
defaultColor: '#ccc' defaultColor: '#0f0'
}, },
allowedTurnBack: { allowedTurnBack: {
show: true, show: true,
offset: { x: 0, y: 30 }, offset: { x: 0, y: 30 },
text: '允许转回', text: '允许转回',
lightColor: '#0f0', lightColor: '#ff0',
defaultColor: '#ccc' defaultColor: '#7F7F7F'
}, },
trainControl: { trainControl: {
show: true, show: true,
offset: { x: 0, y: 30 }, offset: { x: 0, y: 30 },
text: '列控', text: '列控',
lightColor: '#0f0', lightColor: '#ff0',
defaultColor: '#ccc' defaultColor: '#0f0'
} }
} }
}; };
@ -586,7 +586,8 @@ class SkinCode extends defaultStyle {
lamp: { lamp: {
radiusR: 6, // 控制灯大小 radiusR: 6, // 控制灯大小
controlColor: '#FFFF00' // 控制灯颜色 controlColor: '#FFFF00' // 控制灯颜色
} },
mouseOverStyle: {}
}; };
this[deviceType.PowerSupply] = { this[deviceType.PowerSupply] = {
text: { text: {
@ -808,14 +809,21 @@ class SkinCode extends defaultStyle {
text: { text: {
fontSize: 11, // 字体大小 fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离 distance: 5, // 灯跟文字距离
lightHighColor: '#0000FF', // 高亮颜色
flashColor: '#0000FF' // 闪烁颜色
}, },
lamp: { lamp: {
fill: 'rgba(0,0,0,0)', // 填充色 fill: 'rgba(0,0,0,0)', // 填充色
radiusR: 6, // 控制灯大小 radiusR: 6, // 控制灯大小
controlColor: '#b5b3b3', // 控制灯颜色 (灰色) controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
lightUpColor: '#FF0000' // 点亮灯颜色 lightUpColor: '#FF0000', // 点亮灯颜色
} lightHighColor: '#00FFFF', // 高亮颜色
flashColor: '#0000FF' // 闪烁颜色
},
mouseOverStyle: true,
lightHigh: true, // 鼠标悬浮高亮
selectFlash: true // 选中闪烁
}; };
this[deviceType.TrainWindow] = { this[deviceType.TrainWindow] = {
@ -927,6 +935,7 @@ class SkinCode extends defaultStyle {
trainTip:true // 鼠标悬停列车状态信息框是否显示 trainTip:true // 鼠标悬停列车状态信息框是否显示
}, },
trainStatusStyle: { trainStatusStyle: {
runLineHide: true,
trainTypeStatus: [ trainTypeStatus: [
{type: '03', serviceNumberColor: '#FFF000', groupNumberColor: '#FFF000'}, {type: '03', serviceNumberColor: '#FFF000', groupNumberColor: '#FFF000'},
{type: '02', trainNumberColor: '#FFF000', groupNumberColor: '#FFF000'} {type: '02', trainNumberColor: '#FFF000', groupNumberColor: '#FFF000'}

View File

@ -437,6 +437,7 @@ class Jlmap {
this.$painter.$transformHandle.revisibleAll(); this.$painter.$transformHandle.revisibleAll();
} }
updatePicture(list = []) { updatePicture(list = []) {
const trainList = [];
list.forEach(item => { list.forEach(item => {
const device = this.mapDevice[item]; const device = this.mapDevice[item];
if (device && device._type !== deviceType.Switch && device._type !== deviceType.Train) { if (device && device._type !== deviceType.Switch && device._type !== deviceType.Train) {
@ -450,8 +451,13 @@ class Jlmap {
this.$painter.updatePicture(this.mapDevice[device.switch.code]); this.$painter.updatePicture(this.mapDevice[device.switch.code]);
} }
} catch (e) { console.error(e); } } catch (e) { console.error(e); }
} else if (device._type === deviceType.Train) {
trainList.push(device);
} }
}); });
trainList.forEach(device => {
this.$painter.update(device);
});
} }
handleResetPoint(points) { handleResetPoint(points) {
return (points[points.length - 1].x >= points[0].x); 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 => { // 引导总锁列表 zrUtil.each(data.totalGuideLockButtonVOList || [], elem => { // 引导总锁列表
mapDevice[elem.code] = createDevice(deviceType.GuideLock, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.GuideLock, elem, propConvert, showConfig);
if (!elem.direction) {
mapDevice[elem.stationCode].guideLockCode = elem.code; // 保证处理车站列表在处理引导总锁列表之前 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); }, this);
zrUtil.each(data.automaticRouteButtonList || [], elem => { // 自动进路列表 zrUtil.each(data.automaticRouteButtonList || [], elem => { // 自动进路列表

View File

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

View File

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

View File

@ -165,7 +165,11 @@ export default class Station extends Group {
const queryCtc = queryList.find(item => { const queryCtc = queryList.find(item => {
return item.includes('ctc'); return item.includes('ctc');
}); });
if (queryCtc && model.createControlMode) { const queryCtcLineCode = queryList.find(item => {
return item.includes('lineCode=16');
});
const pic = store.state.map.picture;
if ((queryCtc && model.createControlMode) || (pic == 'trafficTerminal' && queryCtcLineCode)) {
this.createCtcControlMode(); this.createCtcControlMode();
} else if (this.style.Station.StationControl.special) { } else if (this.style.Station.StationControl.special) {
if (model.visible && model.createControlMode) { // model.createControlMode 控制模式 if (model.visible && model.createControlMode) { // model.createControlMode 控制模式
@ -850,7 +854,7 @@ export default class Station extends Group {
// } // }
} }
handleLocal() { // 站控 handleLocal(model) { // 站控
this.noneBeforeMode = 'Local'; this.noneBeforeMode = 'Local';
this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor); this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor);
@ -859,7 +863,23 @@ export default class Station extends Group {
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor); this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
this.stationControlCC && this.stationControlCC.setStyle({text:'LC', textFill:this.style.Station.StationControl.text.stationControlColor}); this.stationControlCC && this.stationControlCC.setStyle({text:'LC', textFill:this.style.Station.StationControl.text.stationControlColor});
this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.lightColor); this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.lightColor);
this.selfDisciplineThree && this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.lightColor, 3); // this.selfDisciplineThree && this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.lightColor, 3);
if (this.selfDisciplineThree) {
const arr = ['', 'Center', 'Station', 'Station_Shunt'];
let index = arr.findIndex(item => {
return model.operationMode == item;
});
if (index < 1) {
index = 1;
}
this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.lightColor, index);
}
if (this.graphRoad && model.routeSetMode == 'Manual_Set_Route') {
this.graphRoad.setColor(this.style.Station.StationControl.graphRoad.lightColor);
}
if (this.planControl && model.planControl) {
this.planControl.setColor(this.style.Station.StationControl.planControl.lightColor);
}
// if (this.style.Station.StationControl.disPlayNone) { // if (this.style.Station.StationControl.disPlayNone) {
// this.stationText && this.stationText.setStyle('textFill', '#fff'); // this.stationText && this.stationText.setStyle('textFill', '#fff');
// if (this.model.subheadDisplay) { // 副标题 // if (this.model.subheadDisplay) { // 副标题
@ -938,7 +958,17 @@ export default class Station extends Group {
this.selfDiscipline && this.selfDiscipline.setColor(this.style.Station.StationControl.selfDiscipline.defaultColor); this.selfDiscipline && this.selfDiscipline.setColor(this.style.Station.StationControl.selfDiscipline.defaultColor);
this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.defaultColor); this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.defaultColor);
this.veryControlButton && this.veryControlButton.setStyle({ fill: this.style.Station.StationControl.veryControlButton.defaultColor }); this.veryControlButton && this.veryControlButton.setStyle({ fill: this.style.Station.StationControl.veryControlButton.defaultColor });
this.selfDisciplineThree && this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.defaultColor, 3); this.centerCommunication && this.centerCommunication.setColor(this.style.Station.StationControl.centerCommunication.defaultColor);
this.graphRoad && this.graphRoad.setColor(this.style.Station.StationControl.graphRoad.defaultColor);
this.planControl && this.planControl.setColor(this.style.Station.StationControl.planControl.defaultColor);
this.trainControl && this.trainControl.setColor(this.style.Station.StationControl.trainControl.defaultColor);
this.allowedTurnBack && this.allowedTurnBack.setColor(this.style.Station.StationControl.allowedTurnBack.defaultColor);
this.selfDisciplineCommunication && this.selfDisciplineCommunication.setColor(this.style.Station.StationControl.selfDisciplineCommunication.defaultColor);
if (this.selfDisciplineThree) {
this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.defaultColor, 1);
this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.defaultColor, 2);
this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.defaultColor, 3);
}
if (this.style.Station.stationText.isSpecialType) { if (this.style.Station.stationText.isSpecialType) {
this.stationText.setColor(this.style.Station.stationText.noneModeColor); this.stationText.setColor(this.style.Station.stationText.noneModeColor);
this.stationText.setBackground(this.style.Station.stationText.defaultBackColor); this.stationText.setBackground(this.style.Station.stationText.defaultBackColor);
@ -972,12 +1002,13 @@ export default class Station extends Group {
this.eachChild(item => { item.hide(); }); this.eachChild(item => { item.hide(); });
} else { } else {
store.getters['map/checkStationGuideMaster'](this._code, model.sguideMasterLock, model.xguideMasterLock); store.getters['map/checkStationGuideMaster'](this._code, model.sguideMasterLock, model.xguideMasterLock);
model.controlMode && this['handle' + model.controlMode](); model.controlMode && this['handle' + model.controlMode](model);
model.preResetValidDuration && this.handlePreResetLamp(); model.preResetValidDuration && this.handlePreResetLamp();
model.controller && this.handleComplexControl(model.controller); model.controller && this.handleComplexControl(model.controller);
model.emergencyController != undefined && this.handleEmergencyChange(model.emergencyController); model.emergencyController != undefined && this.handleEmergencyChange(model.emergencyController);
model.controlApplicant && this.handleControlApplicant(model); model.controlApplicant && this.handleControlApplicant(model);
model.allowAutonomy && this.handleAllowAutonomy(); model.allowAutonomy && this.handleAllowAutonomy(model);
this.handleGuideLock(model);
if (this.style.Station.syncCentralizeStation && (model.controlMode || model.controller || model.emergencyController != undefined) && model.centralized) { if (this.style.Station.syncCentralizeStation && (model.controlMode || model.controller || model.emergencyController != undefined) && model.centralized) {
model.chargeStationCodeList.forEach(item => { model.chargeStationCodeList.forEach(item => {
const device = store.getters['map/getDeviceByCode'](item); const device = store.getters['map/getDeviceByCode'](item);
@ -1018,6 +1049,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() { handlePreResetLamp() {
this.controlPreReset && this.controlPreReset.setColor('#f00'); this.controlPreReset && this.controlPreReset.setColor('#f00');
} }

View File

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

View File

@ -137,15 +137,15 @@ export default class Train extends Group {
if (style.Section.trainPosition.display) { if (style.Section.trainPosition.display) {
const data = this.model.physicalCode; const data = this.model.physicalCode;
const oldmodel = store.getters['map/getDeviceByCode'](data); const oldmodel = store.getters['map/getDeviceByCode'](data);
const leftPoint = oldmodel.points[0]; const leftPoint = oldmodel.instance.computedPoints[0];
const rightPoint = oldmodel.points[oldmodel.points.length - 1]; const rightPoint = oldmodel.instance.computedPoints[oldmodel.instance.computedPoints.length - 1];
this.startX = this.model.right == 1 ? leftPoint.x : rightPoint.x; this.startX = this.model.right == 1 ? leftPoint.x : rightPoint.x;
this.startY = this.model.right == 1 ? leftPoint.y : rightPoint.y; this.startY = this.model.right == 1 ? leftPoint.y : rightPoint.y;
// 算出折线的长度 // 算出折线的长度
this.lineLength = 0; this.lineLength = 0;
let oldPoint = null; let oldPoint = null;
this.pointList = []; this.pointList = [];
oldmodel.points.forEach((point) => { oldmodel.instance.computedPoints.forEach((point) => {
if (oldPoint) { if (oldPoint) {
const temp = Math.sqrt( const temp = Math.sqrt(
Math.pow(point.x - oldPoint.x, 2) + Math.pow(point.x - oldPoint.x, 2) +

View File

@ -101,11 +101,6 @@ export default {
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
}, },
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
},
{ {
label: '设置备用车', label: '设置备用车',
handler: this.loadSpare, handler: this.loadSpare,
@ -319,9 +314,6 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
cancelSpeed() { cancelSpeed() {
let sectionCode = this.selected.code; let sectionCode = this.selected.code;
if (this.selected.type == '02' || this.selected.type == '03') { if (this.selected.type == '02' || this.selected.type == '03') {

View File

@ -117,11 +117,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -460,9 +455,6 @@ export default {
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -114,11 +114,6 @@ export default {
label: '重启联锁机', label: '重启联锁机',
handler: this.restartInterlock, handler: this.restartInterlock,
cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -290,9 +285,6 @@ export default {
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected); this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -141,11 +141,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -325,9 +320,6 @@ export default {
this.$refs.standDetail.doShow(operate, this.selected, []); this.$refs.standDetail.doShow(operate, this.selected, []);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -90,11 +90,6 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -305,9 +300,6 @@ export default {
callback: action => { callback: action => {
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -220,10 +220,6 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -374,9 +370,6 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() { nextStation() {
commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => { }).catch((error) => {

View File

@ -87,11 +87,6 @@ export default {
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
}, },
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
},
{ {
label: '设置备用车', label: '设置备用车',
handler: this.loadSpare, handler: this.loadSpare,
@ -285,9 +280,6 @@ export default {
callback: action => { callback: action => {
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -209,11 +209,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -473,9 +468,6 @@ export default {
createDeviceLabel() { createDeviceLabel() {
this.doClose(); this.doClose();
this.$refs.createDeviceLabel.doShow(); this.$refs.createDeviceLabel.doShow();
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -126,11 +126,6 @@ export default {
label: '重启联锁机', label: '重启联锁机',
handler: this.restartInterlock, handler: this.restartInterlock,
cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -377,9 +372,6 @@ export default {
callback: action => { callback: action => {
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -95,11 +95,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -237,9 +232,6 @@ export default {
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -113,11 +113,6 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -285,9 +280,6 @@ export default {
}, },
createDeviceLabel() { createDeviceLabel() {
this.$refs.createDeviceLabel.doShow(); this.$refs.createDeviceLabel.doShow();
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -142,10 +142,6 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -293,9 +289,6 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() { nextStation() {
commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => { }).catch((error) => {

View File

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

View File

@ -81,11 +81,6 @@ export default {
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
}, },
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
},
{ {
label: '设置备用车', label: '设置备用车',
handler: this.loadSpare, handler: this.loadSpare,
@ -227,9 +222,6 @@ export default {
this.$refs.trainAddPlan.doShow(operate); this.$refs.trainAddPlan.doShow(operate);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -179,11 +179,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -371,9 +366,6 @@ export default {
} }
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -59,11 +59,6 @@ export default {
label: '重启联锁机', label: '重启联锁机',
handler: this.restartInterlock, handler: this.restartInterlock,
cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -140,9 +135,6 @@ export default {
console.error('该车站无zc设备'); console.error('该车站无zc设备');
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -107,11 +107,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -231,9 +226,6 @@ export default {
this.$refs.standDetail.doShow(operate, this.selected, []); this.$refs.standDetail.doShow(operate, this.selected, []);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -120,11 +120,6 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -273,9 +268,6 @@ export default {
callback: action => { callback: action => {
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -143,10 +143,6 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -287,9 +283,6 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() { nextStation() {
commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => { }).catch((error) => {

View File

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

View File

@ -33,7 +33,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item prop="targetDeviceCode" label="目的地:"> <el-form-item prop="targetDeviceCode" label="目的地:">
<el-select ref="faultSelect1" v-model="formModel.targetDeviceCode" filterable size="small" style="height: 32px;line-height: 32px;" placeholder="请选择"> <el-select ref="faultSelect1" v-model="formModel.targetDeviceCode" filterable clearable size="small" style="height: 32px;line-height: 32px;" placeholder="请选择">
<el-option <el-option
v-for="item in selectedList" v-for="item in selectedList"
:key="item.code" :key="item.code"
@ -329,7 +329,9 @@ export default {
} else if (this.operation == OperationEvent.MixinCommand.cancelStoppage.menu.operation) { } else if (this.operation == OperationEvent.MixinCommand.cancelStoppage.menu.operation) {
this.cancelCommand(); this.cancelCommand();
} else if (this.operation == OperationEvent.MixinCommand.collocation.menu.operation) { } 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); this.sendCommand(setp);
}, },
handleCollocation() { // handleTrainDrive() { //
const setp = { const setp = {
over: true, over: true,
operation: menuOperate.Common.collocation.operation, operation: menuOperate.Common.trainDrive.operation,
cmdType: menuOperate.Common.collocation.cmdType, cmdType: menuOperate.Common.trainDrive.cmdType,
param: { param: {
groupNumber: this.groupNumber, groupNumber: this.groupNumber,
param: { param: {
@ -378,6 +380,22 @@ export default {
}; };
this.sendCommand(setp); 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) { sendCommand(setp) {
this.loading = true; this.loading = true;
this.$store.dispatch('trainingNew/next', setp).then(({ valid }) => { this.$store.dispatch('trainingNew/next', setp).then(({ valid }) => {

View File

@ -63,7 +63,7 @@
</el-row> </el-row>
<notice-info ref="noticeInfo" :pop-class="popClass" /> <notice-info ref="noticeInfo" :pop-class="popClass" />
<password-box ref="passwordBox" :pop-class="popClass" @checkOver="passWordCommit" /> <password-box ref="passwordBox" :pop-class="popClass" @checkOver="passWordCommit" />
<ning-bo-confirm-tip ref="ningBoConfirmTip" @close="doClose"/> <ning-bo-confirm-tip ref="ningBoConfirmTip" @close="doClose" />
</el-dialog> </el-dialog>
</template> </template>

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,217 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<set-fault ref="setFault" pop-class="fuzhou-01__systerm" />
<set-train-operation ref="setTrainOperation" pop-class="fuzhou-01__systerm" />
<notice-info ref="noticeInfo" pop-class="fuzhou-01__systerm" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import SetTrainOperation from '@/jmapNew/theme/components/menus/dialog/setTrainOperation';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import { DeviceMenu } from '@/scripts/ConstDic';
export default {
name: 'MenuTrain',
components: {
PopMenu,
SetFault,
SetTrainOperation,
NoticeInfo
},
props: {
selected: {
type: Object,
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu:[],
menuNormal: [
{
label: '切换驾驶模式',
children: [
{
label: '转AM-C模式',
handler: this.handlerApplyAmcMode
},
{
label: '转SM-C模式',
handler: this.handlerApplySmcMode
},
{
label: '转AM-I模式',
handler: this.handlerApplyAmiMode
},
{
label: '转SM-I模式',
handler: this.handlerApplySmiMode
},
{
label: '转RM模式',
handler: this.handlerApplyRmMode
}
]
},
{
label: '转NRM模式',
handler: this.handlerApplyNrmMode
},
{
label: '开关门',
handler: this.handleOpenOrCloseDoor
},
{
label: '换端',
handler: this.handleTurnDirection
},
{
label: '驾驶',
handler: this.handleDriveTo
},
{
label: '连挂',
handler: this.setLink
},
{
label: '回库',
handler: this.setInbound
}
]
};
},
computed:{
roleDeviceCode() {
return this.$store.state.training.roleDeviceCode;
}
},
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() {
//
if (this.selected.code == this.roleDeviceCode) {
this.menu = [...this.menuNormal];
} else {
this.menu = [];
}
},
//
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);
}
});
},
// NRM
handlerApplyNrmMode() {
commitOperate(menuOperate.Driver.applyNrm, { groupNumber: this.selected.code }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleOpenOrCloseDoor() {
commitOperate(menuOperate.Driver.openOrCloseDoor, { groupNumber: this.selected.code }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
// AM-C
handlerApplyAmcMode() {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
// SM-C
handlerApplySmcMode() {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
// AM-I
handlerApplyAmiMode() {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplySmiMode() {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplyRmMode() {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
setLink() {
commitOperate(menuOperate.Common.setLink, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setTrainOperation.doShow(menuOperate.Common.setLink, 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

@ -250,6 +250,16 @@ export const menuOperate = {
// 取消分路不良 // 取消分路不良
operation: OperationEvent.Switch.cancelDefectiveShunting.menu.operation, operation: OperationEvent.Switch.cancelDefectiveShunting.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_CANCEL_DEFECTIVE_SHUNTING cmdType: CMD.Switch.CMD_SWITCH_CANCEL_DEFECTIVE_SHUNTING
},
beforeForkDirective:{
// 岔前分路不良
operation: OperationEvent.Switch.defectiveShunting.before.operation,
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_FRONT
},
locateForkDirective:{
// 定位分路不良
operation: OperationEvent.Switch.defectiveShunting.locate.operation,
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_FIXED
} }
}, },
StationStand:{ StationStand:{
@ -415,6 +425,11 @@ export const menuOperate = {
operation: OperationEvent.MixinCommand.collocation.menu.operation, operation: OperationEvent.MixinCommand.collocation.menu.operation,
cmdType: CMD.Train.CMD_TRAIN_TRUST cmdType: CMD.Train.CMD_TRAIN_TRUST
}, },
// 机器人司机模拟驾驶 Train_Drive
trainDrive: {
operation: OperationEvent.MixinCommand.trainDrive.menu.operation,
cmdType: CMD.Train.CMD_TRAIN_DRIVE
},
// 设置连挂 // 设置连挂
setLink: { setLink: {
operation: OperationEvent.MixinCommand.setLink.menu.operation, operation: OperationEvent.MixinCommand.setLink.menu.operation,
@ -879,6 +894,21 @@ export const menuOperate = {
modifyDispatcherLogerRpDirection:{ modifyDispatcherLogerRpDirection:{
operation: OperationEvent.CTCCommand.modifyDispatcherLogerRpSection.menu.operation, operation: OperationEvent.CTCCommand.modifyDispatcherLogerRpSection.menu.operation,
cmdType: CMD.CTC.CTC_ZONE_SAVE_DIRECTION cmdType: CMD.CTC.CTC_ZONE_SAVE_DIRECTION
},
// 状态切换操作
switchRouteSetModel:{
operation: OperationEvent.CTCCommand.switchRouteSetModel.confirm.operation,
cmdType: CMD.CTC.CTC_SWITCH_ROUTE_SET_MODEL
},
// 操作模式转换
switchControlMode:{
operation: OperationEvent.MixinCommand.modeCovert.applyModeCovertCommit.operation,
cmdType: CMD.CTC.CTC_SWITCH_CONTROL_OPERATION_MODEL
},
// 同意操作模式转换
agreeSwitchControlMode:{
operation: OperationEvent.MixinCommand.modeCovert.agreeModeCovertCommit.operation,
cmdType: CMD.CTC.CTC_AGREE_OPERATION_MODEL
} }
}, },
Rail: { Rail: {
@ -901,6 +931,31 @@ export const menuOperate = {
railQueryRegister: { railQueryRegister: {
operation: OperationEvent.RailCommand.railQueryRegister.menu.operation, operation: OperationEvent.RailCommand.railQueryRegister.menu.operation,
cmdType: CMD.RAIL.CMD_RAIL_QUERY_REGISTER 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
},
// 防洪安全上岗签到表 提交
floodControlSafetyTableSave:{
operation: OperationEvent.FloodSafetyRegister.formInput.submit.operation,
cmdType: CMD.RAIL.CMD_RAIL_FLOOD_CONTROL_SAFETY_SUBMIT
},
// 防洪安全上岗签到表 更新
floodControlSafetyTableUpdate:{
operation: OperationEvent.FloodSafetyRegister.formInput.update.operation,
cmdType: CMD.RAIL.CMD_RAIL_FLOOD_CONTROL_SAFETY_UPDATE
},
// 非正常情况接发列车关键环节控制表 提交
abnormalTrainTableSave:{
operation: OperationEvent.AbnormalTrainRegister.formInput.submit.operation,
cmdType: CMD.RAIL.CMD_RAIL_ABNORMAL_TRAIN_SAVE
} }
}, },
Conversation: { Conversation: {

View File

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

View File

@ -84,11 +84,6 @@ export default {
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
}, },
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
},
{ {
label: '设置备用车', label: '设置备用车',
handler: this.loadSpare, handler: this.loadSpare,
@ -230,9 +225,6 @@ export default {
this.$refs.trainAddPlan.doShow(operate); this.$refs.trainAddPlan.doShow(operate);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -164,11 +164,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -357,9 +352,6 @@ export default {
} }
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -67,11 +67,6 @@ export default {
label: '重启联锁机', label: '重启联锁机',
handler: this.restartInterlock, handler: this.restartInterlock,
cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -150,9 +145,6 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
handlerOpenPdf(elem) { handlerOpenPdf(elem) {
const url = `https://joylink.club/oss/projects/wjls/${this.selected.jp}/${elem.file}`; const url = `https://joylink.club/oss/projects/wjls/${this.selected.jp}/${elem.file}`;
window.open(url, '_blank'); window.open(url, '_blank');

View File

@ -91,11 +91,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -212,9 +207,6 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
}
} }
}; };
</script> </script>

View File

@ -112,11 +112,6 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -266,9 +261,6 @@ export default {
callback: action => { callback: action => {
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -27,7 +27,6 @@ import TrainDetailInfo from './dialog/trainDetailInfo';
import CancelMouseState from '@/mixin/CancelMouseState'; import CancelMouseState from '@/mixin/CancelMouseState';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
export default { export default {
@ -116,10 +115,6 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -214,9 +209,6 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() { nextStation() {
commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => { }).catch((error) => {

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="menus" :style="{width: width + 'px'}"> <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" /> <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="position: absolute; top: 64px;z-index: 10;background: #F0F0F0;padding: 2px;height: 65px;width: 100%;">
<div style="display: flex;"> <div style="display: flex;">
@ -33,7 +33,7 @@
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">与中心通信正常</div> <div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">与中心通信正常</div>
</div> </div>
</div> </div>
<menu-button-ctc ref="menuButtonCtc" :selected="selected" /> <menu-button-ctc ref="menuButtonCtc" :selected="selected" :work="'ctcWork'" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'ctcWork'" /> <menu-station-stand ref="menuStationStand" :selected="selected" :work="'ctcWork'" />
<menu-switch ref="menuSwitch" :selected="selected" :work="'ctcWork'" /> <menu-switch ref="menuSwitch" :selected="selected" :work="'ctcWork'" />
<menu-signal ref="menuSignal" :selected="selected" :work="'ctcWork'" /> <menu-signal ref="menuSignal" :selected="selected" :work="'ctcWork'" />
@ -42,7 +42,7 @@
<menu-station ref="menuStation" :selected="selected" :work="'ctcWork'" /> <menu-station ref="menuStation" :selected="selected" :work="'ctcWork'" />
<passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" /> <passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" />
<runplan-pane ref="runplanPane" /> <runplan-pane ref="runplanPane" />
<bottom-table ref="bottomTable" /> <!-- <bottom-table ref="bottomTable" /> -->
<menu-panel ref="menuPanel" /> <menu-panel ref="menuPanel" />
<stage-runplan ref="stageRunplan" @closeFlash="closeStageFlash" @noticeInfo="noticeInfo" /> <stage-runplan ref="stageRunplan" @closeFlash="closeStageFlash" @noticeInfo="noticeInfo" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" /> <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 NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control'; import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import { timestampFormat } from '@/utils/date'; import { timestampFormat } from '@/utils/date';
import BottomTable from './bottomTable'; // import BottomTable from './bottomTable';
import MenuPanel from './menuPanel'; import MenuPanel from './menuPanel';
import CtcBarIcon1 from '@/assets/ctc_icon/pic1.png'; import CtcBarIcon1 from '@/assets/ctc_icon/pic1.png';
import CtcBarIcon2 from '@/assets/ctc_icon/pic2.png'; import CtcBarIcon2 from '@/assets/ctc_icon/pic2.png';
@ -110,7 +110,7 @@ export default {
StageRunplan, StageRunplan,
NoticeInfo, NoticeInfo,
// DispatcherLoger, // DispatcherLoger,
BottomTable, // BottomTable,
MenuPanel, MenuPanel,
cmdManage, cmdManage,
signedCmd signedCmd

View File

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

View File

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

View File

@ -0,0 +1,320 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="apply-agree chengdou-03__systerm"
:title="title"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="tableBox">
<el-table :data="tableData" height="300px">
<el-table-column prop="name" label="站名" width="150" />
<el-table-column v-if="isAgreeMode">
<template slot="header" slot-scope="scope">
<el-checkbox v-model="allAgreeChecked" @change="changeAllAgreeChecked">全选</el-checkbox>
</template>
<template slot-scope="scope">
<el-checkbox v-model="scope.row.isAgree">同意</el-checkbox>
</template>
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">
<el-radio v-model="controlTypeAll" label="Center" :disabled="isAgreeMode" @input="changeControlTypeAll">全选</el-radio>
</template>
<template slot-scope="scope">
<el-radio v-model="scope.row.target" label="Center" :disabled="isAgreeMode">
<span :class="getTextColor(scope.row, 'Center')">中心控制</span>
</el-radio>
</template>
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">
<el-radio v-model="controlTypeAll" label="Station" :disabled="isAgreeMode" @input="changeControlTypeAll">全选</el-radio>
</template>
<template slot-scope="scope">
<el-radio v-model="scope.row.target" label="Station" :disabled="isAgreeMode">
<span :class="getTextColor(scope.row, 'Station')">车站控制</span>
</el-radio>
</template>
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">
<el-radio v-model="controlTypeAll" label="Station_Shunt" :disabled="isAgreeMode" @input="changeControlTypeAll">全选</el-radio>
</template>
<template slot-scope="scope">
<el-radio v-model="scope.row.target" label="Station_Shunt" :disabled="isAgreeMode">
<span :class="getTextColor(scope.row, 'Station_Shunt')">车站调车</span>
</el-radio>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="5" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="5" :offset="2">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog></div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import {menuOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { UserOperationType } from '@/scripts/ConstDic';
export default {
name: 'ForkDirective',
components: {
NoticeInfo
},
props: {
work: {
type: String,
default: () => {
return 'ctcWork';
}
}
},
data() {
return {
dialogShow: false,
title: '操作方式转换',
controlTypeAll: '',
tableData: [],
loading: false,
isAgreeMode: false,
allAgreeChecked: false,
domIdConfirm: ''
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
roleDeviceCode() {
return this.$store.state.training.roleDeviceCode;
},
operationModeApplyList() {
return this.$store.state.socket.operationModeApplyList;
}
},
watch: {
tableData: {
handler: function() {
const hasTableData = !!this.tableData.length;
const isAgreeEvery = hasTableData && this.tableData.every(item => {
return item.isAgree;
});
this.allAgreeChecked = isAgreeEvery;
const centerEvery = hasTableData && this.tableData.every(item => {
return item.target == 'Center';
});
const stationEvery = hasTableData && this.tableData.every(item => {
return item.target == 'Station';
});
const shuntEvery = hasTableData && this.tableData.every(item => {
return item.target == 'Station_Shunt';
});
if (centerEvery) {
this.controlTypeAll = 'Center';
} else if (stationEvery) {
this.controlTypeAll = 'Station';
} else if (shuntEvery) {
this.controlTypeAll = 'Station_Shunt';
} else {
this.controlTypeAll = '';
}
},
deep: true
}
},
methods:{
getTextColor(row, type) {
let colorClass = '';
if (row.source == type) {
colorClass = 'redText';
}
if (this.isAgreeMode) {
if (row.target == type) {
colorClass = 'orangeText';
}
}
return colorClass;
},
changeAllAgreeChecked() {
this.tableData.forEach(item => {
this.$set(item, 'isAgree', this.allAgreeChecked);
});
},
changeControlTypeAll() {
this.tableData.forEach(item => {
this.$set(item, 'target', this.controlTypeAll);
});
},
doShow(operate) {
this.operation = operate.operation;
if (this.operation == OperationEvent.MixinCommand.modeCovert.applyModeCovert.operation) {
this.domIdConfirm = OperationEvent.MixinCommand.modeCovert.applyModeCovertCommit.domId;
this.isAgreeMode = false;
} else if (this.operation == OperationEvent.MixinCommand.modeCovert.agreeModeCovert.operation) {
this.domIdConfirm = OperationEvent.MixinCommand.modeCovert.agreeModeCovertCommit.domId;
this.isAgreeMode = true;
}
this.getListData();
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
getListData() {
this.tableData = [];
if (this.isAgreeMode) {
this.operationModeApplyList.forEach(item => {
const info = this.$store.getters['map/getDeviceByCode'](item.code);
const obj = {
...item,
name: info ? info.name : '',
isAgree: false
};
this.tableData.push(obj);
});
} else {
let list = this.stationList;
if (this.work == 'ctcWork') {
const roleDeviceInfo = this.$store.getters['map/getDeviceByCode'](this.roleDeviceCode);
if (roleDeviceInfo) {
list = [roleDeviceInfo];
}
}
list.forEach(item => {
const info = this.$store.getters['map/getDeviceByCode'](item.code);
if (info) {
const obj = {
name: info.name,
isAgree: false,
code: info.code,
source: info.operationMode,
target: info.operationMode
};
this.tableData.push(obj);
}
});
}
},
commit() {
if (this.isAgreeMode) {
const list = [];
const noList = [];
this.tableData.forEach(item => {
if (item.isAgree) {
list.push(item.code);
} else {
noList.push(item.code);
}
});
const operate = {
over: true,
operation: menuOperate.CTC.agreeSwitchControlMode.operation,
userOperationType: UserOperationType.LEFTCLICK,
cmdType: menuOperate.CTC.agreeSwitchControlMode.cmdType,
param: {
agreeStationCodes: list,
noAgreeStationCodes: noList
}
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.loading = false;
this.doClose();
this.$store.commit('socket/clearOperationModeApplyList', JSON.parse(JSON.stringify(this.tableData)));
}
}).catch((err) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(err.message);
});
} else {
const list = [];
this.tableData.forEach(item => {
if (item.source != item.target) {
list.push({
stationCode: item.code,
target: item.target
});
}
});
if (list.length) {
const operate = {
over: true,
operation: menuOperate.CTC.switchControlMode.operation,
userOperationType: UserOperationType.LEFTCLICK,
cmdType: menuOperate.CTC.switchControlMode.cmdType,
param: {
params: list
}
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.loading = false;
this.doClose();
}
}).catch((err) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(err.message);
});
}
}
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh');
}
}
};
</script>
<style lang="scss" scoped>
.tableBox {
padding-bottom: 10px;
}
.button-group {
text-align: center;
}
.redText {
color: red;
}
.orangeText {
color: orange;
}
</style>

View File

@ -0,0 +1,118 @@
<template>
<el-dialog
v-dialogDrag
class="switch-control chengdou-03__systerm"
:title="title"
:visible.sync="show"
width="300px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row justify="center" style="text-align: center;margin-bottom: 10px;">
{{ name+ '请输入第1重密码' }}
</el-row>
<el-row justify="center" style="text-align:center;">
<el-input v-model="passwordCheck" placeholder="" size="medium" type="password" style="width: 180px;display: inline-block;margin-bottom: 10px;" />
</el-row>
<el-row v-if="showMistake" style="margin-bottom: 10px;text-align: center;">
<el-col :span="22" :offset="1">
<span class="password-error">*密码输入错误请重新输入*</span>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="3">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'DefectivePasswordBox',
components: {
},
data() {
return {
/* 写死的初始密码*/
correctPassword: '123',
name:'',
/* 输入值*/
passwordCheck: '',
dialogShow: false,
loading: false,
title:'铅封按钮,请输入密码',
selected: null,
showMistake: false,
operation: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Switch.defectiveShunting.twoConfirm.domId : '';
}
},
methods:{
doShow(operate) {
this.operation = operate.operation;
if (operate.operation == OperationEvent.Switch.cancelDefectiveShunting.menu.operation) {
this.name = '取消分路不良';
} else {
this.name = '分路不良';
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
commit() {
if (this.passwordCheck === this.correctPassword) {
this.$emit('checkOver', this.operation);
this.doClose();
this.inputClear();
} else {
this.showMistake = true;
}
},
inputClear() {
this.showMistake = false;
this.passwordCheck = '';
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh');
}
}
};
//
</script>
<style lang="scss">
.password-error {
color: red;
}
</style>

View File

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

View File

@ -0,0 +1,160 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="switch-control chengdou-03__systerm"
:title="title"
:visible.sync="show"
width="300px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row justify="center" class="ForkDirectiveTips">
{{ '下发"'+title+'" 命令吗?' }}
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="3">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
<defective-password-box ref="defectivePasswordBox" pop-class="chengdou-03__systerm" @checkOver="passWordCommit" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import DefectivePasswordBox from './childDialog/defectivePasswordBox';
import { UserOperationType } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'ForkDirective',
components: {
DefectivePasswordBox,
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
title:'分路不良',
selected: null,
operation: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Switch.defectiveShunting.confirm.domId : '';
}
},
methods: {
doShow(operate, selected) {
this.selected = selected;
this.operation = operate.operation;
if (operate.operation == OperationEvent.Switch.cancelDefectiveShunting.menu.operation) {
this.title = '取消分路不良';
} else {
this.title = '分路不良';
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
commit() {
this.openPasswordBox(OperationEvent.Switch.defectiveShunting);
},
//
openPasswordBox(operator) {
const operate = {
operation: operator.confirm.operation
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.defectivePasswordBox.doShow({operation:this.operation});
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow();
});
},
passWordCommit(data) {
const operate = {
over: true,
operation: data,
userOperationType: UserOperationType.LEFTCLICK
};
switch (data) {
case OperationEvent.Switch.defectiveShunting.before.operation: {
operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_FRONT;
break;
}
case OperationEvent.Switch.defectiveShunting.locate.operation: {
operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_FIXED;
break;
}
case OperationEvent.Switch.defectiveShunting.reverse.operation: {
operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_REVERSE;
break;
}
case OperationEvent.Section.defectiveShunting.menu.operation: {
operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING;
break;
}
case OperationEvent.Switch.cancelDefectiveShunting.menu.operation: {
operate.cmdType = CMD.Section.CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING;
break;
}
}
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh');
}
}
};
</script>
<style lang="scss">
.ForkDirectiveTips{
margin-bottom: 16px;
text-align: center;
font-size: 15px;
font-weight: bold;
}
</style>

View File

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

View File

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

View File

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

View File

@ -0,0 +1,250 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm updateTrip"
:title="title"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="tableBox">
<el-table :data="tableData" height="300px">
<el-table-column prop="name" label="站名" width="150" />
<el-table-column>
<template slot="header" slot-scope="scope">
<el-checkbox v-model="planControlChecked" @change="changePlanControlChecked">全选</el-checkbox>
</template>
<template slot-scope="scope">
<el-checkbox v-model="scope.row.planControl">计划控制</el-checkbox>
</template>
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">
<el-radio v-model="allRouteSet" label="Plan_Set_Route" @input="changeAllRouteSet">全选</el-radio>
</template>
<template slot-scope="scope">
<el-radio v-model="scope.row.routeSetMode" label="Plan_Set_Route">
<span :class="isRouteSetMode(scope.row.code, 'Plan_Set_Route') ? 'redText' : ''">按图排路</span>
</el-radio>
</template>
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">
<el-radio v-model="allRouteSet" label="Manual_Set_Route" @input="changeAllRouteSet">全选</el-radio>
</template>
<template slot-scope="scope">
<el-radio v-model="scope.row.routeSetMode" label="Manual_Set_Route">
<span :class="isRouteSetMode(scope.row.code, 'Manual_Set_Route') ? 'redText' : ''">手工排路</span>
</el-radio>
</template>
</el-table-column>
</el-table>
</div>
<div class="button-group">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</div>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { UserOperationType } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
export default {
name: 'StatusSelect',
components: {
NoticeInfo
},
props: {
work: {
type: String,
default: () => {
return 'ctcWork';
}
}
},
data() {
return {
dialogShow: false,
tableData: [],
mapTableData: {},
planControlChecked: false,
allRouteSet: '',
loading: false
};
},
computed: {
...mapGetters('map', ['stationList']),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.CTCCommand.switchRouteSetModel.cancel.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.switchRouteSetModel.confirm.domId : '';
},
title() {
return '状态选择';
},
roleDeviceCode() {
return this.$store.state.training.roleDeviceCode;
}
},
watch: {
tableData: {
handler: function() {
const hasTableData = !!this.tableData.length;
const planControlEvery = hasTableData && this.tableData.every(item => {
return item.planControl;
});
this.planControlChecked = planControlEvery;
const planSetRouteEvery = hasTableData && this.tableData.every(item => {
return item.routeSetMode == 'Plan_Set_Route';
});
const manualSetRouteEvery = hasTableData && this.tableData.every(item => {
return item.routeSetMode == 'Manual_Set_Route';
});
this.allRouteSet = planSetRouteEvery ? 'Plan_Set_Route' : (manualSetRouteEvery ? 'Manual_Set_Route' : '');
},
deep: true
}
},
methods: {
changePlanControlChecked() {
this.tableData.forEach(item => {
this.$set(item, 'planControl', this.planControlChecked);
});
},
changeAllRouteSet() {
this.tableData.forEach(item => {
this.$set(item, 'routeSetMode', this.allRouteSet);
});
},
isRouteSetMode(code, key) {
let s = false;
const obj = this.mapTableData[code];
if (obj && obj.routeSetMode == key) {
s = true;
}
return s;
},
doShow() {
this.getTableData();
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
getTableData() {
const mList = [];
this.mapTableData = {};
let list = this.stationList;
if (this.work == 'ctcWork') {
const roleDeviceInfo = this.$store.getters['map/getDeviceByCode'](this.roleDeviceCode);
if (roleDeviceInfo) {
list = [roleDeviceInfo];
}
}
const localArr = ['Station'];
list.forEach(item => {
const obj = this.$store.getters['map/getDeviceByCode'](item.code);
if (obj && obj.controlMode == 'Local' && localArr.includes(obj.operationMode)) {
const param = {
code: obj.code,
name: obj.name,
routeSetMode: obj.routeSetMode,
planControl: obj.planControl
};
mList.push(param);
this.mapTableData[obj.code] = {
...param
};
}
});
this.tableData = mList;
},
getChangeInfoList() {
const list = [];
this.tableData.forEach(item => {
const obj = this.mapTableData[item.code];
if (obj) {
const param = {};
const difArr = ['routeSetMode', 'planControl'];
difArr.forEach(key => {
if (item[key] != obj[key]) {
param[key] = item[key];
}
});
if (Object.keys(param).length) {
list.push({
...param,
stationCode: item.code
});
}
}
});
return list;
},
commit() {
const list = this.getChangeInfoList();
console.log('🚀 ~ file: statusSelect.vue:154 ~ commit ~ list', list);
if (list.length) {
const operate = {
over: true,
operation: menuOperate.CTC.switchRouteSetModel.operation,
userOperationType: UserOperationType.LEFTCLICK,
cmdType: menuOperate.CTC.switchRouteSetModel.cmdType,
param: {
routeSetModeParams: list
}
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.loading = false;
this.doClose();
}
}).catch((err) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(err.message);
});
}
},
cancel() {
const operate = {
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.CTCCommand.switchRouteSetModel.cancel.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.doClose();
}
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.tableBox {
padding-bottom: 10px;
}
.button-group {
text-align: center;
}
.redText {
color: red;
}
</style>

View File

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

View File

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

View File

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

View File

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

View File

@ -1,118 +1,125 @@
<template> <template>
<div id="menuButtons_box" class="menu menuButton" style="height: 35px;" :style="{left: point.x+'px', bottom: point.y+'px' }"> <div id="menuButtons_box" class="menu menuButton" style="height: 35px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
<button :id="Signal.arrangementRoute.button.domId" class="button_box" @click="buttonDown(Signal.arrangementRoute.button.operation, ['Signal','SignalButton'])"> <button :id="Signal.arrangementRoute.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Signal.arrangementRoute.button.operation, ['Signal','SignalButton'])">
<span :style="{ color: operation === Signal.arrangementRoute.button.operation ? '#ccc':'black'}"> <span :style="{ color: operation === Signal.arrangementRoute.button.operation ? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="MixinCommand.totalCancel.button.domId" class="button_box" @click="buttonDown(MixinCommand.totalCancel.button.operation, ['Signal','SignalButton'])"> <button :id="MixinCommand.totalCancel.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(MixinCommand.totalCancel.button.operation, ['Signal','SignalButton'])">
<span :style="{color: operation === MixinCommand.totalCancel.button.operation ? '#ccc': 'black'}"> <span :style="{color: operation === MixinCommand.totalCancel.button.operation ? '#ccc': 'black'}">
<center><b></b></center> <center><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="Signal.reopenSignal.button.domId" class="button_box" @click="buttonDown(Signal.reopenSignal.button.operation, ['Signal','SignalButton'])"> <button :id="Signal.reopenSignal.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Signal.reopenSignal.button.operation, ['Signal','SignalButton'])">
<span :style="{color: operation === Signal.reopenSignal.button.operation ? '#ccc': 'black'}"> <span :style="{color: operation === Signal.reopenSignal.button.operation ? '#ccc': 'black'}">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="Signal.guide.button.domId" class="button_box" @click="buttonDown(Signal.guide.button.operation, ['SignalButton'])"> <button :id="Signal.guide.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Signal.guide.button.operation, ['SignalButton'])">
<span :style="{color: operation === Signal.guide.button.operation? '#ccc':'#800000'}"> <span :style="{color: operation === Signal.guide.button.operation? '#ccc':'#800000'}">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </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" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Station.guideLock.button.operation, ['GuideLock'])">
<span :style="{color: operation === Station.guideLock.button.operation?'#ccc':'#800000'}"> <span :style="{color: operation === Station.guideLock.button.operation?'#ccc':'#800000'}">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="Signal.humanTrainRoute.button.domId" class="button_box" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['Signal','SignalButton'])"> <button :id="Signal.humanTrainRoute.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['Signal','SignalButton'])">
<span :style="{color: operation === Signal.humanTrainRoute.button.operation ? '#ccc':'#800000'}"> <span :style="{color: operation === Signal.humanTrainRoute.button.operation ? '#ccc':'#800000'}">
<center><b></b></center> <center><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="Switch.locate.button.domId" class="button_box" @click="buttonDown(Switch.locate.button.operation, ['Switch'])"> <button :id="Switch.locate.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Switch.locate.button.operation, ['Switch'])">
<span :style="{color: operation === Switch.locate.button.operation? '#ccc':'black'}"> <span :style="{color: operation === Switch.locate.button.operation? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="Switch.reverse.button.domId" class="button_box" @click="buttonDown(Switch.reverse.button.operation, ['Switch'])"> <button :id="Switch.reverse.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Switch.reverse.button.operation, ['Switch'])">
<span :style="{color: operation === Switch.reverse.button.operation? '#ccc':'black'}"> <span :style="{color: operation === Switch.reverse.button.operation? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="Switch.lock.button.domId" class="button_box" @click="buttonDown(Switch.lock.button.operation, ['Switch'])"> <button :id="Switch.lock.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Switch.lock.button.operation, ['Switch'])">
<span :style="{color: operation === Switch.lock.button.operation ? '#ccc':'black'}"> <span :style="{color: operation === Switch.lock.button.operation ? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="Switch.unlock.button.domId" class="button_box" @click="buttonDown(Switch.unlock.button.operation, ['Switch'])"> <button :id="Switch.unlock.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Switch.unlock.button.operation, ['Switch'])">
<span :style="{color: operation === Switch.unlock.button.operation ? '#ccc':'black'}"> <span :style="{color: operation === Switch.unlock.button.operation ? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="MixinCommand.block.button.domId" class="button_box" @click="buttonDown(MixinCommand.lock.button.operation, ['Switch', 'Signal'])"> <button :id="MixinCommand.block.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(MixinCommand.block.button.operation, ['Switch', 'Signal'])">
<span :style="{color: operation === MixinCommand.block.button.operation ? '#ccc':'black'}"> <span :style="{color: operation === MixinCommand.block.button.operation ? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="MixinCommand.functionButton.button.domId" class="button_box" @click="buttonDown(MixinCommand.functionButton.button.operation, ['StationStand', 'Station','SignalButton'])"> <button :id="MixinCommand.functionButton.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(MixinCommand.functionButton.button.operation, ['StationStand', 'Station','SignalButton'])">
<span :style="{color: operation === MixinCommand.functionButton.button.operation ? '#ccc':'black'}"> <span :style="{color: operation === MixinCommand.functionButton.button.operation ? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="111" class="button_box" @click="buttonDown()"> <button :id="111" class="button_box" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" @click="buttonDown()">
<span style="color: black;"> <span style="color: black;">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="222" :disabled="true" class="button_box" @click="buttonDown()"> <button :id="Section.defectiveShunting.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Section.defectiveShunting.button.operation, ['Section','Switch'])">
<span style="color: black;"> <span :style="{color: operation === Section.defectiveShunting.button.operation ? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="Command.cancel.clearMbm.domId" class="button_box" @click="commandClear"> <button :id="Command.cancel.clearMbm.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="commandClear">
<span style="color: black;"> <span style="color: black;">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="333" class="button_box" @click="commandOrders"> <button :id="333" class="button_box" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" @click="commandOrders">
<span style="color: black;"> <span style="color: black;">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="444" class="button_box" @click="buttonDown()"> <button :id="CTCCommand.switchRouteSetModel.menu.domId" class="button_box" @click="statusSelectBtn">
<span style="color: black;"> <span style="color: black;">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<button :id="555" class="button_box" @click="buttonDown()"> <button :id="MixinCommand.modeCovert.button.domId" class="button_box" :class="{flicker: hasModeApplyList && !modeCovertShow, redFlick: hasModeApplyList && !modeCovertShow}" @click="modeCovertBtn(MixinCommand.modeCovert.button.operation)">
<span style="color: black;"> <span :style="{color: modeCovertShow ? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b></b><b></b></center>
<center><b></b><b></b></center> <center><b></b><b></b></center>
</span> </span>
</button> </button>
<div v-if="modeCovertShow" class="modeCovertPopList">
<div :id="MixinCommand.modeCovert.applyModeCovert.domId" class="eachModeCovertPop" @click="applyModeCovert">模式申请</div>
<div :id="MixinCommand.modeCovert.agreeModeCovert.domId" class="eachModeCovertPop" :class="{flicker: hasModeApplyList && modeCovertShow, redFlick: hasModeApplyList && modeCovertShow}" @click="agreeModeCovert">同意模式申请</div>
</div>
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" /> <password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" /> <notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<train-route ref="trainRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" /> <train-route ref="trainRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" />
<shunt-route ref="shuntRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" /> <shunt-route ref="shuntRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" />
<fork-directive ref="forkDirective" />
<apply-or-agree-mode-covert ref="applyOrAgreeModeCovert" :work="work" />
<statusSelect ref="statusSelect" :work="work" />
</div> </div>
</template> </template>
@ -130,7 +137,9 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
import { MouseEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MouseEvent, DeviceMenu } from '@/scripts/ConstDic';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import {UserOperationType} from '../../../../scripts/ConstDic'; import {UserOperationType} from '../../../../scripts/ConstDic';
import ForkDirective from './dialog/forkDirective';
import ApplyOrAgreeModeCovert from './dialog/applyOrAgreeModeCovert';
import StatusSelect from './dialog/statusSelect';
export default { export default {
name: 'MapButtonMenu', name: 'MapButtonMenu',
components: { components: {
@ -139,7 +148,10 @@ export default {
NoticeInfo, NoticeInfo,
PopMenu, PopMenu,
TrainRoute, TrainRoute,
ShuntRoute ShuntRoute,
ForkDirective,
ApplyOrAgreeModeCovert,
StatusSelect
}, },
props: { props: {
selected: { selected: {
@ -147,6 +159,12 @@ export default {
default: () => { default: () => {
return null; return null;
} }
},
work: {
type: String,
default: () => {
return 'ctcWork';
}
} }
}, },
data() { data() {
@ -156,6 +174,7 @@ export default {
y: 0 y: 0
}, },
operation: '', operation: '',
modeCovertShow:false,
buttonName: '', buttonName: '',
guideColorDown: '#FEEE1A', guideColorDown: '#FEEE1A',
guideColorUp: '#DCDCDC', guideColorUp: '#DCDCDC',
@ -197,6 +216,12 @@ export default {
'autoReentryList', 'autoReentryList',
'autoReentryData' 'autoReentryData'
]), ]),
hasModeApplyList() {
return this.$store.state.socket.operationModeApplyList.length;
},
isDispatchWork () {
return this.work == 'dispatchWork';
},
Switch() { Switch() {
return OperationEvent.Switch; return OperationEvent.Switch;
}, },
@ -243,6 +268,8 @@ export default {
return CMD.Signal.CMD_SIGNAL_SET_ROUTE; return CMD.Signal.CMD_SIGNAL_SET_ROUTE;
case this.Signal.guide.button.operation: // case this.Signal.guide.button.operation: //
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE; return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
case this.Signal.lock.button.operation: //
return CMD.Signal.CMD_SIGNAL_BLOCK;
} }
return ''; return '';
} }
@ -252,7 +279,6 @@ export default {
this.updateButtonShow(val, old); this.updateButtonShow(val, old);
}, },
'$store.state.menuOperation.selectedCount': function (val) { '$store.state.menuOperation.selectedCount': function (val) {
// debugger;
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode); const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
if (!station || station.controlMode === 'Interlock') { return; } if (!station || station.controlMode === 'Interlock') { return; }
this.selectedChange(); this.selectedChange();
@ -262,7 +288,11 @@ export default {
this.$store.dispatch('menuOperation/setButtonOperation', null); this.$store.dispatch('menuOperation/setButtonOperation', null);
this.clearOperate(); this.clearOperate();
}, },
'$store.state.menuOperation.leftClickCount': function (val) {
this.modeCovertShow = false;
},
'$store.state.menuOperation.menuCount': function (val) { '$store.state.menuOperation.menuCount': function (val) {
this.modeCovertShow = false;
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) { if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
const operate = { const operate = {
userOperationType: 'rightClick', userOperationType: 'rightClick',
@ -311,9 +341,9 @@ export default {
this.Switch.lock.button.operation, this.Switch.lock.button.operation,
this.Switch.unlock.button.operation, this.Switch.unlock.button.operation,
this.Switch.locate.button.operation, this.Switch.locate.button.operation,
this.Switch.reverse.button.operation, this.Switch.reverse.button.operation
this.Switch.block.button.operation, // this.Switch.block.button.operation,
this.Switch.unblock.button.operation // this.Switch.unblock.button.operation
]; ];
EventBus.$on('setMenuButtonPosition', (offset) => { EventBus.$on('setMenuButtonPosition', (offset) => {
this.point.y = offset; this.point.y = offset;
@ -345,6 +375,9 @@ export default {
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); 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 => { }).catch(e => {
console.error(e); console.error(e);
@ -371,39 +404,28 @@ export default {
} }
} }
}, },
// S statusSelectBtn() {
guideLockLeftButtonDown() {
const operate = { const operate = {
userOperationType: UserOperationType.LEFTCLICK, operation: OperationEvent.CTCCommand.switchRouteSetModel.menu.operation
operation: this.Switch.guideLock.leftButton.operation
}; };
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.statusSelect.doShow();
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 modeCovertBtn(operation) {
guideLockRightButtonDown() {
const operate = { const operate = {
userOperationType: UserOperationType.LEFTCLICK, operation: operation
operation: this.Switch.guideLock.rightButton.operation
}; };
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) { this.modeCovertShow = true;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.operation = operation;
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) { buttonDown(operation, commandTypeList) {
// MixinCommand.modeCovert.button.operation
this.modeCovertShow = false;
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode); const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
if (!station || station.controlMode === 'Interlock') { return; } if (!station || station.controlMode === 'Interlock') { return; }
const operate = { const operate = {
@ -411,6 +433,12 @@ export default {
userOperationType: UserOperationType.LEFTCLICK, userOperationType: UserOperationType.LEFTCLICK,
operation: operation operation: operation
}; };
if (operation == this.MixinCommand.modeCovert.button.operation) {
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
this.modeCovertShow = true;
this.operation = operation;
});
} else {
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/setButtonOperation', operation === this.Command.cancel.clearMbm.operation ? null : operation); this.$store.dispatch('menuOperation/setButtonOperation', operation === this.Command.cancel.clearMbm.operation ? null : operation);
@ -420,7 +448,8 @@ export default {
const operationList = [ const operationList = [
this.Signal.humanTrainRoute.button.operation, this.Signal.humanTrainRoute.button.operation,
this.Section.fault.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)) { if (operationList.includes(operation)) {
operate['operateNext'] = this.Command.close.password.operation; operate['operateNext'] = this.Command.close.password.operation;
@ -429,6 +458,31 @@ export default {
this.timeNode = this.$store.state.socket.simulationTimeSync; this.timeNode = this.$store.state.socket.simulationTimeSync;
} }
}); });
}
},
applyModeCovert() {
const operate = {
userOperationType: UserOperationType.LEFTCLICK,
operation: this.MixinCommand.modeCovert.applyModeCovert.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
this.modeCovertShow = false;
this.$refs.applyOrAgreeModeCovert.doShow(operate);
this.clearOperate();
});
},
agreeModeCovert() {
const operate = {
userOperationType: UserOperationType.LEFTCLICK,
operation: this.MixinCommand.modeCovert.agreeModeCovert.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
this.modeCovertShow = false;
this.$refs.applyOrAgreeModeCovert.doShow(operate);
this.clearOperate();
});
}, },
// //
handleRouteDataMap() { handleRouteDataMap() {
@ -546,6 +600,7 @@ export default {
}; };
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) { if (valid) {
this.deviceList.push(model);
this.$store.dispatch('training/updateMapState', [{code: model.code, _type: model._type, hasSelected: 1}]); this.$store.dispatch('training/updateMapState', [{code: model.code, _type: model._type, hasSelected: 1}]);
} }
}); });
@ -586,35 +641,72 @@ export default {
return false; return false;
} }
}, },
handleSignalBlockOrUnblock(model) { handleSignalBlock(model) {
const buttonOperation = this.$store.state.menuOperation.buttonOperation;
const operate = { const operate = {
over: true,
code: model.code, code: model.code,
operation: buttonOperation, operation: this.Signal.lock.button.operation,
cmdType: '', userOperationType: UserOperationType.LEFTCLICK,
param: {} val: model.code,
param: {signalCode: model.code}
}; };
if (model._type === 'Signal' && !this.checkHasTrainButton(model)) { this.$store.dispatch('trainingNew/next', operate);
if (buttonOperation === this.Signal.lock.button.operation) { },
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK; handleSwitchBlock(model) {
operate.param = {signalCode: model.code}; const operate = {
} else if (buttonOperation === this.Signal.unlock.button.operation) { code: model.code,
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK; operation: this.Switch.block.button.operation,
operate.param = {signalCode: model.code}; userOperationType: UserOperationType.LEFTCLICK,
} val: model.code,
} else if (model._type === 'SignalButton' && model.type === 'PICK') { param: {switchCode: model.code}
if (buttonOperation === this.Signal.lock.button.operation) { };
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK; this.$store.dispatch('trainingNew/next', operate);
operate.param = {signalCode: model.signalCode}; },
} else if (buttonOperation === this.Signal.unlock.button.operation) { // handleSignalLockOrUnlock(model) {
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK; // const buttonOperation = this.$store.state.menuOperation.buttonOperation;
operate.param = {signalCode: model.signalCode}; // const operate = {
} // over: true,
} // code: model.code,
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { // 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}
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.clearOperate(); this.$store.dispatch('training/updateMapState', [{code: model.code, _type: model._type, hasSelected: 1}]);
} }
}).catch(e => { }).catch(e => {
console.error(e); console.error(e);
@ -622,15 +714,6 @@ export default {
this.clearOperate(); 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) { handleFaultSection(model) {
if (model._type === 'Section') { if (model._type === 'Section') {
const operate = { const operate = {
@ -659,6 +742,7 @@ export default {
return; return;
} }
const buttonOperation = this.$store.state.menuOperation.buttonOperation; 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.commandTypeList.includes(model._type)) {
if (buttonOperation === this.MixinCommand.totalCancel.button.operation) { if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
this.handleTotalCancel(model); this.handleTotalCancel(model);
@ -666,16 +750,26 @@ export default {
this.handleTotalHumanSolution(model); this.handleTotalHumanSolution(model);
} else if (this.switchOperation.includes(buttonOperation)) { } else if (this.switchOperation.includes(buttonOperation)) {
this.handleSwitchOperate(model); this.handleSwitchOperate(model);
} else if (buttonOperation === this.Signal.lock.button.operation || buttonOperation === this.Signal.unlock.button.operation) { } else if (buttonOperation === this.MixinCommand.block.button.operation) {
this.handleSignalBlockOrUnblock(model); 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) { } else if (buttonOperation === this.Section.fault.button.operation) {
this.handleFaultSection(model); this.handleFaultSection(model);
} else if (buttonOperation === this.Section.defectiveShunting.button.operation) {
this.handelDefectiveShunting(model);
} else if (buttonOperation === this.Signal.reopenSignal.button.operation) { } else if (buttonOperation === this.Signal.reopenSignal.button.operation) {
this.handleReopenSignal(model); this.handleReopenSignal(model);
} else if (buttonOperation === this.Signal.arrangementRoute.button.operation) { } else if (buttonOperation === this.Signal.arrangementRoute.button.operation) {
this.arrangementRouteOperation(model); this.arrangementRouteOperation(model);
} else if (buttonOperation === this.Signal.guide.button.operation ) { } else if (buttonOperation === this.Signal.guide.button.operation ) {
this.handleGuideSignal(model); this.handleGuideSignal(model);
} else if (buttonOperation === this.Station.guideLock.button.operation ) {
this.handleGuideLock(model);
} else if (buttonOperation === this.MixinCommand.functionButton.button.operation) { } else if (buttonOperation === this.MixinCommand.functionButton.button.operation) {
const signalButtonList = ['ASSIST', 'CHANGE_DIRECTION', 'PICK_ASSIST', 'DEPART_ASSIST', 'OCCLUSION', 'RECOVERY', 'ACCIDENT']; const signalButtonList = ['ASSIST', 'CHANGE_DIRECTION', 'PICK_ASSIST', 'DEPART_ASSIST', 'OCCLUSION', 'RECOVERY', 'ACCIDENT'];
if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) { if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) {
@ -702,6 +796,7 @@ export default {
if (this.deviceList && this.deviceList[1]) { if (this.deviceList && this.deviceList[1]) {
deviceState.push({code: this.deviceList[1].code, _type: this.deviceList[0]._type, hasSelected: 0}); deviceState.push({code: this.deviceList[1].code, _type: this.deviceList[0]._type, hasSelected: 0});
} }
this.operation = '';
this.$store.dispatch('training/updateMapState', deviceState); this.$store.dispatch('training/updateMapState', deviceState);
this.deviceList = []; this.deviceList = [];
this.menuSignal = null; this.menuSignal = null;
@ -751,14 +846,28 @@ export default {
operate.userOperationType = UserOperationType.LEFTCLICK; operate.userOperationType = UserOperationType.LEFTCLICK;
operate.over = true; operate.over = true;
operate.cmdType = this.cmdType; 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) {
console.log(this.selected, 'selected');
operate.userOperationType = UserOperationType.LEFTCLICK;
operate.over = true;
operate.cmdType = this.selected.instance && this.selected.instance.guideLock ? CMD.Station.CMD_STATION_MASTER_UNLOCK : CMD.Station.CMD_STATION_MASTER_LOCK;
} }
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.clearOperate();
}
}).catch(e => { }).catch(e => {
console.error(e); console.error(e);
this.$refs.noticeInfo.doShow(); 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(); this.clearOperate();
}); });
} }
@ -766,6 +875,43 @@ export default {
commandClear() { commandClear() {
this.clearOperate(); this.clearOperate();
}, },
//
handelDefectiveShunting(model) {
if (model._type == 'Section') {
const operate = {
start: 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) {
// operate.operation = OperationEvent.Section.defectiveShunting.menu.operation;
this.$refs.forkDirective.doShow(operate, this.selected);
}
});
} else if (model._type == 'Switch') {
const operate = {
start: true,
operation: OperationEvent.Section.defectiveShunting.menu.operation,
userOperationType: UserOperationType.LEFTCLICK,
param:{
sectionCode: model.sectionACode
}
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
operate.operation = OperationEvent.Switch.defectiveShunting.before.operation;
this.$refs.forkDirective.doShow(operate, this.selected);
}
});
}
this.clearOperate();
},
assistOperateOrChange(model) { assistOperateOrChange(model) {
// mode.type== // mode.type==
const modelTypeMap = { const modelTypeMap = {
@ -909,4 +1055,43 @@ export default {
background-color: $hoverBg; background-color: $hoverBg;
} }
} }
.modeCovertPopList{
position: absolute;
width: 130px;
background: #F0F0F0;
bottom: 18px;
left: 780px;
box-shadow: 1px 3px 3px #000;
}
.eachModeCovertPop{
font-size: 15px;
padding: 5px 0px 5px 10px;
cursor: pointer;
}
.eachModeCovertPop:hover{
background: #c3c3c3;
}
.disabled {
cursor: not-allowed;
span {
color: #ccc !important;
}
}
.redFlick {
background: red;
}
@keyframes fade {
from {
opacity: 1.0;
}
50% {
opacity: 0.2;
}
to {
opacity: 1.0;
}
}
.flicker {
animation: fade 600ms infinite;
}
</style> </style>

View File

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

View File

@ -67,11 +67,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -174,9 +169,6 @@ export default {
this.$refs.trainAddPlan.doShow(operate); this.$refs.trainAddPlan.doShow(operate);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

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 {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import DrawSelect from './dialog/drawSelect'; import DrawSelect from './dialog/drawSelect';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import {UserOperationType} from "../../../../scripts/ConstDic"; import {UserOperationType} from '../../../../scripts/ConstDic';
export default { export default {
name: 'SignalMenu', name: 'SignalMenu',
@ -62,34 +62,40 @@ export default {
label: '办理 通过进路', label: '办理 通过进路',
handler: this.arrangementRoute, handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, 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: '列车 办理进路', label: '列车 办理进路',
handler: this.arrangementRoute, handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, 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: '取消进路', label: '取消进路',
handler: this.cancelTrainRoute, handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, 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: '信号重开', label: '信号重开',
handler: this.reopenSignal, handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, 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: '封锁/解封', label: '封锁/解封',
handler: this.lockOrUnlock, handler: this.lockOrUnlock,
cmdType: '', 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 // cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
}, },
@ -97,22 +103,26 @@ export default {
label: '总人解', label: '总人解',
handler: this.humanTrainRoute, handler: this.humanTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE, 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: '引导', label: '引导',
handler: this.guide, handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_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: '坡道解锁', label: '坡道解锁',
handler: '', handler: '',
cmdType: '', cmdType: '',
isDisabled: (signal, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork' isDisabled: (signal, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
} }
], ],
menuForce: [ menuForce: [
@ -125,11 +135,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -315,9 +320,6 @@ export default {
} }
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -65,11 +65,6 @@ export default {
label: '重启联锁机', label: '重启联锁机',
handler: this.restartInterlock, handler: this.restartInterlock,
cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -154,9 +149,6 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
// //
veryControlClick(selected) { veryControlClick(selected) {
// stationCodepressDown10 // stationCodepressDown10

View File

@ -50,11 +50,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -113,9 +108,6 @@ export default {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -8,6 +8,7 @@
<set-fault ref="setFault" pop-class="datie-02__systerm" /> <set-fault ref="setFault" pop-class="datie-02__systerm" />
<draw-select ref="drawSelect" /> <draw-select ref="drawSelect" />
<route-cancel ref="routeCancel" /> <route-cancel ref="routeCancel" />
<fork-directive ref="forkDirective" />
</div> </div>
</template> </template>
@ -25,6 +26,9 @@ import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import RouteCancel from './menuDialog/routeCancel'; import RouteCancel from './menuDialog/routeCancel';
import { UserOperationType } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import ForkDirective from './dialog/forkDirective';
export default { export default {
name: 'SwitchMenu', name: 'SwitchMenu',
@ -36,7 +40,8 @@ export default {
SetFault, SetFault,
SwitchHookLock, SwitchHookLock,
DrawSelect, DrawSelect,
RouteCancel RouteCancel,
ForkDirective
}, },
mixins: [ mixins: [
CancelMouseState CancelMouseState
@ -63,72 +68,109 @@ export default {
label: '定操', label: '定操',
handler: this.locate, handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION, 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: '反操', label: '反操',
handler: this.reverse, handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION, 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: '单锁', label: '单锁',
handler: this.lock, handler: this.lock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_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: '单解', label: '单解',
handler: this.unlock, handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_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: '道岔钩锁', label: '道岔钩锁',
handler: this.hookLock, handler: this.hookLock,
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK, 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: '封锁/解封', label: '封锁/解封',
handle: '' handler: this.blockOrUnblock,
cmdType: CMD.Switch.CMD_SWITCH_BLOCK,
isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '区故解', 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: '岔前 分路不良', 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: '定位 分路不良', 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: '反位 分路不良', 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: '接触网定位无电', label: '空闲',
handle: '' handler: this.cancleForkDirective,
}, cmdType: CMD.Section.CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING,
{ isDisabled: (section, station, work) => station.controlMode !== 'Local',
label: '接触网反位无电', isShow: (section, work) => work === 'ctcWork'
handle: ''
},
{
label: '添加调机号',
handle: ''
},
{
label: '删除调机号',
handle: ''
},
{
label: '修改调机号',
handle: ''
} }
// {
// 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: [ menuForce: [
{ {
@ -138,11 +180,6 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -238,27 +275,37 @@ export default {
} }
}); });
}, },
blockOrUnblock() {
if (this.selected.blockade) {
this.unblock();
} else {
this.block();
}
},
// //
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) { if (valid) {
this.$refs.switchControl.doShow(operate, this.selected); // this.$refs.switchControl.doShow(operate, this.selected);
} }
}); });
}, },
// //
unblock() { 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) { if (valid) {
this.$refs.switchControl.doShow(operate, this.selected); // this.$refs.switchControl.doShow(operate, this.selected);
} }
}); });
}, },
// / // /
fault() { 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) { if (valid) {
this.$refs.switchControl.doShow(operate, this.selected); // this.$refs.switchControl.doShow(operate, this.selected);
} }
}); });
}, },
@ -287,6 +334,47 @@ export default {
} }
}); });
}, },
//
beforeForkDirective() {
commitOperate(menuOperate.Switch.beforeForkDirective, {sectionCode:this.selected.sectionACode}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.forkDirective.doShow(operate, this.selected);
}
});
},
//
locateForkDirective() {
commitOperate(menuOperate.Switch.locateForkDirective, {sectionCode:this.selected.sectionACode}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.forkDirective.doShow(operate, this.selected);
}
});
},
//
reverseForkDirective() {
commitOperate(menuOperate.Switch.locateForkDirective, {sectionCode:this.selected.sectionACode}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.forkDirective.doShow(operate, this.selected);
}
});
},
//
cancleForkDirective() {
const operate = {
start: 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) {
this.$refs.forkDirective.doShow(operate, this.selected);
}
});
},
// //
hookLock() { hookLock() {
this.$refs.switchHookLock.doShow(this.selected); this.$refs.switchHookLock.doShow(this.selected);
@ -298,9 +386,6 @@ export default {
callback: action => { callback: action => {
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -6,6 +6,7 @@
<speed-limit ref="speedLimit" pop-class="chengdou-03__systerm" /> <speed-limit ref="speedLimit" pop-class="chengdou-03__systerm" />
<train-stop ref="trainStop" pop-class="chengdou-03__systerm" /> <train-stop ref="trainStop" pop-class="chengdou-03__systerm" />
<update-trip ref="updateTrip" /> <update-trip ref="updateTrip" />
<train-operation ref="trainOperation" />
</div> </div>
</template> </template>
@ -21,8 +22,10 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { menuOperate } from '@/jmapNew/theme/components/utils/menuOperate'; import { menuOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit'; import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
import TrainStop from '@/jmapNew/theme/components/menus/dialog/trainStop'; import TrainStop from '@/jmapNew/theme/components/menus/dialog/trainStop';
import {UserOperationType} from "../../../../scripts/ConstDic"; import TrainOperation from '@/jmapNew/theme/components/menus/dialog/trainOperation';
import {UserOperationType} from '../../../../scripts/ConstDic';
import { MouseEvent } from '@/scripts/ConstDic';
import { getSessionStorage } from '@/utils/auth';
export default { export default {
name: 'MenuTrain', name: 'MenuTrain',
components: { components: {
@ -31,7 +34,8 @@ export default {
SetFault, SetFault,
UpdateTrip, UpdateTrip,
SpeedLimit, SpeedLimit,
TrainStop TrainStop,
TrainOperation
}, },
mixins: [ mixins: [
CancelMouseState CancelMouseState
@ -63,13 +67,13 @@ export default {
label: '删车次号', label: '删车次号',
handler: this.removeTripNumber, handler: this.removeTripNumber,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE, cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE,
isShow: (train, work) => work === 'localWork' isShow: (train, work) => work === 'localWork' || work === 'ctcWork'
}, },
{ {
label: '换端', label: '换端',
handler: this.turnDirection, handler: this.turnDirection,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE, cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE,
isShow: (train, work) => work === 'localWork' isShow: (train, work) => work === 'localWork' || work === 'ctcWork'
} }
], ],
menuForce: [ menuForce: [
@ -80,10 +84,6 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -135,15 +135,23 @@ export default {
]), ]),
...mapGetters('menuOperation', [ ...mapGetters('menuOperation', [
'buttonOperation' 'buttonOperation'
]) ]),
project() {
return getSessionStorage('project');
}
}, },
watch: { watch: {
'$store.state.menuOperation.menuCount': function () { '$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); this.doShow(this.$store.state.menuOperation.menuPosition);
} else { } else {
this.doClose(); this.doClose();
} }
},
'$store.state.menuOperation.selected': function (val) {
if (val._type === 'Train' && val._event === MouseEvent.Left && this.project === 'thailandsandbox') {
this.$refs.trainOperation.doShow(val);
}
} }
}, },
methods: { methods: {
@ -216,9 +224,6 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
handleSpeedLimit() { // handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected); this.$refs.speedLimit.doShow(this.selected);
}, },
@ -317,15 +322,14 @@ export default {
const operate = { const operate = {
start: true, start: true,
userOperationType: UserOperationType.LEFTCLICK, userOperationType: UserOperationType.LEFTCLICK,
operation: menuOperate.Driver.changePreselectionMode.operation, operation: menuOperate.Common.trainDrive,
cmdType: menuOperate.Driver.changePreselectionMode.cmdType,
param: { param: {
code: this.selected.code code: this.selected.code
} }
}; };
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (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> </template>
<script> <script>
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { UserOperationType } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default { export default {
@ -109,7 +110,7 @@ export default {
}, },
cancel() { cancel() {
const operate = { const operate = {
over: true, userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };

View File

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

View File

@ -96,11 +96,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
// { // {
// label: '', // label: '',
@ -251,9 +246,6 @@ export default {
this.$refs.trainAddPlan.doShow(operate); this.$refs.trainAddPlan.doShow(operate);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -171,11 +171,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -381,9 +376,6 @@ export default {
} }
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -72,11 +72,6 @@ export default {
label: '重启联锁机', label: '重启联锁机',
handler: this.restartInterlock, handler: this.restartInterlock,
cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -162,9 +157,6 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
handlerOpenPdf(elem) { handlerOpenPdf(elem) {
const url = `https://joylink.club/oss/projects/wjls/${this.selected.jp}/${elem.file}`; const url = `https://joylink.club/oss/projects/wjls/${this.selected.jp}/${elem.file}`;
window.open(url, '_blank'); window.open(url, '_blank');

View File

@ -91,11 +91,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -211,9 +206,6 @@ export default {
this.$refs.standDetail.doShow(operate, this.selected, []); this.$refs.standDetail.doShow(operate, this.selected, []);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -178,11 +178,6 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -335,9 +330,6 @@ export default {
callback: action => { callback: action => {
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -150,10 +150,6 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -289,9 +285,6 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() { nextStation() {
this.trainSend(menuOperate.Driver.driveAhead); this.trainSend(menuOperate.Driver.driveAhead);
}, },

View File

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

View File

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

View File

@ -96,11 +96,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
// { // {
// label: '', // label: '',
@ -255,9 +250,6 @@ export default {
this.$refs.trainAddPlan.doShow(operate); this.$refs.trainAddPlan.doShow(operate);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -177,11 +177,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -390,9 +385,6 @@ export default {
} }
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -72,11 +72,6 @@ export default {
label: '重启联锁机', label: '重启联锁机',
handler: this.restartInterlock, handler: this.restartInterlock,
cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -162,9 +157,6 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
handlerOpenPdf(elem) { handlerOpenPdf(elem) {
const url = `https://joylink.club/oss/projects/wjls/${this.selected.jp}/${elem.file}`; const url = `https://joylink.club/oss/projects/wjls/${this.selected.jp}/${elem.file}`;
window.open(url, '_blank'); window.open(url, '_blank');

View File

@ -91,11 +91,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -211,9 +206,6 @@ export default {
this.$refs.standDetail.doShow(operate, this.selected, []); this.$refs.standDetail.doShow(operate, this.selected, []);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -172,11 +172,6 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -332,9 +327,6 @@ export default {
callback: action => { callback: action => {
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -153,10 +153,6 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -299,9 +295,6 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() { nextStation() {
this.trainSend(menuOperate.Driver.driveAhead); this.trainSend(menuOperate.Driver.driveAhead);
}, },

View File

@ -153,10 +153,6 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -299,9 +295,6 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() { nextStation() {
this.trainSend(menuOperate.Driver.driveAhead); this.trainSend(menuOperate.Driver.driveAhead);
}, },

View File

@ -114,6 +114,10 @@ class Theme {
loadLocalWorkMenuComponent(code) { loadLocalWorkMenuComponent(code) {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/localWorkMenu`).default); 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) { loadCtcWorkMenuComponent(code) {
if (code == '16') { if (code == '16') {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/ctcWorkMenu`).default); return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/ctcWorkMenu`).default);

View File

@ -109,11 +109,6 @@ export default {
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
}, },
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
},
{ {
label: '设置备用车', label: '设置备用车',
handler: this.loadSpare, handler: this.loadSpare,
@ -296,9 +291,6 @@ export default {
this.$refs.allLineCancelLimit.doShow(operate, this.selected); this.$refs.allLineCancelLimit.doShow(operate, this.selected);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -174,11 +174,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -452,9 +447,6 @@ export default {
} }
}); });
return routes; return routes;
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -73,11 +73,6 @@ export default {
label: '重启联锁机', label: '重启联锁机',
handler: this.restartInterlock, handler: this.restartInterlock,
cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -179,9 +174,6 @@ export default {
this.$refs.stationCmdControl.doShow(operate, this.selected); this.$refs.stationCmdControl.doShow(operate, this.selected);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -166,11 +166,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -324,9 +319,6 @@ export default {
this.$refs.standDetail.doShow(operate, this.selected); this.$refs.standDetail.doShow(operate, this.selected);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -153,11 +153,6 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -428,9 +423,6 @@ export default {
this.$refs.allLineCancelLimit.doShow(operate, this.selected); this.$refs.allLineCancelLimit.doShow(operate, this.selected);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -123,10 +123,6 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -275,9 +271,6 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() { nextStation() {
commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch(() => { }).catch(() => {

View File

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

View File

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

View File

@ -101,13 +101,13 @@ export default {
title: this.$t('menu.menuBar.forcedStationControl'), title: this.$t('menu.menuBar.forcedStationControl'),
click: this.mandatoryStationControl, click: this.mandatoryStationControl,
operate: OperationEvent.StationControl.forcedStationControl.password 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

@ -127,11 +127,6 @@ export default {
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
}, },
{
label: this.$t('menu.menuSection.triggerFaultManagement'),
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
},
{ {
label: '设置备用车', label: '设置备用车',
handler: this.loadSpare, handler: this.loadSpare,
@ -325,9 +320,6 @@ export default {
this.$refs.speedCmdControl.doShow(operate, this.selected); this.$refs.speedCmdControl.doShow(operate, this.selected);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -178,11 +178,6 @@ export default {
label: this.$t('menu.menuSignal.cancelFault'), label: this.$t('menu.menuSignal.cancelFault'),
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: this.$t('menu.menuSection.triggerFaultManagement'),
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -513,9 +508,6 @@ export default {
this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected)); this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected));
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -101,11 +101,6 @@ export default {
label: '重启联锁机', label: '重启联锁机',
handler: this.restartInterlock, handler: this.restartInterlock,
cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE
},
{
label: this.$t('menu.menuSection.triggerFaultManagement'),
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -234,9 +229,6 @@ export default {
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected); this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
} }
}; };

View File

@ -167,11 +167,6 @@ export default {
label: '取消站台紧急停车', label: '取消站台紧急停车',
handler: this.cancelEmergencyClose, handler: this.cancelEmergencyClose,
cmdType: CMD.Stand.CMD_STAND_CANCEL_EMERGENCY_CLOSE cmdType: CMD.Stand.CMD_STAND_CANCEL_EMERGENCY_CLOSE
},
{
label: this.$t('menu.menuSection.triggerFaultManagement'),
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
} }
] ]
}; };
@ -356,9 +351,6 @@ export default {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
// PSL // PSL
openPsl() { openPsl() {
this.$refs.psl.doShow(this.selected); this.$refs.psl.doShow(this.selected);

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