调整西安一 三号线运行图导入

This commit is contained in:
zyy 2020-04-21 14:14:33 +08:00
parent d4a621d049
commit b31ef6bc2d
83 changed files with 21717 additions and 4 deletions

View File

@ -5,7 +5,8 @@
"author": "Pan <panfree23@gmail.com>",
"license": "MIT",
"scripts": {
"dev": "vue-cli-service serve --open",
"start": "vue-cli-service serve --open",
"dev": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve",
"build": "vue-cli-service build",
"test": "vue-cli-service build --mode staging",
"local": "vue-cli-service build --mode native",

View File

@ -6,7 +6,8 @@ const mapDeviceStyle = {
'06': 'ningbo_01',
'07': 'haerbin_01',
'08': 'foshan_01',
'09': 'xian_02'
'09': 'xian_02',
'10': 'xian_01'
};
export function selectLineCode(code) {

View File

@ -0,0 +1,652 @@
import defaultStyle from '../defaultStyle';
import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle {
constructor() {
super();
this[deviceType.Section] = {
active: {
routeColor: false // 进路触发颜色
},
text: {
show: true, // 物理区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 18, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
logicText: {
show: true, // 逻辑区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 6, // 文字离区段距离
fontSize: 8, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
standText: {
show: true, // 站台轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 30, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
reentryText: {
show: true, // 折返轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 30, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
transferText: {
show: true, // 转换轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 28, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
destinationText: {
show: true, // 目的码名称显示
opposite: true, // 对称相反
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 10, // 文字离区段距离
fontSize: 10, // 字体大小
fontWeight: 'bold', // 字体粗细
fontColor: 'yellow', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
line: {
width: 5, // 区段宽度
beyondWidth: 1, // 区段宽超出宽度
invadeColor: '#EF0C08', // 区段侵入颜色
spareColor: '#3F3F3F', // 区段空闲颜色
communicationOccupiedColor: '#FF329A', // 区段通信车占用颜色
unCommunicationOccupiedColor: '#FE0000', // 区段非通讯车占用颜色
routeLockColor: '#FFFFFF', // 区段路由锁定颜色
faultLockColor: '#9B4A0A', // 区段故障锁定颜色
undefinedColor: '#0071C1', // 区段未定义颜色
protectionLockedColor: '#FEFF00', // 保护区段锁闭(未用)
blockColor: '#800080', // 区段封锁颜色
atcExcisionColor: '#A0522D', // 区段atc切除颜色
atsExcisionColor: '#A0522D', // 区段ats切除颜色
timeReleaseColor: '#3F3F3F', // 区段延时释放颜色
protectiveLockColor: '#FFFF00', // 区段保护锁闭
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
logicalTextColor: '#FFFFFF' // 逻辑区段名称颜色 (未用)
},
axle: {}, // 计轴
speedLimit: { // 限速元素
width: 1, // 限速线的宽短
distance: 5, // 限速线距离区段距离
lineColor: '#FFFF00', // 限速线颜色
nameShow: false // 名称显示
},
separator: {
z: 6, // 分割符层级
width: 1.2, // 分隔符宽度
endWidth: 3.5, // 尽头分隔符宽度
endColor: '#3F3F3F', // 尽头分隔符颜色
color: '#3149C3', // 区段边界符颜色
halfHeight: 5 // 区段分隔符高度的一半
},
block: {
special: false // 区段特殊显示
},
trainPosition:{
display: false // 列车实时位置显示
}
};
this[deviceType.Signal] = {
distance: 10, // 设备距离区段的距离
post: {
standardLength: 6, // 高柱长度
standardHeight: 6, // 灯柱高度
standardColor: '#3149C3', // 灯珠颜色
standardWidth: 2 // 灯珠宽度
},
text: {
show: true, // 信号机名称显示
distance: 3, // 文字和灯杆的距离
isAlignCenter: false, // 信号字体对其方式
fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: '#FFFFFF', // 信号灯字体默认色
blockColor: '#EF0C08', // 信号灯字体锁定颜色
checkColor: '#00FF00', // 信号字体
nameBorderShow: true // 信号机名字边框显示
},
lamp: {
bgShow: false, // 是否被选中
guidName: 'defult', // 默认引导类型
stopWidth: 2, // 禁止线宽度
borderWidth: 1, // 信号灯边框线宽度
borderColor: '#3149C3', // 信号灯边框线颜色
radiusR: 6, // 信号灯半径
blockColor: '#EF0C08', // 信号灯锁闭
grayColor: '#7F7F7F', // 信号灯灰色
redColor: '#FF0000', // 信号灯红色
greenColor: '#00FF00', // 信号灯绿色
yellowColor: '#FFFF00', // 信号灯黄色
whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#0070C0' // 信号灯蓝色
},
route: {
direction: false, // 自动进路方向
offset: { x: -4, y: 0 }, // 自动进路偏移量
routeColor: '#00FF00' // 自动进路
},
auto: {
signalFrontTriangle: false, // 信号灯前三角展示
direction: false, // 自动通过方向
offset: { x: -4, y: 0}, // 自动通过偏移量
width: 5, // 自动宽度
autoRoute: '#00FF00', // 自动进路
autoTrigger: '#FFFF00', // 自动触发
manualControl: '#FFFF00', // 人工控制
outConflict: '#C00808' // 出车冲突
},
delay: {
direction: true, // 延时解锁方向
offset: { x: 15, y: -10}, // 延时解锁偏移量
fontSize: 11, // 延迟解锁字体大小
fontColor: '#FF0000', // 延迟解锁颜色
fontWeight: 'bold' // 字体粗细
},
button: {
distance: 5, // 信号灯按钮距离区段的距离
borderDashColor: '#FFFFFF', // 信号灯按钮边线
buttonColor: 'darkgreen', // 信号灯按钮颜色
buttonLightenColor: '#E4EF50' // 信号灯按钮闪烁颜色
},
lowButton:{
display: false // 现地 信号机按钮
}
};
this[deviceType.StationStand] = {
common: { // 通用属性
textFontSize: 11, // 站台默认字体大小
functionButtonShow: '03' // 功能灯按钮显示条件01所有模式下显示 02 行调显示 03现地显示
},
safetyDoor: { // 屏蔽门
height: 3, // 站台屏蔽门高度
width: 60,
distance: 8, // 站台和屏蔽门之间的距离
defaultColor: '#00FF00', // 屏蔽门默认颜色
splitDoorColor: '#F61107' // 屏蔽门切除颜色
},
stand: { // 站台
headFontSize: 11, // 站台首端字体大小
spareColor: '#606060', // 站台空闲颜色
stopColor: '#FEFE00', // 站台列车停站颜色
jumpStopColor: '#9A99FF', // 站台跳停颜色
designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: 0, y: 25 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: -25 }, // 外站台紧急关闭偏移量
closeColor: '#F61107' // 站台紧急关闭颜色
},
reentry: { // 站台折返策略
position: 0, // 折返方向
offset: {x: -16, y: 20}, // 折返偏移量
noHumanColor: '#0F16DA', // 站台无人折返
autoChangeEndsColor: '#0BF400' // 站台自动换端
},
detainCar: { // 扣车
text: 'H', // 扣车显示内容
position: 1, // 扣车方向
offset: {x: -8, y: -6}, // 扣车偏移量
trainColor: '#E4EF50', // 车站扣车颜色
centerTrainColor: '#FFFFFF', // 中心扣车颜色
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
},
stopTime: { // 停站时间
position: 1, // 运行时间方向
offset: {x: -8, y: 26}, // 运行时间偏移量
textColor: '#FFFFFF' // 停站时间字体颜色
},
level: { // 运行等级
position: 1, // 运行等级方向
offset: {x: -8, y: 6}, // 运行等级偏移量
textColor: '#FFFFFF' // 停站等级字体颜色
},
trainStop: {}, // 停车标志
trainDepart: {}, // 停车计时
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
lampColor: '#5A5D5A' // 功能按钮颜色
}
};
this[deviceType.StationCounter] = {
text: {
distance: 2, // 计数器名称和文字的距离
fontColor: '#FFFFFF', // 计数器字体颜色
borderColor: '#E4EF50' // 计数器边框颜色
}
};
this[deviceType.StationDelayUnlock] = {
text: {
distance: 3, // 延迟解锁和设备之间的距离
fontColor: '#FFFFFF', // 延时解锁字体颜色
borderColor: '#FFFFFF' // 延迟解锁边框颜色
}
};
this[deviceType.AutoTurnBack] = {
// 是否显示
visibleConditions: '03',
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
subtitleText: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 17 // 等于副标题距离
},
lamp: {
lineDash: null, // 灯的包围框
borderShow: false, // 是否显示边框
stroke: '#FFFFFF', // 框的颜色
fill: 'rgba(0,0,0,0)', // 填充色
radiusR: 6, // 控制灯大小
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
lightUpColor: '#ffff00' // 点亮灯颜色
},
OutFrame: {
}
};
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
fill: 'rgba(0,0,0,0)', // 填充色
radiusR: 6, // 控制灯大小
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
lightUpColor: '#FF0000' // 点亮灯颜色
}
};
this[deviceType.Station] = {
// text: {
// show: true // 公里标名称显示
// },
kmPostShow: true, // 公里标显示
kilometerPosition: 'up', // 公里标朝向
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#FFFF00' // 控制灯颜色
},
turnBack: { // 按图折返
lamp: 1, // 灯数量
lampSpace: 60 // 灯间距
},
StationControl:{
text: {
distance: 2, // 灯和文字之间的距离
fontSize: 11, // 字体大小
fontFormat: 'consolas', // 字体格式
fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
},
lamp: {
count: 2, // 控制模式灯个数
offset: {x: 0, y: 0}, // 控制模式灯偏移量
radiusR: 4, // 控制模式灯的半径
distance: 36, // 控制模式之间灯之间的距离
grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色
emergencyControlShow: false, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: false // 中控显示
},
arrow: {
show: true // 控制模式箭头显隐
},
mouseOverStyle: { // 鼠标悬浮样式
fontSize: null,
fontFormat: 'consolas',
fontColor: '#000',
fontWeight: 'normal',
textAlign: 'middle',
textVerticalAlign: 'top'
}
}
};
this[deviceType.Switch] = {
text: {
show: true, // 道岔名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
offset: {x: 0, y: 8}, // 道岔名称与区段距离
fontSize: 11, // 字体大小
fontColor: '#C0C0C0', // 道岔名称颜色
fontWeight: 'bold', // 字体粗细
borderColor: '#FE0000', // 道岔边框颜色
lossColor: '#FFFFFF', // 道岔失去颜色
locateColor: '#00FF00', // 道岔定位颜色
inversionColor: '#9C9D09', // 道岔反位颜色
monolockLocationColor: '#ea282c', // 道岔单锁'定位'颜色
monolockInversionColor: '#ea282c', // 道岔单锁'反位'颜色
block: true // 封锁名称
},
sectionAction: {
flag: false, // 道岔 关联区段显示
spareColor: '#5b5b5b' // 区段显示颜色
},
core: {
length: 6 // 道岔单边长度
},
jointImg: { // 道岔 A B C D四元素属性配置
trapezoidLength: 8, // 直角梯形元素默认长度
block: false, // 联合图形封锁状态
flashingColors: '#D600D5', // 联合图形封锁闪烁显示颜色
fork: false, // 挤岔专用(如有挤岔操作 变为true
forKColor: 'red' // 挤岔颜色 配合挤岔专用
},
arcBlcok: { // 圆形封锁图形
show: false, // 显示
arcBorderColor: 'green', // 默认边框颜色
locationColor: 'green', // 定位封锁颜色
inversionColor: '#FFFF00' // 反位封锁颜色
},
rectLock: { // 矩形封锁框图形
rectWidth: 18, // 矩形框 宽高
rectBorderColor: '#fff', // 矩形边框颜色
monolock: false, // 单锁显示
block: false // 封锁显示
}
};
this[deviceType.Line] = {
lineColor: '#FFFFFF' // 线条颜色
};
this[deviceType.LcControl] = {
text: {
fontSize: 10, // 灯字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 灯大小
controlColor: '#FFFF00' // 灯颜色
},
mouseOverStyle: {
fontSize: 10,
fontFormat: 'consolas',
fontColor: '#FFF000',
fontWeight: 'normal',
textAlign: 'middle',
textVerticalAlign: 'top',
arcColor: '#00FFFF',
textColor: '#000000'
}
};
this[deviceType.ZcControl] = {
text: {
fontSize: 10, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 灯大小
controlColor: '#00FF00' // 灯颜色
},
mouseOverStyle: {
fontSize: 10,
fontFormat: 'consolas',
fontColor: '#FFF000',
fontWeight: 'normal',
textAlign: 'middle',
textVerticalAlign: 'top',
arcColor: '#00FFFF',
textColor: '#000000'
}
};
this[deviceType.LimitControl] = {
text: {
fontSize: 10, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 灯大小
controlColor: '#ECE9D8' // 灯颜色
},
mouseOverStyle: {
fontSize: 10,
fontFormat: 'consolas',
fontColor: '#FFF000',
fontWeight: 'normal',
textAlign: 'middle',
textVerticalAlign: 'top',
textColor: '#000000',
arcColor: '#00FFFF'
}
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
fill: 'rgba(0,0,0,0)', // 填充色
radiusR: 6, // 控制灯大小
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
}
};
this[deviceType.TrainWindow] = {
lineColor: '#4DD43F', // 车次窗颜色
lineDash: null, // 车次窗虚线间隔
lineWidth: 1, // 车次窗线宽
trainWindowSmooth: 0 // 车次窗矩形圆滑程度
};
this[deviceType.SplitStation] = {
lineLength: 15, // 箭头线长度
lineWidth: 2, // 线宽
height: 35, // 分隔整体高度
strokeColor: '#00FF00', // 线颜色
triangleFillColor: '#00FF00', // 三角填充颜色
textFill: '#FFFFFF', // 文字颜色
verticalDistance: 10, // 箭头三角垂直高度
horizontalDistance: 7// 箭头三角水平高度
};
this[deviceType.Train] = {
trainBody: {
trainBodyLineWidth: 0, // 车身line宽
changeTrainWidth: true, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [
{
type: '03',
serviceNumber: 'MM',
nameFormat: 'serviceNumber:groupNumber'
},
{
type: '02',
nameFormat: 'targetCode:groupNumber'
}
], // 特殊列车类型需设置显示格式
lrPadding: 1, // 两边间隔
upPadding: 1, // 上边距离
trainBodyFillColor: '#000000', // 列车车身填充颜色
trainNameFormat: 'targetCode:serviceNumber:tripNumber'// 列车显示格式
},
directionArrow: {
},
hsda: {
trainHSDATextFontSize: 8// 列车HDSA字号
},
trainNumber: {
targetCodePrefix: '000', // 目的地码前缀
defaultTargetCode: 'AAA', // 默认目的地码
trainTargetTextAlign: 'left', // 车次号文字显示位置
trainNumberOffset: { x: 1, y: 1}// 目的地码偏移量
},
trainServer: {
serviceNumberPrefix: '00', // 服务号(表号)前缀
defaultServiceNumber: 'BB', // 默认服务号(表号)
trainServerOffset: { x: 26, y: 1}// 列车服务号偏移
},
trainTarget: {
tripNumberPrefix: '0000', // 车次号前缀
defaultDirectionCode: 'D', // 默认车次号1
defaultTripNumber: 'CCC', // 默认车次号2
trainTargetOffset: { x: 42, y: 1}// 列车车次号偏移
},
trainTargetNumber: {
groupNumberPrefix: '000', // 车组号前缀
defaultGroupNumber: 'EEE', // 默认车组号
trainTargetNumberOffset: {x: -1, y: 1}// 车组号偏移量
},
trainHead: {
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
trainHeadTriangleFirst: { x: 0, y: 0}, // 列车车头三角坐标1偏移量
trainHeadTriangleSecond: { x: 4, y: 7.5}, // 列车车头三角坐标2偏移量
trainHeadTriangleThird: { x: 0, y: 15}, // 列车车头三角坐标3偏移量
trainHeadRectHeight: 15, // 列车车头矩形高度
trainConntWidth: 4, // 列车竖杠的宽度
trainHeadFillColor: '#EF0C08'// 列车车头矩形填充颜色
},
common: {
trainHeight: 17, // 列车高度
trainHeadDistance: 2, // 列车和车头之间的间距
trainWidth: 76, // 列车长度
trainTextFontSize: 15, // 列车字号
fontFamily: 'consolas', // 默认字体 族类
nameFontSize: 15, // 字体大小
haveTextHSDA: false, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false, // 是否需创建trainBorder对象
aspectRatio: 8 / 15, // 字体宽高比例用以拼接text是计算位置
textOffset: 1, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 2, // 计算列车长度时--列车长比text多出尺寸
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
trainTip:true // 鼠标悬停列车状态信息框是否显示
},
trainStatusStyle: {
destinationStatus: [
{status: '01', showColor: '#FFFFFF'},
{status: '02', showColor: '#00FF00'},
{status: '03', showColor: '#3265FF'},
{status: '04', showColor: '#9B4A09'},
{status: '05', showColor: '#EF0C08'},
{status: '06', showColor: '#FFFFFF'},
{status: '07', showColor: '#FFFF00'}
], // 目的地状态 01准点 02早点 03严重早点 04晚点 05严重晚点 06头码车 07ATP切除
destinationStatusSetText: 'trainServer', // 目的地状态设置的对应哪个text的颜色
directionType: [
{
type: 1,
lineLShow: false,
lineRShow: false,
arrowLShow: false,
arrowRShow: true
},
{
type: 0,
lineLShow: false,
lineRShow: false,
arrowLShow: true,
arrowRShow: false
}
], // 运行方向状态类型对应车头显示状态 1从左往右 0从右往左
directionStopType: [
{type: '01', lineLShow: false, lineRShow: false},
{type: '02', lineLShow: false, lineRShow: true},
{type: '03', lineLShow: true, lineRShow: false}
], // 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行
driveModeStatus: [
{
status: 'AM',
trainLColor: '#00FF00',
trainRColor: '#00FF00'
},
{
status: 'CM',
trainLColor: '#FFFF00',
trainRColor: '#FFFF00'
},
{
status: 'RM',
trainLColor: '#EA700D',
trainRColor: '#EA700D'
},
{
status: 'NRM',
trainLColor: '#A0522D',
trainRColor: '#A0522D'
}
], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM
runControlStatus: [], // 设置运行控制状态类型 eg:{status: '01', hShow: false, sShow: false}
doorStatus: [], // 设置车门状态类型
communicationStatus: [], // 设置通信状态 eg:{status: '01', trainColor:'#725A64'}
alarmStatus: [], // 设置报警状态 eg:{status: '01', aShow: false}
serverNoType: []// 服务号状态类型 eg:{type: '01', showColor: '#FFFFFF'}
}
};
}
}
export default new SkinCode();

View File

@ -11,7 +11,8 @@ class Theme {
'06': 'ningbo_01',
'07': 'haerbin_01', // 哈尔滨培训线路
'08': 'foshan_01',
'09': 'xian_02'
'09': 'xian_02',
'10': 'xian_01'
};
this._localShowMode = { // 现地显示模式
'01': 'all', // 成都一 全显
@ -22,7 +23,8 @@ class Theme {
'06': 'ecStation', // 宁波一 集中站显示
'07': 'ecStation', // 哈尔滨培训线路 集中站显示
'08': 'all', // 佛山有轨线路 全显
'09': 'all'
'09': 'all',
'10': 'all'
};
}

View File

@ -0,0 +1,86 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm notice-info"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<template v-for="(message,index) in messages">
<div :key="index">{{ message }}</div>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'NoticeInfo',
data() {
return {
dialogShow: false,
messages: [this.$t('tip.commandFailed')],
operate: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return this.$t('tip.hint');
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.dialogShow = true;
this.messages = [this.$t('tip.commandFailed')];
if (messages && messages != 'null') {
this.messages.push(messages);
}
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.doClose();
},
cancel() {
this.doClose();
}
}
};
</script>
<style>
.notice-info .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -0,0 +1,361 @@
<template>
<el-dialog v-dialogDrag class="fuzhou-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false" append-to-body>
<div class="context">
<template v-for="(message,index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import NoticeInfo from './childDialog/noticeInfo';
export default {
name: 'ConfirmControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
return this.$t('menu.accessSetting');
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
return this.$t('menu.menuSignal.signalOff');
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
return this.$t('menu.menuSignal.signalReopen');
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
return this.$t('menu.cancelTheWay');
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
return this.$t('menu.approachManualControl');
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
return this.$t('menu.accessToATSAutomaticControl');
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
return this.$t('menu.menuStationStand.setRunLevel');
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
return this.$t('menu.stopTime');
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
return this.$t('menu.setSwitchbackStrategy');
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
/** 进路设置*/
return OperationEvent.Signal.arrangementRoute.confirm.domId;
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
return OperationEvent.Signal.signalClose.confirm.domId;
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
/** 信号重开*/
return OperationEvent.Signal.reopenSignal.confirm.domId;
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
/** 取消进路*/
return OperationEvent.Signal.cancelTrainRoute.confirm.domId;
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
return OperationEvent.Signal.humanControl.confirm.domId;
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交ATS自动控*/
return OperationEvent.Signal.atsAutoControl.confirm.domId;
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
/** 设置运行等级*/
return OperationEvent.StationStand.setRunLevel.confirm.domId;
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
/** 设置停站时间*/
return OperationEvent.StationStand.setStopTime.confirm.domId;
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
/** 设置折返策略*/
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
}
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
/** 进路设置*/
this.routeSetting();
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
this.signalClose();
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
/** 信号重开*/
this.reopenSignal();
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
/** 取消进路*/
this.cancelTrainRoute();
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
this.humanControl();
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交ATS自动控*/
this.atsAutoControl();
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
/** 设置运行等级*/
this.setRunLevel();
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
/** 停站时间*/
this.setStopTime();
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
/** 设置折返策略*/
this.setBackStrategy();
}
},
//
routeSetting() {
const operate = {
over: true,
operation: OperationEvent.Signal.arrangementRoute.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
signalClose() {
const operate = {
over: true,
operation: OperationEvent.Signal.signalClose.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
reopenSignal() {
const operate = {
over: true,
operation: OperationEvent.Signal.reopenSignal.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelTrainRoute() {
const operate = {
over: true,
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
humanControl() {
const operate = {
over: true,
operation: OperationEvent.Signal.humanControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
// ATS
atsAutoControl() {
const operate = {
over: true,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
setRunLevel() {
const operate = {
over: true,
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
val: this.operate.val
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
setStopTime() {
const operate = {
over: true,
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
val: this.operate.val
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
setBackStrategy() {
const operate = {
over: true,
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
val: this.operate.val
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.confirm-control .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -0,0 +1,144 @@
<template>
<el-dialog v-dialogDrag class="fuzhou-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="540px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false" append-to-body>
<div style="height: 60px; padding-left: 20px">
<span style="font-size: 18px">{{ message }}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="6" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="10" :offset="2">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'ConfirmControlSpeed',
data() {
return {
dialogShow: false,
loading: false,
operation: '',
message: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
return this.$t('menu.menuSection.sectionSetSpeedLimit');
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
return this.$t('menu.menuSection.sectionCancelSpeedLimit');
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
return this.$t('menu.switchSettingSpeedLimit');
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
return this.$t('menu.menuSection.sectionCancelSpeedLimit');
}
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
return OperationEvent.Section.setSpeed.confirm.domId; //
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
return OperationEvent.Section.cancelSpeed.confirm.domId; //
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
return OperationEvent.Switch.setSpeed.confirm.domId; //
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
return OperationEvent.Switch.cancelSpeed.confirm.domId; //
}
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.operation = operate.operation;
this.message = operate.message;
}
this.loading = false;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {};
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 1, success: true });
this.doClose();
}
}).catch(() => {
this.$emit('setOperate', { step: 0, success: false });
this.doClose();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 0, success: false });
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.confirm-control-speed .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -0,0 +1,126 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm route-unlock-confirm"
:title="title"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="height: 60px; padding-left: 20px">
<span>{{ $t('menu.in') }}{{ stationName }}{{ signalName }}{{ $t('menu.signalConfirmed') }}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="6" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="10" :offset="2">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'RouteUnlockConfirm',
data() {
return {
dialogShow: false,
loading: false,
signalName: '',
stationName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return this.$t('menu.signalDeblocking');
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.unlock.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.stationName = '';
this.signalName = '';
if (selected) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.loading = false;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
operation: OperationEvent.Signal.unlock.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 1, success: true });
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('setOperate', { step: 0, success: false });
this.doClose();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 0, success: false });
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.route-unlock-confirm .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -0,0 +1,180 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm confirm-control"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<template v-for="(message,index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'ConfirmTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
return this.$t('menu.menuTrain.addTrainId');
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
return this.$t('menu.menuTrain.editTrainId');
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
return this.$t('menu.menuTrain.deleteTrainId');
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
return this.$t('menu.menuTrain.moveTrainId');
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
return this.$t('menu.menuTrain.switchTrainId');
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
return this.$t('menu.menuTrain.editTrainNo');
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
/** 删除列车识别号*/
return OperationEvent.Train.delTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
/** 移动列车识别号*/
return OperationEvent.Train.moveTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
/** 交换列车识别号*/
return OperationEvent.Train.switchTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
/** 修改车组号*/
return OperationEvent.Train.editTrainNo.confirm.domId;
}
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('map/setTrainWindowShow', false);
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
this.routeSetting();
}
},
//
routeSetting() {
const operate = {
over: true,
operation: OperationEvent.Train.addTrainId.confirm.operation,
cmdType: CMD.Train.CMD_ADD_TRAIN_ID
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.confirm-control .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -0,0 +1,450 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm route-cmd-control"
:title="title"
:visible.sync="show"
width="840px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="8">
<el-form-item :label="this.$t('menu.type')" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option
v-for="option in typeList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="this.$t('menu.signalName')" label-width="100px">
<el-input v-model="signalName" size="small" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table
ref="tempData"
class="table"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
height="200"
>
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
</el-table>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="3">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
v-show="timeCountCommand>0"
>({{ timeCountCommand }})</span></el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdConfirm1" style="width:120px;" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
v-show="timeCountConfirm>0"
>({{ timeCountConfirm }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
</el-col>
</el-row>
</el-dialog>
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate" />
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { now } from '@/utils/date';
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteCmdControl',
components: {
ConfirmSignalUnlock
},
data() {
return {
dialogShow: false,
backOperate: '',
selected: '',
order: 0,
row: null,
timer: null,
operation: '',
cmdDisabled: [true, true, true],
stpDisabled: true,
tempData: [],
message: '',
timeCountCommand: -1,
timeCountConfirm: -1,
stationName: '',
signalName: ''
};
},
computed: {
typeList() {
return [
{ code: OperationEvent.Signal.unlock.menu.operation, name: this.$t('menu.menuSignal.signalDeblock') },
{ code: OperationEvent.Signal.guide.menu.operation, name: this.$t('menu.menuSignal.guideRouteHandle') }
];
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.order.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.order.domId;
}
}
return '';
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.confirm1.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.confirm1.domId;
}
}
return '';
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.confirm2.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.confirm2.domId;
}
}
return '';
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.stop.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.stop.domId;
}
}
return '';
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
return '';
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
return '信号解封';
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
return '办理引导进路';
}
}
return '';
}
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false;
}
});
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1;
}
}
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected) {
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
this.selected = selected;
}
this.order = 0;
this.operation = operate.operation;
this.tempData = [];
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true];
}
this.dialogShow = true;
this.stpDisabled = true;
this.setMessage(this.$t('tip.releaseTip'));
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
command() {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 第一步带弹框处理*/
this.commandHasPopUp();
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 第一步不带弹框处理*/
this.commandNoPopUp();
}
},
commandHasPopUp() {
const operate = {
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.order.operation;
}
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
}
}
});
},
commandNoPopUp() {
const operate = {
};
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.order.operation;
}
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
});
},
confirm1() {
const operate = {
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm1.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.confirm1.operation;
}
this.setMessage(this.$t('tip.secondConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
});
},
confirm2() {
const operate = {
over: true
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.confirm2.operation;
operate.cmdType = CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
});
},
stop() {
const operate = {
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.stop.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
});
},
close() {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
getOperate(operate) {
/** 弹框返回值处理*/
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
this.backOperate = operate;
this.setButtonEnable(operate);
if (operate.success) {
this.timeCountCommand = 30;
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.confirmedSuccess') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.cancelSuccess') });
}
}
},
setButtonEnable(param) {
this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false;
}
},
setMessage(message) {
this.message = message;
},
writeRecord(param) {
this.tempData.push(param);
},
editRecord(param) {
this.tempData.forEach(elem => {
if (elem.order == param.order) {
for (var prop in param) {
elem[prop] = param[prop];
}
}
});
}
}
};
</script>

View File

@ -0,0 +1,332 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm signal-control"
:title="title"
:visible.sync="show"
width="300px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="11" :offset="2"><span>{{ $t('menu.signal') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="signalName" size="small" disabled />
</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">{{ $t('menu.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteControl',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: null,
stationName: '',
signalName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
return this.$t('menu.menuSignal.cancelTheTrainApproach');
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
return this.$t('menu.menuSignal.signalOff');
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
return this.$t('menu.menuSignal.reopenTrainSignal');
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
return this.$t('menu.menuSignal.setInterlockAutoRoute');
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
return this.$t('menu.menuSignal.cancelInterlockAutoRoute');
} else if (this.operation == OperationEvent.Signal.setAutoTrigger.menu.operation) {
return this.$t('menu.menuSignal.setInterlockAutoTrigger');
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
return this.$t('menu.menuSignal.cancelInterlockAutoTrigger');
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.selected = selected;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
/** 取消列车进路*/
this.cancelTrainRoute();
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
this.signalClose();
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
/** 信号重开*/
this.reopenSignal();
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
/** 设置联锁自动进路*/
this.setAutoInterlock();
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
/** 取消联锁自动进路*/
this.cancelAutoInterlock();
} else if (this.operation == OperationEvent.Signal.setAutoTrigger.menu.operation) {
/** 设置联锁自动触发*/
this.setAutoTrigger();
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
/** 取消联锁自动触发*/
this.cancelAutoTrigger();
}
},
//
cancelTrainRoute() {
if (this.$store.state.training.prdType == '01') {
/** 现地工作站*/
this.cancelTrainRouteByLocal();
} else if (this.$store.state.training.prdType == '02') {
/** 行调工作站*/
this.cancelTrainRouteByCentral();
}
},
//
cancelTrainRouteByLocal() {
const operate = {
over: true,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelTrainRouteByCentral() {
const operate = {
over: true,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
messages: [this.$t('tip.signalModeToManualModeTipPrefix') + this.signalName + this.$t('tip.signalModeToManualModeTipSuffix')]
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate, this.selected);
}
}).catch(() => {
this.loading = false;
});
},
//
signalClose() {
const operate = {
operation: OperationEvent.Signal.signalClose.menu.operation,
messages: [this.$t('menu.menuSignal.signalOff') + this.$t('global.colon') + this.signalName]
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
this.loading = false;
});
},
//
reopenSignal() {
const operate = {
operation: OperationEvent.Signal.reopenSignal.menu.operation,
messages: [this.$t('menu.menuSignal.signalReopen') + this.$t('global.colon') + this.signalName]
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
this.loading = false;
});
},
//
setAutoInterlock() {
const operate = {
over: true,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
operation: OperationEvent.Signal.setAutoInterlock.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelAutoInterlock() {
const operate = {
over: true,
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
setAutoTrigger() {
const operate = {
over: true,
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelAutoTrigger() {
const operate = {
over: true,
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
};
this.doClose();
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancel() {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
}
};
</script>

View File

@ -0,0 +1,166 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm route-detail"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="10" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div class="table">
<span>{{ $t('menu.routeList') }}</span>
<el-table
ref="tempTable"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
:height="140"
>
<el-table-column :label="this.$t('menu.route')">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column prop="status" :label="this.$t('menu.controlState')" width="180">
<template slot-scope="scope">
<span v-if="scope.row.controlType == '01'">{{ $t('menu.automatic') }}</span>
<span v-else>{{ $t('menu.artificial') }}</span>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteDetail',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
stationName: '',
signalName: ''
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
},
title() {
return this.$t('menu.queryAccessControlMode');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected, tempData) {
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || [];
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
over: true,
operation: OperationEvent.Signal.detail.menu.operation,
cmdType: CMD.Signal.CMD_STAND_VIEW_STATUS
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,316 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm route-hand-control"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="10" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div class="table">
<span>{{ $t('menu.routeList') }}</span>
<el-table
ref="tempTable"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
:height="140"
>
<el-table-column :id="domIdChoose" prop="name" :label="this.$t('menu.route')" style="margin-left:30px">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.check" :disabled="scope.row.disabled" />
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column prop="controlType" :label="this.$t('menu.controlState')" :width="80">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">
<span v-if="scope.row.controlType == '01'">{{ $t('menu.automatic2') }}</span>
<span v-else>{{ $t('menu.artificial') }}</span>
</span>
</template>
</el-table-column>
<el-table-column prop="conflictCheck" :label="this.$t('menu.conflictCheck')" :width="80">
<template slot-scope="scope">
<span
:style="{color: scope.row.disabled ? '#CBCBCB':'unset'}"
>{{ scope.row.conflictCheck }}</span>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button
:id="domIdConfirm"
type="primary"
:disabled="commitDisabled"
:loading="loading"
@click="commit"
>{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteHandControl',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
operation: null,
selection: [],
stationName: '',
signalName: ''
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return OperationEvent.Signal.humanControl.choose.domId;
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return OperationEvent.Signal.atsAutoControl.choose.domId;
}
}
return '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return this.$t('menu.menuSignal.humanControl');
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return this.$t('menu.menuSignal.atsAutoControl');
}
return '';
},
commitDisabled() {
let disabled = true;
if (this.selection && this.selection.length) {
disabled = false;
}
return disabled;
}
},
watch: {
//
tempData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected, tempData) {
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
if (tempData && tempData.length > 0) {
tempData.forEach(elem => {
elem.check = false;
elem.disabled = false;
//
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
elem.controlType != '01') {
elem.disabled = true;
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
elem.controlType == '01') {
elem.disabled = true;
}
});
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.tempTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
checkTableDataSelction(data) {
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
});
}
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.handleChooseChange(selection);
this.selection = selection;
}
},
handleChooseChange(selection) {
this.selection = selection;
const codeList = selection.map(elem => { return elem.code; });
if (codeList && codeList.length) {
const operate = {
repeat: true,
operation: '',
val: codeList.join('::')
};
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 自排关*/
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 自排开*/
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
} else if (!selection) {
this.$messageBox(this.$t('tip.selectAPieceOfData'));
}
},
commit() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 自排关*/
this.humanControl();
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 自排开*/
this.atsAutoControl();
}
},
//
humanControl() {
const codeList = this.selection.map(elem => { return elem.code; });
const operate = {
over: true,
operation: OperationEvent.Signal.humanControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
param: {
Route_Code_List: codeList
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
atsAutoControl() {
const codeList = this.selection.map(elem => { return elem.code; });
const operate = {
over: true,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
param: {
Route_Code_List: codeList
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,167 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm route-lock"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="10" :offset="2"><span>{{ $t('menu.signalName') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div class="table">
<span>{{ $t('menu.listOfSignalButtons') }}</span>
<el-table
ref="table"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
:height="140"
>
<el-table-column prop="name" :label="this.$t('menu.buttonName')" />
<el-table-column prop="status" :label="this.$t('menu.buttonStatus')" />
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteLock',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
operate: null,
stationName: '',
signalName: ''
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.lock.menu.domId : '';
},
title() {
return this.$t('menu.blockSignalButton');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
/** status 04:封锁*/
const signal = (selected || {}).status;
this.tempData = [{ code: selected.code, name: selected.name, status: signal.status != '04' ? this.$t('menu.unblocked') : this.$t('menu.blocked') }];
const timer = setInterval(() => {
if (this.$refs.table) {
this.$refs.table.setCurrentRow(this.tempData[0]);
clearInterval(timer);
}
}, 300);
}
this.dialogShow = true;
this.$nextTick(() => {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
over: true,
operation: OperationEvent.Signal.lock.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,239 @@
<template>
<el-dialog v-dialogDrag class="fuzhou-01__systerm route-setting" :title="title" :visible.sync="show" width="500px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row class="header">
<el-col :span="8"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="8" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="8" :offset="2">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<el-table ref="table" :data="tempData" border style="width: 100%; margin-top:10px" size="mini" height="120" highlight-current-row @row-click="clickEvent">
<el-table-column :id="domIdChoose" prop="name" :label="this.$t('menu.route')" style="margin-left:30px" />
<el-table-column prop="protectedSection" :label="this.$t('menu.protectionSection')" :width="180">
<template slot-scope="scope">
<span>{{ getProtectedSectionName(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="canSetting" :label="this.$t('global.status')" :width="100">
<template slot-scope="scope">
<span v-if="scope.row.canSetting">{{ $t('menu.allowSelection') }}</span>
<span v-else>{{ $t('menu.notAllowSelection') }}</span>
</template>
</el-table-column>
</el-table>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="4">
<el-button
:id="domIdConfirm"
type="primary"
:loading="loading"
:disabled="commitDisabled"
@click="commit"
>{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'RouteSelection',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
tempData: [],
beforeSectionList: [],
dialogShow: false,
loading: false,
row: null,
operation: '',
display: true,
stationName: '',
signalName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return this.$t('menu.menuSignal.routeSelect');
},
commitDisabled() {
let disabled = true;
if (this.row) {
disabled = !this.row.canSetting;
}
return disabled;
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
getProtectedSectionName(row) {
let name = '';
if (row &&
row.overlapSectionList &&
row.overlapSectionList &&
row.overlapSectionList.length > 0) {
const protect = row.overlapSectionList[0];
name = `${protect.name}`;
if (protect.parentName) {
name = `${protect.parentName}${protect.name}`;
}
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) {
name = `${name}(${station.name})`;
}
}
return name;
},
doShow(operate, selected, tempData) {
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.restoreBeforeDevices();
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
restoreBeforeDevices() {
//
if (this.beforeSectionList && this.beforeSectionList.length) {
this.beforeSectionList.forEach(elem => {
elem.cutOff = false;
});
}
this.$store.dispatch('training/updateMapState', [... this.beforeSectionList]);
this.beforeSectionList = [];
},
clickEvent(row, event, column) {
this.row = row;
if (row) {
//
this.restoreBeforeDevices();
if (row.canSetting) {
//
if (row.containSectionList && row.containSectionList.length) {
//
row.containSectionList.forEach(elem => {
elem.cutOff = true;
});
}
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
this.beforeSectionList = row.containSectionList || [];
//
const operate = {
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
val: row.code,
param: {
Route_Code: row.code
}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
}
},
commit() {
if (this.row && this.row.canSetting) {
let names = '';
if (this.row.overlapSectionList && this.row.overlapSectionList.length > 0) {
names = names + this.row.overlapSectionList.map(elem => { return elem.name; }).join('');
}
if (this.row.overlapSwitchList && this.row.overlapSwitchList.length > 0) {
names = names + this.row.overlapSwitchList.map(elem => { return elem.name; }).join('');
}
const operate = {
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
messages: [this.$t('menu.accessSetting') + this.$t('global.colon') + `${this.row.name}${names}(${this.row.stationName})`]
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,419 @@
<template>
<div>
<el-dialog v-dialogDrag class="fuzhou-01__systerm section-cmd-control" :title="title" :visible.sync="show" width="840px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="8">
<el-form-item :label="this.$t('global.status')" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option v-for="option in typeList" :key="option.code" :label="option.name" :value="option.code" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="this.$t('menu.sectionName')" label-width="100px">
<el-input v-model="sectionName" size="small" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table :data="tempData" border style="width: 100%" size="mini" highlight-current-row height="200">
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
</el-table>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="3">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">
{{ $t('menu.release') }}
<span v-show="timeCountCommand>0">({{ timeCountCommand }})</span></el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">
{{ $t('menu.secondConfirm') }}
<span v-show="timeCountConfirm>0">({{ timeCountConfirm }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { now } from '@/utils/date';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SectionCmdControl',
data() {
return {
dialogShow: false,
backOperate: '',
selected: '',
order: 0,
row: null,
timer: null,
operation: '',
cmdDisabled: [true, true, true],
stpDisabled: true,
tempData: [],
message: '',
timeCountCommand: -1,
timeCountConfirm: -1,
stationName: '',
sectionName: ''
};
},
computed: {
typeList() {
return [
{ code: OperationEvent.Section.unlock.menu.operation, name: this.$t('menu.menuSection.sectionUnblock') },
{ code: OperationEvent.Section.fault.menu.operation, name: this.$t('menu.menuSection.sectionFaultUnlock') },
{ code: OperationEvent.Section.axlePreReset.menu.operation, name: this.$t('menu.menuSection.sectionAxisPreReset') }
];
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
return OperationEvent.Section.unlock.order.domId; //
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
return OperationEvent.Section.fault.order.domId; //
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
return OperationEvent.Section.axlePreReset.order.domId; //
}
}
return '';
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
return OperationEvent.Section.unlock.confirm1.domId; //
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
return OperationEvent.Section.fault.confirm1.domId; //
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
return OperationEvent.Section.axlePreReset.confirm1.domId; //
}
}
return '';
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
return OperationEvent.Section.unlock.confirm2.domId;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
return OperationEvent.Section.fault.confirm2.domId;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
return OperationEvent.Section.axlePreReset.confirm2.domId;
}
}
return '';
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
return OperationEvent.Section.unlock.stop.domId;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
return OperationEvent.Section.fault.stop.domId;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
return OperationEvent.Section.axlePreReset.stop.domId;
}
}
return '';
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
return '';
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
return this.$t('menu.menuSection.sectionUnblock');
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
return this.$t('menu.menuSection.sectionFaultUnlock');
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
return this.$t('menu.menuSection.sectionAxisPreReset');
}
}
return '';
}
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false;
}
});
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1;
}
}
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected) {
if (!this.dialogShow) {
this.sectionName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type === '02') {
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) {
this.sectionName += section.name;
}
}
this.sectionName += selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
this.selected = selected;
}
this.order = 0;
this.operation = operate.operation || '';
this.dialogShow = true;
this.tempData = [];
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true];
}
this.stpDisabled = true;
this.setMessage(this.$t('tip.releaseTip'));
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
command() {
if (this.operation == OperationEvent.Section.fault.menu.operation ||
this.operation == OperationEvent.Section.unlock.menu.operation ||
this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 第一步不带弹框处理*/
this.commandNoPopUp();
} else {
/** 第一步带弹框处理*/
this.commandHasPopUp();
}
},
commandHasPopUp() {
},
commandNoPopUp() {
const operate = {};
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
operate.operation = OperationEvent.Section.unlock.order.operation;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
operate.operation = OperationEvent.Section.fault.order.operation;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
operate.operation = OperationEvent.Section.axlePreReset.order.operation;
}
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
});
},
confirm1() {
const operate = {
};
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
operate.operation = OperationEvent.Section.unlock.confirm1.operation;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
operate.operation = OperationEvent.Section.fault.confirm1.operation;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
operate.operation = OperationEvent.Section.axlePreReset.confirm1.operation;
}
this.setMessage(this.$t('tip.secondConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
});
},
confirm2() {
const operate = {};
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
operate.cmdType = CMD.Section.CMD_SECTION_UNBLOCK;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
operate.operation = OperationEvent.Section.fault.confirm2.operation;
operate.cmdType = CMD.Section.CMD_SECTION_FAULT_UNLOCK;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
operate.operation = OperationEvent.Section.axlePreReset.confirm2.operation;
operate.cmdType = CMD.Section.CMD_SECTION_AXIS_PRE_RESET;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
});
},
stop() {
const operate = {};
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
operate.operation = OperationEvent.Section.unlock.stop.operation;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
operate.operation = OperationEvent.Section.fault.stop.operation;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
operate.operation = OperationEvent.Section.axlePreReset.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
});
},
close() {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
setButtonEnable(param) {
this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false;
}
},
setMessage(message) {
this.message = message;
},
writeRecord(param) {
this.tempData.push(param);
},
editRecord(param) {
this.tempData.forEach(elem => {
if (elem.order == param.order) {
for (var prop in param) {
elem[prop] = param[prop];
}
}
});
}
}
};
</script>

