desc: 增加成都四号线模型, 修改地图删除逻辑
This commit is contained in:
parent
e86be938f3
commit
d70953a130
@ -1,5 +1,5 @@
|
||||
const mapDeviceStyle = {
|
||||
// '01': 'chengdu_04',
|
||||
'01': 'chengdu_04',
|
||||
'02': 'fuzhou_01',
|
||||
'03': 'bejing_01',
|
||||
'04': 'chengdu_03',
|
||||
|
555
src/jmap/config/skinStyle/chengdu_04.js
Normal file
555
src/jmap/config/skinStyle/chengdu_04.js
Normal file
@ -0,0 +1,555 @@
|
||||
import defaultStyle from '../defaultStyle';
|
||||
import deviceType from '../../constant/deviceType';
|
||||
|
||||
class SkinStyle extends defaultStyle {
|
||||
constructor() {
|
||||
super();
|
||||
this[deviceType.Link] = {
|
||||
lineWidthColor: '#FFFFFF', // line 颜色
|
||||
linkWidth: 4.4, // link 宽度
|
||||
linkColor: '#3F3F3F', // link 线条颜色
|
||||
linkTextColor: '#FFFFFF' // link 字体颜色
|
||||
};
|
||||
|
||||
this[deviceType.Section] = {
|
||||
text: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 10, // 文字离区段距离
|
||||
fontSize: 12, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
logicText: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 12, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
standText: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 24, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
reentryText: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 36, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
transferText: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 36, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
destinationText: {
|
||||
opposite: true, // 对称相反
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 12, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'bold', // 字体粗细
|
||||
fontColor: 'yellow', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
line: {
|
||||
width: 5, // 区段宽度
|
||||
beyondWidth: 0, // 区段宽超出宽度
|
||||
invadeColor: '#FFFFFF', // 区段侵入颜色
|
||||
spareColor: '#5578B6', // 区段空闲颜色
|
||||
communicationOccupiedColor: '#FF00FF', // 区段通信车占用颜色
|
||||
unCommunicationOccupiedColor: '#DE310C', // 区段非通讯车占用颜色
|
||||
routeLockColor: '#FFFFFF', // 区段路由锁定颜色
|
||||
faultLockColor: '#006400', // 区段故障锁定颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#FFFFFF', // 保护区段锁闭
|
||||
blockColor: '#00FF00', // 区段封锁颜色
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
timeReleaseColor: '#3F3F3F', // 区段延时释放颜色
|
||||
protectiveLockColor: '#FFFF00', // 区段保护锁闭
|
||||
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
||||
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
||||
logicalTextColor: '#C0C0C0' // 逻辑区段名称颜色 (未用)
|
||||
},
|
||||
axle: {
|
||||
radius: 3, // 计轴 半径
|
||||
distance: 5, // 计轴和区段之间的距离 (未用)
|
||||
color: '#C0C0C0', // 区段计轴颜色
|
||||
resetColor: '#00FFFF', // 区段计轴预复位颜色
|
||||
Failure: '#E6A23C' // #FFFF00 计轴失效
|
||||
},
|
||||
speedLimit: { // 限速元素
|
||||
width: 1, // 限速线的宽度
|
||||
distance: 5, // 限速线距离区段距离
|
||||
lineColor: '#C0C000', // 限速线颜色 (黄色透明光)
|
||||
nameBackground: '#C0C000', // 限速名称背景颜色
|
||||
nameShow: true, // 名称显示
|
||||
nameNumberColor: '#C00808', // 限速值颜色
|
||||
nameNumberFontSize: 11, // 限速值大小
|
||||
kilometerColor: '#fff', // 公里标颜色
|
||||
kilometerFontSize: 8, // 公里标大小
|
||||
drogueWidth: 19, // 浮标宽度
|
||||
drogueHeight: 12 // 浮标高度
|
||||
},
|
||||
separator: {
|
||||
z: 6, // 分割符层级
|
||||
width: 1.5, // 分隔符宽度
|
||||
endWidth: 1.5, // 尽头分隔符宽度
|
||||
endColor: '#FFFFFF', // 尽头分隔符颜色
|
||||
color: '#FFFFFF' // 区段边界符颜色
|
||||
},
|
||||
shuttleBack: { // 折返进路 (存在此对象 显示折返箭头)
|
||||
distance: 5 // 限速线距离区段距离
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Signal] = {
|
||||
distance: 10, // 设备距离区段的距离
|
||||
post: {
|
||||
standardColor: '#FFFFFF', // 灯柱颜色
|
||||
standardWidth: 2 // 灯柱宽度
|
||||
},
|
||||
text: {
|
||||
distance: 3, // 文字和灯杆的距离
|
||||
isNoRotation: true, // 是否禁止旋转
|
||||
isAlignCenter: false, // 信号字体对其方式
|
||||
fontSize: 11, // 信号机名称字体大小
|
||||
fontWeight: 'bold', // 信号机名称字体粗细
|
||||
defaultColor: '#FFFFFF', // 信号灯字体默认色
|
||||
blockColor: '#EF0C08', // 信号灯字体锁定颜色
|
||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||
},
|
||||
lamp: {
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 2, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
radiusR: 6, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#7F7F7F', // 信号灯灰色
|
||||
redColor: '#FF0000', // 信号灯红色
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
yellowColor: '#FFFF00', // 信号灯黄色
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#0070C0' // 信号灯蓝色
|
||||
},
|
||||
route: {
|
||||
direction: true, // 自动通过方向
|
||||
offset: { x: 4, y: 0}, // 自动通过偏移量
|
||||
routeColor: '#00FF00' // 自动进路
|
||||
},
|
||||
auto: {
|
||||
direction: false, // 自动通过方向
|
||||
offset: { x: -4, y: 0}, // 自动通过偏移量
|
||||
width: 5, // 自动宽度
|
||||
manualControl: '#FFFF00', // 人工控制
|
||||
autoRoute: '#00FF00', // 自动进路
|
||||
autoTrigger: '#FFFF00', // 自动触发
|
||||
outConflict: '#C00808' // 出车冲突
|
||||
},
|
||||
delay: {
|
||||
direction: false, // 延时解锁方向
|
||||
offset: { x: -5, y: 0}, // 延时解锁偏移量
|
||||
fontSize: 11, // 延迟解锁字体大小
|
||||
fontColor: '#C00808', // 延迟解锁颜色
|
||||
fontWeight: 'bold' // 字体粗细
|
||||
|
||||
},
|
||||
button: {
|
||||
distance: 5, // 信号灯按钮距离区段的距离
|
||||
borderDashColor: '#FFFFFF', // 信号灯按钮边线
|
||||
buttonColor: 'darkgreen', // 信号灯按钮颜色
|
||||
buttonLightenColor: '#E4EF50' // 信号灯按钮闪烁颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.StationStand] = {
|
||||
common: { // 通用属性
|
||||
textFontSize: 10, // 站台默认字体大小
|
||||
haveJumpShow: true // 站台是否有列车停跳显示
|
||||
},
|
||||
safetyDoor: { // 屏蔽门
|
||||
height: 3, // 站台屏蔽门高度
|
||||
distance: 8, // 站台和屏蔽门之间的距离
|
||||
defaultColor: '#00FF00', // 屏蔽门默认颜色
|
||||
splitDoorColor: '#C00808' // 屏蔽门切除颜色
|
||||
},
|
||||
stand: { // 站台
|
||||
headFontSize: 10, // 站台首端字体大小
|
||||
spareColor: '#808080', // 站台空闲颜色
|
||||
stopColor: '#FFF000', // 站台列车停站颜色
|
||||
jumpStopColor: '#808080', // 站台跳停颜色
|
||||
designatedJumpStopColor: '#808080' // 站台指定列车跳停颜色
|
||||
},
|
||||
standEmergent: { // 紧急关闭
|
||||
mergentR: 4, // 站台紧急关闭半径
|
||||
offset: {x: 0, y: 40}, // 站台紧急关闭偏移量
|
||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
||||
},
|
||||
reentry: { // 站台折返策略
|
||||
position: 0, // 折返方向
|
||||
offset: {x: -16, y: 20}, // 折返偏移量
|
||||
noHumanColor: '#0F16DA', // 站台无人折返
|
||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
},
|
||||
detainCar: { // 扣车
|
||||
text: '扣', // 扣车显示内容
|
||||
position: -1, // 扣车方向
|
||||
offset: {x: -8, y: -20}, // 扣车偏移量
|
||||
trainColor: '#FFFF00', // 车站扣车颜色
|
||||
centerTrainColor: '#C0C0C0', // 中心扣车颜色
|
||||
andCenterTrainColor: '#C0C0C0', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: {x: -8, y: -4}, // 运行时间偏移量
|
||||
textColor: '#C0C0C0' // 停站时间字体颜色
|
||||
},
|
||||
jump: {
|
||||
text: '跳', // 停跳显示内容
|
||||
position: -1, // 停跳方向
|
||||
offset: {x: -8, y: 0},
|
||||
textColor: '#0000FF', // 停跳文字颜色
|
||||
arcColor: '#0000FF', // 停跳圆圈颜色
|
||||
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
|
||||
r: 8 // 圆半径大小
|
||||
},
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
offset: {x: -8, y: 30}, // 运行等级偏移量
|
||||
textColor: '#FFF000' // 停站等级字体颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.StationControl] = {
|
||||
text: {
|
||||
distance: 2, // 灯和文字之间的距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontFormat: 'consolas', // 字体格式
|
||||
fontColor: '#ffffff', // 字体颜色
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
textAlign: 'middle', // 字体水平对齐
|
||||
textVerticalAlign: 'top' // 字体垂直对齐
|
||||
},
|
||||
lamp: {
|
||||
count: 4, // 控制模式的个数
|
||||
offset: {x: 0, y: 0}, // 偏移量
|
||||
radiusR: 6, // 控制模式灯的半径
|
||||
distance: 36, // 控制模式之间灯之间的距离
|
||||
grayColor: '#7F7F7F', // 控制模式灰色
|
||||
greenColor: '#00FF00', // 控制模式绿色
|
||||
redColor: '#FF0000', // 控制模式红色
|
||||
yellowColor: '#FFFF00' // 控制模式黄色
|
||||
},
|
||||
arrow: {
|
||||
show: true // 控制模式箭头显隐
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.StationCounter] = {
|
||||
text: {
|
||||
distance: 2, // 计数器名称和文字的距离
|
||||
fontColor: '#FFFFFF', // 计数器字体颜色
|
||||
borderColor: '#E4EF50' // 计数器边框颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.StationDelayUnlock] = {
|
||||
text: {
|
||||
distance: 3, // 延迟解锁和设备之间的距离
|
||||
fontColor: '#FFFFFF', // 延时解锁字体颜色
|
||||
borderColor: '#FFFFFF' // 延迟解锁边框颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Station] = {
|
||||
kilometerPosition: 'up' // 公里标朝向
|
||||
};
|
||||
|
||||
this[deviceType.Switch] = {
|
||||
text: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
offset: {x: 5, y: -10}, // 道岔名称与区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
borderColor: '#FE0000', // 道岔边框颜色
|
||||
lossColor: '#C00808', // 道岔失去颜色
|
||||
locateColor: '#00FF00', // 道岔定位颜色
|
||||
inversionColor: '#FFFF00', // 道岔反位颜色
|
||||
monolockColor: '#FFFFFF' // 道岔单锁颜色
|
||||
},
|
||||
core: {
|
||||
length: 6 // 道岔单边长度
|
||||
},
|
||||
monolock: { // 道岔单锁配置
|
||||
locationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
||||
inversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
|
||||
rectShow: true, // 道岔单锁 矩形框是否显示
|
||||
rectWidth: 18, // 矩形框 宽高
|
||||
rectBorderColor: '#fff' // 矩形边框颜色
|
||||
},
|
||||
block: { // 道岔封锁配置
|
||||
nameBorderShow: false, // 道岔名称是否有包围框 显示
|
||||
contentRectShow: true, // 道岔封锁显示
|
||||
contentRectColor: 'red' // 道岔封锁边框颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.LcControl] = {
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#FFFF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.ZcControl] = {
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.LimitControl] = {
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#ECE9D8' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Line] = {
|
||||
lineColor: '#FFFFFF' // 线条颜色
|
||||
};
|
||||
|
||||
this[deviceType.TrainWindow] = {
|
||||
lineColor: '#4DD43F', // 车次窗颜色
|
||||
lineDash: null, // 车次窗虚线间隔
|
||||
lineWidth: 1, // 车次窗线宽
|
||||
trainWindowSmooth: 0 // 车次窗矩形圆滑程度
|
||||
};
|
||||
|
||||
this[deviceType.Train] = {
|
||||
trainBody: {
|
||||
trainBodyLineWidth: 1, // 车身line宽
|
||||
trainBodyOnMouseOver: {
|
||||
train: true,
|
||||
textTrainNumber: false,
|
||||
textTrainServer: false,
|
||||
textTrainTarget: false,
|
||||
textTrainTargetNumber: false
|
||||
}, // 车身鼠标悬浮事件
|
||||
trainBodyOnMouseOut: {
|
||||
train: true,
|
||||
textTrainNumber: false,
|
||||
textTrainServer: false,
|
||||
textTrainTarget: false,
|
||||
textTrainTargetNumber: false
|
||||
}, // 车身鼠标移出事件
|
||||
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||
specialTrainType: [], // 特殊列车类型需设置显示格式
|
||||
lrPadding: 4, // 两边间隔
|
||||
upPadding: 4, // 上边距离
|
||||
trainBodyFillColor: '#000099', // 列车车身填充颜色
|
||||
trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
|
||||
},
|
||||
hsda: {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 4, // HSDA上边距离
|
||||
trainHSDATextFontSize: 9, // 列车HDSA字号
|
||||
textHContent: '扣', // textH文本
|
||||
textSContent: '跳', // textS文本
|
||||
textDContent: '门', // textD文本
|
||||
textAContent: '警' // textA文本
|
||||
},
|
||||
trainNumber: {
|
||||
targetCodePrefix: '000', // 目的地码前缀
|
||||
defaultTargetCode: 'DDD', // 默认目的地码
|
||||
trainTargetTextAlign: 'left', // 目的地码文字显示位置
|
||||
trainNumberOffset: { x: 24, y: 4}// 目的地码偏移量
|
||||
},
|
||||
trainServer: {
|
||||
serviceNumberPrefix: '000', // 服务号(表号)前缀
|
||||
defaultServiceNumber: 'TTT', // 默认服务号(表号)
|
||||
defaultServerNoColor: '#FFFFFF', // 默认服务号状态显示颜色
|
||||
trainServerOffset: { x: 4, y: 4} // 列车服务号偏移
|
||||
},
|
||||
trainTarget: {
|
||||
tripNumberPrefix: '000', // 车次号前缀
|
||||
defaultTripNumber: 'DDD', // 默认车次号2
|
||||
trainTargetOffset: { x: 36, y: 4}, // 列车车次号偏移
|
||||
trainTargetTextAlign: 'right' // 车次号文字显示位置
|
||||
},
|
||||
trainTargetNumber: {
|
||||
trainTargetNumberOffset: {x: 0, y: 0}// 车组号偏移量
|
||||
},
|
||||
trainHead: {
|
||||
trainMoreLength: 0, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
||||
trainHeadTriangleFirst: { x: 7, y: 1}, // 列车车头三角坐标1偏移量
|
||||
trainHeadTriangleSecond: { x: 13, y: 10}, // 列车车头三角坐标2偏移量
|
||||
trainHeadTriangleThird: { x: 7, y: 19}, // 列车车头三角坐标3偏移量
|
||||
trainConntWidth: 3, // 列车竖杠的宽度
|
||||
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
|
||||
trainHeadRectHeight: 20 // 列车车头矩形高度
|
||||
},
|
||||
common: {
|
||||
trainHeight: 20, // 列车高度
|
||||
trainHeadDistance: 4, // 列车和车头之间的间距
|
||||
trainWidth: 48, // 列车长度
|
||||
trainTextFontSize: 12, // 列车字号
|
||||
fontFamily: 'consolas', // 默认字体 族类
|
||||
haveTextHSDA: true, // 是否需创建textHSDA对象
|
||||
haveArrowText: true, // 是否需创建arrowText对象
|
||||
haveTrainBorder: false // 是否需创建trainBorder对象
|
||||
},
|
||||
trainStatusStyle: {
|
||||
defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色
|
||||
destinationStatusSetText: 'trainTarget', // 目的地状态设置的对应哪个text的颜色
|
||||
destinationStatus: [
|
||||
{status: '01', showColor: '#FFFFFF'},
|
||||
{status: '02', showColor: '#00FF00'},
|
||||
{status: '03', showColor: '#A0522D'},
|
||||
{status: '04', showColor: '#FFFF00'}
|
||||
], // 目的地状态 01准点 02早点 03晚点 04头码车
|
||||
serverNoType: [
|
||||
{type: '01', showColor: '#FFFFFF'},
|
||||
{type: '02', showColor: '#FFF000'}
|
||||
], // 服务号状态类型 01显示服务号 计划车 02显示车组号: 头码车与人工车
|
||||
directionType: [
|
||||
{
|
||||
type: '01',
|
||||
lineLShow: true,
|
||||
lineRShow: true,
|
||||
arrowLShow: false,
|
||||
arrowRShow: false
|
||||
},
|
||||
{
|
||||
type: '02',
|
||||
lineLShow: false,
|
||||
lineRShow: true,
|
||||
arrowLShow: false,
|
||||
arrowRShow: true
|
||||
},
|
||||
{
|
||||
type: '03',
|
||||
lineLShow: true,
|
||||
lineRShow: false,
|
||||
arrowLShow: true,
|
||||
arrowRShow: false
|
||||
}
|
||||
], // 列车运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行
|
||||
directionStopType: [
|
||||
{
|
||||
type: '01',
|
||||
lineLShow: false,
|
||||
lineRShow: false
|
||||
},
|
||||
{
|
||||
type: '02',
|
||||
lineLShow: false,
|
||||
lineRShow: true
|
||||
},
|
||||
{
|
||||
type: '03',
|
||||
lineLShow: true,
|
||||
lineRShow: false
|
||||
}
|
||||
], // 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行
|
||||
runModeStatus: [
|
||||
{
|
||||
status: '01',
|
||||
trainLColor: '#FFFFFF',
|
||||
trainRColor: '#FFFFFF'
|
||||
},
|
||||
{
|
||||
status: '02',
|
||||
trainLColor: '#00FF00',
|
||||
trainRColor: '#00FF00'
|
||||
},
|
||||
{
|
||||
status: '03',
|
||||
trainLColor: '#FFFF00',
|
||||
trainRColor: '#FFFF00'
|
||||
},
|
||||
{
|
||||
status: '04',
|
||||
trainLColor: '#A0522D',
|
||||
trainRColor: '#A0522D'
|
||||
},
|
||||
{
|
||||
status: '05',
|
||||
trainLColor: '#A0522D',
|
||||
trainRColor: '#A0522D'
|
||||
}
|
||||
], // 列车运行模式对应车头颜色 01未知 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM 04 限制人工驾驶模式RM 05 非限制人工驾驶模式RM
|
||||
runControlStatus: [
|
||||
{
|
||||
status: '01',
|
||||
hShow: false,
|
||||
sShow: false
|
||||
},
|
||||
{
|
||||
status: '02',
|
||||
hShow: true,
|
||||
sShow: false
|
||||
},
|
||||
{
|
||||
status: '03',
|
||||
hShow: false,
|
||||
sShow: true
|
||||
}
|
||||
], // 设置运行控制状态类型 01正常 02扣车 03停跳
|
||||
doorStatus: [
|
||||
{status: '01', dShow: false},
|
||||
{status: '02', dShow: true}
|
||||
], // 设置车门状态类型 01关门 02开门
|
||||
communicationStatus: [
|
||||
{status: '01', trainColor: '#725A64'},
|
||||
{status: '02', trainColor: '#C0C0C0'}
|
||||
], // 设置通信状态 01正常 02故障
|
||||
alarmStatus: [
|
||||
{status: '01', aShow: false},
|
||||
{status: '02', aShow: true}
|
||||
] // 设置报警状态 01不报警 02报警
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default new SkinStyle();
|
114
src/jmap/theme/default/menus/dialog/routecancel.vue
Normal file
114
src/jmap/theme/default/menus/dialog/routecancel.vue
Normal file
@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<el-dialog class="default__systerm route-cancel" title="取消列车进路" :visible.sync="show" width="360px"
|
||||
:before-close="cancel" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-row>
|
||||
<el-col :span="10" :offset="1">
|
||||
<span>集中站</span>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<span>始端信号机</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10" :offset="1">
|
||||
<el-input v-model="model.stationName" :disabled="true" size="mini"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="model.signalName" :disabled="true" size="mini"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row>
|
||||
<el-row class="botton-group" style="margin-top:20px">
|
||||
<el-col :span="4" :offset="10">
|
||||
<el-button id="route_cancel_1" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="3">
|
||||
<el-button id="route_cancel_0" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'RouteCancel',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
operation: '',
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
signalCode: '',
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operation, selected) {
|
||||
this.model.signalName = '';
|
||||
this.model.stationCode = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.model.signalName = selected.name
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.model.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.model.operation = operation;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
91
src/jmap/theme/default/menus/dialog/routerelieve.vue
Normal file
91
src/jmap/theme/default/menus/dialog/routerelieve.vue
Normal file
@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<el-dialog class="default__systerm" title="人解列车进路" :visible.sync="show" width="420px" label-position="top"
|
||||
:before-close="cancel" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<h3 style="text-align: center;">是否执行人解列车进路命令?</h3>
|
||||
<el-row class="botton-group">
|
||||
<el-col :span="4" :offset="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'RouteCancel',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return OperationEvent.Signal.humanTrainRoute.menu.domId;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Signal.humanTrainRoute.menu.operation
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
</style>
|
171
src/jmap/theme/default/menus/dialog/routesetting.vue
Normal file
171
src/jmap/theme/default/menus/dialog/routesetting.vue
Normal file
@ -0,0 +1,171 @@
|
||||
<template>
|
||||
<el-dialog class="default__systerm route-setting" title="排列进路" :visible.sync="show" width="380px"
|
||||
:before-close="cancel" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<span>集中站</span>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<span>始端信号机</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="model.stationName" :disabled="true" size="mini"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="model.signalName" :disabled="true" size="mini"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<span style="height: 30px; line-height: 30px">进路列表</span>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="6">
|
||||
<el-button :id="domIdChoose" @click="" style="float: right;" size="mini">展开进路预览</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table ref="tempData" :show-header="false" :data="tempData" border style="width: 100%" :height="80"
|
||||
size="mini" @row-click="clickEvent" highlight-current-row>
|
||||
<el-table-column>
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px" :id="scope.row.code">{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'RouteSetting',
|
||||
props: {
|
||||
tempData: {
|
||||
type: Array
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
row: null,
|
||||
model: {
|
||||
operation: '',
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''
|
||||
},
|
||||
domIdConfirm() {
|
||||
return OperationEvent.Signal.arrangementRoute.menu.domId;
|
||||
},
|
||||
domIdChoose() {
|
||||
return OperationEvent.Signal.arrangementRoute.choose.domId
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operation, selected) {
|
||||
this.model.signalName = '';
|
||||
this.model.stationCode = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.model.signalName = selected.name
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.model.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.model.operation = operation;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
clickEvent(row, event, column) {
|
||||
if (row) {
|
||||
this.row = row;
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||
val: this.row.code
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
if (this.row) {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.el-table__row>:hover {
|
||||
background-color: #c0c4cc !important;
|
||||
}
|
||||
|
||||
.current-row>td {
|
||||
background: #e4e3e3 !important;
|
||||
}
|
||||
</style>
|
145
src/jmap/theme/default/menus/dialog/sectioncontrol.vue
Normal file
145
src/jmap/theme/default/menus/dialog/sectioncontrol.vue
Normal file
@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<el-dialog class="default__systerm" title="区段控制" :visible.sync="show" width="420px" :before-close="cancel"
|
||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span style="height:30px; line-height:30px">集中站</span>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-input v-model="model.stationName" :disabled="true" size="mini"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="2">
|
||||
<span style="height:30px; line-height:30px">区段名</span>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-input v-model="model.sectionName" :disabled="true" size="mini"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top:30px">
|
||||
<el-col :offset="1">
|
||||
<el-radio-group v-if="grou1" v-model="model.operation">
|
||||
<el-radio :label="lock" :disabled="true">封锁</el-radio>
|
||||
<el-radio :label="unlock" :disabled="true">解封</el-radio>
|
||||
</el-radio-group>
|
||||
<el-radio-group v-if="grou2" v-model="model.operation">
|
||||
<el-radio :label="active" :disabled="true">激活</el-radio>
|
||||
<el-radio :label="split" :disabled="true">切除</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top:30px">
|
||||
<el-col :span="4" :offset="12">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确 定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'SectionControl',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
domIdConfirm: '',
|
||||
model: {
|
||||
operation: '',
|
||||
stationName: '',
|
||||
sectionName: '',
|
||||
returnCode: '',
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
grou1() {
|
||||
return this.model.operation === this.lock || this.model.operation === this.unlock;
|
||||
},
|
||||
grou2() {
|
||||
return this.model.operation === this.active || this.model.operation === this.split;
|
||||
},
|
||||
lock() {
|
||||
return OperationEvent.Section.lock.menu.operation
|
||||
},
|
||||
unlock() {
|
||||
return OperationEvent.Section.unlock.menu.operation
|
||||
},
|
||||
active() {
|
||||
return OperationEvent.Section.active.menu.operation
|
||||
},
|
||||
split() {
|
||||
return OperationEvent.Section.split.menu.operation
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operation, selected, type) {
|
||||
this.model.sectionName = '';
|
||||
this.model.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
this.model.sectionName = selected.name
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.model.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.model.operation = operation;
|
||||
this.domIdConfirm = getDomIdByOperation(operation);
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: this.model.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
237
src/jmap/theme/default/menus/dialog/sectionfault.vue
Normal file
237
src/jmap/theme/default/menus/dialog/sectionfault.vue
Normal file
@ -0,0 +1,237 @@
|
||||
<template>
|
||||
<el-dialog class="default__systerm" title="区段控制" :visible.sync="show" width="500px" :before-close="cancel"
|
||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="padding: 10px 20px;border: 1px solid lightgray;">
|
||||
<span class="base-label">准备</span>
|
||||
<div style="margin-top: 10px">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-col :span="4" :offset="2">区段</el-col>
|
||||
<el-col :span="12">
|
||||
<el-input :type="type" v-model="model.sectionName" size="mini" :disabled="true"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button id="section_fault_1" size="mini" @click="commitOnce" :disabled="type==='password'">确认
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px">
|
||||
<span class="base-label">确认</span>
|
||||
<div>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-col :span="4" :offset="2">区段</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select id="section_fault_select" v-model="model.name" filterable size="mini"
|
||||
@change="sectionSelectChange" :disabled="type==='text'">
|
||||
<el-option v-for="option in filterSections" :key="option.name" :label="option.name"
|
||||
:value="option.name">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button id="section_fault_2" size="mini" :loading="loading" @click="commit"
|
||||
:disabled="type==='text'">确认</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-row type="flex" justify="left" style="margin-top:20px">
|
||||
<el-col :span="4" :offset="1"> 操作倒计时</el-col>
|
||||
<el-col :span="19">
|
||||
<el-input v-model="model.time" size="mini" readonly="true"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="1"> 状态</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="1" :span="23">
|
||||
<el-input type="textarea" :rows="2" placeholder="" v-model="model.status">
|
||||
</el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="botton-group" style="margin-top:20px">
|
||||
<el-col :span="4" :offset="10">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'SectionFault',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
type: 'text',
|
||||
timeout: 1000,
|
||||
timenum: 30,
|
||||
stepNum: 0,
|
||||
task: null,
|
||||
model: {
|
||||
name: '',
|
||||
sectionName: '',
|
||||
operation: '',
|
||||
status: '',
|
||||
time: 0,
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
lock() {
|
||||
return OperationEvent.Section.lock.menu.operation;
|
||||
},
|
||||
unlock() {
|
||||
return OperationEvent.Section.unlock.menu.operation;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''
|
||||
},
|
||||
...mapGetters('map', [
|
||||
'sectionList'
|
||||
]),
|
||||
filterSections() {
|
||||
let i = 0, list = [];
|
||||
if (this.sectionList) {
|
||||
this.sectionList.forEach(elem => {
|
||||
for (i = 0; i < list.length; i++) {
|
||||
if (list[i].name === elem.name) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i >= list.length) {
|
||||
list.push({ name: elem.name });
|
||||
}
|
||||
});
|
||||
}
|
||||
return list;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
stopTask() {
|
||||
if (this.task) {
|
||||
clearInterval(this.task);
|
||||
}
|
||||
this.task = null;
|
||||
if (this.stepNum < 3) {
|
||||
this.$store.dispatch('training/backSteps', this.stepNum);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.model.name = '';
|
||||
this.model.time = '';
|
||||
this.type = 'text';
|
||||
}
|
||||
},
|
||||
doShow(operation, selected) {
|
||||
this.model.sectionName = '';
|
||||
this.model.sectionCode = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
this.model.sectionName = selected.name;
|
||||
this.model.sectionCode = selected.code;
|
||||
}
|
||||
|
||||
this.stepNum = 0;
|
||||
this.model.operation = operation;
|
||||
this.dialogShow = true;
|
||||
this.stopTask();
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
waitSelectEvent() {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
this.model.time -= 1;
|
||||
if (this.model.time <= 0) {
|
||||
this.stopTask();
|
||||
}
|
||||
}
|
||||
},
|
||||
commitOnce() {
|
||||
this.stepNum = 1;
|
||||
let operate = {
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Section.fault.prepare.operation
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.type = 'password';
|
||||
this.model.time = this.timenum;
|
||||
this.task = setInterval(this.waitSelectEvent, this.timeout);
|
||||
}
|
||||
})
|
||||
},
|
||||
sectionSelectChange(val) {
|
||||
if (this.model.name === this.model.sectionName) {
|
||||
this.stepNum = 2;
|
||||
}
|
||||
|
||||
let operate = {
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Section.fault.select.operation,
|
||||
val: val
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
this.model.status = '';
|
||||
if (this.model.name && this.model.name === this.model.sectionName) {
|
||||
this.stepNum = 3;
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Section.fault.confirm.operation,
|
||||
val: this.model.sectionCode
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.type = 'password';
|
||||
this.stopTask();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
} else {
|
||||
this.model.status = '区段选择错误';
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
119
src/jmap/theme/default/menus/dialog/signalreopen.vue
Normal file
119
src/jmap/theme/default/menus/dialog/signalreopen.vue
Normal file
@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<el-dialog class="default__systerm" title="信号重开" :visible.sync="show" width="360px" :before-close="cancel"
|
||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-form size="small" label-position="top">
|
||||
<el-row>
|
||||
<el-col :span="10" :offset="1">
|
||||
<el-form-item label="集中站">
|
||||
<el-input v-model="model.stationName" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-form-item label="信号机">
|
||||
<el-input v-model="model.signalName" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row class="botton-group" style="margin-top:20px">
|
||||
<el-col :span="4" :offset="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="3">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'SignalReopen',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
domIdConfirm: '',
|
||||
model: {
|
||||
operation: '',
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
signalCode: '',
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operation, selected) {
|
||||
this.model.signalName = '';
|
||||
this.model.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.model.signalName = selected.name
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.model.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.model.operation = operation;
|
||||
this.domIdConfirm = getDomIdByOperation(operation);
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
</style>
|
137
src/jmap/theme/default/menus/dialog/standearlydeparture.vue
Normal file
137
src/jmap/theme/default/menus/dialog/standearlydeparture.vue
Normal file
@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<el-dialog class="default__systerm" title="提前发车" :visible="show" width="420px" :before-close="cancel" :zIndex="2000"
|
||||
:modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span style="height:30px; line-height:30px">集中站</span>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-input v-model="model.stationName" :disabled="true" size="mini"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="2">
|
||||
<span style="height:30px; line-height:30px">站台</span>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-input v-model="model.stationStandName" :disabled="true" size="mini"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top:30px">
|
||||
<el-col :offset="1">
|
||||
<el-radio-group v-model="model.direction">
|
||||
<el-radio :label="upstream" :disabled="true">本站台上行</el-radio>
|
||||
<el-radio :label="downstream" :disabled="true">本站台下行</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top:30px">
|
||||
<el-col :span="4" :offset="12">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确 定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'earlyDeparture',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
trainNoList: [],
|
||||
domIdConfirm: '',
|
||||
model: {
|
||||
direction: '',
|
||||
operation: '',
|
||||
stationName: '',
|
||||
tripNumber: '',
|
||||
stationStandName: '',
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
upstream() {
|
||||
return '02' //方向: 02上行
|
||||
},
|
||||
downstream() {
|
||||
return '01' //方向: 01下行
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operation, selected) {
|
||||
this.model.stationName = '';
|
||||
this.model.stationStandName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.model.stationStandName = selected.name
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.model.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.model.operation = operation;
|
||||
this.domIdConfirm = getDomIdByOperation(operation);
|
||||
this.model.direction = selected.direction;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: this.model.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
</style>
|
242
src/jmap/theme/default/menus/dialog/standjumpstop.vue
Normal file
242
src/jmap/theme/default/menus/dialog/standjumpstop.vue
Normal file
@ -0,0 +1,242 @@
|
||||
<template>
|
||||
<el-dialog class="default__systerm" title="跳停" :visible="show" width="540px" :before-close="cancel" :zIndex="2000"
|
||||
:modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row style="margin-left:10px">
|
||||
<el-col :span="3">
|
||||
<span style="height:30px; line-height:30px">集中站</span>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="model.stationName" :disabled="true" size="mini"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<span style="height:30px; line-height:30px">站台</span>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-input v-model="model.stationStandName" :disabled="true" size="mini"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form label-width="70px" size="mini" style="margin:10px">
|
||||
<el-row style="margin-top: 20px;padding: 10px 20px; border: 2px solid lightgray;">
|
||||
<span class="base-label" style="display:block">范围</span>
|
||||
<el-radio-group v-model="model.val1">
|
||||
<el-form-item label-width="20px">
|
||||
<el-radio :label="upstream" :disabled="model.direction !== '02'">本站台上行跳停</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="20px">
|
||||
<el-radio :label="downstream" :disabled="model.direction !== '01'">本站台下行跳停</el-radio>
|
||||
</el-form-item>
|
||||
</el-radio-group>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio-group id="stand_upDown_choose" v-model="model.val2" @change="upAndDownStreamChange">
|
||||
<el-form-item label-width="20px">
|
||||
<el-radio :label="upstream" :disabled="model.direction !== '02'">指定列车上行跳停</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="20px">
|
||||
<el-radio :label="downstream" :disabled="model.direction !== '01'">指定列车下行跳停</el-radio>
|
||||
</el-form-item>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
<el-col :span="1"></el-col>
|
||||
<el-col :span="13" align="top">
|
||||
<span>车组号</span>
|
||||
<el-select id="stand_trainNo_select" v-model="model.tripNumber" size="mini"
|
||||
@change="trainNoSelectChange">
|
||||
<el-option v-for="option in trainList" :key="option.groupNumber" :label="option.groupNumber"
|
||||
:value="option.groupNumber">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px; padding: 10px 20px; border: 2px solid lightgray;">
|
||||
<span class="base-label">功能</span>
|
||||
<el-form-item label-width="20px">
|
||||
<el-radio-group v-model="model.operation">
|
||||
<el-radio :label="JumpStopSet" :disabled="true">设置</el-radio>
|
||||
<el-radio :label="JumpStopCancel" :disabled="true">取消</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row style="margin-top:20px">
|
||||
<el-col :span="4" :offset="10">
|
||||
<el-button id="stand_jumpstop_1" type="primary" :loading="loading" @click="commit">确 定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'StationStandControl',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
trainList: [],
|
||||
domIdConfirm: '',
|
||||
model: {
|
||||
val1: '',
|
||||
val2: '',
|
||||
tripNumber: '',
|
||||
direction: '',
|
||||
operation: '',
|
||||
stationName: '',
|
||||
stationStandName: '',
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
upstream() {
|
||||
return '02'; //上行
|
||||
},
|
||||
downstream() {
|
||||
return '01'; //下行
|
||||
},
|
||||
JumpStopSet() {
|
||||
return OperationEvent.StationStand.setJumpStop.menu.operation;
|
||||
},
|
||||
JumpStopCancel() {
|
||||
return OperationEvent.StationStand.cancelJumpStop.menu.operation;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'model.val1'(val) {
|
||||
if (val) this.model.val2 = '';
|
||||
},
|
||||
'model.val2'(val) {
|
||||
if (val) this.model.val1 = '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
//转换站台的上下行为列车的上下行
|
||||
//站台上下行direction 01:下行 /02:上行
|
||||
//列车行驶方向directionType 02:上行/ 03:下行
|
||||
let directionType = this.model.direction === '02' ? '02' : '03';
|
||||
this.trainList = this.$store.getters['map/viewTrainListBy'](directionType);
|
||||
|
||||
},
|
||||
doShow(operation, selected) {
|
||||
this.model.stationName = '';
|
||||
this.model.stationStandName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.model.stationStandName = selected.name
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.model.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.model.direction = selected.direction;
|
||||
this.model.operation = operation;
|
||||
this.domIdConfirm = getDomIdByOperation(operation);
|
||||
this.model.val1 = this.selected.direction //站台的上下行方向, 01:下行 /02:上行
|
||||
this.model.val2 = '';
|
||||
this.model.tripNumber = '';
|
||||
|
||||
/** 加载列车数据*/
|
||||
this.loadInitData(this.map);
|
||||
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
upAndDownStreamChange(val) {
|
||||
let operation = this.val2 == this.JumpStopSet ?
|
||||
OperationEvent.StationStand.setJumpStop.choose.operation : OperationEvent.StationStand.cancelJumpStop.choose.operation;
|
||||
let operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: operation,
|
||||
val: val
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
trainNoSelectChange(val) {
|
||||
let operation = this.val2 == this.JumpStopSet ?
|
||||
OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
|
||||
let operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: operation,
|
||||
val: val
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let val = this.model.val1;
|
||||
if (this.model.val2) {
|
||||
val = this.model.val2 + '::' + this.model.tripNumber;
|
||||
}
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: this.model.operation,
|
||||
val: val
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
</style>
|
151
src/jmap/theme/default/menus/dialog/switchcontrol.vue
Normal file
151
src/jmap/theme/default/menus/dialog/switchcontrol.vue
Normal file
@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<el-dialog class="default__systerm" title="道岔控制" :visible="show" width="420px" :before-close="cancel" :zIndex="2000"
|
||||
:modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-form label-width="70px" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="3" :offset="1">
|
||||
<span style="height:30px; line-height:30px">集中站</span>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-input v-model="model.stationName" :disabled="true" size="mini"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="2">
|
||||
<span style="height:30px; line-height:30px">道岔</span>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-input v-model="model.switchName" :disabled="true" size="mini"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 30px;">
|
||||
<el-col :offset="1">
|
||||
<el-radio-group v-if="group1" v-model="model.operation">
|
||||
<el-radio :label="lock" :disabled="true">单锁</el-radio>
|
||||
<el-radio :label="unlock" :disabled="true">解锁</el-radio>
|
||||
</el-radio-group>
|
||||
<el-radio-group v-if="group2" v-model="model.operation">
|
||||
<el-radio :label="locate" :disabled="true">道岔定位</el-radio>
|
||||
<el-radio :label="reverse" :disabled="true">道岔反位</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row style="margin-top: 30px;">
|
||||
<el-col :span="4" :offset="12">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确 定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'SwitchControl',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
domIdConfirm: '',
|
||||
model: {
|
||||
operation: '',
|
||||
stationName: '',
|
||||
switchName: '',
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
group1() {
|
||||
return this.model.operation === this.lock || this.model.operation === this.unlock;
|
||||
},
|
||||
group2() {
|
||||
return this.model.operation === this.locate || this.model.operation === this.reverse;
|
||||
},
|
||||
lock() {
|
||||
return OperationEvent.Switch.lock.menu.operation;
|
||||
},
|
||||
unlock() {
|
||||
return OperationEvent.Switch.unlock.menu.operation;
|
||||
},
|
||||
locate() {
|
||||
return OperationEvent.Switch.locate.menu.operation;
|
||||
},
|
||||
reverse() {
|
||||
return OperationEvent.Switch.reverse.menu.operation;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operation, selected) {
|
||||
this.model.switchName = '';
|
||||
this.model.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
this.model.switchName = selected.name
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.model.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.model.operation = operation;
|
||||
this.domIdConfirm = getDomIdByOperation(operation);
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: this.model.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
</style>
|
135
src/jmap/theme/default/menus/dialog/traincreate.vue
Normal file
135
src/jmap/theme/default/menus/dialog/traincreate.vue
Normal file
@ -0,0 +1,135 @@
|
||||
<template>
|
||||
<el-dialog class="default__systerm" title="设置列车" :visible.sync="show" width="420px" label-position="top"
|
||||
:before-close="cancel" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-form :model="formModel" size="small" label-width="100px">
|
||||
<el-form-item label="列车:" prop="trainCode">
|
||||
<el-select v-model="formModel.trainCode" filterable placeholder="列车">
|
||||
<el-option v-for="item in trainList" :key="item.code" :label="item.groupNumber" :value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="列车车次:" prop="tripNumber">
|
||||
<el-select v-model="formModel.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>
|
||||
<el-row class="botton-group">
|
||||
<el-col :span="4" :offset="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
import { getPublishMapTrainNos } from '@/api/runplan';
|
||||
|
||||
export default {
|
||||
name: 'RouteCancel',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
trainList: [],
|
||||
trainNoList: [],
|
||||
formModel: {
|
||||
trainCode: '',
|
||||
tripNumber: ''
|
||||
},
|
||||
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;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (Object.keys(map || {}).length) {
|
||||
getPublishTrainList(map.skinStyle).then(response => {
|
||||
this.trainList = response.data;
|
||||
}).catch(error => {
|
||||
this.$messageBox(`获取列车列表失败`);
|
||||
})
|
||||
|
||||
getPublishMapTrainNos(map.skinStyle).then(response => {
|
||||
this.trainNoList = response.data;
|
||||
}).catch(error => {
|
||||
this.$messageBox(`获取列车车次失败`);
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(operation, selected) {
|
||||
this.dialogShow = true;
|
||||
this.selected = selected;
|
||||
|
||||
/** 加载列车数据*/
|
||||
this.loadInitData(this.map);
|
||||
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
||||
val: '' + this.formModel.tripNumber + '::' + this.formModel.trainCode
|
||||
}
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
251
src/jmap/theme/default/menus/index.vue
Normal file
251
src/jmap/theme/default/menus/index.vue
Normal file
@ -0,0 +1,251 @@
|
||||
<template>
|
||||
<div class="menus">
|
||||
<menu-cancel ref="menuCancel"></menu-cancel>
|
||||
<template v-if="!isShowAll">
|
||||
<menu-button ref="menuButton"></menu-button>
|
||||
<menu-station-control ref="menuStationControl" :selected="selected"></menu-station-control>
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected"></menu-station-stand>
|
||||
<menu-switch ref="menuSwitch" :selected="selected"></menu-switch>
|
||||
<menu-signal ref="menuSignal" :selected="selected"></menu-signal>
|
||||
<menu-section ref="menuSection" :selected="selected"></menu-section>
|
||||
<menu-train ref="menuTrain" :selected="selected"></menu-train>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuButton from './menuButton';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuStationControl from './menuStationControl';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
|
||||
export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuCancel,
|
||||
MenuButton,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
MenuStationControl,
|
||||
MenuStationStand,
|
||||
MenuTrain,
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isShowAll() {
|
||||
return this.$route.params.mode == 'dp'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch('config/updateMenuBar');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.menus {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.menus .pop-menu {
|
||||
background: #F4F4F4;
|
||||
}
|
||||
|
||||
.menus .pop-menu span {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.menus .pop-menu .is-disabled span {
|
||||
color: #B4B3B8;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog {
|
||||
background: #FFFFFF;
|
||||
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
|
||||
border: 1px solid #C3C3C3;
|
||||
border-radius: 4px;
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-dialog__header {
|
||||
height: 40px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-dialog__footer {
|
||||
background: #FFFFFF;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-dialog__body {
|
||||
padding: 20px 10px 20px 10px;
|
||||
margin: 10px;
|
||||
border: 2px solid #C3C3C3;
|
||||
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
|
||||
color: #000;
|
||||
background: #FFFFFF;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-dialog__title {
|
||||
margin-left: 10px;
|
||||
font-size: 16px;
|
||||
background: rgba(226, 226, 226, 0.5);
|
||||
}
|
||||
|
||||
.default__systerm .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-left: 2px solid rgba(120, 121, 123, 0.5);
|
||||
border-right: 2px solid rgba(120, 121, 123, 0.5);
|
||||
border-bottom: 2px solid rgba(120, 121, 123, 0.5);
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
top: 0px;
|
||||
right: 3px;
|
||||
line-height: 22px;
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-button {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding: 0px;
|
||||
width: 80px;
|
||||
border: 1px solid #B9B9B9;
|
||||
border-radius: 4px !important;
|
||||
color: #000;
|
||||
background: #F0F0F0;
|
||||
background: -webkit-linear-gradient(#FFFFFF, #DEDEDE);
|
||||
background: -o-linear-gradient(#FFFFFF, #DEDEDE);
|
||||
background: -moz-linear-gradient(#FFFFFF, #DEDEDE);
|
||||
background: linear-gradient(#FFFFFF, #DEDEDE);
|
||||
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-button:focus span {
|
||||
border: 1px dashed gray;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-button:active {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
|
||||
.default__systerm .el-dialog .el-button:disabled {
|
||||
border: 2px outset #E2E2E2;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-button:disabled span {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
|
||||
.default__systerm .el-dialog .el-input {
|
||||
border: 1px solid #B9B9B9;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-input .el-input__inner {
|
||||
color: #000;
|
||||
background: #F0F0F0;
|
||||
border: 0px;
|
||||
border-radius: 0px !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-textarea {
|
||||
border: 1px solid #B9B9B9;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-textarea .el-textarea__inner {
|
||||
color: #000;
|
||||
background: #F0F0F0;
|
||||
border: 0px;
|
||||
border-radius: 0px !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-table {
|
||||
border: 1px solid #B9B9B9;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-table th.is-leaf {
|
||||
background: #F0F0F0 !important;
|
||||
border-right: 1px solid #BDBDBD !important;
|
||||
border-bottom: 1px solid #BDBDBD !important;
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-table tr td {
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-table__row>:hover {
|
||||
background-color: #c0c4cc !important;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .current-row>td {
|
||||
background: #e4e3e3 !important;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -15px;
|
||||
top: -18px;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-form-item label {
|
||||
font-weight: normal !important;
|
||||
color: #000 !important;
|
||||
padding: 0px 0px 5px;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .el-row {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .context {
|
||||
height: 160px;
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .table {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .notice {
|
||||
margin-left: 62px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.default__systerm .el-dialog .button-group {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
305
src/jmap/theme/default/menus/menuButton.vue
Normal file
305
src/jmap/theme/default/menus/menuButton.vue
Normal file
@ -0,0 +1,305 @@
|
||||
<template>
|
||||
<div class="menu" style="height: 45px;" :style="{left: point.x+'px', top: point.y+'px' }" v-if="!isScreen">
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id='Signal.arrangementRoute.button.domId' @click="buttonDown(Signal.arrangementRoute.button.operation)">
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>进</b>
|
||||
<b>路</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>建</b>
|
||||
<b>立</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id="Signal.cancelTrainRoute.button.operation"
|
||||
@click="buttonDown(Signal.cancelTrainRoute.button.operation)">
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>总</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>取</b>
|
||||
<b>消</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id="Signal.reopenSignal.button.operation" @click="buttonDown(Signal.reopenSignal.button.operation)">
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>信</b>
|
||||
<b>号</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>重</b>
|
||||
<b>开</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id="Signal.humanTrainRoute.button.operation" @click="buttonDown(Signal.humanTrainRoute.button.operation)">
|
||||
<span style="color: red">
|
||||
<center>
|
||||
<b>总</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>人</b>
|
||||
<b>解</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}" id="mbm_05"
|
||||
@click="buttonDown('mbm_05')">
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>引</b>
|
||||
<b>导</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>按</b>
|
||||
<b>钮</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}" id="mbm_06"
|
||||
@click="buttonDown('mbm_06')">
|
||||
<span style="color: red">
|
||||
<center>
|
||||
<b>引</b>
|
||||
<b>导</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>总</b>
|
||||
<b>锁</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px',backgroundColor:buttonUpColor}"
|
||||
:id="Switch.locate.button.operation" @click="buttonDown(Switch.locate.button.operation)">
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>道</b>
|
||||
<b>岔</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>总</b>
|
||||
<b>定</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id="Switch.reverse.button.operation" @click="buttonDown(Switch.reverse.button.operation)">
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>道</b>
|
||||
<b>岔</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>总</b>
|
||||
<b>反</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id="Switch.lock.button.operation" @click="buttonDown(Switch.lock.button.operation)">
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>道</b>
|
||||
<b>岔</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>单</b>
|
||||
<b>锁</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id="Switch.unlock.button.operation" @click="buttonDown(Switch.unlock.button.operation)">
|
||||
<span style="color: red">
|
||||
<center>
|
||||
<b>道</b>
|
||||
<b>岔</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>解</b>
|
||||
<b>锁</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}" id="mbm_11"
|
||||
@click="buttonDown('mbm_11')">
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b style="color:deepskyblue">功</b>
|
||||
<b style="color:burlywood">能</b>
|
||||
</center>
|
||||
<center>
|
||||
<b style="color: red">按</b>
|
||||
<b style="color:forestgreen">钮</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}" id="mbm_12"
|
||||
@click="buttonDown('mbm_12')">
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>封</b>
|
||||
<b>锁</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>按</b>
|
||||
<b>钮</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { getDomOffset } from '@/utils/index';
|
||||
|
||||
export default {
|
||||
name: 'MapButtonMenu',
|
||||
data() {
|
||||
return {
|
||||
__type: 'mbm',
|
||||
point: {
|
||||
x: -1000,
|
||||
y: -1000
|
||||
},
|
||||
operation: '0',
|
||||
buttonName: '',
|
||||
buttonDownColor: '#A8A8A8',
|
||||
buttonUpColor: '#DCDCDC',
|
||||
width: 58,
|
||||
tempData: null,
|
||||
offset: {},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
Switch() {
|
||||
return OperationEvent.Switch;
|
||||
},
|
||||
Signal() {
|
||||
return OperationEvent.Signal;
|
||||
},
|
||||
isScreen() { // 大屏隐藏所有菜单
|
||||
return this.$route.params.mode === 'dp'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.config.canvasOffsetCount': function (val) {
|
||||
this.resetPosition();
|
||||
},
|
||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||
this.updateButtonShow(val, old);
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function (val) {
|
||||
this.selectedChange();
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.resetPosition();
|
||||
},
|
||||
methods: {
|
||||
resetPosition() {
|
||||
this.$nextTick(() => {
|
||||
let canvasOffset = this.$store.state.config.canvasOffset;
|
||||
this.point = {
|
||||
x: canvasOffset.x + 20,
|
||||
y: canvasOffset.y + this.$store.state.config.height - 65
|
||||
}
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
updateButtonShow(val, old) {
|
||||
if (old) {
|
||||
// 恢复旧按钮显示
|
||||
let domId = getDomIdByOperation(old);
|
||||
let dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = false;
|
||||
dom.style.backgroundColor = this.buttonUpColor;
|
||||
}
|
||||
}
|
||||
if (val) {
|
||||
// 新按钮按下效果
|
||||
let domId = getDomIdByOperation(val);
|
||||
let dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = true;
|
||||
dom.style.backgroundColor = this.buttonDownColor;
|
||||
}
|
||||
}
|
||||
},
|
||||
buttonDown(operation) {
|
||||
if (!this.$store.state.menuOperation.buttonOperation) {
|
||||
let operate = {
|
||||
type: 'mbm',
|
||||
operation: operation
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', operation);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
selectedChange() {
|
||||
// 按钮按下时
|
||||
if (this.$store.state.menuOperation.buttonOperation) {
|
||||
let model = this.$store.state.menuOperation.selected;
|
||||
if (model && model._type) {
|
||||
let deviceType = MapDeviceType[model._type];
|
||||
if (deviceType && deviceType.type) {
|
||||
let operate = {
|
||||
send: true,
|
||||
model: model,
|
||||
code: model.code,
|
||||
type: deviceType.type,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
tempData: this.tempData
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
if (response) {
|
||||
this.tempData = response.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
$bg: #fff;
|
||||
$hoverBg: #f5f7fa;
|
||||
|
||||
.menu {
|
||||
background-color: $bg;
|
||||
position: fixed;
|
||||
border: 1px solid gray;
|
||||
z-index: 1000;
|
||||
display: block;
|
||||
|
||||
.dsp-block {
|
||||
display: block;
|
||||
text-align: center;
|
||||
border-radius: unset;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dsp-block:hover {
|
||||
background-color: $hoverBg;
|
||||
}
|
||||
}
|
||||
</style>
|
119
src/jmap/theme/default/menus/menuCancel.vue
Normal file
119
src/jmap/theme/default/menus/menuCancel.vue
Normal file
@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import OperateHandler from '@/scripts/plugin/trainingOperateHandler';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
|
||||
export default {
|
||||
name: 'CancelMenu',
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuTrain: [
|
||||
{
|
||||
label: '命令下达',
|
||||
handler: this.commandSend,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
label: '命令清除',
|
||||
handler: this.commandClear,
|
||||
disabled: true
|
||||
}
|
||||
],
|
||||
menuScreen: [
|
||||
{
|
||||
label: '放大地图',
|
||||
handler: this.magnifyMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '缩小地图',
|
||||
handler: this.shrinkMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '返回',
|
||||
handler: this.back,
|
||||
disabled: false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isScreen() { // 大屏隐藏所有菜单
|
||||
return this.$route.params.mode === 'dp'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||
if (!this.isScreen && this.menu && this.menu.length > 1) {
|
||||
this.menu[0].disabled = (this.menu[0] && val) ? true : true;
|
||||
this.menu[1].disabled = (this.menu[1] && val) ? false : true;
|
||||
}
|
||||
},
|
||||
'$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() {
|
||||
let self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.menu = [];
|
||||
this.clickEvent();
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
if (this.isScreen) {
|
||||
this.menu = [...this.menu, ...this.menuScreen];
|
||||
} else {
|
||||
this.menu = [...this.menu, ...this.menuTrain];
|
||||
}
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
commandClear() {
|
||||
OperateHandler.cleanOperates(); // 清空提示信息
|
||||
this.$store.dispatch('menuOperation/reset');
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: false });
|
||||
},
|
||||
commandSend() {
|
||||
|
||||
},
|
||||
// 放大地图
|
||||
magnifyMap() {
|
||||
this.$store.dispatch('menuOperation/handleMagnifyCount');
|
||||
},
|
||||
// 缩小地图
|
||||
shrinkMap() {
|
||||
this.$store.dispatch('menuOperation/handleShrinkCount');
|
||||
},
|
||||
// 返回
|
||||
back() {
|
||||
history.go(-1);
|
||||
exitFullscreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
357
src/jmap/theme/default/menus/menuSection.vue
Normal file
357
src/jmap/theme/default/menus/menuSection.vue
Normal file
@ -0,0 +1,357 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<section-fault ref="sectionfault"></section-fault>
|
||||
<section-control ref="sectionControl"></section-control>
|
||||
<train-create ref="trainCreate"></train-create>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionFault from './dialog/sectionfault';
|
||||
import SectionControl from './dialog/sectioncontrol';
|
||||
import TrainCreate from './dialog/traincreate';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledStatus, menuConvert } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SectionFault,
|
||||
SectionControl,
|
||||
TrainCreate
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [
|
||||
{
|
||||
label: '封锁',
|
||||
handler: this.lock,
|
||||
disabledCallback: MenuDisabledStatus.Section.lock
|
||||
},
|
||||
{
|
||||
label: '解禁',
|
||||
handler: this.unlock,
|
||||
disabledCallback: MenuDisabledStatus.Section.unlock
|
||||
},
|
||||
{
|
||||
label: '区故解',
|
||||
handler: this.fault,
|
||||
disabledCallback: MenuDisabledStatus.Section.fault
|
||||
},
|
||||
{
|
||||
label: '区段跟踪激活',
|
||||
handler: this.active,
|
||||
disabledCallback: MenuDisabledStatus.Section.active
|
||||
},
|
||||
{
|
||||
label: '区段跟踪切除',
|
||||
handler: this.split,
|
||||
disabledCallback: MenuDisabledStatus.Section.split
|
||||
},
|
||||
{
|
||||
label: '确认计轴有效',
|
||||
handler: this.sureAxleEffective,
|
||||
disabledCallback: MenuDisabledStatus.Section.sureAxleEffective
|
||||
},
|
||||
{
|
||||
label: '设置临时限速',
|
||||
handler: this.setTemporarySpeedLimit,
|
||||
disabledCallback: MenuDisabledStatus.Section.setTemporarySpeedLimit
|
||||
},
|
||||
{
|
||||
label: '查看设备状态',
|
||||
handler: this.viewDeviceStatus,
|
||||
disabledCallback: MenuDisabledStatus.Section.viewDeviceStatus
|
||||
}
|
||||
],
|
||||
menuAdmin: [
|
||||
{
|
||||
label: '新建列车',
|
||||
handler: this.newTrain,
|
||||
disabledCallback: MenuDisabledStatus.Section.newTrain
|
||||
},
|
||||
{
|
||||
label: '空闲',
|
||||
handler: this.spare,
|
||||
disabledCallback: MenuDisabledStatus.Section.spare
|
||||
},
|
||||
{
|
||||
label: '故障锁闭',
|
||||
handler: this.faultLock,
|
||||
disabledCallback: MenuDisabledStatus.Section.faultLock
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
disabledCallback: MenuDisabledStatus.Section.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
disabledCallback: MenuDisabledStatus.Section.cancelStoppage
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
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();
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
},
|
||||
initMenu() {
|
||||
//第一层设置
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = this.menuAdmin;
|
||||
} else {
|
||||
this.menu = this.menuNormal;
|
||||
}
|
||||
|
||||
//第二层拼接
|
||||
if (this.mode === TrainingMode.EDIT) {
|
||||
this.menu = [...this.menu, ...this.menuForce]
|
||||
}
|
||||
|
||||
//故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
//设置故障
|
||||
setStoppage() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
label: MapDeviceType.Section.label,
|
||||
operation: OperationEvent.Section.stoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
//取消故障
|
||||
cancelStoppage() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
label: MapDeviceType.Section.label,
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
//解锁
|
||||
lock() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
label: MapDeviceType.Section.label,
|
||||
operation: OperationEvent.Section.lock.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(operate.operation, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//封锁
|
||||
unlock() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
label: MapDeviceType.Section.label,
|
||||
operation: OperationEvent.Section.unlock.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(operate.operation, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//区故解
|
||||
fault() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
label: MapDeviceType.Section.label,
|
||||
operation: OperationEvent.Section.fault.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionfault.doShow(operate.operation, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//区段跟踪激活
|
||||
active() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
label: MapDeviceType.Section.label,
|
||||
operation: OperationEvent.Section.active.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(operate.operation, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//区段跟踪切除
|
||||
split() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
label: MapDeviceType.Section.label,
|
||||
operation: OperationEvent.Section.split.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(operate.operation, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//确认计轴有效
|
||||
sureAxleEffective() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
},
|
||||
//设置临时限速
|
||||
setTemporarySpeedLimit() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
},
|
||||
//查看设备状态
|
||||
viewDeviceStatus() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
},
|
||||
//新建列车
|
||||
newTrain() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
label: MapDeviceType.Section.label,
|
||||
operation: OperationEvent.Section.newtrain.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainCreate.doShow(operate.operation, this.selected);
|
||||
}
|
||||
})
|
||||
},
|
||||
//空闲
|
||||
spare() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Section.type,
|
||||
// label: MapDeviceType.Section.label,
|
||||
// operation: OperationEvent.Section.split.menu.operation
|
||||
// };
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainCreate.doShow(operate.operation, this.selected);
|
||||
// }
|
||||
// })
|
||||
},
|
||||
//故障解锁
|
||||
faultLock() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Section.type,
|
||||
// label: MapDeviceType.Section.label,
|
||||
// operation: OperationEvent.Section.split.menu.operation
|
||||
// };
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainCreate.doShow(operate.operation, this.selected);
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
351
src/jmap/theme/default/menus/menuSignal.vue
Normal file
351
src/jmap/theme/default/menus/menuSignal.vue
Normal file
@ -0,0 +1,351 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<route-setting ref="routeSetting" :tempData="tempData"></route-setting>
|
||||
<route-cancel ref="routeCancel"></route-cancel>
|
||||
<route-relieve ref="routeRelieve"></route-relieve>
|
||||
<signal-reopen ref="signalReopen"></signal-reopen>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import RouteSetting from './dialog/routesetting';
|
||||
import RouteCancel from './dialog/routecancel';
|
||||
import RouteRelieve from './dialog/routerelieve';
|
||||
import SignalReopen from './dialog/signalreopen';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledStatus, menuConvert } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
RouteSetting,
|
||||
RouteCancel,
|
||||
RouteRelieve,
|
||||
SignalReopen
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
menu: [],
|
||||
menuNormal: [
|
||||
{
|
||||
label: '排列进路',
|
||||
handler: this.arrangementRoute,
|
||||
disabledCallback: MenuDisabledStatus.Signal.arrangementRoute
|
||||
},
|
||||
{
|
||||
label: '取消列车进路',
|
||||
handler: this.cancelTrainRoute,
|
||||
disabledCallback: MenuDisabledStatus.Signal.cancelTrainRoute
|
||||
},
|
||||
{
|
||||
label: '人解列车进路',
|
||||
handler: this.humanTrainRoute,
|
||||
disabledCallback: MenuDisabledStatus.Signal.humanTrainRoute
|
||||
},
|
||||
{
|
||||
label: '封锁',
|
||||
handler: this.lock,
|
||||
disabledCallback: MenuDisabledStatus.Signal.lock
|
||||
},
|
||||
{
|
||||
label: '解锁',
|
||||
handler: this.unlock,
|
||||
disabledCallback: MenuDisabledStatus.Signal.unlock
|
||||
},
|
||||
|
||||
{
|
||||
label: '设置自动通过进路',
|
||||
handler: this.setUpAutomaticRoute,
|
||||
disabledCallback: MenuDisabledStatus.Signal.setUpAutomaticRoute
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
disabledCallback: MenuDisabledStatus.Signal.reopenSignal
|
||||
},
|
||||
{
|
||||
label: '引导',
|
||||
handler: this.guide,
|
||||
disabledCallback: MenuDisabledStatus.Signal.guide
|
||||
},
|
||||
{
|
||||
label: '进路交人工控',
|
||||
handler: this.routeToIndustrialControl,
|
||||
disabledCallback: MenuDisabledStatus.Signal.routeToIndustrialControl
|
||||
},
|
||||
{
|
||||
label: '进路交自动控',
|
||||
handler: this.routeToAutomaticControl,
|
||||
disabledCallback: MenuDisabledStatus.Signal.routeToAutomaticControl
|
||||
},
|
||||
{
|
||||
label: '查询进路控制状态',
|
||||
handler: this.queryRouteAutomaticState,
|
||||
disabledCallback: MenuDisabledStatus.Signal.queryRouteAutomaticState
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
disabledCallback: MenuDisabledStatus.Signal.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
disabledCallback: MenuDisabledStatus.Signal.cancelStoppage
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
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();
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
},
|
||||
initMenu() {
|
||||
//第一层设置
|
||||
this.menu = this.menuNormal;
|
||||
|
||||
//第二层拼接
|
||||
if (this.mode === TrainingMode.EDIT) {
|
||||
this.menu = [...this.menu, ...this.menuForce]
|
||||
}
|
||||
|
||||
//故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
//设置故障
|
||||
setStoppage() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.stoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
//取消故障
|
||||
cancelStoppage() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
//排列进路
|
||||
arrangementRoute() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
model: this.selected,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
if (response) {
|
||||
this.tempData = response.data;
|
||||
} else {
|
||||
this.tempData = null;
|
||||
}
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.routeSetting.doShow(operate.operation, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//取消列车进路
|
||||
cancelTrainRoute() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.routeCancel.doShow(operate.operation, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//人解列车进路
|
||||
humanTrainRoute() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.humanTrainRoute.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.routeRelieve.doShow(operate.operation, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//封锁
|
||||
lock() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// send: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Signal.type,
|
||||
// label: MapDeviceType.Signal.label,
|
||||
// operation: OperationEvent.Signal.lock.menu.operation
|
||||
// };
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.routeSetting.doShow(operate.operation, this.selected);
|
||||
// }
|
||||
// });
|
||||
},
|
||||
//解锁
|
||||
unlock() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// send: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Signal.type,
|
||||
// label: MapDeviceType.Signal.label,
|
||||
// operation: OperationEvent.Signal.unlock.menu.operation
|
||||
// };
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.routeSetting.doShow(operate.operation, this.selected);
|
||||
// }
|
||||
// });
|
||||
},
|
||||
//设置自动通过进路
|
||||
setUpAutomaticRoute() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
},
|
||||
//信号重开
|
||||
reopenSignal() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.signalReopen.doShow(operate.operation, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//引导
|
||||
guide() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
},
|
||||
//进路交人工控
|
||||
routeToIndustrialControl() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
},
|
||||
//进路交自动控
|
||||
routeToAutomaticControl() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
},
|
||||
//查询近路自动状态
|
||||
queryRouteAutomaticState() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
0
src/jmap/theme/default/menus/menuStation.vue
Normal file
0
src/jmap/theme/default/menus/menuStation.vue
Normal file
206
src/jmap/theme/default/menus/menuStationControl.vue
Normal file
206
src/jmap/theme/default/menus/menuStationControl.vue
Normal file
@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledStatus, menuConvert } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'StationControlMenu',
|
||||
components: { PopMenu },
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [
|
||||
{
|
||||
label: '紧急站控',
|
||||
handler: this.emergencyStationControl,
|
||||
disabledCallback: MenuDisabledStatus.StationControl.emergencyStationControl
|
||||
},
|
||||
{
|
||||
label: '请求站控',
|
||||
handler: this.requestStationControl,
|
||||
disabledCallback: MenuDisabledStatus.StationControl.requestStationControl
|
||||
},
|
||||
{
|
||||
label: '强行站控',
|
||||
handler: this.forcedStationControl,
|
||||
disabledCallback: MenuDisabledStatus.StationControl.forcedStationControl
|
||||
},
|
||||
{
|
||||
label: '请求中控',
|
||||
handler: this.requestCentralControl,
|
||||
disabledCallback: MenuDisabledStatus.StationControl.requestCentralControl
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
disabledCallback: MenuDisabledStatus.StationControl.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
disabledCallback: MenuDisabledStatus.StationControl.cancelStoppage
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
},
|
||||
initMenu() {
|
||||
//第一层设置
|
||||
this.menu = this.menuNormal;
|
||||
|
||||
//第二层拼接
|
||||
if (this.mode === TrainingMode.EDIT) {
|
||||
this.menu = [...this.menu, ...this.menuForce]
|
||||
}
|
||||
|
||||
//故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
//设置故障
|
||||
setStoppage() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
label: MapDeviceType.StationControl.label,
|
||||
operation: OperationEvent.StationControl.stoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
//取消故障
|
||||
cancelStoppage() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
label: MapDeviceType.StationControl.label,
|
||||
operation: OperationEvent.StationControl.cancelStoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
emergencyStationControl() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
val: this.selected.code,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
label: MapDeviceType.StationControl.label,
|
||||
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
requestStationControl() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
val: this.selected.code,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
label: MapDeviceType.StationControl.label,
|
||||
operation: OperationEvent.StationControl.requestStationControl.menu.operation
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
forcedStationControl() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
val: this.selected.code,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
label: MapDeviceType.StationControl.label,
|
||||
operation: OperationEvent.StationControl.forcedStationControl.menu.operation
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
requestCentralControl() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
val: this.selected.code,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
label: MapDeviceType.StationControl.label,
|
||||
operation: OperationEvent.StationControl.requestCentralControl.menu.operation
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
277
src/jmap/theme/default/menus/menuStationStand.vue
Normal file
277
src/jmap/theme/default/menus/menuStationStand.vue
Normal file
@ -0,0 +1,277 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<stand-jump-stop ref="standJumpStop"></stand-jump-stop>
|
||||
<stand-early-departure ref="standEarlyDeparture"></stand-early-departure>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StandJumpStop from './dialog/standjumpstop';
|
||||
import StandEarlyDeparture from './dialog/standearlydeparture';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledStatus, menuConvert } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
StandJumpStop,
|
||||
StandEarlyDeparture
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [
|
||||
// {
|
||||
// label: '设置扣车',
|
||||
// handler: this.setDetainTrain,
|
||||
// disabledCallback: MenuDisabledStatus.StationStand.setDetainTrain
|
||||
// },
|
||||
// {
|
||||
// label: '取消扣车',
|
||||
// handler: this.cancelDetainTrain,
|
||||
// disabledCallback: MenuDisabledStatus.StationStand.cancelDetainTrain
|
||||
// },
|
||||
{
|
||||
label: '设置跳停',
|
||||
handler: this.setJumpStop,
|
||||
disabledCallback: MenuDisabledStatus.StationStand.setJumpStop
|
||||
},
|
||||
{
|
||||
label: '取消跳停',
|
||||
handler: this.cancelJumpStop,
|
||||
disabledCallback: MenuDisabledStatus.StationStand.cancelJumpStop
|
||||
},
|
||||
{
|
||||
label: '提前发车',
|
||||
handler: this.earlyDeparture,
|
||||
disabledCallback: MenuDisabledStatus.StationStand.earlyDeparture
|
||||
},
|
||||
{
|
||||
label: '站台详细信息',
|
||||
handler: this.stationStandDetail,
|
||||
disabledCallback: MenuDisabledStatus.StationStand.stationStandDetail
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
disabledCallback: MenuDisabledStatus.StationStand.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
disabledCallback: MenuDisabledStatus.StationStand.cancelStoppage
|
||||
},
|
||||
// {
|
||||
// label: '强制开门',
|
||||
// handler: this.forceOpenDoor,
|
||||
// disabledCallback: MenuDisabledStatus.StationStand.forceOpenDoor
|
||||
// },
|
||||
// {
|
||||
// label: '强制关门',
|
||||
// handler: this.forceCloseDoor,
|
||||
// disabledCallback: MenuDisabledStatus.StationStand.forceCloseDoor
|
||||
// }
|
||||
]
|
||||
}
|
||||
},
|
||||
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() {
|
||||
let self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
},
|
||||
initMenu() {
|
||||
//第一层设置
|
||||
this.menu = this.menuNormal;
|
||||
|
||||
//第二层拼接
|
||||
if (this.mode === TrainingMode.EDIT) {
|
||||
this.menu = [...this.menu, ...this.menuForce]
|
||||
}
|
||||
|
||||
//故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
//设置故障
|
||||
setStoppage() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
label: MapDeviceType.StationStand.label,
|
||||
operation: OperationEvent.StationStand.stoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
//取消故障
|
||||
cancelStoppage() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
label: MapDeviceType.StationStand.label,
|
||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
// //强制开门
|
||||
// forceOpenDoor() {
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// send: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.StationStand.type,
|
||||
// label: MapDeviceType.StationStand.label,
|
||||
// operation: OperationEvent.StationStand.forceOpenDoor.menu.operation
|
||||
// };
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
// //强制关门
|
||||
// forceCloseDoor() {
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// send: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.StationStand.type,
|
||||
// label: MapDeviceType.StationStand.label,
|
||||
// operation: OperationEvent.StationStand.forceCloseDoor.menu.operation
|
||||
// };
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
//设置扣车
|
||||
setDetainTrain() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
},
|
||||
//取消扣车
|
||||
cancelDetainTrain() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
},
|
||||
//设置跳停
|
||||
setJumpStop() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
label: MapDeviceType.StationStand.label,
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standJumpStop.doShow(operate.operation, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//取消跳停
|
||||
cancelJumpStop() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
label: MapDeviceType.StationStand.label,
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standJumpStop.doShow(operate.operation, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//提前发车
|
||||
earlyDeparture() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
label: MapDeviceType.StationStand.label,
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standEarlyDeparture.doShow(operate.operation, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//详细信息
|
||||
stationStandDetail() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
277
src/jmap/theme/default/menus/menuSwitch.vue
Normal file
277
src/jmap/theme/default/menus/menuSwitch.vue
Normal file
@ -0,0 +1,277 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<switch-control ref="switchControl"></switch-control>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SwitchControl from './dialog/switchcontrol';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledStatus, menuConvert } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SwitchControl
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [
|
||||
{
|
||||
label: '定操',
|
||||
handler: this.normalIndication,
|
||||
disabledCallback: MenuDisabledStatus.Switch.normalIndication
|
||||
},
|
||||
{
|
||||
label: '反操',
|
||||
handler: this.reverseIndication,
|
||||
disabledCallback: MenuDisabledStatus.Switch.reverseIndication
|
||||
},
|
||||
{
|
||||
label: '单锁',
|
||||
handler: this.lock,
|
||||
disabledCallback: MenuDisabledStatus.Switch.lock
|
||||
},
|
||||
{
|
||||
label: '解锁',
|
||||
handler: this.unlock,
|
||||
disabledCallback: MenuDisabledStatus.Switch.unlock
|
||||
},
|
||||
{
|
||||
label: '封锁',
|
||||
handler: this.block,
|
||||
disabledCallback: MenuDisabledStatus.Switch.block
|
||||
},
|
||||
{
|
||||
label: '区故解',
|
||||
handler: this.fault,
|
||||
disabledCallback: MenuDisabledStatus.Switch.fault
|
||||
},
|
||||
{
|
||||
label: '区段跟踪激活',
|
||||
handler: this.active,
|
||||
disabledCallback: MenuDisabledStatus.Switch.active
|
||||
},
|
||||
{
|
||||
label: '区段跟踪切除',
|
||||
handler: this.splite,
|
||||
disabledCallback: MenuDisabledStatus.Switch.splite
|
||||
},
|
||||
{
|
||||
label: '查看设备状态',
|
||||
handler: this.viewDeviceStatus,
|
||||
disabledCallback: MenuDisabledStatus.Switch.viewDeviceStatus
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
disabledCallback: MenuDisabledStatus.Switch.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
disabledCallback: MenuDisabledStatus.Section.cancelStoppage
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
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();
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
},
|
||||
initMenu() {
|
||||
//第一层设置
|
||||
this.menu = this.menuNormal;
|
||||
|
||||
//第二层拼接
|
||||
if (this.mode === TrainingMode.EDIT) {
|
||||
this.menu = [...this.menu, ...this.menuForce]
|
||||
}
|
||||
|
||||
//故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
//设置故障
|
||||
setStoppage() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
label: MapDeviceType.Switch.label,
|
||||
operation: OperationEvent.Switch.stoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
//取消故障
|
||||
cancelStoppage() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
label: MapDeviceType.Switch.label,
|
||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
//定操
|
||||
normalIndication() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
label: MapDeviceType.Switch.label,
|
||||
operation: OperationEvent.Switch.locate.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate.operation, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//反操
|
||||
reverseIndication() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
label: MapDeviceType.Switch.label,
|
||||
operation: OperationEvent.Switch.reverse.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate.operation, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//单锁
|
||||
lock() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
label: MapDeviceType.Switch.label,
|
||||
operation: OperationEvent.Switch.lock.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate.operation, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//解锁
|
||||
unlock() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
label: MapDeviceType.Switch.label,
|
||||
operation: OperationEvent.Switch.unlock.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate.operation, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//封锁
|
||||
block() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
},
|
||||
//区故解
|
||||
fault() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
},
|
||||
//区段跟踪激活
|
||||
active() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
},
|
||||
//区段跟踪切除
|
||||
splite() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
},
|
||||
//查看设备状态
|
||||
viewDeviceStatus() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
201
src/jmap/theme/default/menus/menuTrain.vue
Normal file
201
src/jmap/theme/default/menus/menuTrain.vue
Normal file
@ -0,0 +1,201 @@
|
||||
<template>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledStatus, menuConvert } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'menuTrain',
|
||||
components: { PopMenu },
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [
|
||||
{
|
||||
label: '删除列车',
|
||||
handler: this.remove,
|
||||
disabledCallback: MenuDisabledStatus.Train.remove
|
||||
},
|
||||
{
|
||||
label: '运行',
|
||||
handler: this.run,
|
||||
disabledCallback: MenuDisabledStatus.Train.run
|
||||
},
|
||||
{
|
||||
label: '停止',
|
||||
handler: this.stop,
|
||||
disabledCallback: MenuDisabledStatus.Train.stop
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
disabledCallback: MenuDisabledStatus.Train.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
disabledCallback: MenuDisabledStatus.Train.cancelStoppage
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
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();
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
},
|
||||
initMenu() {
|
||||
//第一层设置
|
||||
this.menu = this.menuNormal;
|
||||
|
||||
//第二层拼接
|
||||
if (this.mode === TrainingMode.EDIT) {
|
||||
this.menu = [...this.menu, ...this.menuForce]
|
||||
}
|
||||
|
||||
//故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
//设置故障
|
||||
setStoppage() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Train.type,
|
||||
label: MapDeviceType.Train.label,
|
||||
operation: OperationEvent.Train.stoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
//取消故障
|
||||
cancelStoppage() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Train.type,
|
||||
label: MapDeviceType.Train.label,
|
||||
operation: OperationEvent.Train.cancelStoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
//删除列车
|
||||
remove() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// send: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Train.type,
|
||||
// label: MapDeviceType.Train.label,
|
||||
// operation: OperationEvent.Train.remove.menu.operation
|
||||
// }
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.doClose();
|
||||
// }
|
||||
// })
|
||||
},
|
||||
//运行
|
||||
run() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// send: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Train.type,
|
||||
// label: MapDeviceType.Train.label,
|
||||
// operation: OperationEvent.Train.run.menu.operation
|
||||
// }
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.doClose();
|
||||
// }
|
||||
// })
|
||||
},
|
||||
//停止
|
||||
stop() {
|
||||
this.$alert('未开发', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
});
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// send: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Train.type,
|
||||
// label: MapDeviceType.Train.label,
|
||||
// operation: OperationEvent.Train.stop.menu.operation
|
||||
// }
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.doClose();
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
590
src/jmap/theme/default/menus/utils/menuItemStatus.js
Normal file
590
src/jmap/theme/default/menus/utils/menuItemStatus.js
Normal file
@ -0,0 +1,590 @@
|
||||
import store from '@/store';
|
||||
import deviceState from '@/jmap/constant/deviceState';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
export function getCurrentStateObject() {
|
||||
return store.getters['menuOperation/selected'];
|
||||
}
|
||||
|
||||
/** 系统类型 */
|
||||
export const SystemType = {
|
||||
'01': 'local', // 现地工作站
|
||||
'02': 'central' // 中心调度工作站
|
||||
};
|
||||
|
||||
export const StationControlType = {
|
||||
'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() {
|
||||
},
|
||||
// 区段取消限速
|
||||
cancelSpeed() {
|
||||
const device = getCurrentStateObject();
|
||||
if (device && device.speedUpperLimit == deviceState.Section.speedUpperLimit.Default) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
// 新建列车
|
||||
newTrain() {
|
||||
},
|
||||
// 计轴预复位
|
||||
axlePreReset() {
|
||||
},
|
||||
// 设置计轴有效
|
||||
alxeEffective() {
|
||||
},
|
||||
// 设置计轴失效
|
||||
alxeFailure() {
|
||||
const device = getCurrentStateObject();
|
||||
if (device && device.status == deviceState.Section.status.State13) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
},
|
||||
Signal: {
|
||||
// 进路选排
|
||||
arrangementRoute() {
|
||||
|
||||
},
|
||||
// 进路取消
|
||||
cancelTrainRoute() {
|
||||
},
|
||||
// 信号封闭
|
||||
lock() {
|
||||
const device = getCurrentStateObject();
|
||||
if (device && device.status == deviceState.Signal.status.State04) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
// 信号解封
|
||||
unlock() {
|
||||
const device = getCurrentStateObject();
|
||||
if (device && device.status != deviceState.Signal.status.State04) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
},
|
||||
// 进路引导
|
||||
guide() {
|
||||
},
|
||||
// 设置联锁自动进路
|
||||
setAutoInterlock() {
|
||||
},
|
||||
// 取消联锁自动进路
|
||||
cancelAutoInterlock() {
|
||||
},
|
||||
// 设置联锁自动触发
|
||||
setAutoTrigger() {
|
||||
},
|
||||
// 取消联锁自动触发
|
||||
cancelAutoTrigger() {
|
||||
},
|
||||
// 关灯
|
||||
signalClose() {
|
||||
const device = getCurrentStateObject();
|
||||
if (device && device.status == deviceState.Signal.status.State01) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
// 总人解
|
||||
humanTrainRoute() {
|
||||
},
|
||||
// 人工控
|
||||
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 (device && device.holdStatus != deviceState.StationStand.holdStatus.State01) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
const device = getCurrentStateObject();
|
||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) {
|
||||
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();
|
||||
},
|
||||
// 设置计轴有效
|
||||
alxeEffective() {
|
||||
},
|
||||
// 道岔取消速度
|
||||
cancelSpeed() {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const device = getCurrentStateObject();
|
||||
if (device && device.fault) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const device = getCurrentStateObject();
|
||||
if (device && !device.fault) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
// 单操到定位
|
||||
locate() {
|
||||
},
|
||||
// 单操到反位
|
||||
reverse() {
|
||||
},
|
||||
// 区故解
|
||||
solution() {
|
||||
},
|
||||
// 属性
|
||||
property() {
|
||||
}
|
||||
},
|
||||
Train: {
|
||||
// 添加列车识别号
|
||||
addTrainId() {
|
||||
},
|
||||
// 删除列车识别号
|
||||
delTrainId() {
|
||||
},
|
||||
// 修改列车识别号
|
||||
editTrainId() {
|
||||
},
|
||||
// 修改车组号
|
||||
editTrainNo() {
|
||||
},
|
||||
// 创建车组号
|
||||
createTrainNo() {
|
||||
},
|
||||
// 移动车组号
|
||||
moveTrainNo() {
|
||||
},
|
||||
// 删除车组号
|
||||
deleteTrainNo() {
|
||||
},
|
||||
// 移动列车识别号
|
||||
moveTrainId() {
|
||||
},
|
||||
// 交换列车识别号
|
||||
switchTrainId() {
|
||||
},
|
||||
// 设计划车
|
||||
setPlanTrainId() {
|
||||
},
|
||||
// 设目的地车
|
||||
destinationTrainId() {
|
||||
},
|
||||
// 设人工车
|
||||
artificialTrainId() {
|
||||
},
|
||||
// 详细列车信息
|
||||
detailTrainInfo() {
|
||||
},
|
||||
// 设置限速
|
||||
limitSpeed() {
|
||||
},
|
||||
// 设置通信故障
|
||||
setStoppage() {
|
||||
const device = getCurrentStateObject();
|
||||
if (device && device.fault) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
// 取消通信故障
|
||||
cancelStoppage() {
|
||||
const device = getCurrentStateObject();
|
||||
if (device && !device.fault) {
|
||||
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 = SystemType[store.state.training.prdType];
|
||||
const status = StationControlType[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 != '') {
|
||||
var type = SystemType[store.state.training.prdType];
|
||||
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;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* 离开菜单以及执行完菜单取消选中状态
|
||||
*/
|
||||
export function mouseCancelState(device) {
|
||||
// Object.assign(device, { _selected: false });
|
||||
// var viewInstance = store.state.map.jlmap.getViewInstanceByDevice({ _type: device._type, _code: device.code });
|
||||
// if (viewInstance && viewInstance['mouseleave']) {
|
||||
// viewInstance['selected'] = false;
|
||||
// viewInstance['mouseleave'](store.state.map.jlmap._zr.curEvent);
|
||||
// }
|
||||
}
|
||||
|
63
src/jmap/theme/default/model.js
Normal file
63
src/jmap/theme/default/model.js
Normal file
@ -0,0 +1,63 @@
|
||||
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.Section] = {
|
||||
borderBorderShow: true, // 区段边界显示
|
||||
standTrackNameShow: true, // 站台轨名称显示
|
||||
reentryTrackNameShow: true, // 折返轨名称显示
|
||||
transferTrackNameShow: true // 转换轨名称显示
|
||||
};
|
||||
this['private'][deviceType.Signal] = {
|
||||
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();
|
@ -2,6 +2,7 @@ class Theme {
|
||||
constructor(code) {
|
||||
this._code = '02';
|
||||
this._mapMenu = {
|
||||
'01': 'default', // 成都4号线
|
||||
'02': 'fuzhou_01',
|
||||
'03': 'beijing_01',
|
||||
'04': 'chengdou_03',
|
||||
|
@ -497,6 +497,7 @@ const map = {
|
||||
queryEffectedModels(state.map, device, effectedModelList);
|
||||
});
|
||||
|
||||
effectedModelList.forEach(elem => { elem['_dispose'] = true; });
|
||||
commit('mapRender', effectedModelList);
|
||||
resolve(effectedModelList);
|
||||
});
|
||||
|
@ -258,14 +258,6 @@ export default {
|
||||
// 刷新地图数据
|
||||
refresh(map) {
|
||||
},
|
||||
// 新增设备
|
||||
addOrUpdateDevices(devices) {
|
||||
this.$jlmap.render(devices);
|
||||
},
|
||||
// 删除设备
|
||||
deleteDevices(devices) {
|
||||
this.$jlmap.render(devices);
|
||||
},
|
||||
// 缩小
|
||||
setShrink() {
|
||||
this.$jlmap.setOptions({type: 'zoom', scale: -1});
|
||||
|
@ -328,14 +328,11 @@ export default {
|
||||
},
|
||||
// 增加数据数据 给vuex map对象中
|
||||
addOrUpdateMapModel(obj) {
|
||||
this.$store.dispatch('map/updateMapDevices', obj).then((devices) => {
|
||||
this.$refs.jlmapVisual.addOrUpdateDevices(devices);
|
||||
});
|
||||
this.$store.dispatch('map/updateMapDevices', obj);
|
||||
},
|
||||
// 删除数据 同时del map
|
||||
delMapModel(obj) {
|
||||
this.$store.dispatch('map/deleteMapDevices', obj).then((devices) => {
|
||||
this.$refs.jlmapVisual.deleteDevices(devices);
|
||||
this.$store.dispatch('map/deleteMapDevices', obj).then(() => {
|
||||
this.selected = null;
|
||||
});
|
||||
},
|
||||
|
@ -98,7 +98,7 @@ export default {
|
||||
},
|
||||
addModel: {
|
||||
code: '',
|
||||
type: '',
|
||||
type: '01',
|
||||
direct: 'R',
|
||||
x: 0,
|
||||
y: 0,
|
||||
@ -238,22 +238,22 @@ export default {
|
||||
|
||||
// 是否初始link
|
||||
isNew() {
|
||||
// this.addModel.type = '01';
|
||||
return this.LinkType === '0';
|
||||
},
|
||||
// 是否正向link
|
||||
isFd() {
|
||||
// this.addModel.type = '01';
|
||||
return this.LinkType === '1';
|
||||
},
|
||||
// 是否侧向link
|
||||
isSd() {
|
||||
// this.addModel.type = '02';
|
||||
return this.LinkType === '2';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
selected: function (val, oldVal) {
|
||||
LinkType(val) {
|
||||
this.addModel.type = val == '2'? '02': '01';
|
||||
},
|
||||
selected(val, oldVal) {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
$route() {
|
||||
|
@ -225,7 +225,7 @@
|
||||
|
||||
// 时间类型
|
||||
this.TimeStyleDict = {};
|
||||
this.$Dictionary.TimeStyleType().then(list => {
|
||||
this.$Dictionary.timeStyleType().then(list => {
|
||||
this.convertList(list, this.TimeStyleList, elem => {
|
||||
return true;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user