View File

@ -0,0 +1,167 @@
<template>
<el-dialog v-dialogDrag class="fuzhou-01__systerm section-control" :title="title" :visible.sync="show" width="300px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row class="header">
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="11" :offset="2"><span>{{ $t('menu.section') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="sectionName" size="small" disabled />
</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">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SectionControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operation: '',
stationName: '',
sectionName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Section.lock.menu.operation) {
return this.$t('menu.menuSection.sectionBlockade');
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
return this.$t('menu.menuSection.orbitalSectionResection');
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
return this.$t('menu.menuSection.orbitalSectionActive');
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
if (!this.dialogShow) {
this.sectionName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type === '02') {
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) {
this.sectionName += section.name;
}
}
this.sectionName += selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.operation = operate.operation || '';
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation == OperationEvent.Section.lock.menu.operation) {
this.lock(); //
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
this.split(); //
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
this.active(); //
}
},
//
lock() {
const operate = {
over: true,
operation: OperationEvent.Section.lock.menu.operation,
cmdType: CMD.Section.CMD_SECTION_BLOCK
};
this.sendCommand(operate);
},
//
split() {
const operate = {
over: true,
operation: OperationEvent.Section.split.menu.operation,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
};
this.sendCommand(operate);
},
//
active() {
const operate = {
over: true,
operation: OperationEvent.Section.active.menu.operation,
cmdType: CMD.Section.CMD_SECTION_ACTIVE
};
this.sendCommand(operate);
},
sendCommand(operate) {
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,547 @@
<template>
<div>
<el-dialog v-dialogDrag class="fuzhou-01__systerm section-cmd-speed" :title="title" :visible.sync="show" width="840px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="6">
<el-form-item :label="this.$t('menu.type')" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option v-for="option in typeList" :key="option.code" :label="option.name" :value="option.code" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="nameLabel" label-width="80px">
<el-input v-model="name" size="small" disabled />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="this.$t('menu.speedLimitValue')" label-width="80px">
<el-select :id="domIdChoose" v-model="formData.SpeedLimit_Value" size="small" :disabled="spdDisabled" @change="speedSelectChange">
<el-option v-for="item in speedList" :key="item" :label="item" :value="item" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table :data="tableData" border style="width: 100%" size="mini" highlight-current-row height="200">
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
</el-table>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="3">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">
{{ $t('menu.release') }}
<span v-show="timeCountCommand>0">({{ timeCountCommand }})</span></el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">
{{ $t('menu.secondConfirm') }}
<span v-show="timeCountConfirm>0">({{ timeCountConfirm }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
</el-col>
</el-row>
</el-dialog>
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate" />
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControlSpeed from './childDialog/confirmControlSpeed';
import { now } from '@/utils/date';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SectionCmdSpeed',
components: {
ConfirmControlSpeed
},
data() {
return {
dialogShow: false,
backOperate: '',
selected: '',
order: 0,
row: null,
timer: null,
operation: '',
cmdDisabled: [true, true, true],
spdDisabled: false,
stpDisabled: true,
tableData: [],
message: '',
timeCountCommand: -1,
timeCountConfirm: -1,
maxSpeed: 80,
speedSpace: 5,
stationName: '',
name: '',
formData: {
SpeedLimit_Value: ''
}
};
},
computed: {
nameLabel() {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation ||
this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
return this.$t('menu.sectionName');
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation ||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
return this.$t('menu.switchName');
}
return null;
},
speedList() {
const list = [];
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
list.push(i * this.speedSpace);
}
return list;
},
typeList() {
return [
{ code: OperationEvent.Section.setSpeed.menu.operation, name: this.$t('menu.menuSection.sectionSetSpeedLimit') },
{ code: OperationEvent.Section.cancelSpeed.menu.operation, name: this.$t('menu.menuSection.sectionCancelSpeedLimit') },
{ code: OperationEvent.Switch.setSpeed.menu.operation, name: this.$t('menu.turnoutSettingSpeedLimit') },
{ code: OperationEvent.Switch.cancelSpeed.menu.operation, name: this.$t('menu.turnoutCancelsSpeedLimit') }
];
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
return this.$t('menu.menuSection.sectionSetSpeedLimit');
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
return this.$t('menu.menuSection.sectionCancelSpeedLimit');
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
return this.$t('menu.turnoutSettingSpeedLimit');
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
return this.$t('menu.turnoutCancelsSpeedLimit');
}
}
return null;
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdChoose() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.choose.domId;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.choose.domId;
}
}
return null;
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.order.domId;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
return OperationEvent.Section.cancelSpeed.order.domId;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.order.domId;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
return OperationEvent.Switch.cancelSpeed.order.domId;
}
}
return null;
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.confirm1.domId;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
return OperationEvent.Section.cancelSpeed.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
return OperationEvent.Switch.cancelSpeed.confirm1.domId;
}
}
return null;
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.confirm2.domId;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
return OperationEvent.Section.cancelSpeed.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.cancelSpeed.confirm2.domId;
}
}
return null;
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.stop.domId;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
return OperationEvent.Section.cancelSpeed.stop.domId;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.stop.domId;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
return OperationEvent.Switch.cancelSpeed.stop.domId;
}
}
return null;
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
return null;
},
isCancelSpeed() {
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation;
}
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.spdDisabled = false;
val.forEach((elem, index) => {
//
if (elem == false && index >= 1 || this.isCancelSpeed) {
this.spdDisabled = true;
}
// 1
if (elem == false && index >= 1) {
this.stpDisabled = false;
}
});
},
deep: true
},
'formData.SpeedLimit_Value': function (val) {
if (val) this.cmdDisabled[0] = false;
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1;
}
}
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected, tempData) {
if (!this.dialogShow) {
this.name = '';
this.stationName = '';
if (selected) {
if (operate.operation == OperationEvent.Section.setSpeed.menu.operation ||
operate.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type === '02') {
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) {
this.name += section.name;
}
}
this.name += selected.name;
}
} else if (operate.operation == OperationEvent.Switch.setSpeed.menu.operation ||
operate.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.name = selected.name;
}
}
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
this.formData.SpeedLimit_Value = '';
this.tableData = [];
this.selected = selected;
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [true, true, true];
this.stpDisabled = true;
this.order = 0;
this.operation = operate.operation;
this.setMessage(this.$t('tip.selectSpeedLimitValueTip'));
if (this.isCancelSpeed) {
this.formData.SpeedLimit_Value = `${tempData}`;
this.spdDisabled = true;
this.cmdDisabled = [false, true, true];
}
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
speedSelectChange(val) {
const operate = {
val: val
};
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.choose.operation;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.choose.operation;
}
this.setMessage(this.$t('tip.releaseTip'));
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
}
});
},
command() {
const operate = {};
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.order.operation;
operate.message = this.$t('menu.in') + `${this.name}` + this.$t('menu.sectionSetLimitPrefix') + `${this.formData.SpeedLimit_Value}` + this.$t('menu.sectionLimitSuffix');
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.order.operation;
operate.message = this.$t('menu.in') + `${this.name}` + this.$t('menu.sectionCancelLimitPrefix') + `${this.formData.SpeedLimit_Value}` + this.$t('menu.sectionLimitSuffix');
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.order.operation;
operate.message = this.$t('menu.in') + `${this.name}` + this.$t('menu.switchSetLimitPrefix') + `${this.formData.SpeedLimit_Value}` + this.$t('menu.sectionLimitSuffix');
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.order.operation;
operate.message = this.$t('menu.in') + `${this.name}` + this.$t('menu.switchCancelLimitPrefix') + `${this.formData.SpeedLimit_Value}` + this.$t('menu.sectionLimitSuffix');
}
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
this.$refs.confirmControlSpeed.doShow(operate, this.selected);
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
});
},
confirm1() {
const operate = {};
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.confirm1.operation;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.confirm1.operation;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.confirm1.operation;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.confirm1.operation;
}
this.setMessage(this.$t('tip.secondConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
});
},
confirm2() {
const operate = {
val: this.formData.SpeedLimit_Value,
param: this.formData
};
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.confirm2.operation;
operate.cmdType = CMD.Section.CMD_SECTION_SET_LIMIT_SPEED;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.confirm2.operation;
operate.cmdType = CMD.Section.CMD_SECTION_SET_LIMIT_SPEED;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
});
},
stop() {
const operate = {};
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.stop.operation;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.stop.operation;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.stop.operation;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
});
},
close() {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickToClose'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
getOperate(operate) {
if (operate.step) {
this.setButtonEnable({ step: operate.step });
}
},
setButtonEnable(param) {
this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false;
}
},
setMessage(message) {
this.message = message;
},
writeRecord(param) {
this.tableData.push(param);
},
editRecord(param) {
this.tableData.forEach(elem => {
if (elem.order == param.order) {
for (var prop in param) {
elem[prop] = param[prop];
}
}
});
}
}
};
</script>

View File

@ -0,0 +1,253 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-run-level"
:title="title"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="10" :offset="2"><span>{{ $t('menu.stationStandStatus') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<div style="height: 32px;">
<el-radio
v-model="standStatus"
label="02"
style="line-height: 32px;"
:style="{color: standStatus == '02' ? '' : 'red'}"
disabled
>{{ $t('menu.upDirection') }}</el-radio>
<el-radio
v-model="standStatus"
label="01"
style="line-height: 32px;"
:style="{color: standStatus == '01' ? '' : 'red'}"
disabled
>{{ $t('menu.downDirection') }}</el-radio>
</div>
</el-col>
</el-row>
<div class="table">
<span>{{ $t('menu.stationStandStatus') }}</span>
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
<el-table-column prop="name" :width="170" :label="this.$t('menu.switchbackStation')" />
<el-table-column prop="station" :label="this.$t('menu.switchbackPlatform')" />
<el-table-column prop="strategy" :label="this.$t('menu.switchbackStrategy')">
<template slot-scope="scope">
<el-select
:id="domIdChoose"
v-model="scope.row.strategy"
size="mini"
@change="strategySelectChange"
>
<el-option
v-for="item in strategyList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
</el-table>
</div>
<el-row class="button-group">
<span v-if="isSelect && tempData.length">{{ $t('menu.switchbackStrategyTip') }}</span>
<span v-if="isConfirm && tempData.length">{{ $t('menu.setSwitchbackStrategyTipPrefix') + tempData[0].name + $t('menu.setSwitchbackStrategyTipSuffix') }}</span>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { mapGetters } from 'vuex';
export default {
name: 'StandBackStrategy',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
strategyList: [
{
value: '01',
label: this.$t('menu.noSwitchback')
},
{
value: '02',
label: this.$t('menu.noOneSwitchback')
},
{
value: '03',
label: this.$t('menu.automaticChange')
},
{
value: '04',
label: this.$t('menu.default')
}
],
stationName: '',
standStatus: '',
selection: [],
isSelect: true,
isConfirm: false,
strategy: ''
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.choose.domId : '';
},
title() {
return this.$t('menu.setSwitchbackStrategy');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(selected, opts) {
this.tempData = [];
const station = this.stationList.find(n => n.code == selected.stationCode);
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
},
doShow(operate, selected, opts) {
if (!this.dialogShow) {
this.standStatus = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standStatus = selected.direction;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.loadInitData(selected, opts);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
checkTableDataSelction(data) {
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
});
}
this.disabledSend = !selection.length;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.selection = selection;
}
},
strategySelectChange(strategy) {
const operate = {
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
val: `${strategy}`
};
this.strategy = strategy;
this.isSelect = false;
this.isConfirm = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.isConfirm) {
const operate = {
over: true,
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
val: `${this.strategy}`,
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
param:{
Stand_ReentryStrategy:this.strategy
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
} else {
this.doClose();
}
},
cancel() {
const operate = {
over: true,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,271 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-detain-train"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="context">
<span>{{ preContext }}{{ standName }}</span>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StandDetainTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
selected: null,
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
return this.$t('menu.menuStationStand.detainTrain');
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
return this.$t('menu.menuStationStand.cancelDetainTrain');
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainForce.menu.operation) {
return this.$t('menu.menuStationStand.cancelDetainTrainForce');
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
return this.$t('menu.menuStationStand.earlyDeparture');
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
return this.$t('menu.menuStationStand.setJumpStop');
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
return this.$t('menu.menuStationStand.cancelJumpStop');
}
return '';
},
preContext() {
return this.title + ':';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(step, selected) {
if (!this.dialogShow) {
this.standName = '';
if (selected) {
this.standName = selected.name;
}
this.selected = selected;
this.operation = step.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
/** 设置扣车*/
this.setDetainTrain();
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
/** 取消扣车*/
this.cancelDetainTrain();
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainForce.menu.operation) {
/** 强制取消扣车*/
this.cancelDetainTrainForce();
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
/** 提前发车*/
this.earlyDeparture();
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
/** 设置跳停*/
this.setJumpStop();
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
/** 取消跳停*/
this.cancelJumpStop();
}
},
//
setDetainTrain() {
const step = {
over: true,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
};
this.loading = true;
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelDetainTrain() {
const step = {
over: true,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
};
this.loading = true;
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelDetainTrainForce() {
const step = {
over: true,
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
cmdType: CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
};
this.loading = true;
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
});
},
//
earlyDeparture() {
const step = {
over: true,
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
};
this.loading = true;
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
});
},
//
setJumpStop() {
const step = {
over: true,
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
val: this.selected.direction, // , 01: /02:
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
};
this.loading = true;
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelJumpStop() {
const step = {
over: true,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
val: this.selected.direction, // , 01: /02:
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
};
this.loading = true;
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
});
},
cancel() {
const step = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.stand-detain-train .context {
height: 80px !important;
}
</style>

View File

@ -0,0 +1,180 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-detail"
:title="title"
:visible.sync="show"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="10" :offset="2"><span>{{ $t('menu.platform') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="standName" size="small" disabled />
</el-col>
</el-row>
<div class="table">
<span>{{ $t('menu.stationStandStatus') }}</span>
<el-table ref="tempData" :data="tempData" border style="width: 100%" size="mini" highlight-current-row>
<el-table-column prop="item" :width="140" :label="this.$t('menu.item')" />
<el-table-column prop="status" :label="this.$t('global.status')" />
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'StandDetail',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
stationName: '',
standName: '',
strategyMap: {
'01': this.$t('menu.noSwitchback'),
'02': this.$t('menu.noOneSwitchback'),
'03': this.$t('menu.automaticChange'),
'04': this.$t('menu.default')
}
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return this.$t('menu.menuStationStand.getStationStandStatus');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(selected, opts) {
this.tempData = [];
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
let stationStand, station;
if (selected.direction == '01') { //
//
if (index != 0) {
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
}
} else {
//
if (index != this.stationList.length - 1) {
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
}
}
/** 01: 未设置扣车 02: 车站扣车 03: 中心扣车 04: 中心+车站扣车*/
this.tempData.push({ item: this.$t('menu.stationDetainTrain'), status: opts.holdStatus == '02' || opts.holdStatus == '04' ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
this.tempData.push({ item: this.$t('menu.centerDetainTrain'), status: opts.holdStatus == '03' || opts.holdStatus == '04' ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
this.tempData.push({ item: this.$t('menu.stopTime'), status: opts.parkingTime != -1 ? opts.parkingTime : this.$t('menu.automatic2') });
if (!stationStand || !station) {
this.tempData.push({ item: this.$t('menu.runLevel'), status: this.$t('menu.automatic2') });
} else {
this.tempData.push({ item: this.$t('menu.runLevel'), status: opts.intervalRunTime > 0 ? this.$t('menu.to') + station.name + stationStand.name + this.$t('global.colon') + this.$t('menu.artificial') : this.$t('menu.to') + station.name + stationStand.name + this.$t('menu.automatic2') });
}
this.tempData.push({ item: this.$t('menu.jumpStop'), status: opts.jumpStopStatus != '01' ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
this.tempData.push({ item: this.$t('menu.downSwitchbackStrategy'), status: this.strategyMap[opts.reentryStrategy] ? this.strategyMap[opts.reentryStrategy] : this.$t('menu.default') });
},
doShow(operate, selected, opts) {
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.loadInitData(selected, opts);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
over: true,
operation: OperationEvent.Command.close.confirm.operation,
cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,192 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-detain-train-all"
:title="title"
:visible.sync="show"
width="390px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-radio-group style="padding: 10px 20px; border: 1px double lightgray;width:100%;">
<span class="base-label" style="font-size:14px;">{{ $t('menu.range') }}</span>
<el-row>
<el-radio-group v-model="upDown" style="width:100%;" @change="choose">
<el-col :span="11">
<el-radio :id="upDown == '01' ? domIdChoose : ''" label="02">{{ $t('menu.uplinkBroadly') }}</el-radio>
</el-col>
<el-col :span="11" :offset="1">
<el-radio :id="upDown == '02' ? domIdChoose : ''" label="01">{{ $t('menu.downlinkBroadly') }}</el-radio>
</el-col>
</el-radio-group>
</el-row>
</el-radio-group>
<div class="table">
<span>{{ $t('menu.detainTrainStationList') }}</span>
<el-table
ref="tempData"
:data="tempData"
border
style="width: 100%"
size="mini"
:empty-text="this.$t('menu.allStationsHaveNoDetainTrainStatus')"
height="160"
highlight-current-row
>
<el-table-column prop="stationName" :label="this.$t('menu.stationName')" />
<el-table-column prop="standName" :width="140" :label="this.$t('menu.detainTrainStation')" />
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="disabled" @click="commit">{{ $t('global.confirm') }}
</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StandDetainTrainAll',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
upDown: '01',
tempData: [],
disabled: true,
operation: ''
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrainAll.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrainAll.menu.domId : '';
},
title() {
if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
return this.$t('menu.menuStationStand.cancelDetainTrainAll');
} else {
return this.$t('menu.menuStationStand.cancelJumpStopAll');
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadTableData() {
this.tempData = [];
this.stationStandList.forEach(elem => {
/** status 01: 未扣车*/
const stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {}).status;
const station = (this.$store.getters['map/getDeviceByCode'](elem.stationCode) || {});
if (station && station.visible && stand && stand.holdStatus != '01' && Number(elem.direction) == Number(this.upDown)) {
this.tempData.push({ stationName: station.name, standName: elem.name });
}
});
//
if (this.tempData.length > 0) {
this.disabled = false;
}
},
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.loading = false;
this.upDown = selected.direction;
this.loadTableData();
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
choose(upDown) {
this.loadTableData();
const operate = {
operation: OperationEvent.StationStand.cancelDetainTrainAll.choose.operation,
val: `${upDown}`
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
commit() {
const operate = {
over: true,
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN,
val: this.upDown,
param: {
Stand_AllLine: this.upDown
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,276 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-run-level"
:title="title"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="10" :offset="2"><span>{{ $t('menu.platform') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="standName" size="small" disabled />
</el-col>
</el-row>
<div class="table">
<span>{{ $t('menu.stationStandStatus') }}</span>
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
<el-table-column prop="name" :width="210" :label="this.$t('menu.nextPlatform')" />
<el-table-column prop="time" :label="this.$t('menu.intervalRunningTime')">
<template slot-scope="scope">
<el-select :id="domIdChoose" v-model="scope.row.time" size="mini" @change="timeSelectChange">
<el-option
v-for="item in timeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="check" :label="this.$t('menu.alwaysEffective')">
<template slot-scope="scope">
<el-checkbox :id="domIdCheck" ref="check" v-model="scope.row.check" @change="checkChange" />
</template>
</el-table-column>
</el-table>
</div>
<el-row class="button-group">
<span v-if="isSelect && tempData.length">{{ $t('menu.setRunLevelTip') }}</span>
<span v-if="isConfirm && tempData.length">{{ $t('menu.setRunLevelStationTip') + tempData[0].name }}</span>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { mapGetters } from 'vuex';
import ConfirmControl from './childDialog/confirmControl';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StandRunLevel',
components: {
ConfirmControl
},
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
maxRunLevel: 300,
stationName: '',
standName: '',
selection: [],
isSelect: true,
isConfirm: false,
time: ''
};
},
computed: {
...mapGetters('map', [
'stationList',
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose.domId : '';
},
domIdCheck() {
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.check.domId : '';
},
title() {
return this.$t('menu.menuStationStand.setRunLevel');
},
timeList() {
const list = [
{ value: 0, label: this.$t('menu.automatic2') },
{ value: 1, label: '1' }
];
for (var i = 60; i <= this.maxRunLevel; i++) {
list.push({ value: i, label: `${i}` });
}
return list;
}
},
watch: {
//
tempData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(selected, opts) {
this.tempData = [];
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
if (selected.direction == '01') { //
//
if (index != 0) {
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
}
} else {
//
if (index != this.stationList.length) {
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
}
}
},
doShow(operate, selected, opts) {
//
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.loadInitData(selected, opts);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
checkTableDataSelction(data) {
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
});
}
this.disabledSend = !selection.length;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.selection = selection;
}
},
timeSelectChange(time) {
const operate = {
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
val: time.toString(),
param: {
Stand_RunLevel: time
}
};
this.time = time;
this.isSelect = false;
this.isConfirm = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
checkChange(check) {
const operate = {
operation: OperationEvent.StationStand.setRunLevel.check.operation,
val: check.toString(),
param: {
Stand_AlwaysValid: !!this.tempData[0].check
}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.isConfirm) {
const forver = !!this.tempData[0].check;
const operate = {
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
val: [this.time, forver].join('::'),
param:{
Stand_AlwaysValid:forver,
Stand_RunLevel:this.time
},
messages: [`${this.$t('menu.menuStationStand.setRunLevel')}${this.$t('global.colon')}${this.tempData[0].name}-${this.standName},${this.tempData[0].time == 0 ? this.$t('menu.runTimeAutomatically') : `${this.$t('menu.runningTimeIs')}${this.tempData[0].time}s`},${this.$t('menu.effectiveFrequencyIs')}${this.tempData[0].check ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
});
} else {
this.doClose();
}
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,265 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="430px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="11" :offset="2"><span>{{ $t('menu.platformName') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="standName" size="small" disabled />
</el-col>
</el-row>
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 60px;">
<span class="base-label">{{ $t('menu.controlMode') }}</span>
<div style=" position: relative; top:-10px;">
<el-radio-group v-model="control" @change="chooseControl">
<el-radio :id="control === '01'? '': domIdChoose1" label="01">{{ $t('menu.automatic2') }}</el-radio>
<el-radio :id="control === '02'? '': domIdChoose1" label="02">{{ $t('menu.artificial') }}</el-radio>
</el-radio-group>
<el-input-number
:id="domIdInput"
v-model="time"
:disabled="disabledInput"
controls-position="right"
:min="0"
size="mini"
style="width: 125px; padding-left:25px"
@change="inputTime"
/><span>&nbsp;{{ $t('global.second') }}</span>
</div>
</div>
<div style="padding: 0px 15px; height: 30px;">
<div style=" position: relative; top:-5px;">
<el-radio-group v-model="direction">
<el-radio label="02" :disabled="disabledUp">{{ $t('menu.upDirection') }}</el-radio>
<el-radio label="01" :disabled="disabledDown">{{ $t('menu.downDirection') }}</el-radio>
</el-radio-group>
</div>
</div>
<div style="padding: 10px 15px; border: 1px double lightgray; height: 60px;">
<span class="base-label">{{ $t('menu.effectiveNumber') }}</span>
<div style=" position: relative; top:-10px;">
<el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
<el-radio :id="effective === false? '': domIdChoose2" :label="false">{{ $t('menu.onceEffective') }}</el-radio>
<el-radio :id="effective === true? '': domIdChoose2" :label="true">{{ $t('menu.alwaysEffective') }}</el-radio>
</el-radio-group>
</div>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StandStopTime',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
time: 0,
control: '01',
direction: '01',
effective: false,
selected: null,
standName: '',
stationName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.StationStand.setStopTime.menu.domId : '';
},
domIdChoose1() {
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose1.domId : '';
},
domIdChoose2() {
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose2.domId : '';
},
domIdInput() {
return this.dialogShow ? OperationEvent.StationStand.setStopTime.input.domId : '';
},
disabledUp() {
if (this.selected) {
return this.selected.direction !== '02';
}
return true;
},
disabledDown() {
if (this.selected) {
return this.selected.direction !== '01';
}
return true;
},
disabledInput() {
return this.control === '01'; //
},
disabledTime() {
return this.control === '01'; //
},
title() {
return this.$t('menu.stopTime');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected, tempDate) {
//
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.control = Number(tempDate.parkingTime) === -1 ? '01' : '02';
this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
this.effective = !!tempDate.parkingValidStatus;
this.direction = selected.direction;
this.selected = selected || {};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
chooseControl(control) {
/** 自动时的默认时间*/
if (control == '01') {
this.inputTime = 15;
this.effective = true;
}
const operate = {
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
val: `${control}`,
param: {
Stand_StopControl: `${control}`
}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
chooseEffective(effective) {
const operate = {
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
val: `${effective}`,
param: {
Stand_AlwaysValid: `${effective}`
}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
inputTime(time) {
const operate = {
repeat: true,
operation: OperationEvent.StationStand.setStopTime.input.operation,
val: `${time}`,
param: {
Stand_StopTime: `${time}`
}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
commit() {
const operate = {
operation: OperationEvent.StationStand.setStopTime.menu.operation,
val: [`${this.control}`, this.time, this.effective].join('::'),
param:{
Stand_StopControl:this.control,
Stand_AlwaysValid:this.effective,
Stand_StopTime:this.time
},
messages: [`${this.$t('menu.stopTime') + this.$t('global.colon') + this.stationName} - ${this.standName}, ${this.$t('menu.stopTimeIs')}${this.control == '01' ? this.$t('menu.automatic2') : this.time + this.$t('global.second')}, ${this.$t('menu.effectiveFrequencyIs')}${this.effective == false ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -0,0 +1,406 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm station-cmd-control"
:title="title"
:visible.sync="show"
width="840px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="11">
<el-form-item :label="this.$t('menu.type')" label-width="40px">
<el-select v-model="operation" size="small" disabled style="width:230px">
<el-option
v-for="option in typeList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item :label="this.$t('menu.stationName')" label-width="100px">
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table
ref="tempData"
class="table"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
height="200"
>
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
</el-table>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="3">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
v-show="timeCountCommand>0"
>({{ timeCountCommand }})</span></el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
v-show="timeCountConfirm>0"
>({{ timeCountConfirm }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { now } from '@/utils/date';
export default {
name: 'StationCmdControl',
data() {
return {
dialogShow: false,
backOperate: '',
order: 0,
row: null,
timer: null,
operation: '',
cmdDisabled: [true, true, true],
stpDisabled: true,
tempData: [],
message: '',
timeCountCommand: -1,
timeCountConfirm: -1,
stationName: ''
};
},
computed: {
typeList() {
return [
{ code: OperationEvent.Station.powerUnLock.menu.operation, name: this.$t('menu.menuStation.powerUnLock') },
{ code: OperationEvent.Station.execKeyOperationTest.menu.operation, name: this.$t('menu.menuStation.execKeyOperationTest') }
];
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
return OperationEvent.Station.powerUnLock.order.domId;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
return OperationEvent.Station.execKeyOperationTest.order.domId;
}
}
return '';
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
return OperationEvent.Station.powerUnLock.confirm1.domId;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
return OperationEvent.Station.execKeyOperationTest.confirm1.domId;
}
}
return '';
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
return OperationEvent.Station.powerUnLock.confirm2.domId;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
return OperationEvent.Station.execKeyOperationTest.confirm2.domId;
}
}
return '';
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
return OperationEvent.Station.powerUnLock.stop.domId;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
return OperationEvent.Station.execKeyOperationTest.stop.domId;
}
}
return '';
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
return '';
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
return this.$t('menu.signalDeblocking');
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
return this.$t('menu.menuStation.execKeyOperationTest');
}
}
return '';
}
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false;
}
});
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1;
}
}
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected) {
if (!this.dialogShow) {
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
this.stationName = selected.name;
}
this.order = 0;
this.operation = operate.operation;
this.tempData = [];
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true];
}
this.stpDisabled = true;
this.dialogShow = true;
this.setMessage(this.$t('tip.releaseTip'));
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
command() {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation ||
this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 第一步不带弹框处理*/
this.commandNoPopUp();
} else {
/** 第一步带弹框处理*/
this.commandHasPopUp();
}
},
commandHasPopUp() {
},
commandNoPopUp() {
const operate = {
};
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
operate.operation = OperationEvent.Station.powerUnLock.order.operation;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.order.operation;
}
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
});
},
confirm1() {
const operate = {
};
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
operate.operation = OperationEvent.Station.powerUnLock.confirm1.operation;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm1.operation;
}
this.setMessage(this.$t('tip.secondConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
});
},
confirm2() {
const operate = {
over: true
};
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation;
// operate.cmdType = CMD.Station.powerUnLock;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm2.operation;
// operate.cmdType = CMD.Station.execKeyOperationTest;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
});
},
stop() {
const operate = {
};
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
operate.operation = OperationEvent.Station.powerUnLock.stop.operation;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
});
},
close() {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
getOperate(operate) {
/** 弹框返回值处理*/
},
setButtonEnable(param) {
this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false;
}
},
setMessage(message) {
this.message = message;
},
writeRecord(param) {
this.tempData.push(param);
},
editRecord(param) {
this.tempData.forEach(elem => {
if (elem.order == param.order) {
for (var prop in param) {
elem[prop] = param[prop];
}
}
});
}
}
};
</script>

View File

@ -0,0 +1,123 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm station-human-control-all"
:title="title"
:visible.sync="show"
width="430px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<span>{{ title }}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StationHumanControlAll',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return this.$t('menu.fullConcentrationStationAccessManualControl');
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
over: true,
operation: OperationEvent.Station.humanControlALL.menu.operation,
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.station-human-control-all .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -0,0 +1,145 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm station-set-route-control-all"
:title="title"
:visible.sync="show"
width="450px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="padding: 0px 10px">
<el-form ref="form" size="small" label-width="110px" label-position="left">
<el-form-item :label="this.$t('menu.concentratedStationName')" prop="stationName">
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-form>
<el-radio-group v-model="mode">
<el-row>
<el-radio :label="true">{{ $t('menu.checkConflict') }}</el-radio>
</el-row>
<el-row style="margin-top: 20px">
<el-radio :label="false">{{ $t('menu.notCheckConflict') }}</el-radio>
</el-row>
</el-radio-group>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StationSetRouteControlAll',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operation: null,
stationName: '',
mode: true
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return this.$t('menu.fullConcentrationStationSettingAccessControlMode');
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Station.atsAutoControlALL.menu.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
if (!this.dialogShow) {
this.loading = false;
this.operation = operate.operation;
this.stationName = '';
if (selected) {
this.stationName = selected.name;
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
over: true,
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
val: this.mode,
param: {
CheckConflict: this.mode
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.station-set-route-control-all .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -0,0 +1,482 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm switch-cmd-control"
:title="title"
:visible.sync="show"
width="840px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="8">
<el-form-item :label="this.$t('menu.type')" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option
v-for="option in typeList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="this.$t('menu.switchName')" label-width="80px">
<el-input v-model="switchName" size="small" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table
ref="tempData"
class="table"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
height="200"
>
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
</el-table>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="3">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
v-show="timeCountCommand>0"
>({{ timeCountCommand }})</span></el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
v-show="timeCountConfirm>0"
>({{ timeCountConfirm }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { now } from '@/utils/date';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SwitchCmdControl',
data() {
return {
dialogShow: false,
backOperate: '',
selected: '',
order: 0,
row: null,
timer: null,
operation: '',
cmdDisabled: [true, true, true],
stpDisabled: true,
tempData: [],
message: '',
timeCountCommand: -1,
timeCountConfirm: -1,
stationName: '',
switchName: ''
};
},
computed: {
typeList() {
return [
{ code: OperationEvent.Switch.unlock.menu.operation, name: this.$t('menu.menuSwitch.switchUnlock') },
{ code: OperationEvent.Switch.unblock.menu.operation, name: this.$t('menu.menuSwitch.switchSectionUnblock') },
{ code: OperationEvent.Switch.fault.menu.operation, name: this.$t('menu.menuSwitch.switchMalfunctionUnlock') },
{ code: OperationEvent.Switch.axlePreReset.menu.operation, name: this.$t('menu.menuSwitch.switchSectionAxisPreReset') }
];
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
return OperationEvent.Switch.unlock.order.domId;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
return OperationEvent.Switch.unblock.order.domId;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
return OperationEvent.Switch.fault.order.domId;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
return OperationEvent.Switch.axlePreReset.order.domId;
}
}
return '';
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
return OperationEvent.Switch.unlock.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
return OperationEvent.Switch.unblock.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
return OperationEvent.Switch.fault.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
return OperationEvent.Switch.axlePreReset.confirm1.domId;
}
}
return '';
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
return OperationEvent.Switch.unlock.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
return OperationEvent.Switch.unblock.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
return OperationEvent.Switch.fault.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
return OperationEvent.Switch.axlePreReset.confirm2.domId;
}
}
return '';
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
return OperationEvent.Switch.unlock.stop.domId;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
return OperationEvent.Switch.unblock.stop.domId;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
return OperationEvent.Switch.fault.stop.domId;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
return OperationEvent.Switch.axlePreReset.stop.domId;
}
}
return '';
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
return '';
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
return '道岔单解';
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
return '道岔解封';
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
return '道岔故障解锁';
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
return '道岔计轴复位';
}
}
return '';
}
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false;
}
});
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1;
}
}
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected) {
if (!this.dialogShow) {
this.switchName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.switchName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
this.selected = selected;
}
this.order = 0;
this.operation = operate.operation;
this.dialogShow = true;
this.tempData = [];
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true];
}
this.stpDisabled = true;
this.setMessage(this.$t('tip.releaseTip'));
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
command() {
/** 道岔单解/道岔解封/道岔故障解锁/道岔计轴复位*/
if (this.operation == OperationEvent.Switch.unlock.menu.operation ||
this.operation == OperationEvent.Switch.unblock.menu.operation ||
this.operation == OperationEvent.Switch.fault.menu.operation ||
this.operation == OperationEvent.Switch.axlePreReset.menu.operation ||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 第一步不带弹框处理*/
this.commandNoPopUp();
} else {
/** 第一步带弹框处理*/
this.commandHasPopUp();
}
},
commandHasPopUp() {
},
commandNoPopUp() {
const operate = {
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
operate.operation = OperationEvent.Switch.unlock.order.operation;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
operate.operation = OperationEvent.Switch.unblock.order.operation;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
operate.operation = OperationEvent.Switch.fault.order.operation;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.order.operation;
}
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
});
},
confirm1() {
const operate = {
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
operate.operation = OperationEvent.Switch.unlock.confirm1.operation;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
operate.operation = OperationEvent.Switch.unblock.confirm1.operation;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
operate.operation = OperationEvent.Switch.fault.confirm1.operation;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.confirm1.operation;
}
this.setMessage(this.$t('tip.secondConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
});
},
confirm2() {
const operate = {
over: true
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
operate.operation = OperationEvent.Switch.unlock.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
operate.operation = OperationEvent.Switch.fault.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_FAULT_UNLOCK;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
});
},
stop() {
const operate = {
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
operate.operation = OperationEvent.Switch.unlock.stop.operation;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
operate.operation = OperationEvent.Switch.unblock.stop.operation;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
operate.operation = OperationEvent.Switch.fault.stop.operation;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
});
},
close() {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
getOperate(operate) {
/** 弹框返回值处理*/
},
setButtonEnable(param) {
this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false;
}
},
setMessage(message) {
this.message = message;
},
writeRecord(param) {
this.tempData.push(param);
},
editRecord(param) {
this.tempData.forEach(elem => {
if (elem.order == param.order) {
for (var prop in param) {
elem[prop] = param[prop];
}
}
});
}
}
};
</script>

View File

@ -0,0 +1,286 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm switch-control"
:title="title"
:visible.sync="show"
width="300px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="11" :offset="2"><span>{{ $t('menu.switch') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="switchName" size="small" disabled />
</el-col>
</el-row>
<el-row v-if="activeShow" style="margin-top: 10px;">
<el-col :span="11">
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
{{ $t('menu.activation') }}</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="radio" label="2" :disabled="radio == 1" style="display: block; text-align: center;">
{{ $t('menu.resection') }}</el-radio>
</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">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SwitchControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operation: '',
stationName: '',
switchName: '',
radio: 1,
activeShow: false
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
return this.$t('menu.menuSwitch.switchLock');
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
return this.$t('menu.menuSwitch.switchBlockade');
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
return this.$t('menu.menuSwitch.switchTurnout');
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
return this.$t('menu.menuSwitch.switchForcedPull');
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
return this.$t('menu.menuSwitch.sectionResection');
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
return this.$t('menu.menuSwitch.sectionActive');
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
if (!this.dialogShow) {
this.switchName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.switchName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.operation = operate.operation;
if (this.operation == OperationEvent.Switch.split.menu.operation) {
this.activeShow = true;
this.radio = '2';
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
this.activeShow = true;
this.radio = '1';
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
/** 道岔单锁*/
this.lock();
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
/** 道岔封锁*/
this.block();
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
/** 道岔转动*/
this.turnout(this.operation);
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
/** 道岔强扳*/
this.turnoutForce();
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
/** 区段激活*/
this.split();
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
/** 区段激活*/
this.active();
}
},
//
lock() {
const operate = {
over: true,
operation: OperationEvent.Switch.lock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
block() {
const operate = {
over: true,
operation: OperationEvent.Switch.block.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
turnout(operation) {
const operate = {
over: true,
operation: OperationEvent.Switch.turnout.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_TURN
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
turnoutForce() {
const operate = {
over: true,
operation: OperationEvent.Switch.turnoutForce.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_FORCE_TURN
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
split() {
const operate = {
over: true,
operation: OperationEvent.Switch.split.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
active() {
const operate = {
over: true,
operation: OperationEvent.Switch.active.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,472 @@
<template>
<el-dialog v-dialogDrag class="fuzhou-01__systerm train-control" :title="title" :visible.sync="show" width="370px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-form ref="form" size="small" label-width="120px" :model="formModel" :rules="rules">
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="groupNumber">
<el-select
:id="domIdTrainNumber"
v-model="formModel.groupNumber"
filterable
:disabled="trainNumberIsDisabled"
@change="trainNumberChange"
>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
<el-form-item prop="trainType" label-width="0px">
<el-radio-group
:id="domIdTrainType"
v-model="formModel.trainType"
style="margin-left: 15px;"
@change="trainTypeChange"
>
<el-radio :label="'01'">{{ $t('menu.planTrain') }}</el-radio>
<el-radio :label="'02'">{{ $t('menu.headCodeTrain') }}</el-radio>
<el-radio :label="'03'" style="margin-top:5px;">{{ $t('menu.artificialTrain') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="formModel.trainType == '01'" prop="serviceNumber">
<span slot="label">{{ $t('menu.serviceNumber') }}</span>
<el-input
:id="domIdServerNo"
v-model="formModel.serviceNumber"
:disabled="serverNoIsDisabled"
/>
</el-form-item>
<el-form-item v-if="formModel.trainType == '01'" :label="this.$t('menu.tripNumber')+this.$t('global.colon')" prop="tripNumber">
<el-input
:id="domIdTrainNo"
v-model="formModel.tripNumber"
:disabled="trainNoIsDisabled"
maxlength="4"
/>
</el-form-item>
<el-form-item v-if="formModel.trainType == '01'" :label="this.$t('menu.targetCode')+this.$t('global.colon')" prop="targetCode">
<el-input
:id="domIdTargetCode"
v-model="formModel.targetCode"
:disabled="targetCodeIsDisabled"
/>
</el-form-item>
<el-form-item v-if="formModel.trainType == '03'" :label="this.$t('menu.category')+this.$t('global.colon')" prop="category">
<el-select
:id="domIdTrainNumber"
v-model="formModel.category"
filterable
:disabled="true"
>
<el-option
v-for="item in categoryList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="istargetCode" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-train ref="confirmTrain" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import ConfirmTrain from './childDialog/confirmTrain';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import Handler from '@/scripts/cmdPlugin/Handler';
export default {
name: 'TrainControl',
components: {
ConfirmTrain,
NoticeInfo
},
data() {
return {
trainList: [],
categoryList: [
{ name: 'MM', value: '01' }
],
formModel: {
tripNumber: '',
groupNumber: '',
trainType: '01',
serviceNumber: '',
targetCode: '',
category: 'MM'
},
rules: {
groupNumber: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'change' }
],
trainType: [
{ required: true, message: this.$t('rules.selectATrainType'), trigger: 'change' }
],
serviceNumber: [
{ required: true, message: this.$t('rules.enterTheServiceNumber'), trigger: 'blur' }
],
tripNumber: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
targetCode: [
{ required: true, message: this.$t('rules.enterTheTargetCode'), trigger: 'blur' }
]
},
operation: null,
dialogShow: false,
loading: false,
direction: 0
};
},
computed: {
...mapGetters('map', [
'map'
]),
trainNoIsDisabled() {
return false;
},
serverNoIsDisabled() {
return true;
},
targetCodeIsDisabled() {
return true;
},
trainNumberIsDisabled() {
if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
return true;
}
return '';
},
// trainTypeIsDisabled() {
// if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
// return true;
// }
// return '';
// },
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdTrainNumber() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.trainNumberChange.domId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.trainNumberChange.domId;
}
}
return '';
},
domIdTrainNo() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.trainNoChange.domId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.trainNoChange.domId;
}
}
return '';
},
domIdTrainType() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.trainTypeChange.domId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.trainTypeChange.domId;
}
}
return '';
},
domIdServerNo() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.serverNoChange.domId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.serverNoChange.domId;
}
}
return '';
},
domIdTargetCode() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.targetCodeChange.domId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.targetCodeChange.domId;
}
}
return '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.menu.domId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.menu.domId;
}
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
title() {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
return this.$t('menu.menuTrain.addTrainId');
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
return this.$t('menu.menuTrain.editTrainId');
}
return '';
},
istargetCode() {
if (this.formModel.serviceNumber && this.formModel.targetCode) {
return false;
}
return true;
}
},
watch: {
'formModel.tripNumber': function(val) {
if (val.length == 4) {
this.trainNoChange(val);
} else {
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: val,
trainType: this.formModel.trainType,
serviceNumber: '',
targetCode: '',
category: 'MM'
};
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {},
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.operation = operate.operation;
}
const model = this.$store.getters['map/getDeviceByCode'](selected.code);
this.formModel = {
groupNumber: model.groupNumber,
tripNumber: `${model.directionCode}${model.tripNumber}`,
trainType: model.type,
serviceNumber: model.serviceNumber,
targetCode: model.targetCode,
category: 'MM'
};
/** 加载列车数据*/
this.loadInitData(this.map);
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
},
trainNumberChange(groupNumber) {
const operate = {
val: `${groupNumber}`,
operation: ''
};
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
operate.operation = OperationEvent.Train.addTrainId.trainNumberChange.operation;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
operate.operation = OperationEvent.Train.editTrainId.trainNumberChange.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
trainTypeChange(trainType) {
const operate = {
val: `${trainType}`,
operation: ''
};
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
operate.operation = OperationEvent.Train.addTrainId.trainTypeChange.operation;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
operate.operation = OperationEvent.Train.editTrainId.trainTypeChange.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
trainNoChange(tripNumber) {
const operate = {
send: true,
val: tripNumber,
operation: ''
};
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
operate.operation = OperationEvent.Train.addTrainId.trainNoChange.operation;
operate.cmdType = CMD.Train.addTrainId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation;
operate.cmdType = CMD.Train.editTrainId;
}
Handler.undo(1);
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
if (response.data) {
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: tripNumber,
trainType: this.formModel.trainType,
serviceNumber: response.data.serviceNumber,
targetCode: response.data.targetCode,
category: 'MM'
};
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: tripNumber,
trainType: this.formModel.trainType,
serviceNumber: '',
targetCode: '',
category: 'MM'
};
}
}
});
},
commit() {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
/** 增加列车识别号*/
this.addTrainId();
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
this.editTrainId();
}
},
//
addTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const model = this.formModel;
const operate = {
send: true,
operation: OperationEvent.Train.addTrainId.menu.operation,
cmdType: CMD.Train.CMD_ADD_TRAIN_ID,
messages: [this.$t('tip.addTrainIdTip')],
val: `${model.groupNumber}::${model.trainType}::${model.serviceNumber}::${model.tripNumber}::${model.targetCode}`
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmTrain.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
//
editTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.editTrainId.menu.operation,
cmdType: CMD.Train.CMD_EDIT_TRAIN_ID,
messages: [this.$t('tip.editTrainIdTip')],
val: `${this.formModel.trainType}::${this.formModel.tripNumber}`
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmTrain.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,155 @@
<template>
<el-dialog v-dialogDrag class="fuzhou-01__systerm route-create" :title="title" :visible.sync="show" width="380px" label-position="top" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<el-form size="small" label-width="100px">
<el-form-item :label="this.$t('menu.train')+this.$t('global.colon')" prop="trainCode">
<el-select v-model="trainCode" filterable :placeholder="this.$t('menu.train')">
<el-option
v-for="item in trainList"
:key="item.code"
:label="item.groupNumber"
:value="item.code"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="列车车次:" prop="tripNumber">
<el-select v-model="tripNumber" filterable placeholder="列车车次">
<el-option v-for="no in trainNoList" :key="no" :label="no" :value="no"></el-option>
</el-select>
<div style="font-size: 12px;">(上行路线车次号选择偶数下行路线车次号选择基数)</div>
</el-form-item> -->
<el-form-item :label="this.$t('menu.trainDirection')+this.$t('global.colon')" prop="direction">
<el-select v-model="direction" filterable :placeholder="this.$t('menu.trainDirection')">
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
</el-select>
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数下行路线车次号选择基数)</div> -->
</el-form-item>
</el-form>
<el-row>
<el-col style="text-align: right;">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ this.$t('global.confirm') }}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ this.$t('global.cancel') }}</el-button>
</el-col>
</el-row>
</div>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteCreate',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
trainList: [],
trainNoList: [],
directionList: [
{
value: '2',
label: this.$t('menu.up')
},
{
value: '1',
label: this.$t('menu.down')
}
],
trainCode: '',
tripNumber: '',
direction: '',
selected: null
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return OperationEvent.Section.newtrain.menu.domId;
},
title() {
return this.$t('menu.settingTrain');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {
if (map.trainList.length) {
this.trainList = map.trainList;
} else {
this.$messageBox(this.$t('error.getTrainListFailed'));
}
},
doShow(operate, selected) {
this.dialogShow = true;
this.selected = selected;
/** 加载列车数据*/
this.loadInitData(this.map);
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.trainCode = '';
this.direction = '';
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
send: true,
operation: OperationEvent.Section.newtrain.menu.operation,
cmdType: CMD.Section.CMD_NEW_TRAIN,
val: '' + this.direction + '::' + this.trainCode
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,167 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="90px" :model="formModel" :rules="rules">
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="groupNumber">
<el-input :id="domIdTrainNumber" v-model="formModel.groupNumber" @change="trainNumberChange" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import { getPublishMapTrainNos } from '@/api/runplan';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'TrainDelete',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
trainNoList: [],
formModel: {
groupNumber: ''
},
rules: {
groupNumber: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
]
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
},
domIdTrainNumber() {
return this.dialogShow ? OperationEvent.Train.delTrainId.trainNumberChange.domId : '';
},
title() {
return this.$t('menu.menuTrain.deleteTrainId');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {
if (map) {
// getPublishMapTrainNos(map.skinCode).then(response => {
// this.trainNoList = response.data;
// }).catch(() => {
// this.$messageBox(``);
// });
}
},
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
},
trainNumberChange() {
const operate = {
val: `${this.formModel.groupNumber}`,
operation: OperationEvent.Train.delTrainId.trainNumberChange.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.delTrainId.menu.operation,
cmdType: CMD.Train.CMD_DEL_TRAIN_ID,
val: this.formModel.groupNumber
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -0,0 +1,138 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="120px" :model="addModel" :rules="rules">
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" label-width="120px" prop="tripNumber">
<el-input v-model="addModel.tripNumber" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'TrainMove',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
tripNumber: ''
},
rules: {
tripNumber: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
},
title() {
return this.$t('menu.menuTrain.editTrainNo');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.editTrainNo.menu.operation,
cmdType: CMD.Train.CMD_EDIT_TRAIN_NO
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,201 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="640px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
<div style="width: 46%;">
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" label-width="95px" prop="tripNumber">
<el-input v-model="addModel.tripNumber" disabled />
</el-form-item>
</div>
<div style="overflow: hidden;">
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;"
>
<span class="base-label">{{ $t('menu.sourceTrainWindow') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandSource">
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
<el-select v-model="addModel.stationStandSource" filterable :placeholder="this.$t('global.choose')">
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainSource">
<el-input v-model="addModel.trainSource" />
</el-form-item>
</div>
</div>
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;"
>
<span class="base-label">{{ $t('menu.targetTrainWindow') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandGoal">
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
<el-select v-model="addModel.stationStandGoal" filterable :placeholder="this.$t('global.choose')">
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainGoal">
<el-input v-model="addModel.trainGoal" />
</el-form-item>
</div>
</div>
</div>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'TrainMove',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
tripNumber: '',
trainSource: '',
stationStandSource: '',
trainGoal: '',
stationStandGoal: ''
},
rules: {
tripNumber: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
],
trainSource: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
stationStandSource: [
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
],
trainGoal: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
stationStandGoal: [
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
},
title() {
return this.$t('menu.menuTrain.moveTrainId');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.moveTrainId.menu.operation,
cmdType: CMD.Train.CMD_MOVE_TRAIN_ID
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,206 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="640px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
<div style="overflow: hidden;">
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px; margin-right: 4%;"
>
<span class="base-label">{{ $t('menu.sourceTrainWindow') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="trainNumberSource">
<el-input v-model="addModel.trainNumberSource" />
</el-form-item>
<el-form-item prop="stationStandSource">
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
<el-select v-model="addModel.stationStandSource" filterable :placeholder="this.$t('global.choose')">
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainSource">
<el-input v-model="addModel.trainSource" />
</el-form-item>
</div>
</div>
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px;"
>
<span class="base-label">{{ $t('menu.targetTrainWindow') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="trainNumberGoal">
<el-input v-model="addModel.trainNumberGoal" />
</el-form-item>
<el-form-item prop="stationStandGoal">
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
<el-select v-model="addModel.stationStandGoal" filterable :placeholder="this.$t('global.choose')">
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainGoal">
<el-input v-model="addModel.trainGoal" />
</el-form-item>
</div>
</div>
</div>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'TrainSwitch',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
trainNumberSource: '',
trainSource: '',
stationStandSource: '',
trainGoal: '',
stationStandGoal: '',
trainNumberGoal: ''
},
rules: {
trainNumberSource: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
],
trainSource: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
stationStandSource: [
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
],
trainNumberGoal: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
],
trainGoal: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
stationStandGoal: [
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
},
title() {
return this.$t('menu.menuTrain.switchTrainId');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.moveTrainId.menu.operation,
cmdType: CMD.Train.CMD_MOVE_TRAIN_ID
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,356 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<template v-show="isShowAll">
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" />
<passive-Timeout ref="passiveTimeout" />
</template>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection';
import MenuTrain from './menuTrain';
import MenuStation from './menuStation';
import MenuBar from './menuBar';
import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from './passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
export default {
name: 'Menus',
components: {
MenuBar,
MenuCancel,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStationStand,
MenuStation,
MenuTrain,
PassiveAlarm,
PassiveContorl,
PassiveTimeout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
computed: {
...mapGetters('config', [
'width'
]),
isShowAll() {
return this.$route.params.mode != 'dp' &&
this.$route.params.mode != 'plan' &&
this.$store.state.training.roles != 'BigScreen';
},
isShowBar() {
return this.$store.state.training.prdType;
}
},
watch: {
isShowBar(val) {
val && this.$store.dispatch('config/updateMenuBar');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
});
}
};
</script>
<style>
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.fuzhou-01__systerm {
overflow: hidden !important;
}
.fuzhou-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3);
border: 2px solid rgb(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;
}
.fuzhou-01__systerm .el-dialog .el-dialog__header {
padding: 5px;
height: 26px;
}
.fuzhou-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.fuzhou-01__systerm .el-dialog .el-dialog__body {
padding-top: 10px;
padding-bottom: 10px;
padding-left: 5px;
padding-right: 5px;
margin: 0px 5px 5px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #F0F0F0;
opacity: 1;
}
.fuzhou-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 4px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 20px
}
.fuzhou-01__systerm .el-dialog .el-dialog__title::before {
content: '';
position: absolute;
top: 0;
left: 0;
-webkit-filter: blur(10px);
filter: blur(10px);
height: 20px;
width: -webkit-fill-available;
background: rgba(128, 128, 128, 0.8);
z-index: -1;
}
.fuzhou-01__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 4px;
right: 5px;
line-height: 16px;
}
.fuzhou-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.fuzhou-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.fuzhou-01__systerm .el-dialog .el-button {
height: 32px;
line-height: 32px;
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 0px !important;
color: #000;
background: #F0F0F0;
}
.fuzhou-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.fuzhou-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.fuzhou-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.fuzhou-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.fuzhou-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.fuzhou-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.fuzhou-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.fuzhou-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.fuzhou-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.fuzhou-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.fuzhou-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.fuzhou-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.fuzhou-01__systerm .el-dialog .el-table th.is-leaf {
background: #F0F0F0 !important;
border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.fuzhou-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.fuzhou-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.fuzhou-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.fuzhou-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.fuzhou-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.fuzhou-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.fuzhou-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.fuzhou-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.fuzhou-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute;
-webkit-box-sizing: content-box;
box-sizing: content-box;
content: "";
border: 1px solid #000;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
top: 1px;
}
.fuzhou-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.fuzhou-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.fuzhou-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.fuzhou-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px;
height: 4px;
border-radius: 100%;
background-color: #000 !important;
position: absolute;
left: 50%;
top: 50%;
}
.fuzhou-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.fuzhou-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.fuzhou-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.fuzhou-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.fuzhou-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.fuzhou-01__systerm .el-dialog .table {
margin-top: 10px;
}
.fuzhou-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.fuzhou-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
</style>

View File

@ -0,0 +1,813 @@
<template>
<div id="menuBar">
<div class="nav">
<template v-for="(item,i) in menu">
<template v-if="noShowingChildren(item.children)">
<li :id="item.operate.domId" :key="i" class="nav-li" @click="hookClick(item)">
<span class="nav-li-text">{{ item.title }}</span>
</li>
</template>
<template v-else>
<li :id="item.operate.domId" :key="i" class="nav-li" @click.stop="selectedClassA(item, i)">
<span class="nav-li-text">{{ item.title }}</span>
<ul class="nav-ul" :class="{'active' :i==classA}">
<template v-for="(child,j) in item.children">
<template v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)">
<li
:id="child.operate.domId"
:key="j"
class="menu-li"
@click.stop="selectedClassB(child, j)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
<ul class="menu-ul" :class="{'active' :j==classB}">
<template v-for="(grandchild,k) in child.children">
<li
v-if="grandchild.show"
:id="grandchild.operate.domId"
:key="k"
class="menu-li"
@click.stop="hookClick(grandchild)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ grandchild.title }}</span>
</span>
</div>
</li>
</template>
</ul>
</li>
</template>
<template v-else>
<li
v-if="child.show"
:id="child.operate.domId"
:key="j"
class="menu-li"
@click.stop="hookClick(child)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
</li>
</template>
</template>
</ul>
</li>
</template>
</template>
</div>
<station-control-convert ref="stationControlConvert" />
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
<view-train-id ref="viewTrainId" />
<view-name ref="viewName" />
<view-device ref="viewDevice" />
<notice-info ref="noticeInfo" />
<train-add ref="trainAdd" />
<train-transtalet ref="trainTranstalet" />
<train-delete ref="trainDelete" />
<manage-user ref="manageUser" />
<help-about ref="helpAbout" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { TrainingMode } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
import { State2SimulationMap } from '@/scripts/cmdPlugin/Config.js';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import StationControlConvert from './menuDialog/stationControlConvert';
import TrainAdd from './menuDialog/trainAdd';
import TrainTranstalet from './menuDialog/trainTranstalet';
import TrainDelete from './menuDialog/trainDelete';
import PasswordBox from './menuDialog/passwordBox';
import ViewTrainId from './menuDialog/viewTrainId';
import ViewName from './menuDialog/viewName';
import ViewDevice from './menuDialog/viewDevice';
import ManageUser from './menuDialog/manageUser';
import HelpAbout from './menuDialog/helpAbout';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'MenuBar',
components: {
NoticeInfo,
StationControlConvert,
PasswordBox,
ViewTrainId,
ViewName,
ViewDevice,
TrainAdd,
TrainTranstalet,
TrainDelete,
ManageUser,
HelpAbout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
classA: -1,
classB: -1,
tempClassA: -1,
tempClassB: -1,
valid: true,
menu: [],
menuNormal: {
Local: [
{
title: this.$t('menu.menuBar.system'),
operate: OperationEvent.Command.mBar.system,
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.view'),
operate: OperationEvent.Command.mBar.check,
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.refresh'),
operate: OperationEvent.Command.mBar.fresh,
click: this.refresh,
children: [
]
},
{
title: this.$t('menu.menuBar.display'),
operate: OperationEvent.Command.mBar.view,
children: [
{
title: this.$t('menu.menuBar.setTrainIdDisplay'),
click: this.setTrainIdDisplay,
operate: OperationEvent.Command.view.setTrainIdDisplay
},
{
title: this.$t('menu.menuBar.setNameDisplay'),
click: this.setNameDisplay,
operate: OperationEvent.Command.view.setNameDisplay
},
{
title: this.$t('menu.menuBar.setDeviceDisplay'),
click: this.setDeviceDisplay,
operate: OperationEvent.Command.view.setDeviceDisplay
}
]
},
{
title: this.$t('menu.menuBar.stationMapSwitch'),
operate: '',
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.controlModeSwitch'),
operate: OperationEvent.Command.mBar.remoteControl,
children: [
{
title: this.$t('menu.menuBar.toStationControl'),
click: this.turnToStationControl,
operate: OperationEvent.StationControl.requestStationControl.mbar
},
{
title: this.$t('menu.menuBar.forcedStationControl'),
click: this.mandatoryStationControl,
operate: OperationEvent.StationControl.forcedStationControl.password
},
{
title: this.$t('menu.menuBar.toCentralControl'),
click: this.conterStationControl,
operate: OperationEvent.StationControl.requestCentralControl.mbar,
froce: true
}
]
},
{
title: this.$t('menu.menuBar.requestOperationArea'),
operate: OperationEvent.Command.mBar.requestZone,
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.historyQuery'),
operate: OperationEvent.Command.mBar.historyQuery,
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.userManage'),
operate: OperationEvent.Command.mBar.userManage,
children: [
{
title: this.$t('menu.menuBar.userManage'),
click: this.userManage,
operate: OperationEvent.Command.manage.userManage
}
]
},
{
title: this.$t('menu.menuBar.help'),
operate: OperationEvent.Command.mBar.help,
children: [
{
title: this.$t('menu.menuBar.about'),
click: this.about,
operate: OperationEvent.Command.help.about
}
]
}
],
Center: [
{
title: this.$t('menu.menuBar.system'),
operate: OperationEvent.Command.mBar.system,
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.view'),
operate: OperationEvent.Command.mBar.check,
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.refresh'),
operate: OperationEvent.Command.mBar.fresh,
click: this.refresh,
children: [
]
},
{
title: this.$t('menu.menuBar.display'),
operate: OperationEvent.Command.mBar.view,
children: [
{
title: this.$t('menu.menuBar.setTrainIdDisplay'),
click: this.setTrainIdDisplay,
operate: OperationEvent.Command.view.setTrainIdDisplay
},
{
title: this.$t('menu.menuBar.setNameDisplay'),
click: this.setNameDisplay,
operate: OperationEvent.Command.view.setNameDisplay
},
{
title: this.$t('menu.menuBar.setDeviceDisplay'),
click: this.setDeviceDisplay,
operate: OperationEvent.Command.view.setDeviceDisplay
}
]
},
{
title: this.$t('menu.menuBar.stationMapSwitch'),
operate: '',
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.planCarOperation'),
operate: OperationEvent.Command.mBar.planTrain,
children: [
{
title: this.$t('menu.menuBar.addPlanCar'),
click: this.addPlanTrain,
operate: OperationEvent.Command.planTrain.addPlanTrain
},
{
title: this.$t('menu.menuBar.panPlanCar'),
click: this.translatPlanTrain,
operate: OperationEvent.Command.planTrain.translatPlanTrain
},
{
title: this.$t('menu.menuBar.deletePlanCar'),
click: this.delPlanTrain,
operate: OperationEvent.Command.planTrain.delPlanTrain
}
]
},
{
title: this.$t('menu.menuBar.trainNumberMaintenance'),
operate: '',
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.controlModeSwitch'),
operate: OperationEvent.Command.mBar.remoteControl,
children: [
{
title: this.$t('menu.menuBar.toStationControl'),
click: this.turnToStationControl,
operate: OperationEvent.StationControl.requestStationControl.mbar,
froce: true
},
{
title: this.$t('menu.menuBar.forcedStationControl'),
click: this.mandatoryStationControl,
operate: OperationEvent.StationControl.forcedStationControl.password,
froce: true
},
{
title: this.$t('menu.menuBar.toCentralControl'),
click: this.conterStationControl,
operate: OperationEvent.StationControl.requestCentralControl.mbar
}
]
},
{
title: this.$t('menu.menuBar.requestOperationArea'),
operate: OperationEvent.Command.mBar.requestZone,
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.schedulingLog'),
operate: '',
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.systemAnalysis'),
operate: '',
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.userManage'),
operate: OperationEvent.Command.mBar.userManage,
children: [
{
title: this.$t('menu.menuBar.userManage'),
click: this.userManage,
operate: OperationEvent.Command.manage.userManage
}
]
},
{
title: this.$t('menu.menuBar.historyQuery'),
operate: OperationEvent.Command.mBar.historyQuery,
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.help'),
operate: OperationEvent.Command.mBar.help,
children: [
{
title: this.$t('menu.menuBar.about'),
click: this.about,
operate: OperationEvent.Command.help.about
}
]
}
]
}
};
},
computed: {
...mapGetters('training', [
'mode',
'started',
'steps',
'order',
'mode'
]),
...mapGetters('map', [
'stationList'
])
},
watch: {
tempClassA() {
this.classA = this.$store.state.menuOperation.break ? -1 : this.tempClassA;
},
tempClassB() {
this.classB = this.$store.state.menuOperation.break ? -1 : this.tempClassB;
},
'$store.state.menuOperation.break': function (val) {
if (val) {
this.classA = this.classB = -1;
} else {
this.classA = this.tempClassA;
this.classB = this.tempClassB;
}
},
'$store.state.training.operatemode': function (mode) {
this.initMenu();
},
'$store.state.training.started': function (val) {
this.closeMenu(true);
},
'$store.state.training.prdType': function () {
this.initMenu();
}
},
mounted() {
this.initMenu();
},
methods: {
initMenu(menu) {
this.menu = MenuContextHandler.menuBarConvert(this.menuNormal[State2SimulationMap[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
this.clickEvent();
this.closeMenu(true);
},
clickEvent() {
const self = this;
window.onclick = function (e) {
if (document.getElementById('menuBar')) {
self.closeMenu(false);
}
};
},
noShowingChildren(children) {
if (!children || children.length <= 0) {
return true;
}
return false;
},
hasShowingChildren(children) {
if (children && children.length > 0) {
return true;
}
return false;
},
closeMenu(flag) {
if (flag || (this.mode !== TrainingMode.EDIT && this.mode !== TrainingMode.TEACH)) {
this.classA = this.tempClassA = -1;
this.classB = this.tempClassB = -1;
}
},
hookClick(item, event) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
if (item && typeof item.click == 'function') {
item.click(item.operate);
}
},
selectedClassA(item, index) {
const order = this.order || 0;
if (this.mode !== TrainingMode.TEACH) { //
this.popupMenuA(item, index);
} else if (this.steps[order] && this.steps[order].type == 'bar') { //
this.popupMenuA(item, index);
}
},
//
popupMenuA(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
this.clickEvent();
const operate = {
operation: item.operate.operation
};
this.tempClassA = index;
this.tempClassB = -1;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
selectedClassB(item, index) {
const order = this.order || 0;
if (this.mode !== TrainingMode.TEACH) { //
this.popupMenuB(item, index);
} else if (this.steps[order] && this.steps[order].type == 'bar') { //
this.popupMenuB(item, index);
}
},
popupMenuB(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
const operate = {
operation: item.operate.operation
};
this.tempClassB = index;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
//
turnToStationControl(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControlConvert.doShow(operate);
}
});
},
//
mandatoryStationControl(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.passwordBox.doShow(operate);
}
});
},
//
conterStationControl(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControlConvert.doShow(operate);
}
});
},
//
setTrainIdDisplay(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewTrainId.doShow(operate);
}
});
},
//
setNameDisplay(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewName.doShow(operate);
}
});
},
//
setDeviceDisplay(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewDevice.doShow(operate);
}
});
},
//
addPlanTrain(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainAdd.doShow(operate);
}
});
},
//
translatPlanTrain(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainTranstalet.doShow(operate);
}
});
},
//
delPlanTrain(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDelete.doShow(operate);
}
});
},
//
userManage(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.manageUser.doShow(operate);
}
});
},
//
about(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.helpAbout.doShow(operate);
}
});
},
//
refresh() {
this.closeMenu(true);
EventBus.$emit('refresh');
},
getLoginResult(operate) {
/** 密码校验*/
if (operate.operation == OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation) {
if (operate.success) {
/** 校验成功*/
this.$refs.stationControlConvert.doShow({ operation: OperationEvent.StationControl.forcedStationControl.mbar.operation });
}
}
},
undeveloped() {
this.doClose();
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
callback: action => {
}
});
},
doClose() {
this.$nextTick(() => {
EventBus.$emit('closeMenu');
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$width: 30px;
$height: 30px;
$menuPadding: 10px;
$menuItemHeight: 30px;
$menuItemWidth: 190px;
$menuItemPadding: 5px;
#menuBar {
z-index: 10;
position: absolute;
width: inherit;
height: $height;
line-height: $height;
}
.nav {
display: block;
cursor: pointer;
color: #0000;
background: -webkit-linear-gradient(#FDFDFE, #DEE3F3);
background: -o-linear-gradient(#FDFDFE, #DEE3F3);
background: -moz-linear-gradient(#FDFDFE, #DEE3F3);
background: linear-gradient(#FDFDFE, #DEE3F3);
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
}
.nav-li {
position: relative;
display: inline-block;
padding-left: $menuPadding;
padding-right: $menuPadding;
}
.nav-li:active {
background: #C9D0E1;
border-radius: 4px;
}
.nav-li-text {
font-size: 13px;
color: #000;
text-align: center;
text-decoration: none;
}
.nav-ul {
display: none;
position: absolute;
list-style: none;
border: 1px solid gray !important;
line-height: $menuItemHeight;
width: $menuItemWidth;
padding: 0px;
margin: 0px;
}
.menu-ul {
display: none;
list-style: none;
background: #F0F0F0;
line-height: $menuItemHeight;
width: $menuItemWidth;
bottom: $menuItemHeight;
}
.active {
position: absolute;
display: block !important;
}
.menu-ul-text {
font-size: 14px;
color: #000;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li {
text-align: left;
background: #F0F0F0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-block {
display: flex;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-text {
font-size: 14px;
color: #000;
}
.menu-li-text .status {
display: block;
float: left;
border-right: 1px inset #CACACA;
width: $width;
}
.menu-li-text .label {
display: block;
float: left;
}
.menu-li-block:hover {
background: #C9DEF7;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
</style>

View File

@ -0,0 +1,130 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { Notification } from 'element-ui';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen';
export default {
name: 'CancelMenu',
components: {
PopMenu
},
data() {
return {
menu: [],
menuNormal: [],
menuScreen: [
{
label: this.$t('menu.menuCancle.zoomIn'),
handler: this.magnifyMap,
disabled: false
},
{
label: this.$t('menu.menuCancle.zoomOut'),
handler: this.shrinkMap,
disabled: false
},
{
label: this.$t('menu.menuCancle.back'),
handler: this.back,
disabled: false
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menuNormal = [];
this.stationList.forEach(station => {
if (station.code === station.concentrateStationCode) {
const node = {
label: station.name,
children: []
};
this.stationList.forEach(elem => {
if (elem.visible) {
let next = elem;
while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
}
if (station.code == next.code) {
node.children.push({
code: elem.code,
label: elem.name,
handler: this.mapLocation
});
}
}
});
this.menuNormal.push(node);
}
});
this.menu = [...this.menuNormal];
},
doShow(point) {
this.clickEvent();
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();
}
},
//
mapLocation(item) {
if (item) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
this.doClose();
}
},
//
magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount');
},
//
shrinkMap() {
this.$store.dispatch('menuOperation/handleShrinkCount');
},
//
async back() {
history.go(-1);
Notification.closeAll();
exitFullscreen();
}
}
};
</script>

View File

@ -0,0 +1,142 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm two-confirmation"
:title="$t('menu.menuChildDialog.secondaryConfirmation')"
:visible.sync="show"
width="360px"
:before-close="doClose"
:show-close="false"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<template v-for="(message,index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="3">
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.confirm') }}</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.close') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'TwoConfirmation',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: '',
timer: null,
domIdConfirm: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
messages() {
if (this.operate) {
return this.operate.messages;
}
return [];
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.domIdConfirm = '';
if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) {
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId;
} else if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) {
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId;
}
this.operate = operate || {};
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
operation: OperationEvent.Command.close.confirm.operation
};
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
});
},
commit() {
if (this.operate) {
this.loading = true;
(this.operate.selection || []).forEach(elem => {
const operate = {
val: elem.code,
param: {
ControlMode_Code: elem.code
}
};
if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
}
this.doClose();
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
});
this.loading = false;
}
}
}
};
</script>

View File

@ -0,0 +1,172 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm user-add"
:title="title"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
<el-form ref="form" size="small" label-width="90px" :model="model" label-position="left" :rules="rules">
<el-form-item :label="$t('menu.menuChildDialog.jobNumber')" prop="jobNumber">
<el-input v-model="model.jobNumber" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.userName')" prop="userName">
<el-input v-model="model.userName" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.password')" prop="password">
<el-input v-model="model.password" type="password" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.confirmPassword')" prop="confirm">
<el-input v-model="model.confirm" type="password" />
</el-form-item>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.determine') }}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'UserAdd',
components: {
},
data() {
return {
operate: {},
operation: null,
dialogShow: false,
loading: false,
model: {
type: 'ADD',
jobNumber: '',
userName: '',
password: '',
confirm: ''
},
rules: {
jobNumber: [
{ required: true, message: this.$t('menu.menuChildDialog.inputJobNumber'), trigger: 'blur' }
],
userName: [
{ required: true, message: this.$t('menu.menuChildDialog.inputUserName'), trigger: 'blur' }
],
password: [
{ required: true, message: this.$t('menu.menuChildDialog.inputPassword'), trigger: 'change' }
],
confirm: [
{ required: true, message: this.$t('menu.menuChildDialog.inputPasswordAgain'), trigger: 'change' }
]
}
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return this.$t('menu.menuChildDialog.addUser');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
this.$nextTick(() => {
this.$refs.form.resetFields();
});
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
if (this.model.password === this.model.confirm) {
this.doClose();
this.$emit('operateUser', this.model);
} else {
this.$messageBox(this.$t('menu.menuChildDialog.passwordInconsistent'));
}
}
});
} else {
return false;
}
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); this.model; });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,143 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm user-delete"
:title="title"
:visible.sync="show"
width="260px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="padding-left: 10px; padding-bottom: 10px">
<i class="el-icon-info" />
<template v-for="(message,index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="3">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.determine') }}</el-button>
</el-col>
<el-col :span="8" :offset="2">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'UserDelete',
components: {
},
data() {
return {
operate: {},
messages: [],
model: {
type: 'DELETE',
jobNumber: '',
userName: ''
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return this.$t('menu.menuChildDialog.deleteUser');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
this.messages = operate.messages;
this.model.userName = '';
this.model.jobNumber = '';
if (selected) {
this.model.userName = selected.userName;
this.model.jobNumber = selected.jobNumber;
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.model.userName && this.model.jobNumber) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$emit('operateUser', this.model);
}
});
} else {
this.$messageBox(this.$t('menu.menuChildDialog.selectTips'));
}
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,189 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm user-edit"
:title="title"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
<el-form ref="form" size="small" label-width="90px" :model="model" label-position="left" :rules="rules">
<el-form-item :label="$t('menu.menuChildDialog.jobNumber')" prop="jobNumber">
<el-input v-model="model.jobNumber" disabled />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.userName')" prop="userName">
<el-input v-model="model.userName" disabled />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.originalPassword')" prop="oldPassword">
<el-input v-model="model.oldPassword" type="password" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.password')" prop="password">
<el-input v-model="model.password" type="password" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.confirmPassword')" prop="confirm">
<el-input v-model="model.confirm" type="password" />
</el-form-item>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.determine') }}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'UserEdit',
components: {
},
data() {
return {
operate: {},
selected: {},
operation: null,
dialogShow: false,
loading: false,
model: {
type: 'EDIT',
jobNumber: '',
userName: '',
oldPassword: '',
password: '',
confirm: ''
},
rules: {
jobNumber: [
{ required: true, message: this.$t('menu.menuChildDialog.inputJobNumber'), trigger: 'blur' }
],
userName: [
{ required: true, message: this.$t('menu.menuChildDialog.inputUserName'), trigger: 'blur' }
],
oldPassword: [
{ required: true, message: this.$t('menu.menuChildDialog.inputOriginal'), trigger: 'change' }
],
password: [
{ required: true, message: this.$t('menu.menuChildDialog.inputNewPassword'), trigger: 'change' }
],
confirm: [
{ required: true, message: this.$t('menu.menuChildDialog.inputNewAgain'), trigger: 'change' }
]
}
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return this.$t('menu.menuChildDialog.userEditPage');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
this.$nextTick(() => {
this.$refs.form.resetFields();
this.selected = selected;
if (selected) {
this.model.jobNumber = selected.jobNumber;
this.model.userName = selected.userName;
}
});
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
if (this.selected.password !== this.model.oldPassword) {
this.$messageBox(this.$t('menu.menuChildDialog.originalPasswordError'));
} else if (this.model.password !== this.model.confirm) {
this.$messageBox(this.$t('menu.menuChildDialog.passwordError'));
} else if (this.model.oldPassword === this.model.password) {
this.$messageBox(this.$t('menu.menuChildDialog.passwordSame'));
} else {
this.doClose();
this.$emit('operateUser', this.model);
}
}
});
} else {
return false;
}
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,140 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm manage-user"
:title="title"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="height: 70px;">
<div style="position: relative; left: 10px;" />
<div style="position: relative; left: 80px;">
<div style="width:100%">
<span style="padding-left: 60px">{{ $t('menu.menuDialog.versionName') }}</span>
<el-button
:id="domIdConfirm"
style="position: absolute; right: 95px;"
type="primary"
:loading="loading"
@click="commit"
>{{ $t('menu.menuDialog.confirm') }}</el-button>
</div>
<div style="width:100%; padding-top: 20px">
<span> {{ $t('menu.menuDialog.copyright') }}</span>
</div>
</div>
</div>
<div style="padding: 10px; margin: 5px; ">
<el-table :data="tableData" style="width: 100%;" height="400">
<el-table-column prop="moduleName" :label="$t('menu.menuDialog.moduleName')" width="180" />
<el-table-column prop="version" :label="$t('menu.menuDialog.version')" width="180" />
<el-table-column prop="updateDate" :label="$t('menu.menuDialog.modifyDate')" />
</el-table>
</div>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'ManageUser',
data() {
return {
tableData: [
{
moduleName: this.$t('menu.menuDialog.mainProgramVersion'),
version: '123',
updateDate: '123'
}
],
operate: {},
operation: null,
dialogShow: false,
loading: false,
selected: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return this.$t('menu.menuDialog.about');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,309 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm manage-user"
:title="title"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; ">
<span class="base-label">{{ $t('menu.menuDialog.userList') }}</span>
<el-row>
<el-col :span="18">
<el-table
ref="multipleTable"
:data="tableData"
border
row-key="code"
style="width: 100%"
height="450"
center
size="mini"
highlight-current-row
@row-click="chooseUser"
>
<el-table-column prop="jobNumber" :label="$t('menu.menuDialog.jobNumber')" width="120">
<template slot-scope="scope">
<span>{{ scope.row.jobNumber }}</span>
</template>
</el-table-column>
<el-table-column prop="userName" :label="$t('menu.menuDialog.userName')">
<template slot-scope="scope">
<span>{{ scope.row.userName }}</span>
</template>
</el-table-column>
<el-table-column width="20" />
</el-table>
</el-col>
<el-col :span="4">
<el-button :id="domIdFreshUser" style="margin-top: 140px; margin-left: 10px;" @click="freshUser">{{ $t('menu.menuDialog.refresh') }}
</el-button>
<el-button :id="domIdAddUser" style="margin-top: 30px; margin-left: 10px;" @click="addUser">{{ $t('menu.menuDialog.add') }}
</el-button>
<el-button :id="domIdEditUser" style="margin-top: 30px; margin-left: 10px;" @click="editUser">{{ $t('menu.menuDialog.modify') }}
</el-button>
<el-button :id="domIdDelUser" style="margin-top: 30px; margin-left: 10px;" @click="delUser">{{ $t('menu.menuDialog.delete') }}
</el-button>
</el-col>
</el-row>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<user-add ref="userAdd" @operateUser="operateUser" />
<user-edit ref="userEdit" @operateUser="operateUser" />
<user-delete ref="userDelete" @operateUser="operateUser" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import UserAdd from './childDialog/userAdd';
import UserEdit from './childDialog/userEdit';
import UserDelete from './childDialog/userDelete';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'ManageUser',
components: {
UserAdd,
UserEdit,
UserDelete
},
data() {
return {
tableData: [],
operate: {},
operation: null,
dialogShow: false,
loading: false,
selected: null
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdAddUser() {
return this.dialogShow ? OperationEvent.Command.manage.addUser.domId : '';
},
domIdEditUser() {
return this.dialogShow ? OperationEvent.Command.manage.editUser.domId : '';
},
domIdDelUser() {
return this.dialogShow ? OperationEvent.Command.manage.delUser.domId : '';
},
domIdFreshUser() {
return this.dialogShow ? OperationEvent.Command.manage.freshUser.domId : '';
},
domIdChooseUser() {
return this.dialogShow ? OperationEvent.Command.manage.chooseUser.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return this.$t('menu.menuDialog.userManage');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
//
addUser() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.addUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userAdd.doShow(operate);
}
}).catch(() => {
this.loading = false;
});
},
//
editUser() {
if (this.selected) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.editUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userEdit.doShow(operate, this.selected);
}
}).catch(() => {
this.loading = false;
});
} else {
this.$messageBox(this.$t('menu.menuDialog.selectUser'));
}
},
//
delUser() {
if (this.selected) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.delUser.operation,
messages: [`${this.$t('menu.menuDialog.deleteMessageOne')} ${this.selected.userName} ${this.$t('menu.menuDialog.deleteMessageTwo')}`]
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userDelete.doShow(operate, this.selected);
}
}).catch(() => {
this.loading = false;
});
} else {
this.$messageBox(this.$t('menu.menuDialog.selectUser'));
}
},
//
freshUser() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.freshUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
}).catch(() => {
this.loading = false;
});
},
//
chooseUser(row) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.chooseUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.selected = row;
}).catch(() => {
this.loading = false;
});
},
commit() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
},
//
operateUser(data) {
if (data && data.type === 'ADD') {
const index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber; }));
if (index < 0) {
this.tableData.push({
jobNumber: data.jobNumber,
userName: data.userName,
password: data.password
});
} else {
this.$messageBox(this.$t('menu.menuDialog.addFail'));
}
} else if (data && data.type === 'EDIT') {
const index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber; }));
if (index >= 0) {
this.tableData[index].password = data.password;
this.tableData[index].userName = data.userName;
} else {
this.$messageBox(this.$t('menu.menuDialog.modifyFail'));
}
} else if (data && data.type === 'DELETE') {
const index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber; }));
if (index >= 0) {
this.tableData.splice(index, 1);
this.selected = null;
} else {
this.$messageBox(this.$t('menu.menuDialog.deleteFail'));
}
}
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,228 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm password-box"
:title="$t('menu.menuDialog.passwordBox')"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="context" style="overflow:hidden">
<el-form label-width="80px" size="mini">
<el-form-item prop="username">
<span slot="label">{{ $t('menu.menuDialog.userNameLabel') }}</span>
<el-input v-model="model.username" disabled />
</el-form-item>
<el-form-item prop="password">
<span slot="label">{{ $t('menu.menuDialog.password') }}</span>
<el-input v-model="model.password" type="password" />
</el-form-item>
</el-form>
<div class="operate">
<el-button-group v-model="key" class="left" size="mini">
<el-button size="mini" @click="click(1)">1</el-button>
<el-button size="mini" @click="click(2)">2</el-button>
<el-button size="mini" @click="click(3)">3</el-button>
<el-button size="mini" @click="click(4)">4</el-button>
<el-button size="mini" @click="click(5)">5</el-button>
</el-button-group>
<el-button-group v-model="key" class="right" size="mini">
<el-button @click="esc">{{ $t('menu.menuDialog.back') }}</el-button>
</el-button-group>
<el-button-group v-model="key" class="left" size="mini">
<el-button size="mini" @click="click(6)">6</el-button>
<el-button size="mini" @click="click(7)">7</el-button>
<el-button size="mini" @click="click(8)">8</el-button>
<el-button size="mini" @click="click(9)">9</el-button>
<el-button size="mini" @click="click(0)">0</el-button>
</el-button-group>
<el-button-group v-model="key" class="right" size="mini">
<el-button @click="clr">{{ $t('menu.menuDialog.clear') }}</el-button>
</el-button-group>
</div>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'PasswordBox',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: null,
model: {
username: '',
password: ''
},
key: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
/** 强制站控*/
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
}
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(operate) {
this.model.username = '';
this.model.password = '';
this.operate = operate || {};
this.operation = operate.operation;
this.model.username = this.$store.state.user.nickname;
},
doShow(operate) {
/** 如果不是断点激活,而是第一次显示需要初始化数据*/
if (!this.dialogShow) {
this.loadInitData(operate);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
operation: OperationEvent.Command.close.password.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
};
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
/** 强制站控*/
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation;
}
if (this.model.password == '123456') {
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setLoginResult', {
operation: operate.operation,
success: valid
});
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('setLoginResult', {
operation: operate.operation,
success: false
});
});
} else {
this.$refs.noticeInfo.doShow(operate, [this.$t('menu.menuDialog.IncorrectPassword')]);
}
},
click(key) {
if (!this.model.password) {
this.model.password = '';
}
this.model.password += key;
},
esc() {
if (this.model.password) {
this.model.password = this.model.password.substring(0, this.model.password.length - 1);
}
},
clr() {
this.model.password = '';
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.password-box .el-form {
margin-top: 10px !important;
margin-right: 20px !important;
}
.password-box .el-form-item {
margin-bottom: 5px !important;
}
.password-box .context {
height: 170px !important;
}
.password-box .operate {
margin-top: 10px !important;
padding-bottom: 10px !important;
}
.password-box .left {
margin-left: 10px !important;
}
.password-box .left .el-button {
color: #000;
background: #F0F0F0;
text-align: center;
width: 30px !important;
}
.password-box .right {
color: #000;
margin-left: 10px !important;
background: #F0F0F0;
width: 80px !important;
}
</style>

View File

@ -0,0 +1,463 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm station-control-convert"
:title="$t('menu.menuDialog.controlModeConversion')"
:visible.sync="show"
width="700px"
:before-close="doClose"
:show-close="true"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-table
ref="multipleTable"
:data="tableData"
border
row-key="code"
style="width: 100%"
height="250"
center
size="mini"
highlight-current-row
>
<el-table-column :id="domIdChoose" prop="check" :label="$t('menu.menuDialog.select')" width="60" style="margin-left:30px">
<template slot-scope="scope">
<el-checkbox ref="check" v-model="scope.row.check" :disabled="scope.row.disabled" />
</template>
</el-table-column>
<el-table-column prop="operate" :label="$t('menu.menuDialog.operatingArea')" width="140">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
</template>
</el-table-column>
<el-table-column prop="control" :label="$t('menu.menuDialog.controlMode')" width="80">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control }}</span>
</template>
</el-table-column>
<el-table-column prop="status" :label="$t('menu.menuDialog.centerStationCommunicationStatus')" width="140">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.status }}</span>
</template>
</el-table-column>
<el-table-column prop="result" :label="$t('menu.menuDialog.transferExecutionStatus')">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.result }}</span>
</template>
</el-table-column>
</el-table>
<el-row class="button-group">
<el-col :span="10" :offset="3" class="control_button">
<el-button v-if="isFork" :id="domIdFork" :disabled="disabledCommit" @click="forkCommit">{{ $t('menu.menuDialog.forcedStationControl') }}</el-button>
<el-button v-if="isRequest" :id="domIdRequest" :disabled="disabledCommit" @click="requestCommit">{{ $t('menu.menuDialog.requestStationControl') }}
</el-button>
<el-button v-if="isConter" :id="domIdConter" :disabled="disabledCommit" @click="conterCommit">{{ $t('menu.menuDialog.requestInTheControl') }}
</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel">{{ $t('menu.menuDialog.close') }}
</el-button>
</el-col>
</el-row>
<two-confirmation ref="twoConfirmation" @setOperate="getOperate" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import TwoConfirmation from './childDialog/twoConfirmation';
export default {
name: 'StationControlConvert',
components: {
TwoConfirmation
},
data() {
return {
operate: null,
dialogShow: false,
disabledSend: false,
disabledSure: false,
disabledClose: false,
operation: '',
controlProps: {
'01': this.$t('menu.menuDialog.inTheControl'),
'02': this.$t('menu.menuDialog.stationControl')
},
selection: [],
tableData: [],
timer: null,
count: 0,
flagListBit: [],
backOperate: '',
timeout: 61,
counts: 0
};
},
computed: {
...mapGetters('map', [
'stationList',
'stationControlList'
]),
...mapGetters('training', [
'mode',
'started'
]),
disabledCommit() {
return this.disabledSend || this.disabledSure;
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
isFork() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl);
}
return false;
},
isRequest() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl);
}
return false;
},
isConter() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl);
}
return false;
},
domIdChoose() {
if (this.dialogShow) {
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
return OperationEvent.StationControl.forcedStationControl.choose.domId;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
return OperationEvent.StationControl.requestStationControl.choose.domId;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
return OperationEvent.StationControl.requestCentralControl.choose.domId;
}
}
return false;
},
domIdConter() {
return this.dialogShow ? OperationEvent.StationControl.requestCentralControl.menu.domId : '';
},
domIdFork() {
return this.dialogShow ? OperationEvent.StationControl.forcedStationControl.menu.domId : '';
},
domIdRequest() {
return this.dialogShow ? OperationEvent.StationControl.requestStationControl.menu.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem) {
this.flagListBit[this.selection.forEach(elem => { return elem.stationControlCode == elem.code; })] = false;
if (elem.hasOwnProperty('timeout')) {
this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.acceptConversionResponseTimeout') }, false);
} else if (elem.hasOwnProperty('agree')) {
if (elem.agree) {
this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.controlModeTransfersuccees') }, true);
} else {
this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.controlModeTransferFailed') }, false);
}
}
this.disabledClose = false;
this.disabledSure = false;
}
},
backOperate: function (operate) {
if (this.dialogShow && operate) {
if (operate.selection && operate.selection.length) {
operate.selection.forEach(elem => {
if (operate.commit) {
this.updateTableValue(elem.code, { result: `${this.$t('menu.menuDialog.senedMessageOne')}${this.timeout} ${this.$t('menu.menuDialog.senedMessageTwo')}` }, false);
} else if (operate.cancel) {
this.updateTableValue(elem.code, { result: '' }, false);
}
});
}
}
},
//
tableData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
mounted() {
this.loadTableData();
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
updateTableValue(code, result, success) {
this.tableData.forEach((row, index) => {
if (row.code == code) {
for (const prop in result) {
row[prop] = result[prop];
}
if (success) {
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
row.control = this.controlProps['02']; // 01: 02:
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
row.control = this.controlProps['01']; // 01: 02:
}
row.disabled = true;
row.check = false;
}
}
});
},
checkTableDataSelction(data) {
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
});
}
this.disabledSend = !selection.length;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.handleChooseChange(selection);
this.selection = selection;
}
},
checkBoxDisabled(row) {
const control = (this.$store.getters['map/getDeviceByCode'](row.code) || {});
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
if (control && control.status == '02') { // 01: 02:
return true;
}
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
if (control && control.status == '01') { // 01: 02:
return true;
}
}
},
loadTableData() {
this.tableData = [];
this.stationControlList.forEach(control => {
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
this.tableData.push({
code: control.code,
operate: station.name || '',
control: '',
check: false,
disabled: false,
status: this.$t('menu.menuDialog.normal'),
result: ''
});
});
},
initTableDataStatus() {
this.tableData.forEach(row => {
row.disabled = this.checkBoxDisabled(row);
row.check = false;
row.result = '';
const control = this.$store.getters['map/getDeviceByCode'](row.code);
if (control) {
row.control = this.controlProps[control.status];
}
});
},
doShow(operate) {
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
this.disabledSure = false;
this.initTableDataStatus();
}
this.dialogShow = true;
this.$store.dispatch('training/emitTipFresh');
},
doClose() {
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$refs.multipleTable.setCurrentRow();
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
setTimer() {
this.clearTimer();
this.flagListBit = new Array(this.selection.length).fill(true);
this.timer = setInterval(() => {
(this.selection || []).forEach((elem, index) => {
if (this.flagListBit[index]) {
elem['count'] = (elem['count'] || 0) + 1;
elem['count'] > this.timeout && (
this.flagListBit[index] = false,
this.setRequestTimeout(elem)
);
}
});
this.flagListBit.findIndex(elem => { return elem; }) < 0 && this.clearTimer();
}, 1000);
},
clearTimer() {
this.count = 0;
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
setRequestTimeout(elem) {
elem['count'] = 0;
this.$store.dispatch('socket/pushMsgQueue',
{ type: 'resp', timeout: 'true', stationControlCode: elem.code }
);
},
handleChooseChange(selection) {
this.selection = selection;
const stationCodeList = selection.map(elem => { return elem.code; });
if (selection && selection.length) {
const operate = {
operation: '',
val: stationCodeList.join('::'),
selection: selection
};
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
operate.operation = OperationEvent.StationControl.forcedStationControl.choose.operation;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
operate.operation = OperationEvent.StationControl.requestStationControl.choose.operation;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
operate.operation = OperationEvent.StationControl.requestCentralControl.choose.operation;
}
this.disabledSure = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.disabledSure = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
} else if (!selection) {
this.$messageBox(this.$t('menu.menuDialog.selectData'));
}
},
requestCommit() {
const stationCodeList = this.selection.map(elem => { return elem.code; });
const operate = {
messages: [this.$t('menu.menuDialog.confirmStationControlTip')],
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
val: stationCodeList.join('::'),
selection: this.selection
};
this.selection.forEach((elem, index) => {
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
this.disabledSure = false;
});
},
forkCommit() {
const stationCodeList = this.selection.map(elem => { return elem.code; });
const operate = {
messages: [this.$t('menu.menuDialog.confirmInTheControlTip')],
operation: OperationEvent.StationControl.forcedStationControl.menu.operation,
val: stationCodeList.join('::'),
selection: this.selection
};
this.selection.forEach((elem, index) => {
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
this.disabledSure = false;
});
},
conterCommit() {
const stationCodeList = this.selection.map(elem => { return elem.code; });
const operate = {
messages: [this.$t('menu.menuDialog.confirmInTheControlTip')],
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
val: stationCodeList.join('::'),
selection: this.selection
};
this.selection.forEach((elem, index) => {
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
this.disabledSure = false;
});
},
getOperate(operate) {
this.backOperate = operate;
if (operate.cancel) {
this.disabledSure = this.disabledSend = false;
}
if (operate.commit || operate.timeout) {
this.disabledSend = this.disabledSure = true;
}
this.setTimer();
this.disabledClose = true;
this.counts = 1;
}
}
};
</script>
<style lang="scss" scoped>
.fuzhou-01__systerm .el-dialog .control_button button{
max-width:180px;
width:auto ;
padding-left: 5px ;
padding-right: 5px ;
min-width: 80px;
}
</style>

View File

@ -0,0 +1,179 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">{{ $t('menu.menuDialog.addLocation') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode">
<span slot="label">{{ $t('menu.menuDialog.terminalOne') }}</span>
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item prop="trainNumberLimber">
<span id="frontTrainNumber" slot="label">{{ $t('menu.menuDialog.frontTrainNumber') }}</span>
<el-input v-model="addModel.trainNumberLimber" />
</el-form-item>
</div>
</div>
<el-form-item id="groupNumber" :label="$t('menu.menuDialog.addTrainNumber')" label-width="115px" prop="groupNumber">
<el-input v-model="addModel.groupNumber" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainAdd',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: '',
trainNumberLimber: ''
},
rules: {
groupNumber: [
{ required: true, message: this.$t('menu.menuDialog.inputTrainNumber'), trigger: 'blur' }
],
// trainNumberLimber: [
// { required: true, message: '', trigger: 'blur' }
// ],
stationStandCode: [
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
]
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
},
title() {
return this.$t('menu.menuDialog.addPlanTrain');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
#frontTrainNumber,#groupNumber label{
line-height: 100%;
display: inline-block;
}
</style>

View File

@ -0,0 +1,157 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
<el-form-item prop="stationStandCode">
<span slot="label">{{ $t('menu.menuDialog.terminalTwo') }}</span>
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
</el-select>
</el-form-item>
<el-form-item :label="$t('menu.menuDialog.trainNumber')" prop="groupNumber">
<el-input v-model="addModel.groupNumber" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainAdd',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: ''
},
rules: {
groupNumber: [
{ required: true, message: this.$t('menu.menuDialog.inputTrainNumber'), trigger: 'blur' }
],
stationStandCode: [
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
]
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
},
title() {
return this.$t('menu.menuDialog.deletePlanTrain');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Command.planTrain.delPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,164 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
<el-form-item :label="$t('menu.menuDialog.trainNumber')" label-width="115px" prop="groupNumber">
<el-input v-model="addModel.groupNumber" />
</el-form-item>
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">{{ $t('menu.menuDialog.purpose') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode">
<span slot="label">{{ $t('menu.menuDialog.terminalTwo') }}</span>
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('menu.menuDialog.trainNumber')" prop="trainNumberLimber">
<el-input v-model="addModel.trainNumberLimber" />
</el-form-item>
</div>
</div>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainTranstalet',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: '',
trainNumberLimber: ''
},
rules: {
groupNumber: [
{ required: true, message: this.$t('menu.menuDialog.inputTrainNumber'), trigger: 'blur' }
],
trainNumberLimber: [
{ required: true, message: this.$t('menu.menuDialog.inputFrontNumber'), trigger: 'blur' }
],
stationStandCode: [
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
]
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
},
title() {
return this.$t('menu.menuDialog.panPlanCar');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -0,0 +1,166 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm view-display"
:title="$t('menu.menuDialog.deviceDisplaySettings')"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-checkbox-group v-model="deviceLevels">
<div>
<el-checkbox :label="1">{{ $t('menu.menuDialog.trainWindow') }}</el-checkbox>
</div>
<div>
<el-checkbox :label="2">{{ $t('menu.menuDialog.sectionBoundary') }}</el-checkbox>
</div>
<div>
<el-checkbox :label="3">{{ $t('menu.menuDialog.linkageAutoRouteShow') }}</el-checkbox>
</div>
<div>
<el-checkbox :label="4">{{ $t('menu.menuDialog.atsAutoTriggerShow') }}</el-checkbox>
</div>
</el-checkbox-group>
<el-row class="button-group">
<el-col :span="8" :offset="2">
<el-button :id="domIdConfirm" class="commit" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}
</el-button>
</el-col>
<el-col :span="8" :offset="3">
<el-button :id="domIdCancel" class="cancal" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewDevice',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
deviceLevels: [2, 3, 4, 5]
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setDeviceDisplay();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: this.deviceLevels.sort().join('::')
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.setDeviceDisplay();
}
}).catch(() => {
this.loading = false;
});
},
setDeviceDisplay() {
const deviceList = [];
//
const borderBorderShow = this.deviceLevels.indexOf(2) !== -1;
const sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
//
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {borderBorderShow }));
});
}
//
const trainWindowShow = this.deviceLevels.indexOf(1) !== -1;
const trainWindowList = this.$store.getters['map/trainWindowList'];
if (trainWindowList && trainWindowList.length > 0) {
trainWindowList.forEach(elem => {
//
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {trainWindowShow }));
});
}
// ATS
const linkageAutoRouteShow = this.deviceLevels.indexOf(3) !== -1; //
const atsAutoTriggerShow = this.deviceLevels.indexOf(4) !== -1; // ATS
const signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { linkageAutoRouteShow, atsAutoTriggerShow }));
});
}
this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -0,0 +1,248 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm view-name"
:title="$t('menu.menuDialog.nameDisplaySetting')"
:visible.sync="show"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-checkbox-group v-model="nameLevels">
<el-row>
<el-col :span="10">
<el-checkbox :label="1">{{ $t('menu.menuDialog.signalName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox :label="2">{{ $t('menu.menuDialog.standTrackName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="3" disabled>{{ $t('menu.menuDialog.buttonName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox :label="4">{{ $t('menu.menuDialog.reentryTrackName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="5">{{ $t('menu.menuDialog.trackName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="6">{{ $t('menu.menuDialog.transferTrackName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="7">{{ $t('menu.menuDialog.turnoutName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="8">{{ $t('menu.menuDialog.indicatorName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="9">{{ $t('menu.menuDialog.turnoutSectionName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="10">{{ $t('menu.menuDialog.destinationName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="11">{{ $t('menu.menuDialog.axisSectionName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="12">{{ $t('menu.menuDialog.kmPost') }}</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import deviceType from '@/jmap/constant/deviceType';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewName',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12]
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setNameDisplay();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: this.nameLevels.sort().join('::')
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.setNameDisplay();
}
}).catch(() => {
this.loading = false;
});
},
setNameDisplay() {
const deviceList = [];
//
let nameShow = this.nameLevels.indexOf(1) !== -1;
const signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
});
}
//
nameShow = this.nameLevels.indexOf(7) !== -1; //
const switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; //
const switchList = this.$store.getters['map/switchList'];
if (switchList && switchList.length > 0) {
switchList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {nameShow, switchSectionNameShow }));
});
}
//
const indicatorShow = this.nameLevels.indexOf(8) !== -1;
const control = this.$store.getters['map/stationControlList'];
if (control && control.length > 0) {
control.forEach(elem => {
//
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow }));
});
}
//
nameShow = false;
let standTrackNameShow = false;
let reentryTrackNameShow = false;
let transferTrackNameShow = false;
const sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
elem._type = deviceType.Section;
if (elem.isSwitchSection && elem.parentCode) {
//
nameShow = false;
} else {
if (elem.type === '01') {
//
nameShow = this.nameLevels.indexOf(11) !== -1;
} else if (elem.type === '02') {
//
nameShow = this.nameLevels.indexOf(5) !== -1;
} else if (elem.type === '03') {
//
nameShow = this.nameLevels.indexOf(9) !== -1;
}
}
//
if (elem.isStandTrack) {
standTrackNameShow = this.nameLevels.indexOf(2) !== -1;
}
//
if (elem.isReentryTrack) {
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1;
}
//
if (elem.isTransferTrack) {
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1;
}
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
});
}
//
const kmPostShow = this.nameLevels.indexOf(12) !== -1;
const stationList = this.$store.getters['map/stationList'];
if (stationList && stationList.length > 0) {
stationList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //
});
}
this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
};
</script>

View File

@ -0,0 +1,209 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm view-train-id"
:title="$t('menu.menuDialog.trainIDDisplaySetting')"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">{{ $t('menu.menuDialog.plantrainDisplayMode') }}</span>
<el-radio-group v-model="planMode">
<el-row>
<el-col :span="10">
<el-radio :label="1">{{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="2">{{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
<el-row class="elrow">
<el-col :span="10">
<el-radio :label="3">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="4">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
<el-row class="elrow">
<el-col :span="10">
<el-radio :label="5">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="6">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
<span class="base-label">{{ $t('menu.menuDialog.headCodeStationDisplayMode') }}</span>
<el-radio-group v-model="headMode">
<el-row>
<el-col :span="10">
<el-radio :label="3">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="6" :offset="4">
<el-radio :label="4">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">{{ $t('menu.menuDialog.fontSize') }}</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99" />
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">{{ $t('menu.menuDialog.range') }}</span>
</el-col>
</el-row>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import deviceType from '@/jmap/constant/deviceType';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewTrainId',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
planMode: 5,
headMode: 5,
fontSize: 16
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setTrainDispaly();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: [this.planMode, this.headMode, this.fontSize].join('::')
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.setTrainDispaly();
this.doClose();
}
}).catch(() => {
this.loading = false;
});
},
setTrainDispaly() {
const updatlist = [];
const trainList = this.$store.getters['training/viewTrainList']();
if (trainList && trainList.length > 0) {
const nameFormat = this.trainNameFormatBy(this.planMode);
const nameFontSize = this.fontSize;
trainList.forEach(elem => {
updatlist.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {nameFormat, nameFontSize }));
});
this.$store.dispatch('map/updateMapDevices', updatlist);
}
},
trainNameFormatBy(mode) {
switch (mode.toString()) {
case '1': return 'serviceNumber:tripNumber'; // +
case '2': return 'serviceNumber:groupNumber'; // +
case '3': return 'targetCode:tripNumber'; // +
case '4': return 'targetCode:groupNumber'; // +
case '5': return 'targetCode:serviceNumber:tripNumber'; // ++
case '6': return 'targetCode:serviceNumber:groupNumber'; // ++
}
return ''; //
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ {
.el-dialog .el-radio__label{
width: 150px ;
white-space: pre-wrap ;
display: inline-block ;
}
.el-radio__input{
vertical-align: top;
}
}
.elrow{
margin-top:4px;
}
</style>

View File

@ -0,0 +1,370 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl" />
<section-cmd-control ref="sectionCmdControl" />
<speed-cmd-control ref="speedCmdControl" />
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl';
import SectionCmdControl from './dialog/sectionCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import Handler from '@/scripts/cmdPlugin/Handler';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default {
name: 'SectionMenu',
components: {
PopMenu,
SectionControl,
SectionCmdControl,
SpeedCmdControl,
NoticeInfo
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
label: this.$t('menu.menuSection.sectionFaultUnlock'),
handler: this.fault,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
},
{
label: this.$t('menu.menuSection.sectionResection'),
handler: this.split,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
},
{
label: this.$t('menu.menuSection.sectionActive'),
handler: this.active,
cmdType: CMD.Section.CMD_SECTION_ACTIVE
},
{
label: this.$t('menu.menuSection.sectionAxisPreReset'),
handler: this.axlePreReset,
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
},
{
label: this.$t('menu.menuSection.sectionBlockade'),
handler: this.lock,
cmdType: CMD.Section.CMD_SECTION_BLOCK
},
{
label: this.$t('menu.menuSection.sectionUnblock'),
handler: this.unlock,
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
},
{
label: this.$t('menu.menuSection.sectionSetSpeedLimit'),
handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
},
{
label: this.$t('menu.menuSection.sectionCancelSpeedLimit'),
handler: this.cancelSpeed,
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
}
],
Center: [
{
label: this.$t('menu.menuSection.sectionFaultUnlock'),
handler: this.fault,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
},
{
label: this.$t('menu.menuSection.sectionResection'),
handler: this.split,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
},
{
label: this.$t('menu.menuSection.sectionActive'),
handler: this.active,
cmdType: CMD.Section.CMD_SECTION_ACTIVE
},
{
label: this.$t('menu.menuSection.sectionBlockade'),
handler: this.lock,
cmdType: CMD.Section.CMD_SECTION_BLOCK
},
{
label: this.$t('menu.menuSection.sectionUnblock'),
handler: this.unlock,
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
},
{
label: this.$t('menu.menuSection.sectionSetSpeedLimit'),
handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
},
{
label: this.$t('menu.menuSection.sectionCancelSpeedLimit'),
handler: this.cancelSpeed,
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
}
]
},
menuForce: [
{
label: this.$t('menu.menuSection.setFault'),
handler: this.setStoppage,
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
},
{
label: this.$t('menu.menuSection.cancelFault'),
handler: this.cancelStoppage,
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
this.menu = MenuContextHandler.covert(this.menuNormal);
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
},
doShow(point) {
this.clickEvent();
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();
}
},
//
setStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.stoppage.menu.operation,
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.cancelStoppage.menu.operation,
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
fault() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.fault.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionCmdControl.doShow(step, this.selected);
}
});
},
//
split() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.split.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionControl.doShow(step, this.selected);
}
});
},
//
active() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.active.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionControl.doShow(step, this.selected);
}
});
},
//
axlePreReset() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.axlePreReset.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionCmdControl.doShow(step, this.selected);
}
});
},
//
lock() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.lock.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionControl.doShow(step, this.selected);
}
});
},
//
unlock() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.unlock.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionCmdControl.doShow(step, this.selected);
}
});
},
//
setSpeed() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.setSpeed.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedCmdControl.doShow(step, this.selected);
}
});
},
//
cancelSpeed() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.cancelSpeed.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.execute(CMD.Section.CMD_QUERY, {}).then(resp => {
const tempData = resp.data;
this.$refs.speedCmdControl.doShow(step, this.selected, tempData);
});
}
});
}
}
};
</script>

View File

@ -0,0 +1,516 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<route-selection ref="routeSelection" />
<route-lock ref="routeLock" />
<route-control ref="routeControl" />
<route-cmd-control ref="routeCmdControl" />
<route-hand-control ref="routeHandControl" />
<route-detail ref="routeDetail" />
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import RouteControl from './dialog/routeControl';
import RouteSelection from './dialog/routeSelection';
import RouteLock from './dialog/routeLock';
import RouteCmdControl from './dialog/routeCmdControl';
import RouteHandControl from './dialog/routeHandControl';
import RouteDetail from './dialog/routeDetail';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import { querySignalStatus } from '@/api/simulation';
export default {
name: 'SignalMenu',
components: {
PopMenu,
RouteControl,
RouteSelection,
RouteLock,
RouteCmdControl,
RouteHandControl,
RouteDetail,
NoticeInfo
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
label: this.$t('menu.menuSignal.routeSelect'),
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
label: this.$t('menu.menuSignal.routeCancel'),
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
{
label: this.$t('menu.menuSignal.signalBlock'),
handler: this.lock,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
},
{
label: this.$t('menu.menuSignal.signalDeblock'),
handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
},
{
label: this.$t('menu.menuSignal.signalReopen'),
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
{
label: this.$t('menu.menuSignal.guideRouteHandle'),
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
},
{
label: this.$t('menu.menuSignal.setInterlockAutoRoute'),
handler: this.setAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
},
{
label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'),
handler: this.cancelAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
},
{
label: this.$t('menu.menuSignal.setInterlockAutoTrigger'),
handler: this.setAutoTrigger,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
},
{
label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
handler: this.cancelAutoTrigger,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
},
{
label: this.$t('menu.menuSignal.signalOff'),
handler: this.signalClose,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
}
],
Center: [
{
label: this.$t('menu.menuSignal.routeSelect'),
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
label: this.$t('menu.menuSignal.routeCancel'),
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
{
label: this.$t('menu.menuSignal.signalBlock'),
handler: this.lock,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
},
{
label: this.$t('menu.menuSignal.signalDeblock'),
handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
},
{
label: this.$t('menu.menuSignal.signalOff'),
handler: this.signalClose,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
},
{
label: this.$t('menu.menuSignal.signalReopen'),
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
{
label: this.$t('menu.menuSignal.humanControl'),
handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
},
{
label: this.$t('menu.menuSignal.atsAutoControl'),
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
}
]
},
menuForce: [
{
label: this.$t('menu.menuSignal.setFault'),
handler: this.setStoppage,
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
},
{
label: this.$t('menu.menuSignal.cancelFault'),
handler: this.cancelStoppage,
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
]),
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menu = MenuContextHandler.covert(this.menuNormal);
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
},
doShow(point) {
this.clickEvent();
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();
}
},
//
setStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.stoppage.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
arrangementRoute() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.routeSelection.doShow(step.operation, this.selected, tempData);
});
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelTrainRoute() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$refs.routeControl.doShow(step, this.selected);
}
});
},
//
lock() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.lock.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeLock.doShow(step.operation, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
unlock() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.unlock.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeCmdControl.doShow(step, this.selected);
}
});
},
//
reopenSignal() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.reopenSignal.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
}
});
},
//
guide() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.guide.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$refs.routeCmdControl.doShow(step, this.selected);
}
});
},
//
setAutoInterlock() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
}
});
},
//
cancelAutoInterlock() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
}
});
},
//
setAutoTrigger() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
}
});
},
//
cancelAutoTrigger() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
}
});
},
//
signalClose() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.signalClose.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
}
});
},
// ()
humanControl() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.humanControl.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.routeHandControl.doShow(step, this.selected, tempData);
});
}
});
},
// ATS
atsAutoControl() {
const step = {
start: true,
Signal_Code: `${this.selected.code}`,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.routeHandControl.doShow(step, this.selected, tempData);
});
}
});
}
//
// detail() {
// const step = {
// start: true,
// code: `${this.selected.code}`,
// operation: OperationEvent.Signal.detail.menu.operation,
// param: {
// Signal_Code: `${this.selected.code}`
// }
// };
// this.$store.dispatch('training/next', step).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
// const tempData = resp.data;
// this.$refs.routeDetail.doShow(step, this.selected, tempData);
// });
// }
// });
// }
}
};
</script>

View File

@ -0,0 +1,309 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<station-cmd-control ref="stationCmdControl" />
<station-human-control-all ref="stationHumanControlAll" />
<station-set-route-control-all ref="stationSetRouteControlAll" />
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import StationCmdControl from './dialog/stationCmdControl';
import StationHumanControlAll from './dialog/stationHumanControlAll';
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default {
name: 'StationMenu',
components: {
PopMenu,
StationCmdControl,
StationHumanControlAll,
StationSetRouteControlAll,
NoticeInfo
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
handler: this.setAutoTrigger,
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
},
{
label: this.$t('menu.menuStation.fullSiteCancelInterlockAutoTrigger'),
handler: this.cancelAutoTrigger,
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
}
// {
// label: this.$t('menu.menuStation.powerUnLock'),
// handler: this.powerUnLock,
// auth: { station: true, center: false }
// // cmdType: CMD.Station.
// },
// {
// label: this.$t('menu.menuStation.execKeyOperationTest'),
// handler: this.execKeyOperationTest,
// auth: { station: true, center: false }
// // cmdType: CMD.Station.
// }
],
Center: [
{
label: this.$t('menu.menuStation.allHumanControl'),
handler: this.humanControlALL,
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
},
{
label: this.$t('menu.menuStation.allATSAutoControl'),
handler: this.atsAutoControlALL,
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
}
// {
// label: this.$t('menu.menuStation.execKeyOperationTest'),
// handler: this.execKeyOperationTest,
// auth: { station: false, center: true },
// cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
// // cmdType: CMD.Section.
// }
]
},
menuForce: [
{
label: this.$t('menu.menuStation.setStoppage'),
handler: this.setStoppage,
cmdType: CMD.Station.CMD_STATION_ADD_FAULT
},
{
label: this.$t('menu.menuStation.cancelStoppage'),
handler: this.cancelStoppage,
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menu = [];
if (this.selected.concentrateStationCode == this.selected.code) {
//
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
this.menu = MenuContextHandler.covert(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
}
if (this.selected.centralized) {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];
}
}
// this.menu = MenuContextHandler.covert(this.menu);
},
doShow(point) {
this.clickEvent();
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();
}
},
//
setStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Station.stoppage.menu.operation,
cmdType: CMD.Station.CMD_STOPPAGE,
param: {
Station_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Station.cancelStoppage.menu.operation,
cmdType: CMD.Station.CMD_CANCEL_STOPPAGE,
param: {
Station_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
setAutoTrigger() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Station.setAutoTrigger.menu.operation,
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER,
param: {
Station_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelAutoTrigger() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation,
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER,
param: {
Station_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
powerUnLock() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Station.powerUnLock.menu.operation,
param: {
Station_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationCmdControl.doShow(step, this.selected);
}
});
},
//
execKeyOperationTest() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Station.execKeyOperationTest.menu.operation,
param: {
Station_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationCmdControl.doShow(step, this.selected);
}
});
},
//
humanControlALL() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Station.humanControlALL.menu.operation,
param: {
Station_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationHumanControlAll.doShow(step);
}
});
},
//
atsAutoControlALL() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
param: {
Station_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationSetRouteControlAll.doShow(step, this.selected);
}
});
}
}
};
</script>

View File

@ -0,0 +1,473 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<stand-control ref="standControl" />
<stand-detail ref="standDetail" />
<stand-run-level ref="standRunLevel" />
<stand-stop-time ref="standStopTime" />
<stand-detain-train-all ref="standDetainTrainAll" />
<notice-info ref="noticeInfo" />
<stand-back-strategy ref="standBackStrategy" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import StandControl from './dialog/standControl';
import StandBackStrategy from './dialog/standBackStrategy';
import StandDetail from './dialog/standDetail';
import StandRunLevel from './dialog/standRunLevel';
import StandStopTime from './dialog/standStopTime';
import StandDetainTrainAll from './dialog/standDetainTrainAll';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import Handler from '@/scripts/cmdPlugin/Handler';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default {
name: 'StationStandMenu',
components: {
PopMenu,
StandControl,
StandDetail,
StandRunLevel,
NoticeInfo,
StandBackStrategy,
StandStopTime,
StandDetainTrainAll
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
label: this.$t('menu.menuStationStand.detainTrain'),
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
},
{
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
},
{
label: this.$t('menu.menuStationStand.cancelDetainTrainForce'),
handler: this.cancelDetainTrainForce,
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
},
{
label: this.$t('menu.menuStationStand.jumpStop'),
handler: this.setJumpStop,
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
},
{
label: this.$t('menu.menuStationStand.cancelJumpStop'),
handler: this.cancelJumpStop,
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
},
{
label: this.$t('menu.menuStationStand.setRunLevel'),
handler: this.setRunLevel,
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
},
{
label: this.$t('menu.menuStationStand.setEarlyDeparture'),
handler: this.earlyDeparture,
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
},
{
label: this.$t('menu.menuStationStand.setBackStrategy'),
handler: this.setBackStrategy,
cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
},
{
label: this.$t('menu.menuStationStand.getStationStandStatus'),
handler: this.detail,
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
}
],
Center: [
{
label: this.$t('menu.menuStationStand.detainTrain'),
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
},
{
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
},
{
label: this.$t('menu.menuStationStand.cancelDetainTrainAll'),
handler: this.cancelDetainTrainAll,
cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
},
{
label: this.$t('menu.menuStationStand.jumpStop'),
handler: this.setJumpStop,
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
},
{
label: this.$t('menu.menuStationStand.cancelJumpStop'),
handler: this.cancelJumpStop,
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
},
{
label: this.$t('menu.menuStationStand.setStopTime'),
handler: this.setStopTime,
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
},
{
label: this.$t('menu.menuStationStand.setRunLevel'),
handler: this.setRunLevel,
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
},
{
label: this.$t('menu.menuStationStand.setEarlyDeparture'),
handler: this.earlyDeparture,
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
},
{
label: this.$t('menu.menuStationStand.setBackStrategy'),
handler: this.setBackStrategy,
cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
},
{
label: this.$t('menu.menuStationStand.getStationStandStatus'),
handler: this.detail,
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
}
]
},
menuForce: [
{
label: this.$t('menu.menuStationStand.setFault'),
handler: this.setStoppage,
cmdType:CMD.Stand.CMD_STAND_ADD_FAULT
},
{
label: this.$t('menu.menuStationStand.cancelFault'),
handler: this.cancelStoppage,
cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
this.menu = MenuContextHandler.covert(this.menuNormal);
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
// this.menu = MenuContextHandler.covert(this.menu);
},
doShow(point) {
this.clickEvent();
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();
}
},
//
setStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.stoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
setDetainTrain() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(step, this.selected);
}
});
},
//
cancelDetainTrain() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(step, this.selected);
}
});
},
//
cancelDetainTrainForce() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(step, this.selected);
}
});
},
// 线
cancelDetainTrainAll() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standDetainTrainAll.doShow(step, this.selected);
}
});
},
//
setJumpStop() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(step, this.selected);
}
});
},
//
cancelJumpStop() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(step, this.selected);
}
});
},
//
setStopTime() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setStopTime.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.standStopTime.doShow(step, this.selected, tempData);
});
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
setRunLevel() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.standRunLevel.doShow(step, this.selected, tempData);
});
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
earlyDeparture() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(step, this.selected);
}
});
},
//
setBackStrategy() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.standBackStrategy.doShow(step, this.selected, tempData);
});
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
detail() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.detail.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.standDetail.doShow(step, this.selected, tempData);
});
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
}
}
};
</script>

View File

@ -0,0 +1,484 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<switch-control ref="switchControl" />
<switch-cmd-control ref="switchCmdControl" />
<speed-cmd-control ref="speedCmdControl" />
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import SwitchControl from './dialog/switchControl';
import SwitchCmdControl from './dialog/switchCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default {
name: 'SwitchMenu',
components: {
PopMenu,
SwitchControl,
SwitchCmdControl,
SpeedCmdControl,
NoticeInfo
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
label: this.$t('menu.menuSwitch.switchLock'),
handler: this.lock,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
{
label: this.$t('menu.menuSwitch.switchUnlock'),
handler: this.unlock,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: this.$t('menu.menuSwitch.switchSectionBlockade'),
handler: this.block,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
},
{
label: this.$t('menu.menuSwitch.switchSectionUnblock'),
handler: this.unblock,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
},
{
label: this.$t('menu.menuSwitch.switchTurnout'),
handler: this.switchTurnout,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_TURN
},
{
label: this.$t('menu.menuSwitch.switchSectionFaultUnlock'),
handler: this.fault,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
},
{
label: this.$t('menu.menuSwitch.switchSectionAxisPreReset'),
handler: this.axlePreReset,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
},
{
label: this.$t('menu.menuSwitch.sectionResection'),
handler: this.split,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
},
{
label: this.$t('menu.menuSwitch.sectionActive'),
handler: this.active,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
},
{
label: this.$t('menu.menuSwitch.switchSectionSetSpeedLimit'),
handler: this.setSpeed,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
},
{
label: this.$t('menu.menuSwitch.switchSectionCancelSpeedLimit'),
handler: this.cancelSpeed,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
}
],
Center: [
{
label: this.$t('menu.menuSwitch.switchLock'),
handler: this.lock,
auth: { station: false, center: true },
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
{
label: this.$t('menu.menuSwitch.switchUnlock'),
handler: this.unlock,
auth: { station: false, center: true },
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: this.$t('menu.menuSwitch.switchSectionBlockade'),
handler: this.block,
auth: { station: false, center: true },
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
},
{
label: this.$t('menu.menuSwitch.switchSectionUnblock'),
handler: this.unblock,
auth: { station: false, center: true },
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
},
{
label: this.$t('menu.menuSwitch.switchTurnout'),
handler: this.switchTurnout,
auth: { station: false, center: true },
cmdType:CMD.Switch.CMD_SWITCH_TURN
},
{
label: this.$t('menu.menuSwitch.switchSectionFaultUnlock'),
handler: this.fault,
auth: { station: false, center: true },
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
},
{
label: this.$t('menu.menuSwitch.sectionResection'),
handler: this.split,
auth: { station: true, center: true },
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
},
{
label: this.$t('menu.menuSwitch.sectionActive'),
handler: this.active,
auth: { station: true, center: true },
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
},
{
label: this.$t('menu.menuSwitch.switchSectionSetSpeedLimit'),
handler: this.setSpeed,
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
},
{
label: this.$t('menu.menuSwitch.switchSectionCancelSpeedLimit'),
handler: this.cancelSpeed,
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
}
]
},
menuForce: [
{
label: this.$t('menu.menuSwitch.setFault'),
handler: this.setStoppage,
auth: {
},
cmdType:CMD.Switch.CMD_SWITCH_ADD_FAULT
},
{
label: this.$t('menu.menuSwitch.cancelFault'),
handler: this.cancelStoppage,
auth: {
},
cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
this.menu = MenuContextHandler.covert(this.menuNormal);
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
// this.menu = MenuContextHandler.covert(this.menu);
},
doShow(point) {
this.clickEvent();
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();
}
},
//
setStoppage() {
const step = {
start: true,
operation: OperationEvent.Switch.stoppage.menu.operation,
cmdType: CMD.Switch.CMD_STOPPAGE,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
operation: OperationEvent.Switch.cancelStoppage.menu.operation,
cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
lock() {
const step = {
start: true,
operation: OperationEvent.Switch.lock.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(step, this.selected);
}
});
},
//
unlock() {
const step = {
start: true,
operation: OperationEvent.Switch.unlock.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchCmdControl.doShow(step, this.selected);
}
});
},
//
block() {
const step = {
start: true,
operation: OperationEvent.Switch.block.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(step, this.selected);
}
});
},
//
unblock() {
const step = {
start: true,
operation: OperationEvent.Switch.unblock.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchCmdControl.doShow(step, this.selected);
}
});
},
//
switchTurnoutForce() {
const step = {
start: true,
operation: OperationEvent.Switch.turnoutForce.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(step, this.selected);
}
});
},
//
switchTurnout() {
const step = {
start: true,
operation: OperationEvent.Switch.turnout.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
if (step.operation) {
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(step, this.selected);
}
});
}
},
//
fault() {
const step = {
start: true,
operation: OperationEvent.Switch.fault.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchCmdControl.doShow(step, this.selected);
}
});
},
//
axlePreReset() {
const step = {
start: true,
operation: OperationEvent.Switch.axlePreReset.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchCmdControl.doShow(step, this.selected);
}
});
},
//
split() {
const step = {
start: true,
operation: OperationEvent.Switch.split.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(step, this.selected);
}
});
},
//
active() {
const step = {
start: true,
operation: OperationEvent.Switch.active.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(step, this.selected);
}
});
},
//
setSpeed() {
const step = {
start: true,
operation: OperationEvent.Switch.setSpeed.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedCmdControl.doShow(step, this.selected);
}
});
},
//
cancelSpeed() {
const step = {
start: true,
operation: OperationEvent.Switch.cancelSpeed.menu.operation,
cmdType: CMD.Switch.CMD_CANCEL_SPEED,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
if (valid) {
const tempData = response.data;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedCmdControl.doShow(step, this.selected, tempData);
}
});
}
}
};
</script>

View File

@ -0,0 +1,332 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<notice-info ref="noticeInfo" />
<train-control ref="trainControl" />
<train-delete ref="trainDelete" />
<train-move ref="trainMove" />
<train-switch ref="trainSwitch" />
<train-edit-number ref="trainEditNumber" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import TrainControl from './dialog/trainControl';
import TrainDelete from './dialog/trainDelete';
import TrainMove from './dialog/trainMove';
import TrainSwitch from './dialog/trainSwitch';
import TrainEditNumber from './dialog/trainEditNumber';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default {
name: 'MenuTrain',
components: {
PopMenu,
NoticeInfo,
TrainControl,
TrainDelete,
TrainMove,
TrainSwitch,
TrainEditNumber
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [],
Center: [
// {
// label: this.$t('menu.menuTrain.addTrainId'),
// handler: this.addTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.deleteTrainId'),
// handler: this.delTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.editTrainId'),
// handler: this.editTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.editTrainNo'),
// handler: this.editTrainNo,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.moveTrainId'),
// handler: this.moveTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.switchTrainId'),
// handler: this.switchTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// }
]
},
menuForce: [
{
label: this.$t('menu.menuTrain.setCommunicationFault'),
handler: this.setStoppage,
cmdType:CMD.Train.CMD_TRAIN_ADD_FAULT
},
{
label: this.$t('menu.menuTrain.cancelCommunicationFault'),
handler: this.cancelStoppage,
cmdType:CMD.Train.CMD_TRAIN_REMOVE_FAULT
}
],
menuSpeed: [
{
label: this.$t('menu.menuTrain.confirmRunToFrontStation'),
handler: this.limitSpeed,
cmdType:CMD.Train.CMD_TRAIN_MANUAL_LIMIT_DRIVE
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
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: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
this.menu = MenuContextHandler.covert(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce, ...this.menuSpeed];
}
// this.menu = MenuContextHandler.covert(this.menu);
},
doShow(point) {
this.clickEvent();
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);
}
},
//
setStoppage() {
const step = {
start: true,
operation: OperationEvent.Train.stoppage.menu.operation,
cmdType: CMD.Train.CMD_STOPPAGE,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
operation: OperationEvent.Train.cancelStoppage.menu.operation,
cmdType: CMD.Train.CMD_CANCEL_STOPPAGE,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
limitSpeed() {
const step = {
start: true,
operation: OperationEvent.Train.limitSpeed.menu.operation,
cmdType: CMD.Train.CMD_LIMIT_SPEED,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
addTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.addTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(step, this.selected);
}
});
},
//
delTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.delTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDelete.doShow(step, this.selected);
}
});
},
//
editTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.editTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(step, this.selected);
}
});
},
//
editTrainNo() {
const step = {
start: true,
operation: OperationEvent.Train.editTrainNo.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainEditNumber.doShow(step, this.selected);
}
});
},
//
moveTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.moveTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainMove.doShow(step, this.selected);
}
});
},
//
switchTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.switchTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainSwitch.doShow(step, this.selected);
}
});
}
}
};
</script>

View File

@ -0,0 +1,218 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm alarm-detail"
:title="level+$t('menu.passiveDialog.alarmDetailInformation')"
:visible.sync="show"
width="760px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form label-width="80px" size="mini">
<el-row>
<el-col :span="8">
<el-form-item :label="$t('menu.passiveDialog.lineName')">
<el-input v-model="model.lineName" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('menu.passiveDialog.unitName')">
<el-input v-model="model.unitName" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('menu.passiveDialog.moduleName')">
<el-input v-model="model.moduleName" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item :label="$t('menu.passiveDialog.alarmDate')">
<el-date-picker v-model="model.alarmDate" type="datetime" :placeholder="$t('menu.passiveDialog.selectDate')" disabled />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item>
<span slot="label">{{ $t('menu.passiveDialog.level') }}</span>
<el-input v-model="model.level" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('menu.passiveDialog.confirmStatus')">
<el-input v-model="model.confirm" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9" class="alarm-type">
<el-form-item>
<span slot="label">{{ $t('menu.passiveDialog.type') }}</span>
<el-input v-model="model.type" disabled />
</el-form-item>
</el-col>
<el-col :span="15" class="alarm-child-type">
<el-form-item :label="$t('menu.passiveDialog.childType')">
<el-input v-model="model.childType" disabled />
</el-form-item>
</el-col>
</el-row>
<el-form-item :label="$t('menu.passiveDialog.timeSummary')">
<el-input v-model="model.timeSummary" disabled />
</el-form-item>
<el-form-item :label="$t('menu.passiveDialog.recommendedOperation')">
<el-input v-model="model.recommendedOperation" disabled />
</el-form-item>
<div class="alarm-detail-description">
<span>{{ $t('menu.passiveDialog.alarmDetailedDescription') }}</span><br>
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" :placeholder="$t('menu.passiveDialog.inputContent')" disabled />
</div>
</el-form>
<el-row class="button-group">
<el-col :span="3" :offset="9">
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">{{ $t('menu.passiveDialog.confirm') }}</el-button>
</el-col>
<el-col :span="10">
<span style="line-height:26px">{{ $t('menu.passiveDialog.unconfirmedMessageOne') }}{{ level }}{{ $t('menu.passiveDialog.unconfirmedMessageTwo') }}</span>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'AlarmDetail',
data() {
return {
dialogShow: false,
loading: false,
level: 0,
operate: null,
controlProps: {
'01': this.$t('menu.passiveDialog.centralControl'),
'02': this.$t('menu.passiveDialog.stationControl')
},
model: {
lineName: '',
unitName: '',
moduleName: '',
level: '',
confirm: '',
alarmDate: '',
type: '',
childType: '',
timeSummary: '',
recommendedOperation: '',
alarmDetail: ''
}
};
},
computed: {
...mapGetters('map', [
'name'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
}
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem && elem.type == 'resp' && elem.agree) {
if (elem.agree) {
const operate = this.$store.state.training.operate;
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
const newOperate = {
type: operate.type,
name: station.name,
currentMode: elem.currentMode
};
this.doShow(newOperate);
}
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.model = {
lineName: this.name,
unitName: this.operate.name,
moduleName: this.$t('menu.passiveDialog.cmmControlModeConversionMode'),
level: this.$t('menu.passiveDialog.zeroLevelAlarm'),
confirm: this.$t('menu.passiveDialog.confirmStatus'),
alarmDate: new Date(),
type: this.$t('menu.passiveDialog.systemEvent'),
childType: this.$t('menu.passiveDialog.childTypeTips'),
timeSummary: this.$t('menu.passiveDialog.controlModeSummary'),
recommendedOperation: '',
alarmDetail: `${this.$t('menu.passiveDialog.controlModeTransfer')} ${this.operate.name}${this.$t('menu.passiveDialog.alarmDetailOne')}${operate.currentMode == '01' ? this.$t('menu.passiveDialog.stationToCentral') : this.$t('menu.passiveDialog.centralToStation')}`
};
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
operation: OperationEvent.Command.close.alarm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
operation: OperationEvent.Command.close.alarm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
});
},
isClose() {
return this.dialogShow;
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.alarm-type .el-input {
width: 220px;
}
.alarm-detail-description {
padding-left: 12px;
text-align: left;
}
</style>

View File

@ -0,0 +1,309 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm passive-control"
:title="$t('menu.passiveDialog.controlModeRequest')"
:visible.sync="show"
width="700px"
:before-close="doClose"
:show-close="true"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<span class="control-label">{{ `${requestInfo}${$t('menu.passiveDialog.requestAreaControlMode')}` }}</span>
<el-table
ref="multipleTable"
:data="tableData"
border
row-key="code"
style="width: 100%"
height="250"
center
size="mini"
highlight-current-row
>
<el-table-column prop="operate" :label="$t('menu.passiveDialog.operatingArea')">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
</template>
</el-table-column>
<el-table-column prop="control" :label="$t('menu.passiveDialog.currentControlMode')" width="120">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control.name }}</span>
</template>
</el-table-column>
<el-table-column prop="target" :label="$t('menu.passiveDialog.requestControlMode')" width="120">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.target.name }}</span>
</template>
</el-table-column>
<el-table-column prop="agree" :label="$t('menu.passiveDialog.isAgree')" width="140">
<template slot-scope="scope">
<el-checkbox ref="agree" v-model="scope.row.agree" :disabled="scope.row.disabled" />
</template>
</el-table-column>
</el-table>
<span class="control-label">{{ $t('menu.passiveDialog.messageOne') }} {{ count }} {{ $t('menu.passiveDialog.messageTwo') }}</span>
<el-row class="button-group">
<el-col :span="10" :offset="3">
<el-button :id="domAgree" :disabled="disabledAgree" @click="agree">{{ $t('menu.passiveDialog.agree') }}
</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">{{ $t('menu.passiveDialog.refuse') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RequestControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
disabledAgree: false,
disabledRefuse: false,
requestInfo: this.$t('menu.passiveDialog.dispatcherWorkstation'),
controlProps: {
'01': this.$t('menu.passiveDialog.inTheControl'),
'02': this.$t('menu.passiveDialog.stationControl')
},
selection: [],
tableData: [],
timer: null,
timeout: 61,
count: 0,
commandId: ''
};
},
computed: {
targetStatus() {
if (this.$store.state.training.prdType == '01') {
return '01';
}
if (this.$store.state.training.prdType == '02') {
return '02';
}
return '';
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdChoose() {
return this.dialogShow ? OperationEvent.StationControl.controlResponse.choose.domId : '';
},
domAgree() {
return this.dialogShow ? OperationEvent.StationControl.controlResponse.agree.domId : '';
},
domIdRefuse() {
return this.dialogShow ? OperationEvent.StationControl.controlResponse.refuse.domId : '';
}
},
watch: {
tableData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
},
'$store.state.socket.msgHead': function (elem) {
if (elem && elem.type == 'req') {
if (elem.stationControlCode) {
this.doShow(elem);
this.commandId = elem.commandId;
}
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
createTimer() {
this.count = this.timeout;
this.timer = setInterval(() => {
if (this.count <= 0) {
this.doClose();
return;
}
this.count = this.count - 1;
}, 1000);
},
clearTimer() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
checkTableDataSelction(data) {
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.agree && !row.disabled) {
selection.push(row);
}
});
}
this.disabledSend = !selection.length;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.handleChooseChange(selection);
this.selection = selection;
this.disabledAgree = this.selection.length <= 0;
}
},
updateTableData(code) {
this.tableData = [];
const model = {
code: code,
operate: '',
control: { code: '', name: '' },
target: { code: '', name: '' },
agree: false,
disabled: false
};
const device = this.$store.getters['map/getDeviceByCode'](code);
if (device) {
const control = (device || {}).state;
if (control) {
model.control = { status: control.status, name: this.controlProps[control.status] };
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
}
const station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
if (station) {
model.operate = station.name || '';
}
}
this.tableData.push(model);
},
doShow(msgHead) {
this.requestInfo = `${msgHead.fromMember.deviceName}`;
if (msgHead.fromMember.nickName) {
this.requestInfo = `${msgHead.fromMember.deviceName}(${msgHead.fromMember.nickName})`;
}
this.dialogShow = true;
this.disabledAgree = true;
this.createTimer();
this.updateTableData(msgHead.stationControlCode);
const operate = {
start: true,
operation: OperationEvent.StationControl.controlResponse.menu.operation
};
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
doClose() {
this.disabledAgree = false;
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.count = 0;
this.dialogShow = false;
this.clearTimer();
this.$store.dispatch('training/emitTipFresh');
this.$refs.multipleTable.setCurrentRow();
},
handleChooseChange(selection) {
this.selection = selection;
if (selection && selection.length) {
const codeList = selection.map(elem => { return elem.code; });
const operate = {
operation: OperationEvent.StationControl.controlResponse.choose.operation,
val: codeList.join('::')
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
} else if (!selection) {
this.$messageBox(this.$t('menu.passiveDialog.selectData'));
}
},
agree() {
const operate = {
start: true,
operation: OperationEvent.StationControl.controlResponse.agree.operation,
code: this.tableData[0].code,
val: this.commandId,
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
param: {
ControlMode_Code: this.tableData[0].code,
Reply_Command_Id: this.commandId,
ControlMode_Reply: true
}
};
this.clearTimer();
this.disabledAgree = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
refuse() {
const operate = {
start: true,
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
code: this.tableData[0].code,
val: this.commandId,
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
param: {
ControlMode_Code: this.tableData[0].code,
Reply_Command_Id: this.commandId,
ControlMode_Reply: false
}
};
this.clearTimer();
this.disabledAgree = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.control-label {
line-height: 30px;
font-size: 18px;
}
</style>

View File

@ -0,0 +1,111 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm cmd-notice"
:title="$t('menu.passiveDialog.operationCommandTips')"
:visible.sync="show"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<span>{{ name }}{{ msg }}!</span>
<el-row class="button-group">
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">{{ $t('menu.passiveDialog.operationConfirm') }}</el-button>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'CmdNotice',
data() {
return {
dialogShow: false,
loading: false,
operate: null,
name: '',
msg: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem && elem.type == 'resp' && (elem.timeout || !elem.agree)) {
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
const newOperate = {
name: station.name
};
if (elem.timeout) {
newOperate['msg'] = this.$t('menu.passiveDialog.requestTimedOut');
this.doShow(newOperate);
} else if (!elem.agree) {
newOperate['msg'] = this.$t('menu.passiveDialog.requestRejection');
this.doShow(newOperate);
}
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.name = this.operate.name || '';
this.msg = this.operate.msg || '';
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
operation: OperationEvent.Command.close.notice.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
operation: OperationEvent.Command.close.notice.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
});
},
isClose() {
return this.dialogShow;
}
}
};
</script>

View File

@ -0,0 +1,25 @@
<template>
<div id="statusDownTrainDetail" />
</template>
<script>
export default {
name: 'StatusDownTrainDetail',
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
};
},
mounted() {
}
};
</script>
<style>
</style>

View File

@ -0,0 +1,26 @@
<template>
<div id="statusUpTrainDetail" />
</template>
<script>
export default {
name: 'StatusUpTrainDetail',
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
};
},
mounted() {
}
};
</script>
<style>
</style>

View File

@ -0,0 +1,570 @@
import store from '@/store/index_APP_TARGET';
import deviceState from '@/jmap/constant/deviceState';
import { OperateMode } from '@/scripts/ConstDic';
export function getCurrentStateObject() {
return store.getters['menuOperation/selected'];
}
/** 系统类型 */
export const State2SimulationMap = {
'01': 'local', // 现地工作站
'02': 'central' // 中心调度工作站
};
export const State2ControlMap = {
'01': 'center', // 中控
'02': 'station', // 站控
'03': 'station'
};
// 控制禁用
export const MenuDisabledState = {
Section: {
// 故障解锁
fault() {
},
// 切除
split() {
const device = getCurrentStateObject();
if (device && device.cutOff != deviceState.Section.cutOff.Default) {
return true;
}
},
// 激活
active() {
const device = getCurrentStateObject();
if (device && device.cutOff == deviceState.Section.cutOff.Default) {
return true;
}
},
// 区段封锁
lock() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.Section.status.State06) {
return true;
}
},
// 区段解禁
unlock() {
const device = getCurrentStateObject();
if (device && device.status != deviceState.Section.status.State06) {
return true;
}
},
// 区段设置限速
setSpeed() {
const device = getCurrentStateObject();
if (device && device.speedUpperLimit != deviceState.Section.speedUpperLimit.Default) {
return true;
}
},
// 区段取消限速
cancelSpeed() {
const device = getCurrentStateObject();
if (device && device.speedUpperLimit == deviceState.Section.speedUpperLimit.Default) {
return true;
}
},
// 新建列车
newTrain() {
},
// 计轴预复位
axlePreReset() {
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
Signal: {
// 进路选排
arrangementRoute() {
},
// 进路取消
cancelTrainRoute() {
},
// 信号封闭
lock() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.Signal.status.State05) {
return true;
}
},
// 信号解封
unlock() {
const device = getCurrentStateObject();
if (device && device.status != deviceState.Signal.status.State05) {
return true;
}
},
// 信号重开
reopenSignal() {
},
// 进路引导
guide() {
},
// 设置联锁自动进路
setAutoInterlock() {
},
// 取消联锁自动进路
cancelAutoInterlock() {
},
// 设置联锁自动触发
setAutoTrigger() {
},
// 取消联锁自动触发
cancelAutoTrigger() {
},
// 关灯
signalClose() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.Signal.status.State01) {
return true;
}
},
// 人工控
humanControl() {
},
// ats自动控
atsAutoControl() {
},
// 查询进路状态
detail() {
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
Station: {
// 全站设置联锁自动触发
setAutoTrigger() {
},
// 全站取消联锁自动触发
cancelAutoTrigger() {
},
// 上电解锁
powerUnLock() {
},
// 执行关键操作测试
execKeyOperationTest() {
},
// 所有进路自排开
atsAutoControlALL() {
},
// 所有进路自排关
humanControlALL() {
},
// 设置ZC故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消ZC故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
StationControl: {
// 紧急站控
emergencyStationControl() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.StationControl.status.State03) {
return true;
}
},
// 请求站控
requestStationControl() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.StationControl.status.State02) {
return true;
}
},
// 强行站控
forcedStationControl() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.StationControl.status.State02) {
return true;
}
},
// 请求中控
requestCentralControl() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.StationControl.status.State01) {
return true;
}
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
StationStand: {
// 设置扣车
setDetainTrain() {
const device = getCurrentStateObject();
if (store.state.training.prdType == '02') { // 中心行调模式
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
return true;
} else if (device && device.holdStatus == deviceState.StationStand.holdStatus.State03) {
return true;
}
} else { // 现地模式
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
return true;
} else if (device && device.holdStatus == deviceState.StationStand.holdStatus.State02) {
return true;
}
}
},
// 取消扣车
cancelDetainTrain() {
const device = getCurrentStateObject();
if (store.state.training.prdType == '02') {
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
return false;
} else if (device && device.holdStatus != deviceState.StationStand.holdStatus.State03) {
return true;
}
} else {
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
return false;
} else if (device && device.holdStatus != deviceState.StationStand.holdStatus.State02) {
return true;
}
}
},
// 强制取消扣车
cancelDetainTrainForce() {
const device = getCurrentStateObject();
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) {
return true;
}
},
// 设置全站扣车
cancelDetainTrainAll() {
},
// 设置运行等级
setRunLevel() {
},
// 设置停站时间
setStopTime() {
},
// 设置跳停
setJumpStop() {
const device = getCurrentStateObject();
if (device && device.jumpStopStatus != deviceState.StationStand.jumpStopStatus.State01) {
return true;
}
},
// 取消跳停
cancelJumpStop() {
const device = getCurrentStateObject();
if (device && device.jumpStopStatus == deviceState.StationStand.jumpStopStatus.State01) {
return true;
}
},
// 提前发车
earlyDeparture() {
},
// 站台详细信息
detail() {
},
// 设置折返策略
setBackStrategy() {
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
Switch: {
// 单锁
lock() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.Switch.status.State10) {
return true;
}
},
// 解锁
unlock() {
const device = getCurrentStateObject();
if (device && device.status != deviceState.Switch.status.State10) {
return true;
}
},
// 封锁
block() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.Switch.status.State14) {
return true;
}
},
// 解封
unblock() {
const device = getCurrentStateObject();
if (device && device.status != deviceState.Switch.status.State14) {
return true;
}
},
// 强扳
switchTurnoutForce() {
},
// 转动
switchTurnout() {
},
// 道岔故障解锁
fault() {
},
// 计轴预复位
axlePreReset() {
},
// 道岔切除
split() {
},
// 道岔激活
active() {
},
// 道岔设置速度
setSpeed() {
// const device = getCurrentStateObject();
},
// 道岔取消速度
cancelSpeed() {
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
Train: {
// 添加列车识别号
addTrainId() {
},
// 删除列车识别号
delTrainId() {
},
// 修改列车识别号
editTrainId() {
},
// 修改车组号
editTrainNo() {
},
// 移动列车识别号
moveTrainId() {
},
// 交换列车识别号
switchTrainId() {
},
// 设置限速
limitSpeed() {
},
// 设置通信故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消通信故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
}
};
export function checkOperationValidity() {
if (store.state.training.prdType == '02') {
return true;
}
}
/**
* 将menu的disabled属性使用disabledCallback计算并返回
* @param {Array} menu
*/
export function menuConvert(menu) {
if (menu.constructor === Array) {
menu.forEach(elem => {
if (elem.type === 'separator') {
elem.show = true;
return;
}
if (elem.disabledCallback.constructor === Function) {
elem.disabled = elem.defaultDisabled;
if (!elem.defaultDisabled) {
elem.disabled = elem.disabledCallback();
}
}
});
}
return menu;
}
/**
* 根据产品类型返回对应的menuBar
* @param {*} menuObj
*/
export function menuBarConvert(menu, mode) {
if (menu) {
if (mode === OperateMode.NORMAL) {
menu.forEach(item => {
if (item.type === 'separator') {
item.show = true;
return;
}
item.show = false;
if (!item.click) {
item.click = () => { };
}
if (!item.froce) {
item.show = true;
if (item.children && item.children.length > 0) {
menuBarConvert(item.children, mode);
}
}
});
} else if (mode === OperateMode.ADMIN) {
menu.forEach(item => {
item.show = true;
if (!item.click) {
item.click = () => { };
}
if (item.children && item.children.length > 0) {
menuBarConvert(item.children, mode);
}
});
}
}
return menu || [];
}
/**
* 将menu的show属性过滤返回
* @param {Array} menu
*/
export function menuFiltration(menuObj) {
var selected = getCurrentStateObject();
var control;
var menu = [];
if (selected._type == 'StationStand') {
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
} else if (selected._type == 'Station') {
control = store.getters['map/getStationControlByStationCode'](selected.code);
} else {
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
}
if (control) {
if (store.state.training.prdType != '') {
const type = State2SimulationMap[store.state.training.prdType];
const status = State2ControlMap[control.status];
menu = [...menuObj[type]];
if (menu.constructor === Array) {
menu.forEach(elem => {
if (elem.type === 'separator') {
elem.show = true;
return;
}
if (elem.auth.constructor === Object) {
elem.show = true;
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
elem.show = false;
}
elem.defaultDisabled = !elem.auth[status];
}
});
}
}
}
return menu;
}
/**
* 将train menu的show属性过滤返回
*/
export function trainMenuFiltration(menuObj) {
var menu = [];
if (store.state.training.prdType != '') {
const type = State2SimulationMap[store.state.training.prdType];
menu = [...menuObj[type]];
if (menu.constructor === Array) {
menu.forEach(elem => {
if (elem.auth.constructor === Object) {
elem.show = true;
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
elem.show = false;
}
}
});
}
}
return menu;
}

View File

@ -0,0 +1,175 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__schedule add-task"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="margin: 10px">
<el-row>
<el-col :span="3">
<el-radio v-model="model.type" label="1">{{ $t('menu.addToTheFront') }}</el-radio>
</el-col>
<el-col :span="2" :offset="1">
<span>{{ $t('menu.tripNumber') + $t('global.colon') }}</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.tripNumber" :placeholder="this.$t('global.choose')">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="3" :offset="1">
<span>{{ $t('global.startTime') + $t('global.colon') }}</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.startTime" :placeholder="this.$t('global.choose')">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<el-radio v-model="model.type" label="2">{{ $t('menu.addToTheEnd') }}</el-radio>
</el-col>
<el-col :span="2" :offset="1">
<span>{{ $t('menu.tripNumber') + $t('global.colon') }}</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.tripNumber" :placeholder="this.$t('global.choose')">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="3" :offset="1">
<span>{{ $t('global.startTime') + $t('global.colon') }}</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.startTime" :placeholder="this.$t('global.choose')">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
<el-row style="margin-bottom: 5px;">
{{ $t('menu.crossing') + $t('global.colon') }}
</el-row>
<el-row>
<el-table :data="model.route" border :height="180">
<el-table-column prop="date" :label="this.$t('menu.date')" width="180" />
<el-table-column prop="name" :label="this.$t('menu.name')" width="180" />
<el-table-column prop="address" :label="this.$t('menu.address')" />
<el-table-column width="20" />
</el-table>
</el-row>
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
{{ $t('global.details') + $t('global.colon') }}
</el-row>
<el-row>
<el-table :data="model.detail" border :height="180">
<el-table-column prop="date" :label="this.$t('menu.date')" width="180" />
<el-table-column prop="name" :label="this.$t('menu.name')" width="180" />
<el-table-column prop="address" :label="this.$t('menu.address')" />
<el-table-column width="20" />
</el-table>
</el-row>
<el-row>
<el-col :offset="16">
<el-checkbox v-model="model.default">{{ $t('menu.displaysDefaultStopTimesAndRunLevels') }}</el-checkbox>
</el-col>
</el-row>
</div>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="commit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row>
</el-dialog>
</template>
<script>
export default {
name: 'AddTask',
components: {
},
data() {
return {
dialogShow: false,
loading: false,
model: {
type: '1',
serviceNumber: '',
tripNumber: '',
startTime: '',
default: false,
route: [],
detail: []
},
tripNumberList: []
};
},
computed: {
title() {
return this.$t('menu.addTask');
}
},
mounted() {
},
methods: {
doShow(params) {
this.model.serviceNumber = params.serviceNumber;
this.model.tripNumber = params.tripNumber;
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
commit() {
this.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.el-button {
margin-left: 40px !important;
margin-right: 40px !important;
}
.el-row {
margin-bottom: 5px !important;
}
.el-input__inner {
height: 20px !important;
line-height: 20px !important;
}
}
</style>

View File

@ -0,0 +1,115 @@
<template>
<el-dialog
v-dialogDrag
:title="title"
class="fuzhou-01__schedule choose-plan-template"
:visible.sync="dialogShow"
width="70%"
:before-close="doClose"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<el-row type="flex" justify="center" class="button-group">
<el-button type="primary" :loading="loading" @click="handleConfirm">{{ $t('global.select') }}</el-button>
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
</el-row>
</el-dialog>
</template>
<script>
import { runPlanTemplateList } from '@/api/runplan';
import { listPublishMap } from '@/api/jmap/map';
export default {
name: 'ChooseTemplatePlan',
data() {
return {
dialogShow: false,
loading: false,
mapList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
reset: true,
labelWidth: '120px',
queryObject: {
name: {
type: 'text',
label: this.$t('menu.runGraphName')
}
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
radioShow: true,
columns: [
{
title: this.$t('menu.runGraphName'),
prop: 'name'
},
{
title: this.$t('menu.mapName'),
prop: 'mapId',
type: 'tag',
columnValue: (row) => {
return this.$convertField(row.mapId, this.mapList, ['id', 'name']);
},
tagType: (row) => { return 'success'; }
}
]
},
currentModel: {}
};
},
computed: {
title() {
return this.$t('menu.selectTemplateRunGraph');
}
},
methods: {
loadInitData() {
this.mapList = [];
listPublishMap().then(response => {
this.mapList = response.data;
});
},
doShow() {
this.loading = false;
this.dialogShow = true;
this.loadInitData();
},
doClose() {
this.dialogShow = false;
},
queryFunction(params) {
if (this.$store.state.map && this.$store.state.map.map) {
// params['lineCode'] = this.$store.getters['map/lineCode'];
params['mapId'] = this.$route.query.mapId;
}
return runPlanTemplateList(params);
},
handleConfirm() {
if (this.$refs && this.$refs.pageRules) {
const choose = this.$refs.pageRules.currentChoose();
if (choose) {
this.$emit('chooseConfirm', choose);
this.doClose();
} else {
this.$messageBox(this.$t('menu.pleaseSelectTemplateRunGraph'));
}
}
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -0,0 +1,206 @@
<template>
<div v-if="show">
<template v-if="maxmini">
<div class="nav">
<div v-show="config.showClose" class="cls-status" @click="touch('Close')"><span /></div>
<div class="min-status" @click="touch('Minim')"><span /></div>
</div>
<el-table
ref="table"
:data="config.data"
:highlight-current-row="config.highlightCurrentRow"
:height="height"
border
@current-change="handleChange"
>
<template v-for="(item,index) in config.columns">
<el-table-column :key="index" :prop="item.prop" :label="item.label" :width="item.width" />
</template>
</el-table>
</template>
<template v-else>
<div class="nav">
<div class=" max-status" @click="touch('Maxim')"><span /></div>
</div>
</template>
</div>
</template>
<script>
export default {
name: 'DataTable',
props: {
height: {
type: Number,
required: true
},
config: {
type: Object,
required: true
}
},
data() {
return {
show: true,
maxmini: true,
touchStrategy: {
'Close': [false, true],
'Minim': [true, false],
'Maxim': [true, true]
}
};
},
methods: {
handleChange(row) {
if (this.config.handleChange) {
this.config.handleChange(row);
}
},
setCurrentRow(row) {
this.$refs.table.setCurrentRow(row);
},
touch(operate) {
this.$nextTick(() => {
[this.show, this.maxmini] = this.touchStrategy[operate];
this.$emit('touch', this.maxmini);
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$height: 20px;
$width: 20px;
.nav {
display: table;
float: right;
width: 100%;
color: #0000;
background: -webkit-linear-gradient(#FDFDFE, #B1CBF3);
background: -o-linear-gradient(#FDFDFE, #B1CBF3);
background: -moz-linear-gradient(#FDFDFE, #B1CBF3);
background: linear-gradient(#FDFDFE, #B1CBF3);
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
height: $height;
line-height: $height;
}
/deep/ {
.el-table--border th.gutter {
background: #EBEADB !important;
}
.el-table {
overflow-y: hidden;
width: 100%;
th.is-leaf {
padding: 0px 0;
background: #EBEADB;
border-right: none !important;
border-left: 1px solid #D1CDBD !important;
border-top: 1px solid #D1CDBD !important;
border-bottom: 1px inset #D1CDBD !important;
color: #000;
.cell {
height: $height;
line-height: $height;
}
}
td {
padding: 0px 0;
.cell {
height: $height;
line-height: $height;
font-size: smaller !important;
}
}
.current-row>td {
background: #316AC5 !important;
color: #fff !important;
}
}
.cls-status {
float: right;
width: 12px;
height: 100%;
line-height: 100%;
margin-left: 5px;
cursor: pointer;
span {
display: inline-block;
content: '/';
background: black;
width: 2px;
height: 12px;
vertical-align: middle;
transform: rotate(45deg);
}
span::after {
display: block;
content: '/';
background: black;
width: 2px;
height: 12px;
transform: rotate(-90deg);
}
}
.min-status {
float: right;
width: 20px;
height: 100%;
line-height: 100%;
cursor: pointer;
span {
display: inline-block;
content: '-';
background: black;
width: 2px;
height: 12px;
vertical-align: middle;
transform: rotate(-90deg);
}
}
.max-status {
float: right;
width: 20px;
height: 100%;
line-height: 100%;
cursor: pointer;
span {
display: inline-block;
content: '';
background: black;
width: 2px;
height: 12px;
transform: rotate(0deg);
}
span::after {
display: block;
content: '';
background: black;
width: 2px;
height: 12px;
transform: rotate(90deg);
}
}
}
</style>

View File

@ -0,0 +1,135 @@
<template>
<el-dialog
v-dialogDrag
:title="title"
class="fuzhou-01__schedule reload-today-plan"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<el-row type="flex" justify="center" class="button-group">
<el-button type="primary" :loading="loading" @click="handleConfirm">{{ $t('menu.load') }}</el-button>
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
</el-row>
</el-dialog>
</template>
<script>
import { runPlanTemplateList } from '@/api/runplan';
import { getStationList } from '@/api/runplan';
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
import { getPublishMapInfo } from '@/api/jmap/map';
export default {
name: 'ReloadTodayPlan',
data() {
return {
dialogShow: false,
loading: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
reset: true,
labelWidth: '120px',
queryObject: {
name: {
type: 'text',
label: this.$t('menu.runGraphName')
}
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
radioShow: true,
columns: [
{
title: this.$t('menu.runGraphName'),
prop: 'name'
}
]
},
currentModel: {}
};
},
computed: {
title() {
return this.$t('menu.loadTheDayPlan');
}
},
methods: {
doShow() {
this.loading = false;
this.dialogShow = true;
},
doClose() {
this.dialogShow = false;
},
queryFunction(params) {
if (this.$store.state.map && this.$store.state.map.map) {
// params['lineCode'] = this.$store.getters['map/lineCode'];
params['mapId'] = this.$route.query.mapId;
}
return runPlanTemplateList(params);
},
//
handleConfirm() {
if (this.$refs && this.$refs.pageRules) {
const choose = this.$refs.pageRules.currentChoose();
if (choose && choose.id) {
this.loading = true;
generateDayRunPlan(choose.id, this.$route.query.group).then(response => {
this.loading = false;
this.reloadTable();
this.loadRunData();
this.doClose();
this.$message.success(this.$t('tip.generateUserDailyRunGraphSuccessfully'));
}).catch(() => {
this.loading = false;
this.reloadTable();
this.$messageBox(this.$t('tip.generateUserDailyRunGraphFailed'));
});
} else {
this.$messageBox(this.$t('rules.selectTheRunningDiagramToBeLoaded'));
}
}
},
loadRunData() {
// const skinCode = this.$route.query.skinCode;
const mapId = this.$route.query.mapId;
this.$store.dispatch('runPlan/clear');
if (mapId) {
getStationList(mapId).then(response => {
const stations = response.data;
getPublishMapInfo(this.$route.query.mapId).then(res=>{
this.PlanConvert = this.$theme.loadPlanConvert(res.data.lineCode);
this.$store.dispatch('runPlan/setStations', stations).then(() => {
getEveryDayRunPlanData(this.$route.query.group).then(resp => {
this.$store.dispatch('runPlan/setPlanData', resp.data);
}).catch(() => {
this.$store.dispatch('runPlan/setPlanData', []);
this.$messageBox(this.$t('error.getRunGraphDataFailed'));
});
});
});
}).catch(() => {
this.$messageBox(this.$t('error.getStationListFail'));
});
}
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -0,0 +1,137 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__schedule create-week-plan"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-form ref="form" :model="model" :rules="rules" label-width="150px" size="small">
<el-form-item :label="this.$t('menu.runGraphName') + this.$t('global.colon')" prop="planId">
<el-row>
<el-col :span="19">
<el-input v-model="model.planName" :readonly="true" />
</el-col>
<el-col :span="4" :offset="1">
<el-button @click="handleChoose">{{ this.$t('global.select') }}</el-button>
</el-col>
</el-row>
</el-form-item>
<el-form-item :label="this.$t('menu.plannedDateRange') + this.$t('global.colon')" prop="dateList">
<el-row>
<el-date-picker
v-model="model.dateList"
type="dates"
:clearable="false"
:placeholder="this.$t('rules.selectOneOrMoreDates')"
value-format="yyyy-MM-dd"
/>
</el-row>
</el-form-item>
</el-form>
</el-row>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="create">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row>
<choose-template-plan ref="choose" @chooseConfirm="chooseConfirm" />
</el-dialog>
</template>
<script>
import { createRunPlanLoad } from '@/api/runplan';
import ChooseTemplatePlan from './chooseTemplatePlan';
export default {
name: 'CreateWeekPlan',
components: {
ChooseTemplatePlan
},
data() {
return {
dialogShow: false,
loading: false,
model: {
planId: '',
planName: '',
dateList: []
}
};
},
computed: {
title() {
return this.$t('menu.createAWeekPlan');
},
rules() {
const rules = {
planId: [
{ required: true, message: this.$t('rules.inputTemplateRunPlan'), trigger: 'blur' }
],
dateList: [
{ required: true, message: this.$t('rules.selectAPlannedDateRange'), trigger: 'change' }
]
};
return rules;
}
},
mounted() {
},
methods: {
doShow(params) {
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleChoose() {
this.$refs.choose.doShow();
},
chooseConfirm(choose) {
if (choose) {
this.model.planId = choose.id;
this.model.planName = choose.name;
}
},
buildModel() {
return {
planDateList: this.model.dateList,
mapId: this.$route.query.mapId,
templatePlanId: this.model.planId
};
},
create() {
this.$refs['form'].validate((valid) => {
if (valid) {
createRunPlanLoad(this.buildModel()).then(response => {
this.$message.success(this.$t('tip.createRunChartPlanSuccessfully'));
this.doClose();
}).catch(() => {
this.doClose();
this.$messageBox(this.$t('tip.createRunChartPlanFailed'));
});
}
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.card-box {
padding-top: 10px;
}
/deep/ {
.el-row {
margin: 10px;
}
}
</style>

View File

@ -0,0 +1,73 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__schedule delete-task"
:title="title"
:visible.sync="dialogShow"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-radio v-model="type" :label="1">{{ $t('menu.deleteAllPreviousTasks') }}</el-radio>
</el-row>
<el-row>
<el-radio v-model="type" :label="2">{{ $t('menu.deleteAllSubsequentTasks') }}</el-radio>
</el-row>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="commit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row>
</el-dialog>
</template>
<script>
export default {
name: 'DeleteTask',
components: {
},
data() {
return {
dialogShow: false,
loading: false,
tripNumber: '',
serviceNumber: '',
type: '1'
};
},
computed: {
title() {
return this.$t('menu.deleteTask');
}
},
mounted() {
},
methods: {
doShow(params) {
this.tripNumber = params.tripNumber;
this.serviceNumber = params.serviceNumber;
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
commit() {
// this.tripNumber
this.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.el-row {
margin: 10px;
}
}
</style>

View File

@ -0,0 +1,62 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__schedule create-week-plan"
:title="title"
:visible.sync="dialogShow"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="commit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row>
</el-dialog>
</template>
<script>
export default {
name: 'DeleteTodayPlan',
components: {
},
data() {
return {
dialogShow: false,
loading: false
};
},
computed: {
title() {
return this.$t('menu.deleteTheDayPlan');
}
},
mounted() {
},
methods: {
doShow(params) {
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
commit() {
// this.tripNumber
this.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.el-row {
margin: 10px;
}
}
</style>

View File

@ -0,0 +1,143 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__schedule manage-plan-list"
:title="title"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</el-dialog>
</template>
<script>
import { getRunPlanLoadList, deleteRunPlanLoad, listAllTempLateRunPlan } from '@/api/runplan';
import { getPublishMapListOnline } from '@/api/jmap/map';
export default {
name: 'ManagePlanList',
data() {
return {
dialogShow: false,
loading: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '140px',
reset: true
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: this.$t('menu.mapName'),
prop: 'mapId',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
tagType: (row) => { return ''; }
},
{
title: this.$t('menu.runGraphName'),
prop: 'templatePlanId',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.templatePlanId, this.templatePlanList, ['id', 'name']); },
tagType: (row) => { return 'success'; }
},
{
title: this.$t('menu.loadDate'),
prop: 'loadTime'
},
{
type: 'button',
title: this.$t('global.operate'),
width: '100',
buttons: [
{
name: this.$t('global.delete'),
handleClick: this.handleDelete,
type: 'danger'
}
]
}
],
actions: [
{ text: this.$t('global.create'), btnCode: 'employee_insert', handler: this.handleCreateRunPlan }
]
},
currentModel: {}
};
},
computed: {
title() {
return this.$t('menu.operationChartSchedule');
}
},
mounted() {
this.loadPageData();
},
methods: {
loadPageData() {
this.mapList = [];
getPublishMapListOnline().then(resp => {
this.mapList = resp.data;
});
this.templatePlanList = [];
listAllTempLateRunPlan().then(resp => {
this.templatePlanList = resp.data;
});
},
queryFunction(params) {
if (this.$route.query.mapId) {
params['mapId'] = this.$route.query.mapId;
}
if (this.$store.state.user.id) {
params['userId'] = this.$store.state.user.id;
}
return getRunPlanLoadList(params);
},
handleDelete(index, row) {
this.$confirm(this.$t('tip.deleteTheRunningGraphLoadedTheNextDay'), this.$t('tip.hint'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
deleteRunPlanLoad(row.id).then(response => {
this.$message.success(this.$t('global.successfullyDelete'));
this.reloadTable();
}).catch(() => {
this.reloadTable();
this.$messageBox(this.$t('global.failDelete'));
});
}).catch(() => { });
},
handleCreateRunPlan() {
this.$emit('dispatchDialog', { name: 'createWeekPlan' });
},
doShow() {
this.dialogShow = true;
this.$nextTick(()=> { this.reloadTable(); });
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -0,0 +1,177 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__schedule edit-planning-train"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :offset="10">{{ $t('menu.trainLine') }}</el-col>
</el-row>
<el-row>
<el-col :span="17">
<el-table :data="serviceData" border style="width: 100%" height="160">
<el-table-column prop="startStationCode" :label="this.$t('menu.startStation')" />
<el-table-column prop="startStationStandCode" :label="this.$t('menu.startPlatform')" />
<el-table-column prop="endStationCode" :label="this.$t('menu.terminal')" />
<el-table-column prop="endStationStandCode" :label="this.$t('menu.endPlatform')" />
</el-table>
</el-col>
<el-col :span="6" :offset="1">
<el-row type="flex" justify="center">
<el-button class="view-button" @click="handleAddTask">{{ this.$t('menu.addTask2') }}</el-button>
</el-row>
<el-row type="flex" justify="center">
<el-button class="view-button" @click="handleReplace">{{ this.$t('menu.replace') }}</el-button>
</el-row>
<el-row type="flex" justify="center">
<el-button class="view-button" @click="handleDeleteTask">{{ this.$t('menu.deleteTask2') }}</el-button>
</el-row>
<div class="view-box">
<el-row type="flex" justify="center">
<el-radio-group v-model="storeInOut">
<el-radio :label="1">{{ this.$t('menu.inTheLibrary') }}</el-radio>
<el-radio :label="2">{{ this.$t('menu.outOfTheLibrary') }}</el-radio>
</el-radio-group>
</el-row>
</div>
</el-col>
</el-row>
<el-row class="view-box">
<el-col :span="9" style="padding-left: 10px">
<el-input v-model="oldServiceNumber" size="small" :disabled="true" />
</el-col>
<el-col :span="9" style="padding-left: 20px">
<el-input v-model="newServiceNumber" size="small" />
</el-col>
<el-col :span="5" style="padding-left: 20px">
<el-button style="width: 150px;" @click="handleModifyingTripNumber">{{ $t('menu.changeTripNumber') }}</el-button>
</el-col>
</el-row>
<el-row style="margin-top: 10px">
<el-col :span="4"><span class="view-label">{{ $t('menu.lineStartTime') }}</span></el-col>
<el-col :span="8">
<el-time-select v-model="serviceStartTime" size="small" />
</el-col>
<el-col :span="4"><span class="view-label">{{ $t('menu.lineEndTime') }}</span></el-col>
<el-col :span="8">
<el-time-select v-model="serviceEndTime" size="small" />
</el-col>
</el-row>
<el-row style="margin-top: 20px">
<el-col :offset="10">{{ $t('menu.lineDetails') }}</el-col>
</el-row>
<el-row>
<el-table :data="tripData" border style="width: 100%" height="200">
<el-table-column prop="arriveTime" :label="this.$t('menu.arrivalTime2')" />
<el-table-column prop="stationCode" :label="this.$t('menu.station')" />
<el-table-column prop="stationStandCode" :label="this.$t('menu.platform')" />
<el-table-column prop="stopTime" :label="this.$t('menu.stopTime')" />
<el-table-column prop="level" :label="this.$t('menu.runLevel')" />
</el-table>
</el-row>
<el-row style="margin-top: 20px">
<el-checkbox v-model="effect">{{ $t('menu.affectSubsequentTasks') }}</el-checkbox>
</el-row>
<el-row type="flex" justify="center">
<el-button @click="commit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row>
</el-dialog>
</template>
<script>
import { formatTime, formatName } from '@/utils/runPlan';
export default {
name: 'ModifyingPlan',
data() {
return {
dialogShow: false,
loading: false,
effect: false,
storeInOut: '1',
oldServiceNumber: '',
newServiceNumber: '',
serviceStartTime: '',
serviceEndTime: '',
serviceData: [],
tripData: []
};
},
computed: {
title() {
return this.$t('global.modify');
}
},
mounted() {
},
methods: {
formatTime(time) {
return formatTime(time);
},
formatName(code) {
return formatName(code);
},
doShow() {
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
//
handleAddTask() {
this.$emit('dispatchDialog', { name: 'addTask', params: {} });
},
//
handleReplace() {
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} });
},
//
handleDeleteTask() {
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} });
},
//
handleModifyingTripNumber() {
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} });
},
//
commit() {
this.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.view-button {
display: list-item;
width: 150px !important;
margin-left: 0px;
}
.view-label {
height: 32px;
line-height: 32px;
}
.view-box {
padding: 10px 0px;
border: 1px inset gray;
border-top: 1px outset gray;
border-left: 1px outset gray;
}
/deep/ {
.el-row {
margin: 5px 20px;
}
}
</style>

View File

@ -0,0 +1,326 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__schedule add-task"
:title="title"
:visible.sync="dialogShow"
width="1000px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="margin: 10px">
<el-row>
<el-col :span="4">
<el-row>
<el-col :span="9">
<span>{{ $t('menu.tripNumber') + $t('global.colon') }}</span>
</el-col>
<el-col :span="15">
<el-select v-model="model.tripNumber" style="display: inline-black" :placeholder="this.$t('global.choose')">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="2">
<el-row>
<el-col :offset="4">
<el-checkbox v-model="model.trainManual">{{ this.$t('menu.manual') }}</el-checkbox>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="12">
<span>{{ $t('menu.defaultStopTime') + $t('global.colon') }}</span>
</el-col>
<el-col :span="12">
<el-select v-model="model.time" style="display: inline-black" :placeholder="this.$t('global.choose')">
<el-option
v-for="item in timeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="9" :offset="2">
<span>{{ $t('menu.serviceNumber') + $t('global.colon') }}</span>
</el-col>
<el-col :span="13">
<el-input v-model="model.serviceNumber" />
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<el-row>
<el-col :span="22" :offset="2">
<el-row>
<el-col :span="6">
<el-checkbox v-model="model.clearGuest">{{ $t('menu.clearGuest') }}</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox v-model="model.continuationPlan">{{ $t('menu.continuationPlan') }}</el-checkbox>
</el-col>
<el-col :span="6">
<el-checkbox v-model="model.firstTrain">{{ $t('menu.firstTrain') }}</el-checkbox>
</el-col>
</el-row>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row>
<el-col :span="4">
<el-row>
<el-col :span="9">
<span>{{ $t('menu.serialNumber') + $t('global.colon') }}</span>
</el-col>
<el-col :span="15">
<el-select v-model="model.serialNumber" style="display: inline-black" :placeholder="this.$t('global.choose')">
<el-option
v-for="item in serialNumberList"
:key="item.value"
:label="item.label"
:value="model.value"
/>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="2">
<el-row>
<el-col :offset="4">
<el-checkbox v-model="model.serialManual">{{ this.$t('menu.manual') }}</el-checkbox>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="12">
<span>{{ $t('menu.defaultRunLevel') + $t('global.colon') }}</span>
</el-col>
<el-col :span="12">
<el-select v-model="model.level" style="display: inline-black" :placeholder="this.$t('global.choose')">
<el-option
v-for="item in levelList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="9" :offset="2">
<span>{{ $t('global.startTime') + $t('global.colon') }}</span>
</el-col>
<el-col :span="13">
<el-time-select v-model="model.startTime" :placeholder="this.$t('global.selectionTime')" :clearable="false" />
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<el-row>
<el-col :span="22" :offset="2">
<el-row>
<el-col :span="6">
<el-checkbox v-model="model.inStock">{{ $t('menu.inTheLibrary') }}</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox v-model="model.outStock">{{ $t('menu.outOfTheLibrary') }}</el-checkbox>
</el-col>
<el-col :span="6">
<el-checkbox v-model="model.lastTrain">{{ $t('menu.lastTrain') }}</el-checkbox>
</el-col>
</el-row>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row style="margin-bottom: 5px;">
{{ $t('menu.crossing') + $t('global.colon') }}
</el-row>
<el-row>
<el-table :data="model.route" border :height="140">
<el-table-column prop="beginStationCode" :label="this.$t('menu.startStation')">
<template slot-scope="scope">
{{ formatName(scope.row.beginStationCode) }}
</template>
</el-table-column>
<el-table-column prop="beginStationStandCode" :label="this.$t('menu.startPlatform')" />
<el-table-column prop="endStationCode" :label="this.$t('menu.terminal')">
<template slot-scope="scope">
{{ formatName(scope.row.endStationCode) }}
</template>
</el-table-column>
<el-table-column prop="endStationStandCode" :label="this.$t('menu.endPlatform')" />
<el-table-column prop="describe" :label="this.$t('menu.description')" :width="280" />
<el-table-column :width="40" />
</el-table>
</el-row>
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
{{ $t('global.details') + $t('global.colon') }}
</el-row>
<el-row>
<el-table :data="model.detail" border :height="140">
<el-table-column prop="stationCode" :label="this.$t('menu.platform')" :width="160">
<template slot-scope="scope">
{{ formatName(scope.row.stationCode) }}
</template>
</el-table-column>
<el-table-column prop="startTime" :label="this.$t('menu.arrivalTime')">
<template slot-scope="scope">
{{ formatTime(scope.row.startTime) }}
</template>
</el-table-column>
<el-table-column prop="stopTime" :label="this.$t('menu.stopTime')">
<template slot-scope="scope">
{{ formatTime(scope.row.stopTime) }}
</template>
</el-table-column>
<el-table-column prop="endTime" :label="this.$t('menu.departureTime')">
<template slot-scope="scope">
{{ formatTime(scope.row.endTime) }}
</template>
</el-table-column>
<el-table-column prop="level" :label="this.$t('menu.runLevel')" />
<el-table-column width="280" />
</el-table>
</el-row>
<el-row>
<el-col :offset="16">
<el-checkbox v-model="model.default">{{ $t('menu.displaysDefaultStopTimesAndRunLevels') }}</el-checkbox>
</el-col>
</el-row>
</div>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="commit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row>
</el-dialog>
</template>
<script>
import { formatTime, formatName } from '@/utils/runPlan';
export default {
name: 'ModifyingTask',
components: {
},
data() {
return {
dialogShow: false,
loading: false,
model: {
tripNumber: '',
serialNumber: '',
trainManual: false,
serialManual: false,
clearGuest: false,
continuationPlan: false,
firstTrain: false,
lastTrain: false,
inStock: false,
outStock: false,
startTime: '',
route: [],
detail: []
},
timeList: [],
levelList: [],
tripNumberList: [],
serialNumberList: []
};
},
computed: {
title() {
return this.$t('menu.modifyTask');
}
},
mounted() {
},
methods: {
formatTime(time) {
return formatTime(time);
},
formatName(code) {
return formatName(code);
},
loadInitData(params) {
this.model.tripNumber = params.tripNumber;
this.model.serviceNumber = params.serviceNumber;
const editData = this.$store.state.runPlan.editData[params.serviceNumber];
if (editData) {
const trainInfo = editData.trainMap[params.tripNumber];
const lastIndex = trainInfo.stationTimeList.length - 1;
const taskObj = {
tripNumber: params.tripNumber,
beginStationCode: trainInfo.stationTimeList[0].stationCode,
beginStationStandCode: '',
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
endStationStandCode: ''
};
this.model.route.push(taskObj);
trainInfo.stationTimeList.forEach((elem, index) => {
const stationObj = {
stationCode: elem.stationCode,
startTime: index == 0 ? null : trainInfo.stationTimeList[index - 1].secondTime,
stopTime: index == 0 ? null : elem.secondTime - trainInfo.stationTimeList[index - 1].secondTime,
endTime: elem.secondTime,
level: ''
};
this.model.detail.push(stationObj);
});
}
},
doShow(params) {
this.loadInitData(params);
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
commit() {
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.el-button {
margin-left: 40px !important;
margin-right: 40px !important;
}
.el-row {
margin-bottom: 5px !important;
}
.el-input__inner {
height: 20px !important;
line-height: 20px !important;
}
.el-input {
width: 110px !important;
}
}
</style>

View File

@ -0,0 +1,69 @@
import deviceType from '../../constant/deviceType';
class Model {
constructor() {
// 公共字段部分默认初始值
this['public'] = {};
this['public'][deviceType.Signal] = {
lampPositionType: '02',
lampPostType: '02'
};
// 私有字段部分默认初始值
this['private'] = {};
this['private'][deviceType.StationControl] = {
indicatorShow: true // 标识灯名称显示
};
this['private'][deviceType.Switch] = {
nameShow: true
};
this['private'][deviceType.Section] = {
nameShow: true,
borderBorderShow: true, // 区段边界显示
destinationNameShow: true, // 目的地码名称显示
standTrackNameShow: true, // 站台轨名称显示
reentryTrackNameShow: true, // 折返轨名称显示
transferTrackNameShow: true // 转换轨名称显示
};
this['private'][deviceType.Signal] = {
nameShow: true, // 信号机名称显示
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
atsAutoTriggerShow: true // ATS自动触发表示灯显示
};
this['private'][deviceType.Train] = {
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
nameFontSize: 10 // 字体大小
};
this['private'][deviceType.TrainWindow] = {
trainWindowShow: true
};
}
initPublicProps(model) {
if (model) {
var modelInitial = this.public[model._type];
if (modelInitial) {
for (var prop in modelInitial) {
model[prop] = modelInitial[prop];
}
}
}
return model;
}
initPrivateProps(model) {
if (model) {
var modelInitial = this.private[model._type];
if (modelInitial) {
for (var prop in modelInitial) {
model[prop] = modelInitial[prop];
}
}
}
return model;
}
}
export default new Model();

View File

@ -0,0 +1,849 @@
// 操作规则定义
// {id: "1", trainingType: "01", name: "车站名称"}
// {id: "2", trainingType: "01", name: "车站控制模式编号"}
// {id: "3", trainingType: "02", name: "进路名称"}
// {id: "4", trainingType: "02", name: "进路编号"}
// {id: "5", trainingType: "02", name: "信号机名称"}
// {id: "6", trainingType: "02", name: "信号机编号"}
// {id: "7", trainingType: "03", name: "道岔名称"}
// {id: "17", trainingType: "03", name: "道岔编码"}
// {id: "15", trainingType: "03", name: "道岔位置"}
// {id: "16", trainingType: "03", name: "道岔位置(反)"}
// {id: "21", trainingType: "03", name: "车站名称"}
// {id: "23", trainingType: "03", name: "车站编号"}
// {id: "24", trainingType: "03", name: "道岔计轴区段编号"}
// {id: "25", trainingType: "03", name: "道岔计轴区段名称"}
// {id: "8", trainingType: "04", name: "物理区段名称"}
// {id: "9", trainingType: "04", name: "逻辑区段名称"}
// {id: "18", trainingType: "04", name: "逻辑区段编码"}
// {id: "19", trainingType: "04", name: "区段编号"}
// {id: "20", trainingType: "04", name: "车站名称"}
// {id: "22", trainingType: "04", name: "车站编号"}
// {id: "10", trainingType: "05", name: "车站名称"}
// {id: "11", trainingType: "05", name: "站台行驶方向编号"}
// {id: "12", trainingType: "05", name: "站台行驶方向"}
// {id: "13", trainingType: "05", name: "站台行驶方向编号(反)"}
// {id: "14", trainingType: "05", name: "站台行驶方向(反)"}
export default {
list: [
{
maxDuration: 20,
minDuration: 15,
operateType: '0103',
skinCode: '02',
trainingName: '转为中控({1})',
trainingRemark: '控制权限转换,站控转中控',
trainingType: '01',
productTypes: ['02'],
stepVOList: [
{ deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: '鼠标左键点击顶部菜单栏【控制模式转换】' },
{ deviceType: 'bar', orderNum: 2, operateCode: '2041', tip: '鼠标左键点击【转为中控】' },
{ deviceType: '05', orderNum: 3, operateCode: '2042', tip: '鼠标左键选择所需要转换的控制区域【{1}】', val: '{2}' },
{ deviceType: '05', orderNum: 4, operateCode: '204', tip: '鼠标左键点击【请求中控】', val: '{2}' },
{ deviceType: '05', orderNum: 5, operateCode: '2043', tip: '鼠标左键点击【确认】按钮', val: '{2}' },
{ deviceType: '05', orderNum: 6, operateCode: '0013', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: 'bar', orderNum: 7, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0101',
skinCode: '02',
trainingName: '转为站控({1})',
trainingRemark: '控制权限转换,中控转站控',
trainingType: '01',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: '鼠标左键点击顶部菜单栏【控制模式转换】' },
{ deviceType: 'bar', orderNum: 2, operateCode: '2021', tip: '鼠标左键点击【转为站控】' },
{ deviceType: '05', orderNum: 3, operateCode: '2022', tip: '鼠标左键选择所需要转换的控制区域【{1}】', val: '{2}' },
{ deviceType: '05', orderNum: 4, operateCode: '202', tip: '鼠标左键点击【请求站控】', val: '{2}' },
{ deviceType: '05', orderNum: 5, operateCode: '2023', tip: '鼠标左键点击【确认】按钮', val: '{2}' },
{ deviceType: '05', orderNum: 6, operateCode: '0013', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: 'bar', orderNum: 7, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0102',
skinCode: '02',
trainingName: '强制站控({1})',
trainingRemark: '控制权限转换,强制站控',
trainingType: '01',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: '鼠标左键点击顶部菜单栏【控制模式转换】' },
{ deviceType: 'bar', orderNum: 2, operateCode: '2034', tip: '鼠标左键点击【强制站控】' },
{ deviceType: 'bar', orderNum: 3, operateCode: '2035', tip: '鼠标左键输入默认密码【123456】后点击【确定】按钮' },
{ deviceType: '05', orderNum: 4, operateCode: '2032', tip: '鼠标左键选择所需要转换的控制区域【{1}】', val: '{2}' },
{ deviceType: '05', orderNum: 5, operateCode: '203', tip: '鼠标左键点击【强制站控】', val: '{2}' },
{ deviceType: '05', orderNum: 6, operateCode: '2033', tip: '鼠标左键点击【确认】按钮', val: '{2}' },
{ deviceType: '05', orderNum: 7, operateCode: '0013', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: 'bar', orderNum: 8, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0501',
skinCode: '02',
trainingName: '站台扣车({10}-{12}站台)',
trainingRemark: '设置扣车功能',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0502',
skinCode: '02',
trainingName: '站台取消扣车({10}-{12}站台)',
trainingRemark: '设置取消扣车功能',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0503',
skinCode: '02',
trainingName: '强制取消扣车({10}-{12}站台)',
trainingRemark: '强制取消扣车功能',
trainingType: '05',
productTypes: ['01'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '506', tip: '鼠标右键菜单选择【强制取消扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '506', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0504',
skinCode: '02',
trainingName: '全线取消扣车({10}-{12}站台)',
trainingRemark: '全线取消扣车功能(默认上行全线/下行全线,不做选择)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '508', tip: '鼠标右键菜单选择【全线取消扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '508', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0504',
skinCode: '02',
trainingName: '全线取消扣车({10}-{12}站台)',
trainingRemark: '全线取消扣车功能(选择上/下行全线)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '508', tip: '鼠标右键菜单选择【全线取消扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '5081', tip: '鼠标右键菜单选择【{14}全线】', val: '{13}' },
{ deviceType: '06', orderNum: 3, operateCode: '508', tip: '鼠标左键点击【确定】按钮', val: '{13}' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0505',
skinCode: '02',
trainingName: '站台跳停({10}-{12}站台)',
trainingRemark: '设置跳停功能',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0506',
skinCode: '02',
trainingName: '取消跳停({10}-{12}站台)',
trainingRemark: '设置取消跳停功能',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
]
},
{
maxDuration: 8,
minDuration: 5,
operateType: '0507',
skinCode: '02',
trainingName: '查询站台状态({10}-{12}站台)',
trainingRemark: '查询站台状态功能',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【查询站台状态】' },
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0508',
skinCode: '02',
trainingName: '设置停站时间({10}-{12}站台)',
trainingRemark: '设置停站时间(自动, 一直有效)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【自动】', val: '01' },
{ deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' },
{ deviceType: '06', orderNum: 4, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0508',
skinCode: '02',
trainingName: '设置停站时间({10}-{12}站台)',
trainingRemark: '设置停站时间(人工, 20秒, 一直有效)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击调整为【20】', val: '20' },
{ deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' },
{ deviceType: '06', orderNum: 5, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0508',
skinCode: '02',
trainingName: '设置停站时间({10}-{12}站台)',
trainingRemark: '设置停站时间(人工, 20秒, 一次有效)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击调整为【20】', val: '20' },
{ deviceType: '06', orderNum: 4, operateCode: '5093', tip: '鼠标左键点击,选择【一次有效】', val: 'false' },
{ deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' },
{ deviceType: '06', orderNum: 6, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0509',
skinCode: '02',
trainingName: '设置运行等级({10}-{12}站台)',
trainingRemark: '设置运行等级(设置区间运行时间为60一直有效)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置运行等级】' },
{ deviceType: '06', orderNum: 2, operateCode: '5101', tip: '鼠标左键点击选择【60】', val: '60' },
{ deviceType: '06', orderNum: 3, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '60::true' },
{ deviceType: '06', orderNum: 4, operateCode: '5102', tip: '鼠标左键点击【确认】按钮', val: '60::true' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0509',
skinCode: '02',
trainingName: '设置运行等级({10}-{12}站台)',
trainingRemark: '设置运行等级(设置区间运行时间为60一次有效)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置运行等级】' },
{ deviceType: '06', orderNum: 2, operateCode: '5101', tip: '鼠标左键点击选择【60】', val: '60' },
{ deviceType: '06', orderNum: 3, operateCode: '5103', tip: '鼠标左键点击,取消选择【一直有效】', val: 'false' },
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '60::false' },
{ deviceType: '06', orderNum: 5, operateCode: '5102', tip: '鼠标左键点击【确认】按钮', val: '60::false' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0510',
skinCode: '02',
trainingName: '设置提前发车({10}-{12}站台)',
trainingRemark: '设置提前发车功能',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '501', tip: '鼠标右键菜单选择【设置提前发车】' },
{ deviceType: '06', orderNum: 2, operateCode: '501', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0511',
skinCode: '02',
trainingName: '人工折返策略设置({10}-{12}站台)',
trainingRemark: '人工折返策略设置功能',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '511', tip: '鼠标右键菜单选择【人工折返策略设置】' },
{ deviceType: '06', orderNum: 2, operateCode: '5111', tip: '鼠标左键点击,选择【无折返】', val: '01' },
{ deviceType: '06', orderNum: 3, operateCode: '511', tip: '鼠标左键点击【确定】按钮', val: '01' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0401',
skinCode: '02',
trainingName: '区段故障解锁({8}{9})',
trainingRemark: '故障解锁功能',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '402', tip: '鼠标右键菜单选择【区段故障解锁】' },
{ deviceType: '03', orderNum: 2, operateCode: '4026', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '4024', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '03', orderNum: 4, operateCode: '4025', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0402',
skinCode: '02',
trainingName: '区段切除({8}{9})',
trainingRemark: '区段切除',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '405', tip: '鼠标右键菜单选择【区段切除】' },
{ deviceType: '03', orderNum: 2, operateCode: '405', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0403',
skinCode: '02',
trainingName: '区段激活({8}{9})',
trainingRemark: '区段激活功能',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '406', tip: '鼠标右键菜单选择【区段激活】' },
{ deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0404',
skinCode: '02',
trainingName: '计轴预复位({8}{9})',
trainingRemark: '计轴预复位功能',
trainingType: '04',
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '409', tip: '鼠标右键菜单选择【区段计轴预复位】' },
{ deviceType: '03', orderNum: 2, operateCode: '4091', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '4093', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '03', orderNum: 4, operateCode: '4094', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0405',
skinCode: '02',
trainingName: '区段封锁({8}{9})',
trainingRemark: '区段封锁功能',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '403', tip: '鼠标右键菜单选择【区段封锁】' },
{ deviceType: '03', orderNum: 2, operateCode: '403', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0406',
skinCode: '02',
trainingName: '区段解封({8}{9})',
trainingRemark: '区段解封功能',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '404', tip: '鼠标右键菜单选择【区段解封】' },
{ deviceType: '03', orderNum: 2, operateCode: '4041', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '4043', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '03', orderNum: 4, operateCode: '4044', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0407',
skinCode: '02',
trainingName: '区段设置限速({8}{9})',
trainingRemark: '区段设置限速功能限速值5',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '407', tip: '鼠标右键菜单选择【区段设置限速】' },
{ deviceType: '03', orderNum: 2, operateCode: '4076', tip: '鼠标左键选择【限速值5】', val: '5' },
{ deviceType: '03', orderNum: 3, operateCode: '4071', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮', val: '5' },
{ deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0408',
skinCode: '02',
trainingName: '区段取消限速({8}{9})',
trainingRemark: '区段取消限速功能',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '408', tip: '鼠标右键菜单选择【区段取消限速】' },
{ deviceType: '03', orderNum: 2, operateCode: '4081', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '4082', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '03', orderNum: 4, operateCode: '4083', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '4084', tip: '鼠标左键点击【确认2】按钮', val: '5' },
{ deviceType: '03', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0301',
skinCode: '02',
trainingName: '道岔单锁({7})',
trainingRemark: '道岔单锁功能',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '103', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0302',
skinCode: '02',
trainingName: '道岔单解({7})',
trainingRemark: '道岔单解功能',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔单解】' },
{ deviceType: '02', orderNum: 2, operateCode: '1041', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '1043', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '02', orderNum: 4, operateCode: '1044', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0303',
skinCode: '02',
trainingName: '道岔区段封闭({7})',
trainingRemark: '道岔区段封闭功能',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔区段封闭】' },
{ deviceType: '02', orderNum: 2, operateCode: '105', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0304',
skinCode: '02',
trainingName: '道岔区段解封({7})',
trainingRemark: '道岔区段解封功能',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔区段解封】' },
{ deviceType: '02', orderNum: 2, operateCode: '1061', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '1063', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '02', orderNum: 4, operateCode: '1064', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0305',
skinCode: '02',
trainingName: '道岔转动({7})',
trainingRemark: '道岔转动功能({15}转{16})',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '107', tip: '鼠标右键菜单选择【道岔转动】' },
{ deviceType: '02', orderNum: 2, operateCode: '107', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 20,
minDuration: 10,
operateType: '0306',
skinCode: '02',
trainingName: '道岔区段故障解锁({7})',
trainingRemark: '道岔区段故障解锁功能',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【道岔区段故障解锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '1091', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '1093', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '02', orderNum: 4, operateCode: '1094', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0307',
skinCode: '02',
trainingName: '道岔区段计轴预复位({7})',
trainingRemark: '道岔区段计轴预复位功能',
trainingType: '03',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '110', tip: '鼠标右键菜单选择【道岔区段计轴预复位】' },
{ deviceType: '02', orderNum: 2, operateCode: '1101', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '1103', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '02', orderNum: 4, operateCode: '1104', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0308',
skinCode: '02',
trainingName: '区段切除({7})',
trainingRemark: '区段切除',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '111', tip: '鼠标右键菜单选择【区段切除】' },
{ deviceType: '02', orderNum: 2, operateCode: '111', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0309',
skinCode: '02',
trainingName: '区段激活({7})',
trainingRemark: '区段激活功能',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '112', tip: '鼠标右键菜单选择【区段激活】' },
{ deviceType: '02', orderNum: 2, operateCode: '112', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0310',
skinCode: '02',
trainingName: '道岔区段设置限速({7})',
trainingRemark: '道岔区段设置限速功能限速值5',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '113', tip: '鼠标右键菜单选择【道岔区段设置限速】' },
{ deviceType: '02', orderNum: 2, operateCode: '1136', tip: '鼠标左键选择【限速值5】', val: '5' },
{ deviceType: '02', orderNum: 3, operateCode: '1131', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '02', orderNum: 4, operateCode: '1132', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '02', orderNum: 5, operateCode: '1133', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '02', orderNum: 6, operateCode: '1134', tip: '鼠标左键点击【确认2】按钮', val: '5' },
{ deviceType: '02', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0311',
skinCode: '02',
trainingName: '道岔区段取消限速({7})',
trainingRemark: '道岔区段取消限速功能',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '114', tip: '鼠标右键菜单选择【道岔区段取消限速】' },
{ deviceType: '02', orderNum: 2, operateCode: '1141', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '1142', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '02', orderNum: 4, operateCode: '1143', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '02', orderNum: 5, operateCode: '1144', tip: '鼠标左键点击【确认2】按钮', val: '5' },
{ deviceType: '02', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0201',
skinCode: '02',
trainingName: '进路选排({3})',
trainingRemark: '选择排列进路',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【进路选排】' },
{ deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
{ deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '04', orderNum: 4, operateCode: '3012', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0202',
skinCode: '02',
trainingName: '进路取消({3})',
trainingRemark: '进路取消',
trainingType: '02',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【进路取消】' },
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '3031', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0202',
skinCode: '02',
trainingName: '进路取消({3})',
trainingRemark: '进路取消',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【进路取消】' },
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0203',
skinCode: '02',
trainingName: '信号封闭({5})',
trainingRemark: '信号封闭',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封闭】' },
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0204',
skinCode: '02',
trainingName: '信号解封({5})',
trainingRemark: '信号解封',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' },
{ deviceType: '04', orderNum: 2, operateCode: '3071', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '3072', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '04', orderNum: 4, operateCode: '3073', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '04', orderNum: 5, operateCode: '3074', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '04', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0205',
skinCode: '02',
trainingName: '信号关灯({3})',
trainingRemark: '信号关灯',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '313', tip: '鼠标右键菜单选择【信号关灯】' },
{ deviceType: '04', orderNum: 2, operateCode: '313', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '3131', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0206',
skinCode: '02',
trainingName: '信号重开({3})',
trainingRemark: '信号重开',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' },
{ deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '3041', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0207',
skinCode: '02',
trainingName: '引导进路办理({3})',
trainingRemark: '进路办理信号引导',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【引导进路办理】' },
{ deviceType: '04', orderNum: 2, operateCode: '3081', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '3083', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '04', orderNum: 4, operateCode: '3084', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '04', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0208',
skinCode: '02',
trainingName: '自排开({5})',
trainingRemark: '自排开',
trainingType: '02',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【自排开】' },
{ deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择控制状态为"人工"的进路', val: '{6}' },
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0209',
skinCode: '02',
trainingName: '自排关({5})',
trainingRemark: '自排关',
trainingType: '02',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【自排关】' },
{ deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择第一条进路', val: '{6}' },
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0210',
skinCode: '02',
trainingName: '查询进路控制状态({5})',
trainingRemark: '查询进路控制状态',
trainingType: '02',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【查询进路控制模式】' },
{ deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0211',
skinCode: '02',
trainingName: '设置联锁自动进路({5})',
trainingRemark: '设置联锁自动进路',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '309', tip: '鼠标右键菜单选择【设置联锁自动进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '309', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0212',
skinCode: '02',
trainingName: '取消联锁自动进路({5})',
trainingRemark: '取消联锁自动进路',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '310', tip: '鼠标右键菜单选择【取消联锁自动进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '310', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0213',
skinCode: '02',
trainingName: '设置联锁自动触发({5})',
trainingRemark: '设置联锁自动触发',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '311', tip: '鼠标右键菜单选择【设置联锁自动触发】' },
{ deviceType: '04', orderNum: 2, operateCode: '311', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0214',
skinCode: '02',
trainingName: '取消联锁自动触发({5})',
trainingRemark: '取消联锁自动触发',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '312', tip: '鼠标右键菜单选择【取消联锁自动触发】' },
{ deviceType: '04', orderNum: 2, operateCode: '312', tip: '鼠标左键点击【确定】按钮' }
]
}
]
};

View File

@ -0,0 +1,820 @@
export default {
list: [
{
maxDuration: 20,
minDuration: 15,
operateType: '0103',
skinCode: '05',
trainingName: 'Switch to central control ({1})',
trainingRemark: 'Control permission conversion, switch station control to central control',
trainingType: '01',
productTypes: ['02'],
stepVOList: [
{ deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: 'Left click the menu bar [control mode conversion]on the top' },
{ deviceType: 'bar', orderNum: 2, operateCode: '2041', tip: 'Left click [switch to central control] ' },
{ deviceType: '05', orderNum: 3, operateCode: '2042', tip: 'Left click to select the control area to be converted【{1}】', val: '{2}' },
{ deviceType: '05', orderNum: 4, operateCode: '204', tip: 'Left click [request to central control] ', val: '{2}' },
{ deviceType: '05', orderNum: 5, operateCode: '2043', tip: 'Left click [confirm]', val: '{2}' },
{ deviceType: '05', orderNum: 6, operateCode: '0013', tip: 'Left click [confirm]' },
{ deviceType: 'bar', orderNum: 7, operateCode: '000', tip: 'Left click [close] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0101',
skinCode: '05',
trainingName: 'Switch to station control ({1})',
trainingRemark: 'Control permission conversion, Force to station control',
trainingType: '01',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: 'Left click the menu bar [control mode conversion]on the top' },
{ deviceType: 'bar', orderNum: 2, operateCode: '2021', tip: 'Left click [switch to station control' },
{ deviceType: '05', orderNum: 3, operateCode: '2022', tip: 'Left click to select the control area to be converted【{1}】', val: '{2}' },
{ deviceType: '05', orderNum: 4, operateCode: '202', tip: 'Left click [request to station control', val: '{2}' },
{ deviceType: '05', orderNum: 5, operateCode: '2023', tip: 'Left click [confirm] ', val: '{2}' },
{ deviceType: '05', orderNum: 6, operateCode: '0013', tip: 'Left click [confirm] ' },
{ deviceType: 'bar', orderNum: 7, operateCode: '000', tip: 'Left click [close] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0102',
skinCode: '05',
trainingName: 'Force to station control ({1})',
trainingRemark: 'Control permission conversion,Force to station control',
trainingType: '01',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: 'Left click the menu bar [control mode conversion]on the top' },
{ deviceType: 'bar', orderNum: 2, operateCode: '2034', tip: 'Left click[Force to station control]' },
{ deviceType: 'bar', orderNum: 3, operateCode: '2035', tip: 'Left click to input the password [123456],then left click the [confirm]' },
{ deviceType: '05', orderNum: 4, operateCode: '2032', tip: 'Left click to select the control area to be converted【{1}】', val: '{2}' },
{ deviceType: '05', orderNum: 5, operateCode: '203', tip: 'Left click [Foece to station control', val: '{2}' },
{ deviceType: '05', orderNum: 6, operateCode: '2033', tip: 'Left click [confirm] ', val: '{2}' },
{ deviceType: '05', orderNum: 7, operateCode: '0013', tip: 'Left click [confirm] ' },
{ deviceType: 'bar', orderNum: 8, operateCode: '000', tip: 'Left click [close] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0501',
skinCode: '05',
trainingName: 'Detain Train({10}-{12}station)',
trainingRemark: 'Set the detaining function',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: 'Right click to select [Detain Train]' },
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0502',
skinCode: '05',
trainingName: 'Cancel Detaining({10}-{12}The platform)',
trainingRemark: 'Set cancelling detaining function',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: 'Right click to select [Cancel Detaining]]' },
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0503',
skinCode: '05',
trainingName: 'Force Canceling Detaining({10}-{12}The platform)',
trainingRemark: 'Force to cancel train detaining function',
trainingType: '05',
productTypes: ['01'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '506', tip: 'Right click to select [Force Canceling Detaining]' },
{ deviceType: '06', orderNum: 2, operateCode: '506', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0504',
skinCode: '05',
trainingName: 'Cancel train detaining along the whole line({10}-{12}The platform)',
trainingRemark: 'Cancel train detaining along the whole line (default the whole uplink and downlink )',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '508', tip: 'Right click to select [Cancel train detaining along the whole line]' },
{ deviceType: '06', orderNum: 2, operateCode: '508', tip: 'Left click [confirm] ', val: '{11}' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0504',
skinCode: '05',
trainingName: 'Cancel train detaining along the whole line({10}-{12}The platform)',
trainingRemark: 'Cancel train detaining along the whole line (select the uplink or downlink ))',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '508', tip: 'Right click to select [Cancel train detaining along the whole line]' },
{ deviceType: '06', orderNum: 2, operateCode: '5081', tip: 'Right click to select[{14}the whole line', val: '{13}' },
{ deviceType: '06', orderNum: 3, operateCode: '508', tip: 'Left click [confirm]', val: '{13}' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0505',
skinCode: '05',
trainingName: 'Skip this station to continue moving({10}-{12}The platform)',
trainingRemark: 'Set the skip to continue moving function',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: 'Right click to select [Skip this station to continue moving]' },
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: 'Left click [confirm]', val: '{11}' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0506',
skinCode: '05',
trainingName: 'Cancel skiping({10}-{12}The platform)',
trainingRemark: 'Set cancelling skiping function',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: 'Right click to select [Cancel skiping]' },
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: 'Left click [confirm]', val: '{11}' }
]
},
{
maxDuration: 8,
minDuration: 5,
operateType: '0507',
skinCode: '05',
trainingName: 'Query Platform status({10}-{12}The platform)',
trainingRemark: 'Query platform status function',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: 'Right click to select [Query Platform status]' },
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0508',
skinCode: '05',
trainingName: 'Set the stop time({10}-{12}The platform)',
trainingRemark: 'Set the stop time (auto, permanent validity)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: 'Right click to select [Set the stop time]' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: 'Left click to select [auto]', val: '01' },
{ deviceType: '06', orderNum: 3, operateCode: '509', tip: 'Left click [confirm] ', val: '01::20::true' },
{ deviceType: '06', orderNum: 4, operateCode: '5091', tip: 'Left click [confirm] ', val: '01::20::true' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0508',
skinCode: '05',
trainingName: 'Set the stop time({10}-{12}The platform)',
trainingRemark: 'Set the stop time (manual, 20 seconds, permanent validity)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: 'Right click to select [Set the stop time]' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: 'Left click to select [manual]', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: 'Set time [20]', val: '20' },
{ deviceType: '06', orderNum: 4, operateCode: '509', tip: 'Left click [confirm] ', val: '02::20::true' },
{ deviceType: '06', orderNum: 5, operateCode: '5091', tip: 'Left click [confirm]', val: '02::20::true' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0508',
skinCode: '05',
trainingName: 'Set the stop time({10}-{12}The platform)',
trainingRemark: 'Set the stop time (manual, 20 seconds, once valid )',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: 'Right click to select [Set the stop time]' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: 'Left click to select [manual]', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: 'Set time [20]', val: '20' },
{ deviceType: '06', orderNum: 4, operateCode: '5093', tip: 'Left click to select "once valid ".', val: 'false' },
{ deviceType: '06', orderNum: 5, operateCode: '509', tip: 'Left click [confirm] ', val: '02::20::false' },
{ deviceType: '06', orderNum: 6, operateCode: '5091', tip: 'Left click [confirm] ', val: '02::20::false' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0509',
skinCode: '05',
trainingName: 'Set Operation speed Level({10}-{12}The platform)',
trainingRemark: 'Set Operation speed Level(set the interval running time to 60, permanent validity)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: 'Right click to select [Set Operation speed Level]' },
{ deviceType: '06', orderNum: 2, operateCode: '5101', tip: 'Left click to select [60]', val: '60' },
{ deviceType: '06', orderNum: 3, operateCode: '510', tip: 'Left click [confirm] ', val: '60::true' },
{ deviceType: '06', orderNum: 4, operateCode: '5102', tip: 'Left click [confirm] ', val: '60::true' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0509',
skinCode: '05',
trainingName: 'Set Operation speed Level({10}-{12}The platform)',
trainingRemark: 'Set Operation speed Level (set the interval running time to 60, once valid )',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: 'Right click to select [Set Operation speed Level]' },
{ deviceType: '06', orderNum: 2, operateCode: '5101', tip: 'Left click to select [60]', val: '60' },
{ deviceType: '06', orderNum: 3, operateCode: '5103', tip: 'Left click to cancel [permanent validity].', val: 'false' },
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: 'Left click [confirm] ', val: '60::false' },
{ deviceType: '06', orderNum: 5, operateCode: '5102', tip: 'Left click [confirm] ', val: '60::false' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0510',
skinCode: '05',
trainingName: 'Set departure in advance({10}-{12}The platform)',
trainingRemark: 'Set departure inadvance function',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '501', tip: 'Right click to select [Set departure in advance]' },
{ deviceType: '06', orderNum: 2, operateCode: '501', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0511',
skinCode: '05',
trainingName: 'Manual return strategy setting({10}-{12}The platform)',
trainingRemark: 'Manual return strategy setting function',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '511', tip: 'Right click to select [Manual return strategy setting]' },
{ deviceType: '06', orderNum: 2, operateCode: '5111', tip: 'Left click to select [No return]".', val: '01' },
{ deviceType: '06', orderNum: 3, operateCode: '511', tip: 'Left click [confirm] ', val: '01' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0401',
skinCode: '05',
trainingName: 'Section fault unlocking({8}{9})',
trainingRemark: 'Fault unlocking',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '402', tip: 'Right click to select [Section fault unlocking]' },
{ deviceType: '03', orderNum: 2, operateCode: '4026', tip: 'Left click [Execute] ' },
{ deviceType: '03', orderNum: 3, operateCode: '4024', tip: 'Left click [ok 1] ' },
{ deviceType: '03', orderNum: 4, operateCode: '4025', tip: 'Left click [ok 2] ' },
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: 'Left click [close] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0402',
skinCode: '05',
trainingName: 'Section resection({8}{9})',
trainingRemark: 'Section resection',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '405', tip: 'Right click to select [Section resection]' },
{ deviceType: '03', orderNum: 2, operateCode: '405', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0403',
skinCode: '05',
trainingName: 'Section activation({8}{9})',
trainingRemark: 'Section activation function',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '406', tip: 'Right click to select [Section activation]' },
{ deviceType: '03', orderNum: 2, operateCode: '406', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0404',
skinCode: '05',
trainingName: 'Axis pre-reset({8}{9})',
trainingRemark: 'Axis pre-reset function',
trainingType: '04',
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '409', tip: 'Right click to select [Axis pre-reset]' },
{ deviceType: '03', orderNum: 2, operateCode: '4091', tip: 'Left click [Execute]' },
{ deviceType: '03', orderNum: 3, operateCode: '4093', tip: 'Left click [confirm1]' },
{ deviceType: '03', orderNum: 4, operateCode: '4094', tip: 'Left click [confirm2]' },
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0405',
skinCode: '05',
trainingName: 'Section blockade({8}{9})',
trainingRemark: 'Section blockade function',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '403', tip: 'Right click to select [Section blockade]' },
{ deviceType: '03', orderNum: 2, operateCode: '403', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0406',
skinCode: '05',
trainingName: 'Section unblockade({8}{9})',
trainingRemark: 'Section unblockade function',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '404', tip: 'Right click to select [Section unblockade]' },
{ deviceType: '03', orderNum: 2, operateCode: '4041', tip: 'Left click [Execute]' },
{ deviceType: '03', orderNum: 3, operateCode: '4043', tip: 'Left click [confirm1]' },
{ deviceType: '03', orderNum: 4, operateCode: '4044', tip: 'Left click [confirm2]' },
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0407',
skinCode: '05',
trainingName: 'Set speed limit on the section({8}{9})',
trainingRemark: 'Set speed limit on the section (speed limit value: 5)',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '407', tip: 'Right click to select [Set speed limit on the section]' },
{ deviceType: '03', orderNum: 2, operateCode: '4076', tip: 'Left click to select [speed limit 5] ', val: '5' },
{ deviceType: '03', orderNum: 3, operateCode: '4071', tip: 'Left click [Execute]' },
{ deviceType: '03', orderNum: 4, operateCode: '4072', tip: 'Left click [confirm]' },
{ deviceType: '03', orderNum: 5, operateCode: '4073', tip: 'Left click [confirm1]' },
{ deviceType: '03', orderNum: 6, operateCode: '4074', tip: 'Left click [confirm2]', val: '5' },
{ deviceType: '03', orderNum: 7, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0408',
skinCode: '05',
trainingName: 'Cancel speed limit on the section({8}{9})',
trainingRemark: 'Cancel speed limit on the section',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '408', tip: 'Right click to select [Cancel speed limit on the section]' },
{ deviceType: '03', orderNum: 2, operateCode: '4081', tip: 'Left click [Execute]' },
{ deviceType: '03', orderNum: 3, operateCode: '4082', tip: 'Left click [confirm] ' },
{ deviceType: '03', orderNum: 4, operateCode: '4083', tip: 'Left click [confirm1]' },
{ deviceType: '03', orderNum: 5, operateCode: '4084', tip: 'Left click [confirm2]', val: '5' },
{ deviceType: '03', orderNum: 6, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0301',
skinCode: '05',
trainingName: 'Single lock of turnout({7})',
trainingRemark: 'Single lock of turnout',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '103', tip: 'Right click to select [Single lock of turnout]' },
{ deviceType: '02', orderNum: 2, operateCode: '103', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0302',
skinCode: '05',
trainingName: 'Single release of turnout({7})',
trainingRemark: 'Single release of turnout',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: 'Right click to select [Single release of turnout]' },
{ deviceType: '02', orderNum: 2, operateCode: '1041', tip: 'Left click [Execute]' },
{ deviceType: '02', orderNum: 3, operateCode: '1043', tip: 'Left click [confirm1] ' },
{ deviceType: '02', orderNum: 4, operateCode: '1044', tip: 'Left click [confirm2] ' },
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: 'Left click [close] '}
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0303',
skinCode: '05',
trainingName: 'Turnout section closure({7})',
trainingRemark: 'Turnout section closure ',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: 'Right click to select [Turnout section closure]' },
{ deviceType: '02', orderNum: 2, operateCode: '105', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0304',
skinCode: '05',
trainingName: 'Turnout section unsealing({7})',
trainingRemark: 'Turnout section unsealing function',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '106', tip: 'Right click to select [Turnout section unsealing]' },
{ deviceType: '02', orderNum: 2, operateCode: '1061', tip: 'Left click [Execute]' },
{ deviceType: '02', orderNum: 3, operateCode: '1063', tip: 'Left click [confirm1]' },
{ deviceType: '02', orderNum: 4, operateCode: '1064', tip: 'Left click [confirm2]' },
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0305',
skinCode: '05',
trainingName: 'Turnout rotation({7})',
trainingRemark: 'Turnout rotation({15}turn{16})',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '107', tip: 'Right click to select [Turnout rotation]' },
{ deviceType: '02', orderNum: 2, operateCode: '107', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 20,
minDuration: 10,
operateType: '0306',
skinCode: '05',
trainingName: 'Turnout section fault unlocking({7})',
trainingRemark: 'Turnout section fault unlocking function',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '109', tip: 'Right click to select [Turnout section fault unlocking]' },
{ deviceType: '02', orderNum: 2, operateCode: '1091', tip: 'Left click [Execute]' },
{ deviceType: '02', orderNum: 3, operateCode: '1093', tip: 'Left click [confirm1]' },
{ deviceType: '02', orderNum: 4, operateCode: '1094', tip: 'Left click [confirm2]' },
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0307',
skinCode: '05',
trainingName: 'Turnout section axile pre reset({7})',
trainingRemark: 'Turnout section axile pre reset function',
trainingType: '03',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '110', tip: 'Right click to select [Turnout section axile pre reset]' },
{ deviceType: '02', orderNum: 2, operateCode: '1101', tip: 'Left click [Execute]' },
{ deviceType: '02', orderNum: 3, operateCode: '1103', tip: 'Left click [confirm1]' },
{ deviceType: '02', orderNum: 4, operateCode: '1104', tip: 'Left click [confirm2]' },
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0308',
skinCode: '05',
trainingName: 'Section resection({7})',
trainingRemark: 'Section resection',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '111', tip: 'Right click to select [Section resection]' },
{ deviceType: '02', orderNum: 2, operateCode: '111', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0309',
skinCode: '05',
trainingName: 'Section activation({7})',
trainingRemark: 'Section activation function',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '112', tip: 'Right click to select [Section activation]' },
{ deviceType: '02', orderNum: 2, operateCode: '112', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0310',
skinCode: '05',
trainingName: 'Set speed limit on the turnout section({7})',
trainingRemark: 'Set speed limit on the section (speed limit value: 5)',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '113', tip: 'Right click to select [Set speed limit on the turnout section]' },
{ deviceType: '02', orderNum: 2, operateCode: '1136', tip: 'Left click to select [speed limit 5] ', val: '5' },
{ deviceType: '02', orderNum: 3, operateCode: '1131', tip: 'Left click [Execute]' },
{ deviceType: '02', orderNum: 4, operateCode: '1132', tip: 'Left click [confirm]' },
{ deviceType: '02', orderNum: 5, operateCode: '1133', tip: 'Left click [confirm1]' },
{ deviceType: '02', orderNum: 6, operateCode: '1134', tip: 'Left click [confirm2]', val: '5' },
{ deviceType: '02', orderNum: 7, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0311',
skinCode: '05',
trainingName: 'Cancel speed limit on the turnout section({7})',
trainingRemark: 'Cancel speed limit on the turnout section',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '114', tip: 'Right click to select [Cancel speed limit on the turnout section]' },
{ deviceType: '02', orderNum: 2, operateCode: '1141', tip: 'Left click [Execute]' },
{ deviceType: '02', orderNum: 3, operateCode: '1142', tip: 'Left click [confirm] ' },
{ deviceType: '02', orderNum: 4, operateCode: '1143', tip: 'Left click [confirm1]' },
{ deviceType: '02', orderNum: 5, operateCode: '1144', tip: 'Left click [confirm2]', val: '5' },
{ deviceType: '02', orderNum: 6, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0201',
skinCode: '05',
trainingName: 'Route selection({3})',
trainingRemark: 'Route selection',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: 'Right click to select [Route selection]' },
{ deviceType: '04', orderNum: 2, operateCode: '3011', tip: 'Left click to select the route name【{3}】', val: '{4}' },
{ deviceType: '04', orderNum: 3, operateCode: '301', tip: 'Left click [confirm] ' },
{ deviceType: '04', orderNum: 4, operateCode: '3012', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0202',
skinCode: '05',
trainingName: 'Cancel the route({3})',
trainingRemark: 'Cancel the route',
trainingType: '02',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: 'Right click to select [Cancel the route]' },
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: 'Left click [confirm] ' },
{ deviceType: '04', orderNum: 3, operateCode: '3031', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0202',
skinCode: '05',
trainingName: 'Cancel the route({3})',
trainingRemark: 'Cancel the route',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: 'Right click to select [Cancel the route]' },
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0203',
skinCode: '05',
trainingName: 'Signal closure({5})',
trainingRemark: 'Signal closure',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: 'Right click to select [Signal closure]' },
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0204',
skinCode: '05',
trainingName: 'Signal unsealing({5})',
trainingRemark: 'Signal unsealing',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '307', tip: 'Right click to select [Signal unsealing]' },
{ deviceType: '04', orderNum: 2, operateCode: '3071', tip: 'Left click [Execute]' },
{ deviceType: '04', orderNum: 3, operateCode: '3072', tip: 'Left click [confirm]' },
{ deviceType: '04', orderNum: 4, operateCode: '3073', tip: 'Left click [confirm1]' },
{ deviceType: '04', orderNum: 5, operateCode: '3074', tip: 'Left click [confirm2]' },
{ deviceType: '04', orderNum: 6, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0205',
skinCode: '05',
trainingName: 'Signal Off({3})',
trainingRemark: 'Signal Off',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '313', tip: 'Right click to select [Signal Off]' },
{ deviceType: '04', orderNum: 2, operateCode: '313', tip: 'Left click [confirm]' },
{ deviceType: '04', orderNum: 3, operateCode: '3131', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0206',
skinCode: '05',
trainingName: 'Signal reopen({3})',
trainingRemark: 'Signal reopen',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: 'Right click to select [Signal reopen]' },
{ deviceType: '04', orderNum: 2, operateCode: '304', tip: 'Left click [confirm]' },
{ deviceType: '04', orderNum: 3, operateCode: '3041', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0207',
skinCode: '05',
trainingName: 'Guide route handling({3})',
trainingRemark: 'Guide route handling',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '308', tip: 'Right click to select [Guide route handling]' },
{ deviceType: '04', orderNum: 2, operateCode: '3081', tip: 'Left click [Execute]' },
{ deviceType: '04', orderNum: 3, operateCode: '3083', tip: 'Left click [confirm1]' },
{ deviceType: '04', orderNum: 4, operateCode: '3084', tip: 'Left click [confirm2]' },
{ deviceType: '04', orderNum: 5, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0208',
skinCode: '05',
trainingName: 'Start automatic routing({5})',
trainingRemark: 'Start automatic routing',
trainingType: '02',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: 'Right click to select [Start automatic routing]' },
{ deviceType: '04', orderNum: 2, operateCode: '3151', tip: 'Left click to select the route based on the manual control state', val: '{6}' },
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0209',
skinCode: '05',
trainingName: 'Close automatic routing({5})',
trainingRemark: 'Close automatic routing',
trainingType: '02',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: 'Right click to select [Close automatic routing]' },
{ deviceType: '04', orderNum: 2, operateCode: '3141', tip: 'Left click to select the first route', val: '{6}' },
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0210',
skinCode: '05',
trainingName: 'Route control status query({5})',
trainingRemark: 'Query the route control status ',
trainingType: '02',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '316', tip: 'Right click to select [Route control status query]' },
{ deviceType: '04', orderNum: 2, operateCode: '316', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0211',
skinCode: '05',
trainingName: 'Set Interlock for Auto Routing({5})',
trainingRemark: 'Set Interlock for Auto Routing',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '309', tip: 'Right click to select [Set Interlock for Auto Routing]' },
{ deviceType: '04', orderNum: 2, operateCode: '309', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0212',
skinCode: '05',
trainingName: 'Cancel Interlock setting for Auto Routing({5})',
trainingRemark: 'Cancel Interlock setting for Auto Routing',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '310', tip: 'Right click to select [Cancel Interlock setting for Auto Routing]' },
{ deviceType: '04', orderNum: 2, operateCode: '310', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0213',
skinCode: '05',
trainingName: 'Set Interlock for Auto Trigger({5})',
trainingRemark: 'Set Interlock for Auto Trigger',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '311', tip: 'Right click to select [Set Interlock for Auto Trigger]' },
{ deviceType: '04', orderNum: 2, operateCode: '311', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0214',
skinCode: '05',
trainingName: 'Cancel Interlock setting for Auto Trigger({5})',
trainingRemark: 'Cancel Interlock setting for Auto Trigger',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '312', tip: 'Right click to select[Cancel Interlock setting for Auto Trigger]' },
{ deviceType: '04', orderNum: 2, operateCode: '312', tip: 'Left click [confirm]' }
]
}
]
};

View File

@ -0,0 +1,316 @@
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan';
export default {
/** 边缘高度*/
EdgeHeight: 600,
/** 间隔高度*/
CoordMultiple: 1,
/** 偏移时间*/
TranslationTime: 60 * 60 * 2,
/** excel解析配置*/
ExcelConfig: {
beginRow: 1,
beginCol: 0,
fieldNum: 6,
sepField: '车次号',
columns: {
'停车站名称': { key: 'stationName', formatter: (val) => { return val; } },
'到达时间': { key: 'arriveTime', formatter: (val) => { return val; } },
'出发时间': { key: 'departureTime', formatter: (val) => { return val; } }
}
},
/** 解析exal数据转换为Json后台数据*/
importData(Sheet, JsonData) {
const dataList = convertSheetToList(Sheet, true);
const needList = Object.keys(this.ExcelConfig.columns);
if (dataList && dataList.length) {
for (let colIndex = this.ExcelConfig.beginCol; colIndex < dataList.length; colIndex += this.ExcelConfig.fieldNum + 1) {
let isContinue = true;
let tripObj = { code: '', arrivalList: [] };
for (let rowIndex = this.ExcelConfig.beginRow; isContinue; rowIndex += 1) {
isContinue = false;
const stationObj = {};
for (let index = 0; index < this.ExcelConfig.fieldNum; index += 1) {
if (dataList[colIndex + index]) {
const title = dataList[colIndex + index][0];
const value = dataList[colIndex + index][rowIndex];
if (title && value) {
// 数据列解析
isContinue = true;
const titleStr = `${title}`.trim();
let valueStr = `${value}`.trim();
if (titleStr == this.ExcelConfig.sepField) {
valueStr = `${dataList[colIndex + index - 1][rowIndex]}${valueStr}`;
if (tripObj.code) {
const length = tripObj.arrivalList.length;
if (length == 1) {
tripObj.arrivalList[0]['flag'] = true;
}
if (valueStr != tripObj.code) {
JsonData.push(tripObj);
tripObj = { code: valueStr, arrivalList: [] };
}
} else {
tripObj.code = valueStr;
}
}
// 取需要的字段
if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) {
stationObj[this.ExcelConfig.columns[titleStr].key] = this.ExcelConfig.columns[titleStr].formatter(valueStr);
}
}
}
}
// 添加字段值
if (Object.keys(stationObj).length) {
tripObj.arrivalList.push(stationObj);
}
}
// 添加最后那条没有车次的记录
if (tripObj.code) {
const length = tripObj.arrivalList.length;
if (length) {
tripObj.arrivalList[length - 1]['flag'] = true;
}
JsonData.push(tripObj);
}
}
}
return JsonData;
},
/** 将后台数据解析成图表*/
convertDataToModels(data, stations, kmRangeCoordMap, lineStyle) {
var models = [];
if (data && data.serviceNumberDataList && data.serviceNumberDataList.length) {
/** 按服务遍历数据*/
data.serviceNumberDataList.forEach((service) => {
/** 按车次遍历数据*/
var isBackup = true;
var opt = { name: '', markPointData: [], data: [] };
if (service.tripNumberDataList && service.tripNumberDataList.length) {
service.tripNumberDataList.forEach((train, j) => {
var pointdata = {};
var idx = 0;
var num = 0;
var lastPoint = null;
var nextPoint = null;
/** 如果车次号为空,不显示名称*/
if (train.tripNumber) {
/** 创建标记点名称和坐标*/
pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode;
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(createMartPoint(pointdata));
/** 创建服务号名称*/
opt.name = `${service.serviceNumber}`;
}
/** 计算非折返点车次点坐标集合*/
train.stationTimeList.forEach((elem, index) => {
idx = index;
if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
index > 0 && index < train.stationTimeList.length - 1) {
const aa = `${train.directionCode}${train.tripNumber}`;
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
}
});
/** 计算折返点车次坐标点集合*/
if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) {
lastPoint = train.stationTimeList[idx - 1];
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
num = this.computedReentryNumber(train.tripNumber);
const aa = `${train.directionCode}${train.tripNumber}`;
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]);
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]);
}
/** 如果是备用车,按车次添加线*/
if (train.backup) {
/** 创建一条完成的服务数据*/
opt.name += j;
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
if (model) {
models.push(model);
opt = { name: '', markPointData: [], data: [] };
}
}
isBackup = train.backup;
});
// 不是备用车,按服务添加线
if (!isBackup) {
/** 创建一条完成的服务数据*/
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
if (model) {
models.push(model);
}
}
}
});
return models;
} else {
return [];
}
},
/** 更新数据并解析成图表*/
updateDataToModels(data, stations, kmRangeCoordMap, runPlanData, series, lineStyle) {
if (data && data.length) {
data.forEach(elem => {
/** 判断此条记录的服务号是否存在*/
if (!runPlanData[elem.serviceNumber]) {
/** 创建一个新服务号标记*/
runPlanData[elem.serviceNumber] = {};
/** 不存在此服务号则需要创建一条新的line*/
series.push(createSeriesModel({
zlevel: 1,
name: `run${elem.serviceNumber}`,
data: [],
markPointData: []
}, Object.assign({ color: hexColor.toCreate() }, lineStyle)));
}
/** 添加数据*/
series.forEach(serie => {
/** 找到服务号所在图数据的位置*/
if (serie.name == `run${elem.serviceNumber}`) {
/** 添加车组号记录标记*/
if (!runPlanData[elem.serviceNumber][elem.tripNumber]) {
runPlanData[elem.serviceNumber][elem.tripNumber] = [];
}
runPlanData[elem.serviceNumber][elem.tripNumber].push(elem);
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
return parseInt(a.secondTime) - parseInt(b.secondTime);
});
/** 如果此记录车组号的数据为第一条时,则打上标签*/
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
serie.markPoint.data.push(createMartPoint({
directionCode: elem.directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.directionCode}${elem.tripNumber}`,
color: lineStyle.color || '#000'
}));
}
/** 计算折返点*/
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
if (serie.data.length > 0) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {
var num = this.computedReentryNumber(elem.tripNumber);
serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[2], num), lastPoint[2]]);
serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[2], num), lastPoint[2]]);
}
}
/** 添加车组号数据到对应的服务图数据中*/
serie.data.push(nextPoint);
/** 保证原始数据排序*/
serie.data.sort((a, b) => {
return parseInt(a[0]) - parseInt(b[0]);
});
}
});
});
}
return series;
},
/** 初始化Y轴*/
initializeYaxis(stations) {
return createMarkLineModels(stations, (elem) => {
return this.EdgeHeight + elem.kmRange * this.CoordMultiple;
});
},
/** 将后台数据转换为试图序列模型*/
convertStationsToMap(stations) {
var map = {};
if (stations && stations.length) {
stations.forEach((elem) => {
map[`${elem.kmRange}`] = this.EdgeHeight + elem.kmRange * this.CoordMultiple;
});
}
return map;
},
/** 计算y轴最小值*/
computedYaxisMinValue(stations) {
return stations[0].kmRange * this.CoordMultiple;
},
/** 计算y轴最大值*/
computedYaxisMaxValue(stations) {
return stations[stations.length - 1].kmRange * this.CoordMultiple + this.EdgeHeight * 2;
},
/** 格式化y轴数据*/
computedFormatYAxis(stations, params) {
var yText = '0m';
stations.forEach(elem => {
if (elem.kmRange < parseInt(params.value) / this.CoordMultiple - this.EdgeHeight) {
yText = Math.floor(elem.kmRange) + 'm';
}
});
return yText;
},
/** 根据是否和上一个车次是否相交,计算下一个车次的折返的高度*/
computedReentryNumber(code) {
return parseInt(code || 1) % 2 ? 1 : 2;
},
/** 根据方向计算y折返偏移量*/
getYvalueByDirectionCode(defaultVlue, directionCode, num) {
if (directionCode === '1') {
defaultVlue -= this.EdgeHeight / 2 * num;
} else if (directionCode === '2') {
defaultVlue += this.EdgeHeight / 2 * num;
}
return defaultVlue;
},
/** 根据elem计算y值*/
getCoordYByElem(stations, kmRangeCoordMap, elem, directionCode, isSpecial, num) {
var defaultVlue = 0;
var station = stations.find(it => { return it.code == elem.stationCode; });
if (station) {
defaultVlue = kmRangeCoordMap[`${station.kmRange}`];
if (isSpecial) {
defaultVlue = this.getYvalueByDirectionCode(defaultVlue, directionCode, num);
}
}
return defaultVlue;
}
};

View File

@ -0,0 +1,403 @@
<template>
<div class="plan-schedule" style="width: 100%">
<title-bar ref="titleBar" @back="back" />
<menu-bar ref="menuBar" :line-code="lineCode" @dispatchDialog="dispatchDialog" />
<schedule ref="schedule" :line-code="lineCode" :group="group" :max-height="height" :max-width="width" />
<status-bar ref="statusBar" :max-top="height" @setPosition="setPosition" />
<manage-plan-list ref="managePlanList" @dispatchDialog="dispatchDialog" />
<create-week-plan ref="createWeekPlan" @reloadTable="reloadTable" />
<create-today-plan ref="createTodayPlan" />
<modifying-plan ref="modifyingPlan" @dispatchDialog="dispatchDialog" />
<add-task ref="addTask" />
<delete-task ref="deleteTask" />
<modifying-task ref="modifyingTask" />
</div>
</template>
<script>
import TitleBar from './titleBar';
import MenuBar from './menuBar';
import StatusBar from './statusBar';
import Schedule from './schedule';
import ManagePlanList from '../menusPlan/managePlanList';
import CreateWeekPlan from '../menusPlan/createWeekPlan';
import CreateTodayPlan from '../menusPlan/createTodayPlan';
import ModifyingPlan from '../menusPlan/modifyingPlan';
import AddTask from '../menusPlan/addTask';
import DeleteTask from '../menusPlan/deleteTask';
import ModifyingTask from '../menusPlan/modifyingTask';
export default {
name: 'Menus',
components: {
TitleBar,
MenuBar,
StatusBar,
Schedule,
ManagePlanList,
CreateWeekPlan,
CreateTodayPlan,
ModifyingPlan,
AddTask,
DeleteTask,
ModifyingTask
},
props: {
group: {
type: String,
required: true
}
},
data() {
return {
};
},
computed: {
lineCode() {
return this.$route.query.lineCode || '02';
},
width() {
return this.$store.state.app.width;
},
height() {
return this.$store.state.app.height;
}
},
methods: {
setPosition() {
this.$nextTick(() => {
this.$refs.schedule.setPosition();
});
},
dispatchDialog(dialogObj) {
this.$nextTick(() => {
if (this.$refs[dialogObj.name]) {
this.$refs[dialogObj.name].doShow(dialogObj.params);
}
});
},
reloadTable(dialogObj) {
if (this.$refs[dialogObj.name]) {
this.$refs[dialogObj.name].reloadTable();
}
},
confirm(params) {
},
back() {
this.$emit('back');
}
}
};
</script>
<style>
.plan-schedule {
position: absolute;
background: gray;
}
.plan-schedule .pop-menu {
background: #F0F0F0;
}
.plan-schedule .pop-menu span {
color: #000;
}
.plan-schedule .system-close {
cursor: pointer;
position: absolute;
right: 0px;
background: -webkit-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -o-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -moz-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid white;
border-radius: 4px;
}
.plan-schedule .system-close::before {
position: absolute;
height: 22px;
line-height: 22px;
top: 0px;
left: 0px;
font-size: x-large;
}
.plan-schedule .pop-menu .is-disabled span {
color: #B4B3B8;
}
.fuzhou-01__schedule {
overflow: hidden !important;
}
.fuzhou-01__schedule .el-dialog {
background: rgba(0, 85, 231, 1);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
border: 2px solid #727375;
border-radius: 4px;
color: #000;
font-size: 14px;
}
.fuzhou-01__schedule .el-dialog .el-dialog__header {
height: 30px;
padding: 5px;
}
.fuzhou-01__schedule .el-dialog .el-dialog__footer {
background: #ECE9D8;
opacity: 1;
}
.fuzhou-01__schedule .el-dialog .el-dialog__body {
padding-top: 10px;
padding-bottom: 10px;
padding-left: 5px;
padding-right: 5px;
margin: 0px 3px 3px 3px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
color: #000;
background: #ECE9D8;
opacity: 1;
}
.fuzhou-01__schedule .el-dialog .el-dialog__title {
font-size: 16px;
}
.fuzhou-01__schedule .el-dialog .el-dialog__headerbtn {
background: -webkit-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -o-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -moz-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid white;
border-radius: 4px;
top: 0px;
right: 3px;
line-height: 26px;
width: 26px;
}
.fuzhou-01__schedule .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.fuzhou-01__schedule .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.fuzhou-01__schedule .el-dialog .el-form {
background: #ECE9D8 !important;
}
.fuzhou-01__schedule .el-dialog .el-card {
background: #ECE9D8 !important;
}
.fuzhou-01__schedule .el-dialog .el-button {
height: 32px;
line-height: 32px;
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 0px !important;
color: #000;
background: #ECE9D8;
}
.fuzhou-01__schedule .el-dialog .expand {
width: 120px;
}
.fuzhou-01__schedule .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.fuzhou-01__schedule .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.fuzhou-01__schedule .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.fuzhou-01__schedule .el-dialog .el-button:disabled span {
border: 0px;
}
.fuzhou-01__schedule .el-dialog .button-group {
margin: 0px 5px;
text-align: center !important;
}
.fuzhou-01__schedule .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.fuzhou-01__schedule .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.fuzhou-01__schedule .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.fuzhou-01__schedule .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.fuzhou-01__schedule .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.fuzhou-01__schedule .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.fuzhou-01__schedule .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.fuzhou-01__schedule .el-dialog .el-table .cell {
line-height: unset !important;
}
.fuzhou-01__schedule .el-dialog .el-table th.is-leaf {
background: #ECE9D8 !important;
border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.fuzhou-01__schedule .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.fuzhou-01__schedule .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.fuzhou-01__schedule .el-dialog .current-row>td {
background: #316AC5 !important;
color: #fff !important;
}
.fuzhou-01__schedule .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.fuzhou-01__schedule .el-dialog .el-checkbox__label {
color: #000 !important;
}
.fuzhou-01__schedule .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.fuzhou-01__schedule .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.fuzhou-01__schedule .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.fuzhou-01__schedule .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute;
-webkit-box-sizing: content-box;
box-sizing: content-box;
content: "";
border: 1px solid #000;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
top: 1px;
}
.fuzhou-01__schedule .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.fuzhou-01__schedule .el-dialog .el-radio__label {
color: #000 !important;
}
.fuzhou-01__schedule .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.fuzhou-01__schedule .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px;
height: 4px;
border-radius: 100%;
background-color: #000 !important;
position: absolute;
left: 50%;
top: 50%;
}
.fuzhou-01__schedule .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.fuzhou-01__schedule .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.fuzhou-01__schedule .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.fuzhou-01__schedule .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.fuzhou-01__schedule .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.fuzhou-01__schedule .el-dialog .table {
margin-top: 10px;
}
.fuzhou-01__schedule .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.fuzhou-01__schedule .el-dialog .button-group {
margin-top: 10px;
}
.fuzhou-01__schedule .el-dialog .el-tree__empty-block {
background: #E9E9E9 !important;
color: #000 !important;
}
</style>

View File

@ -0,0 +1,518 @@
<template>
<div id="PlanMenuBar">
<div class="nav">
<template v-for="(item,i) in menu">
<template v-if="noShowingChildren(item.children)">
<li :key="i" class="nav-li" @click="hookClick(item)">
<span class="nav-li-text">{{ item.title }}</span>
</li>
</template>
<template v-else>
<li :key="i" class="nav-li" @click.stop="popupMenuA(item, i)">
<span class="nav-li-text">{{ item.title }}</span>
<ul class="nav-ul" :class="{'active' :i==classA}">
<template v-for="(child,j) in item.children">
<template
v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)"
>
<li v-if="child.type === 'separator'" :key="j" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li v-else-if="child.type === 'file'" :key="j" class="menu-li">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<el-button type="text" class="button" :disabled="child.disabled">
<input
:ref="child.label"
type="file"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(child)"
>
{{ child.title }}
</el-button>
</span>
</div>
</li>
<li v-else :key="j" class="menu-li" @click.stop="popupMenuB(child, j)">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
<ul class="menu-ul" :class="{'active' :j==classB}">
<template v-for="(grandchild,k) in child.children">
<li v-if="grandchild.type === 'separator'" :key="k" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li v-else-if="grandchild.type === 'file'" :key="k" class="menu-li">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<el-button
type="text"
class="button"
:disabled="grandchild.disabled"
>
<input
:ref="grandchild.label"
type="file"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(grandchild)"
>
{{ grandchild.title }}
</el-button>
</span>
</div>
</li>
<li v-else :key="k" class="menu-li" @click.stop="hookClick(grandchild)">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ grandchild.title }}</span>
</span>
</div>
</li>
</template>
</ul>
</li>
</template>
<template v-else>
<li v-if="child.type === 'separator'" :key="j" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li v-else-if="child.type === 'file'" :key="j" class="menu-li">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<el-button type="text" class="button" :disabled="child.disabled">
<input
:ref="child.title"
type="file"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(child)"
>
{{ child.title }}
</el-button>
</span>
</div>
</li>
<li v-else :key="j" class="menu-li" @click.stop="hookClick(child)">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
</li>
</template>
</template>
</ul>
</li>
</template>
</template>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'PlanMenuBar',
props: {
lineCode: {
type: String,
required: true
}
},
data() {
return {
classA: -1,
classB: -1,
tempClassA: -1,
tempClassB: -1,
menu: [
{
title: this.$t('menu.file'),
children: [
]
},
{
title: this.$t('menu.view'),
children: [
// {
// title: '',
// },
// {
// title: '',
// },
// {
// title: ''
// }
]
},
{
title: this.$t('menu.edit'),
children: [
// {
// title: '',
// click: this.handleEditPlanningTrain
// },
// {
// title: '',
// click: this.handleAddTask
// },
// {
// title: '',
// click: this.handleDeleteTask
// },
// {
// title: '',
// click: this.handleModifyingPlanId
// },
// {
// title: '',
// click: this.handleTranslationalMulTrain
// }
]
},
{
title: this.$t('menu.tool'),
children: [
{
title: this.$t('menu.viewPlanList'),
click: this.handleViewPlanSchedule,
width: 150
},
{
title: this.$t('menu.createAWeekPlan'),
click: this.handleCreateWeekPlan,
width: 150
},
{
title: this.$t('menu.loadTheDayPlan'),
click: this.handleReloadTodayPlan,
width: 150
}
// {
// title: '',
// click: this.handleValidityCheck
// }
]
},
{
title: this.$t('menu.help'),
children: [
]
}
]
};
},
computed: {
...mapGetters('training', [
'mode'
]),
...mapGetters('map', [
'stationList'
])
},
watch: {
tempClassA() {
this.classA = this.$store.state.menuOperation.break ? -1 : this.tempClassA;
},
tempClassB() {
this.classB = this.$store.state.menuOperation.break ? -1 : this.tempClassB;
},
'$store.state.menuOperation.break': function (val) {
if (val) {
this.classA = this.classB = -1;
} else {
this.classA = this.tempClassA;
this.classB = this.tempClassB;
}
}
},
mounted() {
this.initMenu();
},
methods: {
initMenu() {
this.clickEvent();
this.closeMenu();
},
clickEvent() {
const self = this;
window.onclick = function (e) {
self.closeMenu(false);
};
},
noShowingChildren(children) {
if (!children || children.length <= 0) {
return true;
}
return false;
},
hasShowingChildren(children) {
if (children && children.length > 0) {
return true;
}
return false;
},
closeMenu() {
this.classA = this.tempClassA = -1;
this.classB = this.tempClassB = -1;
},
hookClick(item, event) {
this.closeMenu();
// launchFullscreen();
setTimeout(() => {
if (item && typeof item.click == 'function') {
item.click();
}
}, 500);
},
popupMenuA(item, index) {
this.clickEvent();
this.tempClassA = index;
this.tempClassB = -1;
},
popupMenuB(item, index) {
this.tempClassB = index;
},
openLoadFile(item) {
const obj = this.$refs[item.title][0];
if (obj.files) {
const file = obj.files[0];
item.click(file);
obj.value = '';
}
},
doClose() {
this.$nextTick(() => {
EventBus.$emit('closeMenu');
});
},
//
refresh() {
this.closeMenu(true);
EventBus.$emit('refresh');
},
undeveloped() {
this.doClose();
this.$alert(this.$t('menu.achieving'), this.$t('tip.hint'), {
confirmButtonText: this.$t('tip.confirm'),
callback: action => {
}
});
},
//
handleEditPlanningTrain() {
this.$emit('dispatchDialog', { name: 'modifyingPlan' });
},
//
handleAddTask() {
const params = this.$store.state.runPlan.selected;
this.$emit('dispatchDialog', { name: 'addTask', params });
},
//
handleDeleteTask() {
const params = this.$store.state.runPlan.selected;
this.$emit('dispatchDialog', { name: 'deleteTask', params });
},
//
handleModifyingTask() {
const params = this.$store.state.runPlan.selected;
this.$emit('dispatchDialog', { name: 'modifyingTask', params });
},
//
handleModifyingPlanId() {
this.$emit('dispatchDialog', { name: 'modifyingPlanId' });
},
//
handleTranslationalMulTrain() {
this.$emit('dispatchDialog', { name: 'translationalMulTrain' });
},
//
handleViewPlanSchedule() {
this.$emit('dispatchDialog', { name: 'managePlanList' });
},
//
handleCreateWeekPlan() {
this.$emit('dispatchDialog', { name: 'createWeekPlan' });
},
//
handleReloadTodayPlan() {
this.$emit('dispatchDialog', { name: 'createTodayPlan' });
},
//
handleValidityCheck() {
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$top: 25px;
$width: 30px;
$height: 20px;
$menuPadding: 10px;
$menuItemHeight: 30px;
$menuItemWidth: 170px;
$menuItemPadding: 5px;
#PlanMenuBar {
z-index: 10;
position: absolute;
top: $top;
width: 100%;
height: $height;
line-height: $height;
}
.nav {
display: block;
cursor: pointer;
color: #0000;
background: #EBEADB;
list-style: none;
border: 1px solid #B6BCCC !important;
}
.nav-li {
position: relative;
display: inline-block;
padding-left: $menuPadding;
padding-right: $menuPadding;
}
.nav-li:active {
background: #C9D0E1;
border-radius: 4px;
}
.nav-li-text {
font-size: 13px;
color: #000;
text-align: center;
text-decoration: none;
}
.nav-ul {
display: none;
position: absolute;
list-style: none;
border: 1px solid gray;
width: $menuItemWidth;
padding: 0px;
margin: 0px;
}
.menu-ul {
display: none;
list-style: none;
background: #F0F0F0;
line-height: $menuItemHeight;
width: $menuItemWidth;
bottom: $menuItemHeight;
}
.active {
position: absolute;
display: block !important;
}
.menu-ul-text {
font-size: 14px;
color: #000;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
border-left: 1px solid #000;
border-right: 1px solid #000;
}
.menu-separator {
text-align: left;
background: #F0F0F0;
height: 2px;
line-height: 2px;
}
.menu-separator .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
height: 100%;
background: #EFECDE;
}
.menu-separator .separator {
display: inline-block;
background: #CACACA;
margin-left: 5px;
height: 2px;
width: $menuItemWidth - $width - 30px;
}
.menu-li {
text-align: left;
background: #F0F0F0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-block {
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-text {
font-size: 14px;
color: #000;
}
.menu-li-text .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
background: #EFECDE;
}
.menu-li-text .label {
display: inline-block;
margin-left: 5px;
}
.menu-li-text .button {
position: relative;
overflow: hidden;
margin-left: 10px;
line-height: 0px;
width: $menuItemWidth - $width;
top: -$menuItemHeight;
color: #000;
cursor: pointer;
input {
opacity: 0;
cursor: pointer;
position: absolute;
top: 0px;
width: $menuItemWidth - $width - 10px;
}
}
.menu-li-block:hover {
background: #C9DEF7;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
</style>

View File

@ -0,0 +1,482 @@
<template>
<div id="PlanSchedule" :style="{top: top+'px', height: height+'px'}">
<div class="left">
<div :id="runPlanId" />
</div>
<div class="right">
<data-table
ref="serviceTable"
:height="height/2"
:config="serviceNumberConfig"
:style="{top: top-height/2+'px'}"
@touch="scheduleTouch"
/>
<data-table
ref="tripTable"
:height="height/2"
:config="tripNumberConfig"
:style="{top: top-height/2+'px'}"
@touch="trainNumTouch"
/>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date';
import { runDiagramGetTime } from '@/api/simulation';
import DataTable from '../menusPlan/components/dataTable';
import echarts from 'echarts';
export default {
name: 'PlanSchedule',
components: {
DataTable
},
props: {
group: {
type: String,
required: true
},
lineCode: {
type: String,
required: true
},
maxWidth: {
type: Number,
required: true
},
maxHeight: {
type: Number,
required: true
}
},
data() {
return {
top: 0,
height: 0,
heights: [100, 100],
runPlanId: 'plan-schedule-id',
myChart: null,
PlanConvert: {},
serviceNumberConfig: {
data: [],
highlightCurrentRow: true,
handleChange: this.serviceNumberChange,
showClose: false,
columns: [
{
prop: 'serviceNumber',
label: this.$t('menu.serviceNumber')
},
{
width: 40
}
]
},
tripNumberConfig: {
data: [],
highlightCurrentRow: true,
handleChange: this.tripNumberChange,
showClose: false,
columns: [
{
prop: 'tripNumber',
label: this.$t('menu.tripNumber')
},
{
width: 40
}
]
},
realData: {},
kmRangeCoordMap: {},
option: {
title: {
text: '',
left: 'center'
},
grid: {
top: '30px',
left: '120px',
right: '40px',
bottom: '65px',
containLabel: true,
backgroundColor: 'floralwhite'
},
toolbox: {
// right: '30px',
// feature: {
// dataZoom: {
// yAxisIndex: 'none'
// },
// restore: {},
// saveAsImage: {}
// }
},
tooltip: {
axisPointer: {
trigger: 'item',
type: 'cross'
},
formatter: this.axisTooltip,
borderWidth: 1
},
xAxis: [
{
type: 'category',
boundaryGap: false,
data: [],
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
formatter: this.xAxisLableFormat,
textStyle: {
color: '#333'
}
},
axisPointer: {
snap: true,
label: {
formatter: this.xAxisPointFormat,
backgroundColor: 'rgb(255,0,0,0.5)',
color: 'white'
}
}
}
],
yAxis: {
type: 'value',
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
interval: 'auto',
formatter: this.yAxisLableFormat
},
axisPointer: {
xAxisIndex: 'all',
label: {
formatter: this.yAxisPointFormat,
backgroundColor: 'rgb(0,100,0,0.5)',
color: 'white'
}
},
min: 0,
max: 0
},
series: [],
dataZoom: [
{
type: 'inside'
},
{
fiterMode: 'filter',
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
handleSize: '80%',
handleStyle: {
color: '#fff',
shadowBlur: 3,
shadowColor: 'rgba(0, 0, 0, 0.6)',
shadowOffsetX: 2,
shadowOffsetY: 2
},
bottom: '20px'
}
]
},
absoluteTime: 2 * 3600,
indexKmRangeMap: {}
};
},
computed: {
...mapGetters('runPlan', [
'stations'
])
},
watch: {
maxWidth() {
this.setPosition();
},
maxHeight() {
this.setPosition();
},
'$store.state.runPlan.planLoadedCount': async function () {
await this.loadChartPage();
},
'$store.state.runPlan.planSizeCount': function () {
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
},
'$store.state.runPlan.selected.serviceNumber': function (val) {
const index = this.serviceNumberConfig.data.findIndex(elem => {
return elem.serviceNumber == val;
});
this.$refs.serviceTable.setCurrentRow(this.serviceNumberConfig.data[index]);
},
'$store.state.runPlan.selected.tripNumber': function (val) {
const index = this.tripNumberConfig.data.findIndex(elem => {
return elem.tripNumber == val;
});
this.$refs.tripTable.setCurrentRow(this.tripNumberConfig.data[index]);
}
},
mounted() {
this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
},
beforeDestroy() {
this.destroy();
},
methods: {
serviceNumberChange(row) {
if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null });
const serviceObj = this.$store.state.runPlan.editData[row.serviceNumber];
if (serviceObj) {
this.analyticalTripNumber(serviceObj.trainMap);
}
}
},
tripNumberChange(row) {
if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
}
},
async analyticalServiceNumber(data) {
this.serviceNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
.map(serviceNumber => { return { serviceNumber }; });
},
async analyticalTripNumber(data) {
this.tripNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
.map(tripNumber => { return { tripNumber }; });
},
async setPosition() {
this.$nextTick(() => {
let top = 3;
const width = this.maxWidth * 0.85;
let height = this.maxHeight;
const titleBar = document.getElementById('PlanTitleBar');
const menuBar = document.getElementById('PlanMenuBar');
const menuTool = document.getElementById('PlanMenuTool');
const statusBar = document.getElementById('PlanStatusBar');
if (titleBar) {
top += (titleBar.offsetHeight || 0);
}
if (menuBar) {
top += (menuBar.offsetHeight || 0);
}
if (menuTool) {
top += (menuTool.offsetHeight || 0);
}
if (statusBar) {
height -= (statusBar.offsetHeight || 0);
}
height = height - top;
this.$store.dispatch('runPlan/resize', { width, height });
if (this.top != top) {
this.top = top;
}
if (this.height != height) {
this.height = height - 20 * 2;
}
});
},
async loadChartPage() {
try {
let series = [];
const planData = this.$store.state.runPlan.planData || [];
const stations = this.$store.state.runPlan.stations || [];
this.viewDisabled = true;
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
series = this.pushModels(series, [this.PlanConvert.initializeYaxis(stations)]);
series = this.pushModels(series, this.PlanConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { width: 0.5 }));
await this.loadInitData(series);
await this.analyticalServiceNumber(this.$store.state.runPlan.editData);
this.viewDisabled = false;
} catch (error) {
this.viewDisabled = false;
this.$messageBox(this.$t('error.loadingOperationGraphFailed'));
}
},
async loadInitData(series) {
this.myChart && this.myChart.showLoading();
await this.xAxisInit();
await this.yAxisInit();
await this.loadInitChart(series);
this.myChart && this.myChart.hideLoading();
},
pushModels(series, models) {
if (models && models.length) {
models.forEach(elem => {
if (elem) {
series.push(elem);
}
});
}
return series;
},
popModels(series, models) {
if (models && models.length) {
models.forEach(elem => {
const index = series.indexOf(elem);
if (index >= 0) {
series.split(index, 1);
}
});
}
return series;
},
loadInitChart(series) {
return new Promise((resolve, reject) => {
try {
this.destroy();
let startValue = 3600 + this.PlanConvert.TranslationTime;
const offsetTime = 3600;
runDiagramGetTime(this.group).then(resp => {
startValue = resp.data - this.PlanConvert.TranslationTime;
this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
this.option.series = series;
this.myChart = echarts.init(document.getElementById(this.runPlanId));
if (this.myChart) {
this.myChart.setOption(this.option);
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
this.myChart.on('click', this.mouseClick);
}
});
resolve(true);
} catch (error) {
reject(error);
}
});
},
xAxisPointFormat(params) {
return timeFormat(params.value);
},
yAxisPointFormat(params) {
return this.PlanConvert.computedFormatYAxis(this.stations, params);
},
xAxisLableFormat(value, index) {
if (value % 60 === 0) {
return timeFormat(value);
}
},
yAxisLableFormat(value, index) {
return '';
},
xAxisInit() {
const list = [];
for (var time = 0 + this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
list.push(time);
}
const startValue = 3600 * 6;
const offsetTime = 3600 * 1;
this.option.xAxis[0].data = list;
if (!this.option.dataZoom[0].startValue) {
this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
}
if (!this.option.dataZoom[0].endValue) {
this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
}
},
yAxisInit() {
if (Object.keys(this.PlanConvert).length) {
this.option.yAxis.min = this.PlanConvert.computedYaxisMinValue(this.stations);
this.option.yAxis.max = this.PlanConvert.computedYaxisMaxValue(this.stations);
}
},
axisTooltip(param) {
const station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`${this.$t('menu.stationName') + station.name}<br>`,
`${this.$t('menu.stationKilometerMark') + station.kmRange} km <br>`,
`${this.$t('menu.arrivalTime2') + timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
].join('');
},
mouseClick(params) {
const model = {
serviceNumber: params.seriesName
};
this.$store.dispatch('runPlan/setSelected', model);
},
reSize(opt) {
if (this.myChart) {
this.myChart.resize({
width: opt.width,
height: opt.height,
silent: false
});
}
},
destroy() {
if (this.myChart && this.myChart.isDisposed) {
this.myChart.dispose();
this.myChart = null;
}
},
scheduleTouch() {
},
trainNumTouch() {
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
#PlanSchedule {
z-index: 5;
position: absolute;
width: 100%;
.left {
height: 100%;
width: 85%;
float: left;
}
.right {
height: 100%;
width: 15%;
float: right;
}
}
</style>

View File

@ -0,0 +1,107 @@
<template>
<data-table
id="PlanStatusBar"
ref="dataTable"
:height="height-11"
:config="stationListConfig"
:close="false"
:style="{top: maxmini? maxTop-110+'px':maxTop-21+'px'}"
@touch="touch"
/>
</template>
<script>
import DataTable from '../menusPlan/components/dataTable';
import { formatTime, formatName } from '@/utils/runPlan';
export default {
name: 'PlanStatusBar',
components: {
DataTable
},
props: {
maxTop: {
type: Number,
required: true
}
},
data() {
return {
maxmini: true,
height: 100,
stationListConfig: {
data: [],
showClose: true,
highlightCurrentRow: true,
columns: [
{
prop: 'stationName',
label: this.$t('menu.platform'),
width: 400
},
{
prop: 'startTime',
label: this.$t('menu.arrivalTime')
},
{
prop: 'stopTime',
label: this.$t('menu.stopTime')
},
{
prop: 'endTime',
label: this.$t('menu.departureTime')
},
{
prop: 'level',
label: this.$t('menu.runLevel')
}
]
}
};
},
watch: {
'$store.state.runPlan.selected': function (select) {
this.stationListConfig.data = [];
const serviceObj = this.$store.state.runPlan.editData[select.serviceNumber];
if (serviceObj) {
const trainMap = serviceObj.trainMap;
if (trainMap) {
const trainObj = trainMap[select.tripNumber];
if (trainObj) {
const stationTimeList = trainObj.stationTimeList;
if (stationTimeList && stationTimeList.length) {
stationTimeList.forEach((elem, index) => {
const stationObj = {
stationName: formatName(elem.stationCode),
startTime: formatTime(index == 0 ? null : stationTimeList[index - 1].secondTime),
stopTime: formatTime(index == 0 ? null : elem.secondTime - stationTimeList[index - 1].secondTime),
endTime: formatTime(elem.secondTime),
level: ''
};
this.stationListConfig.data.push(stationObj);
});
}
}
}
}
}
},
methods: {
touch(maxmini) {
this.maxmini = maxmini;
this.$emit('setPosition');
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
#PlanStatusBar {
z-index: 5;
position: absolute;
width: 100%;
}
</style>

View File

@ -0,0 +1,75 @@
<template>
<div id="PlanTitleBar">
<img class="logo" :src="logoImg">
<span> {{ mapName }} &ensp;</span>
<span v-if="runPlanName">({{ runPlanName }})</span>
<span class="system-close el-icon-close" @click="back" />
</div>
</template>
<script>
import logo_ from '@/assets/logo_.png';
import { getPublishMapInfo } from '@/api/jmap/map';
export default {
name: 'PlanTitleBar',
data() {
return {
mapName: '',
logoImg: logo_
};
},
computed: {
runPlanName() {
return this.$route.query.planName || '';
}
},
mounted() {
if (this.$route.query.mapId) {
getPublishMapInfo(this.$route.query.mapId).then(resp => {
this.mapName = resp.data.name;
});
}
},
methods: {
back() {
this.$emit('back');
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$width: 25px;
$height: 25px;
#PlanTitleBar {
z-index: 10;
display: flex;
position: absolute;
width: 100%;
height: $height;
line-height: $height;
background: -webkit-linear-gradient(#0055E8, #0099F8);
background: -o-linear-gradient(#0055E8, #0099F8);
background: -moz-linear-gradient(#0055E8, #0099F8);
background: linear-gradient(#0055E8, #0099F8);
color: white;
font: bold;
font-size: 16px;
.logo {
display: inline-block;
width: $width;
height: $height;
padding-right: 5px;
}
.system-close {
width: 25px;
height: 25px;
position: absolute;
right: 1px;
}
}
</style>