Merge remote-tracking branch 'remotes/origin/test'
This commit is contained in:
commit
f949f41506
@ -31,3 +31,11 @@ export function queryMapGroupPaging(params) {
|
||||
params
|
||||
});
|
||||
}
|
||||
/** 导入数据 */
|
||||
export function importMapGroupData( groupId, data) {
|
||||
return request({
|
||||
url: `/api/mapGroup/${groupId}/syc/import`,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
@ -178,6 +178,7 @@ export function AssetLoader(){
|
||||
// console.log(data);
|
||||
for(let j=0;j<otherData.length;j++){
|
||||
let model = new AssetModel(otherData[j]);
|
||||
// console.log(otherData[j]);
|
||||
scope.modellist.push(otherData[j]);
|
||||
}
|
||||
}
|
||||
@ -244,12 +245,24 @@ export function AssetLoader(){
|
||||
|
||||
}
|
||||
|
||||
let specilModelXiAn = {
|
||||
assetname: "spmxa",
|
||||
deviceType: "spmxa",
|
||||
id: "spmxa",
|
||||
mesh:"",
|
||||
packageName: "spmxa",
|
||||
type: "spmxa",
|
||||
url: "/MODEL/2021-04-13/1427-29057.FBX",
|
||||
};
|
||||
this.assetPromiseOver = function (scene){
|
||||
let initlist = [];
|
||||
|
||||
for(let i=0;i<scope.modellist.length;i++){
|
||||
// console.log(scope.modellist);
|
||||
initlist.push(fbxPromiseOver(scope.modellist[i]));
|
||||
|
||||
if(scope.modellist[i].packageName == "西安三隧道"){
|
||||
scope.modellist.push(specilModelXiAn);
|
||||
initlist.push(fbxPromiseOver(specilModelXiAn));
|
||||
}
|
||||
}
|
||||
|
||||
return new Promise(function(resolve, reject){
|
||||
|
@ -70,7 +70,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
|
||||
for(let i=0;i<standsdata.length;i++){
|
||||
for(let j=0;j<mapdata.stationStandList.length;j++){
|
||||
if(standsdata[i].code == mapdata.stationStandList[j].stationCode){
|
||||
|
||||
|
||||
standsdata[i].inside = mapdata.stationStandList[j].inside;
|
||||
j = mapdata.stationStandList.length;
|
||||
}
|
||||
@ -107,7 +107,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
|
||||
.then(function(data){
|
||||
//console.log(data);
|
||||
//console.log(assetloader);
|
||||
console.log(stationstandlist);
|
||||
// console.log(stationstandlist);
|
||||
return tdt.initTdt(stationstandlist.list,mapdata.sectionList,rails.sectionrail,sceneload);
|
||||
})
|
||||
.then(function(data){
|
||||
|
@ -140,8 +140,9 @@ export function StationStandListN() {
|
||||
let selectmesh1;
|
||||
let selectmesh2;
|
||||
let selectmesh3;
|
||||
|
||||
let specilmesh;
|
||||
for(let j=0;j<assetloader.modellist.length;j++){
|
||||
// console.log(assetloader.modellist[j].type);
|
||||
if(assetloader.modellist[j].type == "stationInside"){
|
||||
selectmesh1 = assetloader.modellist[j].mesh;
|
||||
}
|
||||
@ -153,6 +154,9 @@ export function StationStandListN() {
|
||||
selectmesh3 = assetloader.modellist[j].mesh;
|
||||
// assetloader.modellist[num2].mesh.rotation.y = Math.PI/2;
|
||||
}
|
||||
if(assetloader.modellist[j].type == "spmxa"){
|
||||
specilmesh = assetloader.modellist[j].mesh;
|
||||
}
|
||||
|
||||
}
|
||||
selectmesh1.traverse( function ( child ) {
|
||||
@ -203,7 +207,7 @@ export function StationStandListN() {
|
||||
|
||||
|
||||
let newstationstand = new StationStandModel(standsdata[i]);
|
||||
|
||||
|
||||
newstationstand.code = standsdata[i].code;
|
||||
newstationstand.name = standsdata[i].name;
|
||||
newstationstand.type = "station";
|
||||
@ -254,6 +258,11 @@ export function StationStandListN() {
|
||||
newstationmesh = selectmesh3.clone(true);
|
||||
newclip = selectmesh3.animations[ 0 ];
|
||||
}
|
||||
|
||||
if(standsdata[i].code == "Station17596"){
|
||||
newstationmesh = specilmesh.clone(true);
|
||||
newclip = specilmesh.animations[ 0 ];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -304,64 +313,6 @@ export function StationStandListN() {
|
||||
}
|
||||
|
||||
}
|
||||
// for(let j=0;j<newstationmesh.children.length;j++){
|
||||
//
|
||||
// if(newstationmesh.children[j].name == "top"){
|
||||
// newstationmesh.children[j].animations = [];
|
||||
// newstationmesh.children[j].animations.push(newclip.clone());
|
||||
//
|
||||
// let mixer = new THREE.AnimationMixer( newstationmesh.children[j] );
|
||||
//
|
||||
//
|
||||
// for(let n=0;n<psddata.length;n++){
|
||||
// for(let m=0;m<newstationstand.stands.length;m++){
|
||||
//
|
||||
// if(psddata[n].standCode == newstationstand.stands[m].code && newstationstand.stands[m].right == false){
|
||||
//
|
||||
// let key = psddata[n].code;
|
||||
// actionss[key] = {
|
||||
// status:"01",
|
||||
// action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
// };
|
||||
// actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
// actionss[key].action.clampWhenFinished = true;
|
||||
// //actionss[key].play();
|
||||
// mixers.push(mixer);
|
||||
// n = psddata.length;
|
||||
// m = newstationstand.stands.length;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// if(newstationmesh.children[j].name == "down"){
|
||||
// newstationmesh.children[j].animations = [];
|
||||
// newstationmesh.children[j].animations.push(newclip.clone());
|
||||
//
|
||||
// let mixer = new THREE.AnimationMixer( newstationmesh.children[j] );
|
||||
// for(let n=0;n<psddata.length;n++){
|
||||
// for(let m=0;m<newstationstand.stands.length;m++){
|
||||
//
|
||||
// if(psddata[n].standCode == newstationstand.stands[m].code && newstationstand.stands[m].right == true){
|
||||
// let key = psddata[n].code;
|
||||
// actionss[key] = {
|
||||
// status:"01",
|
||||
// action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
// };
|
||||
// actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
// actionss[key].action.clampWhenFinished = true;
|
||||
// //actionss[key].play();
|
||||
// mixers.push(mixer);
|
||||
// n = psddata.length;
|
||||
// m = newstationstand.stands.length;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
if(mode){
|
||||
if(mode == "02"){
|
||||
@ -382,7 +333,6 @@ export function StationStandListN() {
|
||||
textt.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// scene.add(scope.textlist);
|
||||
|
@ -17,7 +17,7 @@ export function TdtList() {
|
||||
stopSections[sectionData[i].code] = sectionData[i];
|
||||
}
|
||||
}
|
||||
console.log(stationData);
|
||||
// console.log(stationData);
|
||||
for(let k in stationData){
|
||||
for(let i=0;i<stationData[k].stands.length;i++){
|
||||
let newmesh = object.clone(true);
|
||||
|
@ -12,7 +12,8 @@ const mapDeviceStyle = {
|
||||
'11': 'xian_01', // 西安三号线
|
||||
'12': 'ningbo_03', // 宁波三号线
|
||||
'13': 'race_01', // 2020国赛线路
|
||||
'14':'nanjing_02' // 南京二号线
|
||||
'14':'nanjing_02', // 南京二号线
|
||||
'15': 'datie_01' // 大铁线路一
|
||||
};
|
||||
|
||||
export function selectLineCode(code) {
|
||||
|
948
src/jmapNew/config/skinCode/datie_01.js
Normal file
948
src/jmapNew/config/skinCode/datie_01.js
Normal file
@ -0,0 +1,948 @@
|
||||
import defaultStyle from '../defaultStyle';
|
||||
import deviceType from '../../constant/deviceType';
|
||||
|
||||
class SkinCode extends defaultStyle {
|
||||
constructor() {
|
||||
super();
|
||||
this.fontFamily = '宋体';
|
||||
this[deviceType.Section] = {
|
||||
elemnetType:['name', 'line', 'separator', 'badShunt'],
|
||||
// 'speedLimit', 'speedLimitName','standTrackText','reentryTrackText','transferTrackText',
|
||||
active: {
|
||||
routeColor: true // 进路触发颜色
|
||||
},
|
||||
name: {
|
||||
z: 10,
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 10, // 文字离区段距离
|
||||
fontSize: 12, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: 'rgb(192,192,192)', // 字体颜色 (银白)
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle', // 文字垂直对齐方式
|
||||
approachColor: '#FFFFFF'
|
||||
},
|
||||
logicText: {
|
||||
z: 10,
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 12, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
// standTrackText: {
|
||||
// z: 10,
|
||||
// position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
// distance: 24, // 文字离区段距离
|
||||
// fontSize: 11, // 字体大小
|
||||
// fontWeight: 'normal', // 字体粗细
|
||||
// fontColor: '#FFFFFF', // 字体颜色
|
||||
// textAlign: 'center', // 水平对齐方式
|
||||
// textPosition: 'inside', // 文字位置
|
||||
// textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
// },
|
||||
// reentryTrackText: {
|
||||
// z: 10,
|
||||
// position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
// distance: 36, // 文字离区段距离
|
||||
// fontSize: 11, // 字体大小
|
||||
// fontWeight: 'normal', // 字体粗细
|
||||
// fontColor: '#FFFFFF', // 字体颜色
|
||||
// textAlign: 'center', // 水平对齐方式
|
||||
// textPosition: 'inside', // 文字位置
|
||||
// textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
// },
|
||||
// transferTrackText: {
|
||||
// z: 10,
|
||||
// position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
// distance: 36, // 文字离区段距离
|
||||
// fontSize: 11, // 字体大小
|
||||
// fontWeight: 'normal', // 字体粗细
|
||||
// fontColor: '#FFFFFF', // 字体颜色
|
||||
// textAlign: 'center', // 水平对齐方式
|
||||
// textPosition: 'inside', // 文字位置
|
||||
// textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
// },
|
||||
destinationText: {
|
||||
z: 10,
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 12, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'bold', // 字体粗细
|
||||
fontColor: 'yellow', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
line: {
|
||||
z: 0,
|
||||
width: 3, // 区段宽度
|
||||
beyondWidth: 0, // 区段宽超出宽度
|
||||
invadeColor: '#FF0000', // 区段侵入颜色 (红色)
|
||||
spareColor: 'rgb(85,120,182)', // 区段空闲颜色 (浅蓝)
|
||||
|
||||
communicationOccupiedColor: '#FF0000', // 区段通信车占用颜色 (红色)
|
||||
unCommunicationOccupiedColor: '#FF0000', // 区段非通讯车占用颜色 (红色)
|
||||
|
||||
routeLockColor: '#FFFFFF', // 区段进路锁定颜色 (白色)
|
||||
faultLockColor: '#006400', // 区段故障锁定颜色
|
||||
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
blockColor: '#00FF00', // 区段封锁颜色
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
timeReleaseColor: '#3F3F3F', // 区段延时释放颜色
|
||||
|
||||
protectiveLockColor: '#FFFF00', // 区段保护锁闭
|
||||
|
||||
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
||||
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
||||
logicalTextColor: '#C0C0C0', // 逻辑区段名称颜色 (未用)
|
||||
invalidColor: '#B18E38' // 区段ARB故障颜色
|
||||
},
|
||||
badShunt:{
|
||||
z: 2,
|
||||
distance: 2, // 分路不良 距离区段距离
|
||||
width: 1, // 分路不良的宽度
|
||||
lineColor: 'rgb(188,67,180)' // 分路不良颜色 (粉红色)
|
||||
},
|
||||
// speedLimit: { // 限速元素
|
||||
// z: 2,
|
||||
// width: 1, // 限速线的宽度
|
||||
// distance: 5, // 限速线距离区段距离
|
||||
// lineColor: '#C0C000', // 限速线颜色 (黄色透明光)
|
||||
// nameShow: true // 名称显示
|
||||
// },
|
||||
// speedLimitName: {
|
||||
// z: 10,
|
||||
// leftName: true, // 左侧限速值是否展示
|
||||
// rightName: true, // 右侧限速值是否展示
|
||||
// nameBackgroundIsRect: false, // 限速值背景是否为矩形
|
||||
// nameBackgroundBorderWidth: 0, // 限速值背景是否边框宽度
|
||||
// nameBackgroundBorderColor: '#000', // 限速值背景边框颜色
|
||||
// limitValueDistance: -15,
|
||||
// kilometerFontSize: 8, // 公里标大小
|
||||
// kilometerColor: '#fff', // 公里标颜色
|
||||
// nameNumberFontSize: 11, // 限速值大小
|
||||
// nameNumberColor: '#C00808', // 限速值颜色
|
||||
// nameBackground: '#C0C000', // 限速名称背景颜色
|
||||
// drogueWidth: 19, // 浮标宽度
|
||||
// drogueHeight: 12 // 浮标高度
|
||||
// },
|
||||
separator: {
|
||||
z: 3, // 分割符层级
|
||||
width: 2, // 物理区段分隔符宽度
|
||||
logicWidth:2, // 逻辑区段分隔符宽度
|
||||
endWidth: 2, // 尽头分隔符宽度
|
||||
endColor: 'rgb(128,128,128)', // 尽头分隔符颜色
|
||||
color: 'rgb(128,128,128)', // 区段边界符颜色
|
||||
invadeSpecial:true, // 特殊侵限
|
||||
halfHeight: 3 // 区段分隔符高度的一半
|
||||
},
|
||||
shuttleBack: { // 折返进路 (存在此对象 显示折返箭头)
|
||||
z: 10,
|
||||
width: 1.5,
|
||||
color: '#FFFFFF',
|
||||
distance: 5 // 限速线距离区段距离
|
||||
},
|
||||
trainPosition:{
|
||||
display: false // 列车实时位置显示
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Signal] = {
|
||||
distance: 10, // 设备距离区段的距离
|
||||
post: {
|
||||
standardLength: 6, // 高柱长度
|
||||
standardHeight: 6, // 灯柱高度
|
||||
standardColor: '#FFFFFF', // 灯柱颜色
|
||||
standardVerticalWidth: 2, // 灯柱竖杆宽度
|
||||
standardRailWidth: 2 // 灯柱横杆宽度
|
||||
},
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
distance: 3, // 文字和灯杆的距离
|
||||
isAlignCenter: false, // 信号字体对其方式
|
||||
fontSize: 11, // 信号机名称字体大小
|
||||
fontWeight: 'bold', // 信号机名称字体粗细
|
||||
defaultColor: '#FFFFFF', // 信号灯字体默认色
|
||||
blockColor: '#EF0C08', // 信号灯字体锁定颜色
|
||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||
},
|
||||
lamp: {
|
||||
bgShow: false, // 是否被选中
|
||||
guidName: 'singleRY', // 成都三号线引导类型
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 2, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
radiusR: 6, // 信号灯半径
|
||||
grayColor: '#7F7F7F', // 信号灯灰色
|
||||
redColor: '#FF0000', // 信号灯红色
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
yellowColor: '#FFFF00', // 信号灯黄色
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#0070C0', // 信号灯蓝色
|
||||
faultType: 'light' // 信号机故障类型 (light闪)
|
||||
},
|
||||
route: {
|
||||
direction: true, // 自动通过方向
|
||||
offset: { x: 4, y: 0}, // 自动通过偏移量
|
||||
routeColor: '#00FF00', // 自动进路
|
||||
radiusR: 6
|
||||
},
|
||||
auto: {
|
||||
signalFrontTriangle: true, // 信号灯前三角展示
|
||||
fleetModeTriangle: true, // 自动进路显示三角形非箭头
|
||||
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' // 信号灯按钮闪烁颜色
|
||||
},
|
||||
lowButton:{
|
||||
display: false // 现地 信号机按钮
|
||||
},
|
||||
sigBack: {
|
||||
fillColor:'rgba(0,0,0,0)', // 信号背景颜色
|
||||
strokecolor:'#F00', // 信号描边颜色
|
||||
lineWidth: 1, // 信号背景描边宽度
|
||||
distanceX: 2, // 信号背景x偏移距离
|
||||
distanceY: 1 // 信号背景Y偏移距离
|
||||
}
|
||||
};
|
||||
|
||||
// 供电线路
|
||||
this[deviceType.Power] = {
|
||||
noElectricStrokeColor:'#808080', // 无电颜色
|
||||
defaultStrokeColor: '#F00', // 线条颜色
|
||||
extendLength: 10 // 延伸长度
|
||||
};
|
||||
|
||||
// 延续保护计时
|
||||
this[deviceType.OverAp] = {
|
||||
show: false
|
||||
};
|
||||
|
||||
// 屏蔽门
|
||||
this[deviceType.Psd] = {
|
||||
// 成都三号线屏蔽门
|
||||
elemnetType:['safetyDoorNormal'],
|
||||
safetyDoorNormal: { // 屏蔽门
|
||||
z:0,
|
||||
height: 3, // 站台屏蔽门高度
|
||||
distance: 8, // 站台和屏蔽门之间的距离
|
||||
defaultColor: '#00FF00', // 屏蔽门默认颜色
|
||||
splitDoorColor: '#C00808' // 屏蔽门切除颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.StationStand] = {
|
||||
// 成都三号线站台元素 站台 站台紧急关闭 扣车元素 停站时间 运行等级 跳停
|
||||
elemnetType:['solidStand', 'emergentRhombus', 'detainNormal', 'stopTime', 'level', 'jumpCircle'],
|
||||
// 站台
|
||||
solidStand:{
|
||||
// 层级
|
||||
z:0,
|
||||
spareColor: '#ffffff', // 站台空闲颜色
|
||||
jumpStopColor: '#808080', // 站台跳停颜色
|
||||
designatedJumpStopColor: '#808080', // 站台指定列车跳停颜色
|
||||
headFontSize: 10, // 站台首端字体大小
|
||||
stopColor: '#FFF000' // 站台列车停站颜色
|
||||
},
|
||||
// 站台紧急关闭
|
||||
emergentRhombus:{
|
||||
z:1,
|
||||
flicker: true, // 闪烁
|
||||
mergentR: 5, // 站台紧急关闭半径
|
||||
mergentN: 4, // 站台紧急关闭边数
|
||||
insideOffset: { x: 0, y: -30 }, // 内站台紧急关闭偏移量
|
||||
outsideOffset: { x: 0, y: 30}, // 外站台紧急关闭偏移量
|
||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
||||
},
|
||||
// 扣车元素 普通扣车
|
||||
detainNormal:{
|
||||
z:0,
|
||||
position: -1, // 扣车标识在站台上显示方向
|
||||
text: '扣', // 扣车显示内容
|
||||
insideOffset: {x: -8, y: 20}, // 内站台扣车偏移量
|
||||
outsideOffset: {x: -8, y: 20}, // 外站台扣车偏移量
|
||||
centerTrainColor: '#C0C0C0', // 中心扣车颜色
|
||||
andCenterTrainColor: '#C0C0C0', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
fontSize: 10, // 字体大小
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
// 停站时间
|
||||
stopTime:{
|
||||
z:1,
|
||||
textFontSize: 10, // 停站时间字体大小
|
||||
textColor: '#FFFFFF', // 停站时间字体颜色
|
||||
position: -1, // 停站时间方向
|
||||
offset: {x: -8, y: 10} // 停站时间偏移量
|
||||
},
|
||||
// 运行等级
|
||||
level:{
|
||||
z:1,
|
||||
textFontSize: 10, // 运行等级字体大小
|
||||
position: 1, // 运行等级方向
|
||||
offset: {x: -8, y: 15}, // 运行等级偏移量
|
||||
textColor: '#FFF000' // 停站等级字体颜色
|
||||
},
|
||||
// 跳停
|
||||
jumpCircle: {
|
||||
z:1,
|
||||
position: 1, // 停跳方向
|
||||
text: '跳', // 停跳显示内容
|
||||
offset: {x: -8, y: 10},
|
||||
textColor: '#00ffcc', // 停跳文字颜色
|
||||
arcColor: '#00ffcc', // 停跳圆圈颜色
|
||||
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
|
||||
r: 8, // 圆半径大小
|
||||
fontWeight: 'normal', // 文字居中
|
||||
fontSize: 11 // 文字大小
|
||||
},
|
||||
|
||||
common: { // 通用属性
|
||||
textFontSize: 10, // 站台默认字体大小
|
||||
functionButtonShow: '03' // 功能灯按钮显示条件(prdType)
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
lampColor: '#5A5D5A' // 功能按钮颜色
|
||||
},
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
}
|
||||
// reentry: {}, // 站台折返策略
|
||||
// trainStop: {}, // 停车标志
|
||||
// trainDepart: {}, // 停车计时
|
||||
};
|
||||
|
||||
this[deviceType.StationCounter] = {
|
||||
text: {
|
||||
distance: 2, // 计数器名称和文字的距离
|
||||
fontColor: '#FFFFFF', // 计数器字体颜色
|
||||
borderColor: '#E4EF50' // 计数器边框颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.StationDelayUnlock] = {
|
||||
text: {
|
||||
distance: 3, // 延迟解锁和设备之间的距离
|
||||
fontColor: '#FFFFFF', // 延时解锁字体颜色
|
||||
borderColor: '#FFFFFF' // 延迟解锁边框颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.StationTurnBack] = { // 站后折返
|
||||
displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
lamp: {
|
||||
fill: '#f1f1f1', // 填充色
|
||||
radiusR: 7 // 控制灯大小
|
||||
},
|
||||
text: {
|
||||
titleTextShow: false,
|
||||
fontWeight: 580,
|
||||
fontSize: 10,
|
||||
distance: 10
|
||||
},
|
||||
rect: {
|
||||
fill: 'rgba(0,0,0,0)',
|
||||
stroke: '#fff',
|
||||
lineWidth: 0,
|
||||
padding: 6
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Station] = {
|
||||
// 成都三号线车站元素 车站名称
|
||||
elemnetType:['stationText'],
|
||||
stationText:{
|
||||
z:0,
|
||||
fontWeight:'normal', // 字体粗细
|
||||
textPadding:[0, 0], // 字体边距
|
||||
borderColor:'', // 字体边框颜色
|
||||
textBorderWidth:0 // 字体边框宽度
|
||||
},
|
||||
|
||||
kmPostShow: false, // 公里标显示
|
||||
kilometerPosition: 'up', // 公里标朝向
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#FFFF00', // 控制灯颜色
|
||||
guideColor: '#5A5D5A' // 引导总锁灯颜色
|
||||
},
|
||||
turnBack: { // 按图折返
|
||||
lamp: 1, // 灯数量
|
||||
lampSpace: 60 // 灯间距
|
||||
},
|
||||
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: 46, // 控制模式之间灯之间的距离
|
||||
grayColor: '#7F7F7F', // 控制模式灰色
|
||||
greenColor: '#00FF00', // 控制模式绿色
|
||||
redColor: '#FF0000', // 控制模式红色
|
||||
yellowColor: '#FFFF00', // 控制模式黄色
|
||||
purpleColor:'#840084' // 控制模式紫色
|
||||
},
|
||||
emergencyControl: { // 紧急站控
|
||||
show: true,
|
||||
offset: { x: 0, y: 0 },
|
||||
text: '紧急站控',
|
||||
arrowShow: false,
|
||||
grayColor: '#7F7F7F'
|
||||
},
|
||||
centerControl: { // 中控
|
||||
show: true,
|
||||
offset: { x: 0, y: 0 },
|
||||
text: '中控',
|
||||
buttonShow: false,
|
||||
arrowShow: false,
|
||||
grayColor: '#7F7F7F'
|
||||
},
|
||||
substationControl: { // 站控按钮
|
||||
show: true,
|
||||
offset: { x: 0, y: 0 },
|
||||
text: '站控',
|
||||
arrowShow: false,
|
||||
grayColor: '#7F7F7F'
|
||||
},
|
||||
interconnectedControl: { // 联锁控
|
||||
show: true,
|
||||
offset: { x: 0, y: 0 },
|
||||
text: '联锁控',
|
||||
arrowShow: false,
|
||||
grayColor: '#7F7F7F'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Switch] = {
|
||||
text: {
|
||||
show: true, // 道岔名称显示
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
offset: {x: 5, y: -10}, // 道岔名称与区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontColor: '#fff', // 道岔名称颜色
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
borderColor: '#FE0000', // 道岔边框颜色
|
||||
lossColor: '#C00808', // 道岔失去颜色
|
||||
locateColor: '#00FF00', // 道岔定位颜色
|
||||
inversionColor: '#FFFF00', // 道岔反位颜色
|
||||
monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
||||
monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
|
||||
faultFlashing: false // 故障闪烁
|
||||
},
|
||||
sectionAction: {
|
||||
flag: false, // 道岔 关联区段显示
|
||||
spareColor: '#5b5b5b' // 区段显示颜色
|
||||
},
|
||||
core: {
|
||||
length: 6, // 道岔单边长度
|
||||
graphShow: true, // 图形显示
|
||||
graphInversionColor: '#FFFF00', // 反位颜色
|
||||
graphLocalColor: '#00FF00' // 定位颜色
|
||||
},
|
||||
jointImg: { // 道岔 A B C D四元素属性配置
|
||||
trapezoidLength: 8, // 直角梯形元素默认长度
|
||||
faultStatus: true, // 挤岔表示
|
||||
fork: true, // 挤岔专用(如有挤岔操作 变为true)
|
||||
forKColor: 'red' // 挤岔颜色 配合挤岔专用
|
||||
},
|
||||
arcBlcok: { // 圆形封锁图形
|
||||
show: false, // 显示
|
||||
arcBorderColor: 'green', // 默认边框颜色
|
||||
locationColor: 'green', // 定位封锁颜色
|
||||
inversionColor: '#FFFF00' // 反位封锁颜色
|
||||
},
|
||||
rectLock: { // 矩形封锁框图形
|
||||
rectWidth: 18, // 矩形框 宽高
|
||||
rectBorderColor: '#fff', // 矩形边框颜色
|
||||
block: true, // 封锁显示
|
||||
blockColor: 'red', // 封锁颜色
|
||||
followName: true, // 位置跟随名称确定
|
||||
},
|
||||
arcBlcok: { // 圆形封锁图形
|
||||
show: true, // 显示
|
||||
shapeR: 10,
|
||||
arcBorderColor: 'red', // 默认边框颜色
|
||||
locationColor: 'red', // 定位封锁颜色
|
||||
inversionColor: 'red' // 反位封锁颜色
|
||||
},
|
||||
};
|
||||
|
||||
this[deviceType.LcControl] = {
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#FFFF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.PowerSupply] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00', // 控制灯颜色
|
||||
offColor: '#000',
|
||||
strokeColor: '#fff'
|
||||
}
|
||||
};
|
||||
this[deviceType.Maintain] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.NoOneReturn] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11,
|
||||
fontWeight: 'normal',
|
||||
distance: 5
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6,
|
||||
controlColor: '#FFFFFF'
|
||||
}
|
||||
};
|
||||
this[deviceType.AtsControl] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00', // 控制灯颜色
|
||||
offColor: '#FF0000'
|
||||
}
|
||||
};
|
||||
this[deviceType.MaintenanceLamps] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.ZcCommunication] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.ChainControl] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00', // 控制灯颜色
|
||||
offColor: '#ff0000'
|
||||
}
|
||||
};
|
||||
this[deviceType.IntersiteControl] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.CenterCommunication] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.LeuControl] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.LocalControl] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00', // 控制灯颜色
|
||||
offColor: '#ff0000'
|
||||
}
|
||||
};
|
||||
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.Automactic] = {
|
||||
// 是否显示
|
||||
visible: true,
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
subtitleText: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 17 // 等于副标题距离
|
||||
},
|
||||
lamp: {
|
||||
lineDash: null, // 灯的包围框
|
||||
stroke: '#FFFFFF', // 框的颜色
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||
lightColor: '#FFFF00' // 控制灯亮颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.AutomaticRoute] = {
|
||||
// 是否显示
|
||||
displayCondition: '03', // 显示条件prdType 为01
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||
lightColor: '#FFFF00' // 控制灯亮颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.AutoTurnBack] = {
|
||||
// 是否显示
|
||||
visibleConditions: '03',
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
subtitleText: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 17 // 等于副标题距离
|
||||
},
|
||||
lamp: {
|
||||
borderShow: false, // 是否显示边框
|
||||
lineDash: null, // 灯的包围框
|
||||
stroke: '#FFFFFF', // 框的颜色
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||
lightUpColor: '#ffff00' // 点亮灯颜色
|
||||
},
|
||||
OutFrame: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
/** 引导总锁 */
|
||||
this[deviceType.GuideLock] = {
|
||||
// 是否显示
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||
lightUpColor: '#FF0000' // 点亮灯颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.TrainWindow] = {
|
||||
lineColor: '#4DD43F', // 车次窗颜色
|
||||
lineDash: null, // 车次窗虚线间隔
|
||||
lineWidth: 1, // 车次窗线宽
|
||||
trainWindowSmooth: 0, // 车次窗矩形圆滑程度
|
||||
show: true // 车次窗是否显示
|
||||
};
|
||||
this[deviceType.SplitStation] = {
|
||||
lineLength: 15, // 箭头线长度
|
||||
lineWidth: 2, // 线宽
|
||||
height: 35, // 分隔整体高度
|
||||
strokeColor: '#00FF00', // 线颜色
|
||||
triangleFillColor: '#00FF00', // 三角填充颜色
|
||||
textFill: '#FFFFFF', // 文字颜色
|
||||
verticalDistance: 10, // 箭头三角垂直高度
|
||||
horizontalDistance: 7// 箭头三角水平高度
|
||||
};
|
||||
this[deviceType.Train] = {
|
||||
trainBody: {
|
||||
fontFamily: 'consolas',
|
||||
trainBodyLineWidth: 1, // 车身line宽
|
||||
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||
specialTrainType: [
|
||||
{
|
||||
type: '03',
|
||||
serviceNumber: '---',
|
||||
nameFormat: 'groupNumber:serviceNumber'
|
||||
},
|
||||
{
|
||||
type: '03',
|
||||
nameFormat: 'serviceNumber:trainNumber'
|
||||
}
|
||||
], // 特殊列车类型需设置显示格式
|
||||
lrPadding: 4, // 两边间隔
|
||||
upPadding: 4, // 上边距离
|
||||
trainBodyFillColor: '#000099', // 列车车身填充颜色
|
||||
trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
soonerOrLater: {
|
||||
level: 3,
|
||||
trainBody: true,
|
||||
earlyColor: '#00FF00',
|
||||
lateColor: '#800000',
|
||||
normalColor: '#FFF'
|
||||
},
|
||||
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: {
|
||||
groupNumberPrefix: '000', // 车组号前缀
|
||||
defaultGroupNumber: 'EEE', // 默认车组号
|
||||
trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量
|
||||
},
|
||||
trainHead: {
|
||||
trainConntWidth: 3, // 列车竖杠的宽度
|
||||
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
|
||||
trainHeadRectHeight: 20, // 列车车头矩形高度
|
||||
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
|
||||
trainHeadArrowWidth: 6, // 列车车头三角宽度
|
||||
trainHeadArrowOffsetX: 5 // 列车车头三角偏移
|
||||
},
|
||||
common: {
|
||||
trainHeight: 20, // 列车高度
|
||||
trainHeadDistance: 4, // 列车和车头之间的间距
|
||||
trainWidth: 48, // 列车长度
|
||||
trainTextFontSize: 12, // 列车字号
|
||||
fontFamily: 'consolas', // 默认字体 族类
|
||||
haveTextHSDA: true, // 是否需创建textHSDA对象
|
||||
haveArrowText: true, // 是否需创建arrowText对象
|
||||
textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
|
||||
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
|
||||
trainTip:true // 鼠标悬停列车状态信息框是否显示
|
||||
},
|
||||
trainStatusStyle: {
|
||||
trainTypeStatus: [
|
||||
{type: '03', serviceNumberColor: '#FFF000', groupNumberColor: '#FFF000'},
|
||||
{type: '02', trainNumberColor: '#FFF000', groupNumberColor: '#FFF000'}
|
||||
], // 列车类型对应的识别号样式
|
||||
defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色
|
||||
destinationStatusSetText: 'trainWindowBorder', // 目的地状态设置的对应哪个颜色
|
||||
destinationStatus: [
|
||||
{status: '01', showColor: '#FFFFFF'},
|
||||
{status: '02', showColor: '#00FF00'},
|
||||
{status: '03', showColor: '#A0522D'}
|
||||
], // 目的地状态 01准点 02早点 03晚点 04头码车
|
||||
serverNoType: [
|
||||
{type: '01', showColor: '#FFFFFF'},
|
||||
{type: '02', showColor: '#FFF000'}
|
||||
], // 服务号状态类型 01显示服务号 计划车 02显示车组号: 头码车与人工车
|
||||
directionType: [
|
||||
{
|
||||
type: 1,
|
||||
lineLShow: false,
|
||||
lineRShow: true,
|
||||
arrowLShow: false,
|
||||
arrowRShow: true
|
||||
},
|
||||
{
|
||||
type: 0,
|
||||
lineLShow: true,
|
||||
lineRShow: false,
|
||||
arrowLShow: true,
|
||||
arrowRShow: false
|
||||
}
|
||||
], // 列车运行方向状态类型对应车头显示状态 1从左往右 0从右往左
|
||||
directionStopType: [
|
||||
{
|
||||
type: 1,
|
||||
lineLShow: false,
|
||||
lineRShow: true
|
||||
},
|
||||
{
|
||||
type: 0,
|
||||
lineLShow: true,
|
||||
lineRShow: false
|
||||
}
|
||||
], // 列车停止方向类型对应车头显示状态 1从左往右 0从右往左
|
||||
driveModeStatus: [
|
||||
{
|
||||
status: 'AM',
|
||||
trainLColor: '#FF8000',
|
||||
trainRColor: '#FF8000'
|
||||
},
|
||||
{
|
||||
status: 'CM',
|
||||
trainLColor: '#FFFF00',
|
||||
trainRColor: '#FFFF00'
|
||||
},
|
||||
{
|
||||
status: 'RM',
|
||||
trainLColor: '#C2C2C2',
|
||||
trainRColor: '#C2C2C2'
|
||||
},
|
||||
{
|
||||
status: 'NRM',
|
||||
trainLColor: '#FF0000',
|
||||
trainRColor: '#FF0000'
|
||||
}
|
||||
], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM
|
||||
communicationStatus: [
|
||||
{status: 'CBTC', trainColor: '#000099'},
|
||||
{status: 'ITC', trainColor: '#747474'},
|
||||
{status: 'IL', trainColor: '#747474'}
|
||||
] // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
|
||||
}
|
||||
};
|
||||
this[deviceType.FloodGate] = {};
|
||||
this[deviceType.DirectionRod] = {};
|
||||
}
|
||||
}
|
||||
|
||||
export default new SkinCode();
|
@ -470,7 +470,9 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
core: {
|
||||
length: 6, // 道岔单边长度
|
||||
graphShow: true // 图形显示
|
||||
graphShow: true, // 图形显示
|
||||
graphInversionColor: '#FFFF00', // 反位颜色
|
||||
graphLocalColor: '#00FF00' // 定位颜色
|
||||
},
|
||||
jointImg: { // 道岔 A B C D四元素属性配置
|
||||
trapezoidLength: 8, // 直角梯形元素默认长度
|
||||
|
@ -527,8 +527,10 @@ class SkinCode extends defaultStyle {
|
||||
spareColor: '#5b5b5b' // 区段显示颜色
|
||||
},
|
||||
core: {
|
||||
length: 6, // 道岔单边长度
|
||||
graphShow: true // 图形显示
|
||||
length: 6, // 道岔单边长度
|
||||
graphShow: true, // 图形显示
|
||||
graphInversionColor: '#FFFF00', // 反位颜色
|
||||
graphLocalColor: '#00FF00' // 定位颜色
|
||||
},
|
||||
jointImg: { // 道岔 A B C D四元素属性配置
|
||||
trapezoidLength: 8, // 直角梯形元素默认长度
|
||||
@ -537,7 +539,7 @@ class SkinCode extends defaultStyle {
|
||||
forKColor: 'red' // 挤岔颜色 配合挤岔专用
|
||||
},
|
||||
arcBlcok: { // 圆形封锁图形
|
||||
show: true, // 显示
|
||||
show: true, // 显示
|
||||
shapeR: 15,
|
||||
arcBorderColor: 'green', // 默认边框颜色
|
||||
locationColor: 'green', // 定位封锁颜色
|
||||
|
@ -275,5 +275,9 @@ deviceRender[deviceType.Responder] = {
|
||||
_type: deviceType.Responder,
|
||||
zlevel: 1
|
||||
};
|
||||
|
||||
/** 信号按钮 */
|
||||
deviceRender[deviceType.SignalButton] = {
|
||||
_type: deviceType.SignalButton,
|
||||
zlevel: 1
|
||||
};
|
||||
export default deviceRender;
|
||||
|
@ -48,7 +48,8 @@ const deviceType = {
|
||||
OverAp: 'OverAp',
|
||||
FloodGate: 'FloodGate',
|
||||
DirectionRod: 'DirectionRod',
|
||||
Responder: 'Responder'
|
||||
Responder: 'Responder',
|
||||
SignalButton: 'SignalButton'
|
||||
};
|
||||
|
||||
export default deviceType;
|
||||
|
196
src/jmapNew/shape/Section/EBadShunt.js
Normal file
196
src/jmapNew/shape/Section/EBadShunt.js
Normal file
@ -0,0 +1,196 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import BezierCurve from 'zrender/src/graphic/shape/BezierCurve';
|
||||
import Line from 'zrender/src/graphic/shape/Line';
|
||||
import JTriangle from '../../utils/JTriangle';
|
||||
import Vue from 'vue';
|
||||
|
||||
export default class EBadShunt extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = model.z;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
// 分路不良
|
||||
const model = this.model.modelData;
|
||||
const style = this.model.style;
|
||||
/** 创建区段*/
|
||||
if (model && model.points.length > 1) {
|
||||
const traingle = new JTriangle(model.points[0], model.points[model.points.length - 1]);
|
||||
let x = traingle.drictx * (style.Section.badShunt.distance) * traingle.getSinRate();
|
||||
let y = traingle.dricty * (style.Section.badShunt.distance) * traingle.getCosRate();
|
||||
if (x == Infinity) { x = 0; }
|
||||
if (y == Infinity) { y = 0; }
|
||||
// if (model.switch) {
|
||||
// 上侧临时限速线
|
||||
const badShuntLeft = this.createLimit({
|
||||
position: [x, -y],
|
||||
switch: model.switch,
|
||||
code: model.code,
|
||||
isSwitchSection: model.switchSection,
|
||||
relSwitchCode: model.relSwitchCode,
|
||||
isCurve: model.curve, // 是否曲线
|
||||
points: model.points
|
||||
});
|
||||
// 下侧临时限速线
|
||||
const badShuntRight = this.createLimit({
|
||||
position: [-x, y],
|
||||
switch: model.switch,
|
||||
code: model.code,
|
||||
isSwitchSection: model.switchSection,
|
||||
relSwitchCode: model.relSwitchCode,
|
||||
isCurve: model.curve, // 是否曲线
|
||||
points: model.points
|
||||
});
|
||||
badShuntLeft.forEach(item => {
|
||||
this.add(item);
|
||||
});
|
||||
badShuntRight.forEach(item => {
|
||||
this.add(item);
|
||||
});
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
createLimit(model) {
|
||||
const style = this.model.style;
|
||||
const dataList = [];
|
||||
if (model.isCurve) {
|
||||
const shape = {};
|
||||
for (let i = 1; i < (model.points.length - 1); i++) {
|
||||
shape[`cpx${i}`] = model.points[i].x;
|
||||
shape[`cpy${i}`] = model.points[i].y;
|
||||
}
|
||||
|
||||
shape[`x1`] = model.points[0].x;
|
||||
shape[`y1`] = model.points[0].y;
|
||||
shape[`x2`] = model.points[model.points.length - 1].x;
|
||||
shape[`y2`] = model.points[model.points.length - 1].y;
|
||||
|
||||
dataList.push(new BezierCurve({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: this.z,
|
||||
culling: true,
|
||||
shape: shape,
|
||||
position: model.position,
|
||||
style: {
|
||||
lineWidth: style.Section.badShunt.width,
|
||||
stroke: style.Section.badShunt.lineColor,
|
||||
fillOpacity: 0
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
const swPadding = style.Switch.core.length; // 定位和反位时区段距离岔芯的距离
|
||||
var switchWidth = style.Section.line.width + style.Section.line.beyondWidth; // 道岔宽度
|
||||
const beg = Object.assign({}, model.points[0]);
|
||||
const end = Object.assign({}, model.points[model.points.length - 1]);
|
||||
if (model.isSwitchSection && beg.y !== end.y) {
|
||||
const swch = Vue.prototype.$jlmap.mapDevice[model.relSwitchCode]; // 获取道岔model 及状态数据
|
||||
|
||||
if (swch && swch.instance) {
|
||||
const traingle = new JTriangle(swch.intersection, swch.skew);
|
||||
if ((swch.intersection.x === beg.x) && (swch.intersection.y === beg.y) && !swch.normalPosition && swch.sectionCCode == model.code) {
|
||||
beg.x = beg.x + traingle.drictx * (swPadding + switchWidth) * traingle.getCotRate();
|
||||
beg.y = beg.y + traingle.dricty * (swPadding + switchWidth);
|
||||
}
|
||||
|
||||
if ((swch.intersection.x === end.x) && (swch.intersection.y === end.y) && swch.normalPosition && swch.sectionCCode == model.code) {
|
||||
end.x = end.x + traingle.drictx * (swPadding + switchWidth) * traingle.getCotRate();
|
||||
end.y = end.y + traingle.dricty * (swPadding + switchWidth);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (model.points.length == 2) {
|
||||
dataList.push(new Line({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: this.z,
|
||||
position: model.position,
|
||||
shape: {
|
||||
x1: beg.x,
|
||||
y1: beg.y,
|
||||
x2: end.x,
|
||||
y2: end.y
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Section.badShunt.width,
|
||||
stroke: style.Section.badShunt.lineColor
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
dataList.push(new Line({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: this.z,
|
||||
position: model.position,
|
||||
shape: {
|
||||
x1: beg.x,
|
||||
y1: beg.y,
|
||||
x2: model.points[1].x,
|
||||
y2: model.points[1].y
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Section.badShunt.width,
|
||||
stroke: style.Section.badShunt.lineColor
|
||||
}
|
||||
}));
|
||||
|
||||
for (let i = 1; i < (model.points.length - 2); i++) {
|
||||
dataList.push(new Line({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
progressive: model.progressive,
|
||||
position: model.position,
|
||||
shape: {
|
||||
x1: model.points[i].x,
|
||||
y1: model.points[i].y,
|
||||
x2: model.points[i + 1].x,
|
||||
y2: model.points[i + 1].y
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Section.badShunt.width,
|
||||
stroke: style.Section.badShunt.lineColor
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
dataList.push(new Line({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
position: model.position,
|
||||
progressive: model.progressive,
|
||||
shape: {
|
||||
x1: model.points[model.points.length - 2].x,
|
||||
y1: model.points[model.points.length - 2].y,
|
||||
x2: end.x,
|
||||
y2: end.y
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Section.badShunt.width,
|
||||
stroke: style.Section.badShunt.lineColor
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
return dataList;
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.eachChild((child) => {
|
||||
child.hide();
|
||||
});
|
||||
}
|
||||
show() {
|
||||
this.eachChild((child) => {
|
||||
child.show();
|
||||
});
|
||||
}
|
||||
}
|
@ -50,8 +50,16 @@ export default class ESeparator extends Group {
|
||||
drict: 1, // 方向
|
||||
type:model.type // 区段类型
|
||||
});
|
||||
this.add(this.lPartition);
|
||||
this.add(this.rPartition);
|
||||
if (this.lPartition.length > 0) {
|
||||
this.lPartition.forEach(each=>{
|
||||
this.add(each);
|
||||
});
|
||||
}
|
||||
if (this.rPartition.length > 0) {
|
||||
this.rPartition.forEach(each=>{
|
||||
this.add(each);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,67 +122,74 @@ export default class ESeparator extends Group {
|
||||
return partition;
|
||||
}
|
||||
|
||||
createNormal(modelData) {
|
||||
let partition;
|
||||
const style = this.model.style;
|
||||
let points = [];
|
||||
let lineWidth = 0;
|
||||
const tanRate = modelData.traingle.getSinRate();
|
||||
if (style.Section.separator.sepical && (modelData.type == '03' || modelData.type == '01') && tanRate != 0 && tanRate != 1) {
|
||||
// debugger;
|
||||
// // 转换坐标系计算
|
||||
// const dataDirection = modelData.traingle.getRotation() > 0 ? 1 : -1;
|
||||
// points = [
|
||||
// [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getCosRate(),
|
||||
// modelData.point.y + dataDirection * (style.Section.separator.halfHeight) * modelData.traingle.getSinRate()],
|
||||
// [modelData.point.x + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate(),
|
||||
// modelData.point.y - dataDirection * (style.Section.separator.halfHeight) * modelData.traingle.getSinRate()]
|
||||
// ];
|
||||
// partition = this.createModel(modelData, points);
|
||||
const direction = modelData.traingle.drictx * modelData.traingle.dricty > 0 ? 1 : -1;
|
||||
const offset = style.Section.line.width / 2;
|
||||
points = [
|
||||
[modelData.point.x + modelData.drict * modelData.traingle.getSinRate() * offset,
|
||||
modelData.point.y - direction * modelData.drict * modelData.traingle.getCosRate() * offset],
|
||||
// [modelData.point.x, modelData.point.y]
|
||||
[modelData.point.x - modelData.drict * modelData.traingle.getSinRate() * offset * 2,
|
||||
modelData.point.y + direction * modelData.drict * modelData.traingle.getCosRate() * offset * 2],
|
||||
[modelData.point.x - modelData.drict * offset * 2.5 / modelData.traingle.getSinRate(),
|
||||
modelData.point.y - direction * modelData.drict * modelData.traingle.getCosRate() * offset],
|
||||
[modelData.point.x + modelData.drict * modelData.traingle.getSinRate() * offset,
|
||||
modelData.point.y - direction * modelData.drict * modelData.traingle.getCosRate() * offset]
|
||||
];
|
||||
partition = new Polyline({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
points: points
|
||||
},
|
||||
style: {
|
||||
lineWidth:1,
|
||||
fill:this.style.Section.separator.color
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
points = [
|
||||
[modelData.point.x, modelData.point.y - (style.Section.separator.halfHeight)],
|
||||
[modelData.point.x, modelData.point.y + (style.Section.separator.halfHeight)]
|
||||
];
|
||||
lineWidth = modelData.type == '02' ? style.Section.separator.logicWidth : style.Section.separator.width;
|
||||
partition = this.createModel(modelData, points, lineWidth);
|
||||
}
|
||||
return partition;
|
||||
}
|
||||
|
||||
setType(modelData) {
|
||||
const style = this.model.style;
|
||||
const type = modelData.sepType;
|
||||
|
||||
if (modelData && style && modelData.traingle) {
|
||||
let partition = null;
|
||||
let partition = [];
|
||||
if (type === '01') { // 普通分割
|
||||
let points = [];
|
||||
let lineWidth = 0;
|
||||
const tanRate = modelData.traingle.getSinRate();
|
||||
if (style.Section.separator.sepical && (modelData.type == '03' || modelData.type == '01') && tanRate != 0 && tanRate != 1) {
|
||||
// debugger;
|
||||
// // 转换坐标系计算
|
||||
// const dataDirection = modelData.traingle.getRotation() > 0 ? 1 : -1;
|
||||
// points = [
|
||||
// [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getCosRate(),
|
||||
// modelData.point.y + dataDirection * (style.Section.separator.halfHeight) * modelData.traingle.getSinRate()],
|
||||
// [modelData.point.x + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate(),
|
||||
// modelData.point.y - dataDirection * (style.Section.separator.halfHeight) * modelData.traingle.getSinRate()]
|
||||
// ];
|
||||
// partition = this.createModel(modelData, points);
|
||||
const direction = modelData.traingle.drictx * modelData.traingle.dricty > 0 ? 1 : -1;
|
||||
const offset = style.Section.line.width / 2;
|
||||
points = [
|
||||
[modelData.point.x + modelData.drict * modelData.traingle.getSinRate() * offset,
|
||||
modelData.point.y - direction * modelData.drict * modelData.traingle.getCosRate() * offset],
|
||||
// [modelData.point.x, modelData.point.y]
|
||||
[modelData.point.x - modelData.drict * modelData.traingle.getSinRate() * offset * 2,
|
||||
modelData.point.y + direction * modelData.drict * modelData.traingle.getCosRate() * offset * 2],
|
||||
[modelData.point.x - modelData.drict * offset * 2.5 / modelData.traingle.getSinRate(),
|
||||
modelData.point.y - direction * modelData.drict * modelData.traingle.getCosRate() * offset],
|
||||
[modelData.point.x + modelData.drict * modelData.traingle.getSinRate() * offset,
|
||||
modelData.point.y - direction * modelData.drict * modelData.traingle.getCosRate() * offset]
|
||||
];
|
||||
partition = new Polyline({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
points: points
|
||||
},
|
||||
style: {
|
||||
lineWidth:1,
|
||||
fill:this.style.Section.separator.color
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
points = [
|
||||
[modelData.point.x, modelData.point.y - (style.Section.separator.halfHeight)],
|
||||
[modelData.point.x, modelData.point.y + (style.Section.separator.halfHeight)]
|
||||
];
|
||||
lineWidth = modelData.type == '02' ? style.Section.separator.logicWidth : style.Section.separator.width;
|
||||
partition = this.createModel(modelData, points, lineWidth);
|
||||
}
|
||||
partition = [this.createNormal(modelData)];
|
||||
} else if (type === '02') { // 单侧分割符
|
||||
const points = [
|
||||
[modelData.point.x + modelData.drict * (style.Section.separator.halfHeight), modelData.point.y - (style.Section.separator.halfHeight * 1.5)],
|
||||
[modelData.point.x, modelData.point.y - (style.Section.separator.halfHeight * 1.5)],
|
||||
[modelData.point.x, modelData.point.y + (style.Section.separator.halfHeight * 1.5)]
|
||||
];
|
||||
partition = this.createModel(modelData, points);
|
||||
partition = [this.createModel(modelData, points)];
|
||||
} else if (type === '03') { // 尽头分隔符
|
||||
let points = [];
|
||||
if (style.Section.separator.isLikeT) {
|
||||
@ -194,11 +209,15 @@ export default class ESeparator extends Group {
|
||||
}
|
||||
const lineWidth = style.Section.separator.endWidth;
|
||||
const stroke = style.Section.separator.endColor;
|
||||
partition = this.createModel(modelData, points, lineWidth, stroke);
|
||||
partition = [this.createModel(modelData, points, lineWidth, stroke)];
|
||||
} else if (type === '04') { // 侵限分隔符
|
||||
partition = this.createCircle(modelData);
|
||||
if (this.style.Section.separator.invadeSpecial) {
|
||||
partition = [this.createNormal(modelData), this.createCircle(modelData)];
|
||||
} else {
|
||||
partition = [this.createCircle(modelData)];
|
||||
}
|
||||
} else if (type === '05') { // 特色分隔符
|
||||
partition = this.createCircleArc(modelData);
|
||||
partition = [this.createCircleArc(modelData)];
|
||||
}
|
||||
return partition;
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ import ELimitName from './ELimitName'; // 成都三号线 限速名称
|
||||
// import JTriangle from '../../utils/JTriangle';
|
||||
import { drawSectionStyle } from '../../config/defaultStyle';
|
||||
import EStopRouteImg from './EStopRouteImg';
|
||||
import EBadShunt from './EBadShunt';
|
||||
import store from '@/store/index';
|
||||
|
||||
/** 区段*/
|
||||
@ -61,7 +62,8 @@ export default class Section extends Group {
|
||||
'separator': ESeparator, // 分隔符
|
||||
'speedLimit': ELimitLines, // 限速线
|
||||
'speedLimitName': ELimitName, // 限速线名称
|
||||
'shuttleBack': EBackArrowGroup // 折返箭头 (成都三号线显示)
|
||||
'shuttleBack': EBackArrowGroup, // 折返箭头 (成都三号线显示)
|
||||
'badShunt':EBadShunt // 大铁项目 分路不良
|
||||
};
|
||||
// 遍历当前线路下的绘图元素
|
||||
const model = this.model;
|
||||
@ -105,6 +107,7 @@ export default class Section extends Group {
|
||||
this.name && this.name.recover();
|
||||
this.speedLimit && this.speedLimit.hide();
|
||||
this.speedLimitName && this.speedLimitName.hide();
|
||||
this.badShunt && this.badShunt.hide();
|
||||
|
||||
this.axle && this.axle.setStyle({
|
||||
stroke: this.style.Section.line.spareColor,
|
||||
@ -433,9 +436,16 @@ export default class Section extends Group {
|
||||
sectionSwitch.instance && sectionSwitch.instance.setLimitState(model.speedUpLimit > 0, model.speedUpLimit);
|
||||
}
|
||||
}
|
||||
// 分路不良
|
||||
model.badShunt && this.badShuntStatus();
|
||||
}
|
||||
}
|
||||
|
||||
// 分路不良
|
||||
badShuntStatus() {
|
||||
this.badShunt && this.badShunt.show();
|
||||
}
|
||||
|
||||
/** 计算提示位置*/
|
||||
getShapeTipPoint() {
|
||||
const rect = this.getBoundingRect();
|
||||
|
121
src/jmapNew/shape/SignalButton/index.js
Normal file
121
src/jmapNew/shape/SignalButton/index.js
Normal file
@ -0,0 +1,121 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import Line from 'zrender/src/graphic/shape/Line';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
|
||||
export default class SignalButton extends Group {
|
||||
constructor(model, {style}) {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 0;
|
||||
this.model = model;
|
||||
this.style = style.Line;
|
||||
this.isShowShape = true;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
this.setShowMode();
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
let fillColor = '#008000';
|
||||
if (model.type === 'GUIDE') {
|
||||
fillColor = '#5050E1';
|
||||
} else if (model.type === 'FLEXIBLE' || model.type === 'SHUNT_TERMINAL') {
|
||||
fillColor = '#808080';
|
||||
}
|
||||
this.rectButton = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
silent: true,
|
||||
shape: {
|
||||
x: model.position.x,
|
||||
y: model.position.y,
|
||||
width: 14,
|
||||
height: 14
|
||||
},
|
||||
style: {
|
||||
lineDash: null,
|
||||
stroke: '#808080',
|
||||
fill: fillColor
|
||||
}
|
||||
});
|
||||
this.leftLine = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: model.position.x,
|
||||
y1: model.position.y,
|
||||
x2: model.position.x + 14,
|
||||
y2: model.position.y + 14
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#ff0000'
|
||||
}
|
||||
});
|
||||
this.add(this.leftLine);
|
||||
this.leftLine.hide();
|
||||
this.rightLine = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: model.position.x + 14,
|
||||
y1: model.position.y,
|
||||
x2: model.position.x,
|
||||
y2: model.position.y + 14
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#ff0000'
|
||||
}
|
||||
});
|
||||
this.add(this.rightLine);
|
||||
this.rightLine.hide();
|
||||
this.buttonText = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
x: model.position.x + 7,
|
||||
y: model.position.y - 20,
|
||||
fontWeight: '400',
|
||||
fontSize: 12,
|
||||
fontFamily: '',
|
||||
text: model.name,
|
||||
textFill: '#C0C0C0',
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
}
|
||||
});
|
||||
this.add(this.rectButton);
|
||||
this.add(this.buttonText);
|
||||
}
|
||||
startAnimate() {
|
||||
let color = '#008000';
|
||||
if (this.model.type === 'TRAIN_TERMINAL') {
|
||||
color = '#008000';
|
||||
} else if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') {
|
||||
color = '#808080';
|
||||
}
|
||||
this.rectButton && this.rectButton.animateStyle(true)
|
||||
.when(0, { fill: '#000' })
|
||||
.when(1000, { fill: color })
|
||||
.when(2000, { fill: '#000' })
|
||||
.start();
|
||||
}
|
||||
stopAnimation() {
|
||||
this.rectButton && this.rectButton.stopAnimation(true);
|
||||
}
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
// 设置显示模式
|
||||
setShowMode() {
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
}
|
||||
getAnchorPoint() {
|
||||
}
|
||||
}
|
@ -230,11 +230,22 @@ export default class Switch extends Group {
|
||||
offsetX = directx * this.style.Switch.rectLock.offset.x;
|
||||
offsetY = directy * this.style.Switch.rectLock.offset.y;
|
||||
}
|
||||
let x = this.model.intersection.x - this.style.Switch.rectLock.rectWidth / 2 + offsetX;
|
||||
let y = this.model.intersection.y - this.style.Switch.rectLock.rectWidth / 2 + offsetY;
|
||||
if (this.style.Switch.rectLock.followName) {
|
||||
const directx = this.triangle.drictx;
|
||||
const rect = this.name.getBoundingRect();
|
||||
const wLen = this.style.Switch.rectLock.rectWidth - (directx > 0? rect.width: rect.width/2);
|
||||
const hLen = this.style.Switch.rectLock.rectWidth - rect.height
|
||||
x = rect.x - wLen/2;
|
||||
y = rect.y - hLen/2
|
||||
}
|
||||
|
||||
this.lockRect = new ELockRect({ // 单锁矩形框
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 6,
|
||||
x: this.model.intersection.x - this.style.Switch.rectLock.rectWidth / 2 + offsetX,
|
||||
y: this.model.intersection.y - this.style.Switch.rectLock.rectWidth / 2 + offsetY,
|
||||
x,
|
||||
y,
|
||||
width: this.style.Switch.rectLock.rectWidth,
|
||||
lineWidth: 1.8,
|
||||
stroke: this.style.Switch.rectLock.rectBorderColor,
|
||||
@ -314,8 +325,9 @@ export default class Switch extends Group {
|
||||
|
||||
/** 恢复状态*/
|
||||
recover() {
|
||||
this.lockRect.hide(); // 矩形包围框
|
||||
this.lockArc.hide(); // 圆形单锁框
|
||||
this.lockRect && this.lockRect.hide(); // 矩形包围框
|
||||
this.lockCircle && this.lockCircle.hide(); // 圆形包围框
|
||||
this.lockArc && this.lockArc.hide(); // 圆形单锁框
|
||||
this.name.getNameText().stopAnimation(false);
|
||||
this.shapeModelC.hide(); // 形状 C
|
||||
this.shapeModelA.hide(); // 形状 A
|
||||
@ -344,7 +356,7 @@ export default class Switch extends Group {
|
||||
}
|
||||
if (this.style.Switch.core.graphShow) { // 佛山线路显示
|
||||
this.shapeModelB.show();
|
||||
this.shapeModelB.setColor('#00FF00');
|
||||
this.shapeModelB.setColor(this.style.Switch.core.graphLocalColor);
|
||||
this.shapeModelC.show();
|
||||
this.shapeModelC.setColor(this.style.backgroundColor);
|
||||
}
|
||||
@ -364,7 +376,7 @@ export default class Switch extends Group {
|
||||
this.shapeModelA.setColor(this.style.Section.line.spareColor);
|
||||
if (this.style.Switch.core.graphShow) { // 佛山线路显示
|
||||
this.shapeModelC.show();
|
||||
this.shapeModelC.setColor('#FFFF00');
|
||||
this.shapeModelC.setColor(this.style.Switch.core.graphInversionColor);
|
||||
this.shapeModelC.attr({
|
||||
z: this.z + 6
|
||||
});
|
||||
@ -474,16 +486,20 @@ export default class Switch extends Group {
|
||||
|
||||
/** 单锁*/
|
||||
setMonolock(normalPosition, reversePosition) {
|
||||
if (this.style.Switch.rectLock.monolock) { // 判断单锁矩形是否显示
|
||||
if (this.style.Switch.rectLock &&
|
||||
this.style.Switch.rectLock.monolock) { // 判断单锁矩形是否显示
|
||||
this.lockRect.show();
|
||||
if (this.style.Switch.rectLock.rectBorderFillColor) { // 西安二号线 专用显示
|
||||
this.lockRect.setStyle({ stroke: this.style.Switch.rectLock.rectBorderColor, fill: this.style.Switch.rectLock.rectBorderFillColor });
|
||||
}
|
||||
}
|
||||
if (this.style.Switch.text.monolock) { // 单锁显示名称包围框
|
||||
|
||||
if (this.style.Switch.text &&
|
||||
this.style.Switch.text.monolock) { // 单锁显示名称包围框
|
||||
this.setHasTextBorder(1);
|
||||
}
|
||||
if (this.style.Switch.arcBlcok.show) { // 圆形单锁是否显示
|
||||
if (this.style.Switch.arcBlcok &&
|
||||
this.style.Switch.arcBlcok.show) { // 圆形单锁是否显示
|
||||
this.lockArc.show();
|
||||
if (normalPosition) {
|
||||
this.lockArc.setStyle({ stroke: this.style.Switch.arcBlcok.locationColor });
|
||||
@ -545,6 +561,7 @@ export default class Switch extends Group {
|
||||
this.lockRect.setStyle({ stroke: this.style.Switch.rectLock.blockColor, fill: this.style.Switch.rectLock.blockFillColor });
|
||||
}
|
||||
}
|
||||
|
||||
// if (this.style.Switch.coverBlock && this.style.Switch.coverBlock.show) {
|
||||
// this.shapeBlockCover.show();
|
||||
// this.shapeBlockCover.setColor(this.style.Switch.coverBlock.coverBlockColor);
|
||||
|
@ -30,6 +30,7 @@ import OverAp from './OverAp/index.js';
|
||||
import FloodGate from './FloodGate/index';
|
||||
import DirectionRod from './DirectionRod/index';
|
||||
import Responder from './Responder/index';
|
||||
import SignalButton from './SignalButton/index';
|
||||
|
||||
/** 图库*/
|
||||
const mapShape = {};
|
||||
@ -81,6 +82,7 @@ mapShape[deviceType.OverAp] = OverAp;
|
||||
mapShape[deviceType.FloodGate] = FloodGate;
|
||||
mapShape[deviceType.DirectionRod] = DirectionRod;
|
||||
mapShape[deviceType.Responder] = Responder;
|
||||
mapShape[deviceType.SignalButton] = SignalButton;
|
||||
|
||||
function shapefactory(device, jmap) {
|
||||
const type = device._type;
|
||||
|
@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
return '信号关灯';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
return OperationEvent.Signal.signalClose.confirm.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.messages = operate.messages;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
this.signalClose();
|
||||
}
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.signalClose.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm confirm-control-speed"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="540px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{ message }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControlSpeed',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
type: '',
|
||||
operation: '',
|
||||
message: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
return '区段设置限速';
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
return '区段取消限速';
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
return '道岔设置限速';
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
return '道岔取消限速';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
return OperationEvent.Section.cancelSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
return OperationEvent.Switch.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
return OperationEvent.Switch.cancelSpeed.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.type = operate.type;
|
||||
this.operation = operate.operation;
|
||||
this.message = operate.message;
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.type
|
||||
};
|
||||
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control-speed .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm confirm-control-speed"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{ message }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="11">
|
||||
<el-button :id="confirmId" type="primary" @click="confirm">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ConfirmTip',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
message: '',
|
||||
confirmId: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '提示';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.message = operate.message;
|
||||
this.dialogShow = true;
|
||||
this.confirmId = operate.confirmId;
|
||||
},
|
||||
confirm() {
|
||||
this.$emit('close');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.confirm-control-speed .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
.chengdou-03__systerm .el-dialog .el-button{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
return '添加列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
return '修改列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
return '删除列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
return '移动列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
return '交换列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
return '修改车组号';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
/** 添加列车识别号*/
|
||||
return OperationEvent.Train.addTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
/** 修改列车识别号*/
|
||||
return OperationEvent.Train.editTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
/** 删除列车识别号*/
|
||||
return OperationEvent.Train.delTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
/** 移动列车识别号*/
|
||||
return OperationEvent.Train.moveTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
/** 交换列车识别号*/
|
||||
return OperationEvent.Train.switchTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
/** 修改车组号*/
|
||||
return OperationEvent.Train.editTrainNo.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.messages = operate.messages;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
this.routeSetting();
|
||||
}
|
||||
},
|
||||
// 进路设置
|
||||
routeSetting() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Train.addTrainId.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,194 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
title="密码校验"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-input v-model="encryptionPassword" placeholder="请使用软键盘输入" size="medium" :disabled="true" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="showMistake">
|
||||
<el-col :span="22" :offset="1">
|
||||
<span class="password-error">*密码输入错误请重新输入*</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">7</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">8</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">9</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">4</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">5</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">6</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">1</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">2</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">3</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">0</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputClear">C</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="backSpace"> < </el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="12">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'PasswordBox',
|
||||
data() {
|
||||
return {
|
||||
/* 写死的初始密码*/
|
||||
correctPassword: '123',
|
||||
dialogShow: false,
|
||||
operation: '',
|
||||
checkHasInput: false,
|
||||
/* 输入值*/
|
||||
passwordCheck: '',
|
||||
/* 输入值替换为对应长度的星号*/
|
||||
encryptionPassword: '',
|
||||
loading: false,
|
||||
showMistake: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.password.domId : ''
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
if (operate.operateNext) {
|
||||
this.operation = operate.operateNext;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.checkHasInput = false;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.showMistake = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() { // 确定
|
||||
if (this.passwordCheck === this.correctPassword) {
|
||||
this.$emit('checkOver', this.operate);
|
||||
this.doClose();
|
||||
this.inputClear();
|
||||
} else {
|
||||
this.showMistake = true;
|
||||
}
|
||||
},
|
||||
/* 软键盘输入*/
|
||||
inputNum(e) {
|
||||
this.showMistake = false;
|
||||
this.passwordCheck += e.path[0].innerText;
|
||||
this.encryptionPassword = this.passwordCheck.replace(/./g, '*');
|
||||
},
|
||||
/* 软键盘清除*/
|
||||
inputClear() {
|
||||
this.showMistake = false;
|
||||
this.passwordCheck = '';
|
||||
this.encryptionPassword = '';
|
||||
},
|
||||
/* 软键盘回退*/
|
||||
backSpace() {
|
||||
this.showMistake = false;
|
||||
const password = this.passwordCheck;
|
||||
if (password !== '') {
|
||||
this.passwordCheck = password.substring(0, password.length - 1);
|
||||
this.encryptionPassword = this.passwordCheck;
|
||||
}
|
||||
},
|
||||
|
||||
cancel() {
|
||||
const operate = {
|
||||
send: false,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.password.operation
|
||||
};
|
||||
this.$emit('checkCancel');
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.inputClear();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.notice-info .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
|
||||
.password-error {
|
||||
|
||||
color: red;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm popup-alarm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-row>
|
||||
<el-col :offset="2">
|
||||
<span v-for="(message, index) in messages" :key="index">{{ message }}</span><br>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'PopupAlarm',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: [],
|
||||
operate: null,
|
||||
operation: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '弹出式告警';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.dialogShow = true;
|
||||
this.messages = messages || [];
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
// 确认计轴有效
|
||||
this.alxeEffective();
|
||||
}
|
||||
|
||||
},
|
||||
alxeEffective() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.alarm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.popup-alarm .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
196
src/jmapNew/theme/datie_01/menus/dialog/routeDetail.vue
Normal file
196
src/jmapNew/theme/datie_01/menus/dialog/routeDetail.vue
Normal file
@ -0,0 +1,196 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm route-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="460px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="2"><span>车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="1"><span>始端信号机</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin-top: 20px">
|
||||
<el-table
|
||||
ref="tempTable"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
:height="140"
|
||||
>
|
||||
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
domIdChoose: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'mapConfig'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '查询进路状态';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
// 如果不是因为断点激活则需要,初始化菜单初始值
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.tempData = tempData || [];
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
handleRouteName(name) {
|
||||
return name.replace(/-/, '-->');
|
||||
},
|
||||
handleDirection(signalCode) {
|
||||
let signalDirection = '';
|
||||
this.signalList.some(item => {
|
||||
if (item.code === signalCode) {
|
||||
signalDirection = item.right;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
|
||||
return '上行';
|
||||
} else {
|
||||
return '下行';
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
278
src/jmapNew/theme/datie_01/menus/dialog/routeGuide.vue
Normal file
278
src/jmapNew/theme/datie_01/menus/dialog/routeGuide.vue
Normal file
@ -0,0 +1,278 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm route-setting"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="460px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="route-table-box">
|
||||
<span class="route-table-tip">进路列表</span>
|
||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini" height="90" highlight-current-row @row-click="clickEvent">
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" style="margin-top: 40px">
|
||||
<el-col :span="12" :offset="12">
|
||||
<el-button
|
||||
:id="domIdConfirm"
|
||||
type="primary"
|
||||
:loading="loading"
|
||||
:disabled="commitDisabled"
|
||||
@click="commit"
|
||||
>执行</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<!--<password-box ref="passwordBox" @checkOver="passWordCommit" />-->
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
// import PasswordBox from './childDialog/passwordInputBox.vue';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
NoticeInfo
|
||||
// PasswordBox
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
beforeSectionList: [],
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: '',
|
||||
display: true,
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
},
|
||||
commitDisabled:true,
|
||||
controlTypeNameMap: {
|
||||
'01': '折返',
|
||||
'02': '直通'
|
||||
},
|
||||
row: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.guide.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '办理引导进路';
|
||||
},
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'mapConfig'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
getProtectedSectionName(row) {
|
||||
let name = '';
|
||||
if (row &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList.length > 0) {
|
||||
|
||||
const protect = row.overlapSectionList[0];
|
||||
name = `${protect.name}`;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
if (station) {
|
||||
name = `${name}(${station.name})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
handleRouteName(name) {
|
||||
return name.replace(/-/, '-->');
|
||||
},
|
||||
handleDirection(signalCode) {
|
||||
let signalDirection = '';
|
||||
this.signalList.some(item => {
|
||||
if (item.code === signalCode) {
|
||||
signalDirection = item.right;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
|
||||
return '上行';
|
||||
} else {
|
||||
return '下行';
|
||||
}
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
this.commitDisabled = true;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.tempData = tempData || [];
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
clickEvent(row, event, column) {
|
||||
this.commitDisabled = false;
|
||||
this.row = row;
|
||||
if (row) {
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.guide.choose.operation,
|
||||
val: row.code
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 办理引导进路
|
||||
commit() {
|
||||
if (this.row && this.row.code) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.guide.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||
param: {
|
||||
routeCode: this.row.code
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
} else {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.route-table-tip {
|
||||
position: relative !important;
|
||||
color: #3C72DF !important;
|
||||
background: #ECE9D8 !important;
|
||||
font-size: 12px;
|
||||
top: -7px;
|
||||
left: 7px;
|
||||
}
|
||||
|
||||
.route-table-box {
|
||||
margin-top: 20px !important;
|
||||
line-height: 10px !important;
|
||||
border: 2px solid #FFFFFF !important;
|
||||
border-radius: 5px !important;
|
||||
z-index: 1;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
|
||||
.item-lable {
|
||||
line-height: 26px !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
267
src/jmapNew/theme/datie_01/menus/dialog/routeHandControl.vue
Normal file
267
src/jmapNew/theme/datie_01/menus/dialog/routeHandControl.vue
Normal file
@ -0,0 +1,267 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-dialogDrag class="chengdou-03__systerm route-hand-control" :title="title" :visible.sync="show" width="500px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="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="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" :highlight-current-row="highlight" :height="140" @row-click="clickEvent">
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :disabled="commitDisabled" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'RouteHandControl',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
tempData: [],
|
||||
operation: null,
|
||||
selection: [],
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
highlight: true,
|
||||
row: '',
|
||||
commitDisabled: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'mapConfig'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return OperationEvent.Signal.humanControl.choose.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return OperationEvent.Signal.atsAutoControl.choose.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return '进路收人工控';
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return '进路交自动控';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
this.selection = [];
|
||||
this.commitDisabled = true;
|
||||
// 如果不是断点激活,而是第一次显示则初始化
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
if (tempData && tempData.length > 0) {
|
||||
tempData.forEach(elem => {
|
||||
elem.check = false;
|
||||
elem.disabled = false;
|
||||
// 设置禁用状态
|
||||
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
|
||||
(elem.atsControl == '0') ) {
|
||||
elem.disabled = true;
|
||||
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
|
||||
(elem.atsControl == '1') ) {
|
||||
elem.disabled = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.tempData = tempData || [];
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
handleRouteName(name) {
|
||||
return name.replace(/-/, '-->');
|
||||
},
|
||||
handleDirection(signalCode) {
|
||||
let signalDirection = '';
|
||||
this.signalList.some(item => {
|
||||
if (item.code === signalCode) {
|
||||
signalDirection = item.right;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
|
||||
return '上行';
|
||||
} else {
|
||||
return '下行';
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$refs.tempTable.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
|
||||
clickEvent(row, event, column) {
|
||||
this.highlight = false;
|
||||
if (row && row.code) {
|
||||
this.highlight = true;
|
||||
this.selection = [row];
|
||||
this.beforeSectionList = row.containSectionList || [];
|
||||
this.row = row;
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
operation: '',
|
||||
val: row.code
|
||||
};
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 进路交人工控*/
|
||||
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
|
||||
this.commitDisabled = !row.atsControl;
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 进路交自动控*/
|
||||
this.commitDisabled = Boolean(row.atsControl);
|
||||
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 进路交人工控*/
|
||||
this.humanControl();
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 进路交自动控*/
|
||||
this.atsAutoControl();
|
||||
}
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
commitOperate(menuOperate.Signal.humanControl, {routeCodeList: [this.row.code]}, 2).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList: [this.row.code]}, 2).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
325
src/jmapNew/theme/datie_01/menus/dialog/routeSelection.vue
Normal file
325
src/jmapNew/theme/datie_01/menus/dialog/routeSelection.vue
Normal file
@ -0,0 +1,325 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm route-setting"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="route-table-box">
|
||||
<span class="route-table-tip">进路列表</span>
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tempData"
|
||||
border
|
||||
:cell-style="tableStyle"
|
||||
style="width: 99%;"
|
||||
size="mini"
|
||||
height="150"
|
||||
highlight-current-row
|
||||
@row-click="clickEvent"
|
||||
>
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" style="margin-top: 70px">
|
||||
<el-col :span="12" :offset="12">
|
||||
<el-button
|
||||
:id="domIdConfirm"
|
||||
type="primary"
|
||||
:loading="loading"
|
||||
:disabled="commitDisabled"
|
||||
@click="commit"
|
||||
>执行</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import PasswordBox from './childDialog/passwordInputBox.vue';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
PasswordBox
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
beforeSectionList: [],
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
row: null,
|
||||
operation: '',
|
||||
display: true,
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
commitDisabled:true,
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '办理进路';
|
||||
},
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'sectionList',
|
||||
'mapConfig'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
getProtectedSectionName(row) {
|
||||
let name = '';
|
||||
if (row &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList.length > 0) {
|
||||
|
||||
const protect = row.overlapSectionList[0];
|
||||
name = `${protect.name}`;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
if (station) {
|
||||
name = `${name}(${station.name})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
handleRouteName(name) {
|
||||
return name.replace(/-/, '-->');
|
||||
},
|
||||
handleDirection(signalCode) {
|
||||
let signalDirection = '';
|
||||
this.signalList.some(item => {
|
||||
if (item.code === signalCode) {
|
||||
signalDirection = item.right;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
|
||||
return '上行';
|
||||
} else {
|
||||
return '下行';
|
||||
}
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
this.commitDisabled = true;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.tempData = tempData || [];
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.restoreBeforeDevices();
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
restoreBeforeDevices() {
|
||||
// 恢复之前选中设备
|
||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||
this.beforeSectionList.forEach(elem => {
|
||||
elem.cutOff = false;
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
||||
this.beforeSectionList = [];
|
||||
},
|
||||
clickEvent(row, event, column) {
|
||||
this.row = row;
|
||||
if (row) {
|
||||
// 恢复进路区段的切除状态
|
||||
this.restoreBeforeDevices();
|
||||
row.canSetting = true;
|
||||
this.commitDisabled = false;
|
||||
// 设置选中区段为切除状态
|
||||
const containSectionList = [];
|
||||
if (row.routeSectionList && row.routeSectionList.length) {
|
||||
// 设置新选的进路区段为切除状态
|
||||
row.routeSectionList.forEach(elem => {
|
||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
|
||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||
section.logicSectionCodeList.forEach(item => {
|
||||
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
|
||||
sec.cutOff = true;
|
||||
containSectionList.push(sec);
|
||||
});
|
||||
} else {
|
||||
section.cutOff = true;
|
||||
containSectionList.push(section);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/updateMapState', [...containSectionList]);
|
||||
this.beforeSectionList = containSectionList || [];
|
||||
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||
val: row.code
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
this.loading = true;
|
||||
commitOperate({operation:OperationEvent.Signal.arrangementRoute.confirm.operation}, {routeCode: this.row.code}, 1).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$refs.passwordBox.doShow({operation:OperationEvent.Signal.arrangementRoute.menu.operation});
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
passWordCommit(data) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {}, 2).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.route-table-tip {
|
||||
position: relative !important;
|
||||
color: #3C72DF !important;
|
||||
background: #ECE9D8 !important;
|
||||
font-size: 12px;
|
||||
top: -7px;
|
||||
left: 7px;
|
||||
}
|
||||
|
||||
.route-table-box {
|
||||
margin-top: 15px !important;
|
||||
line-height: 10px !important;
|
||||
border: 2px solid #FFFFFF !important;
|
||||
border-radius: 5px !important;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.item-lable {
|
||||
line-height: 26px !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
114
src/jmapNew/theme/datie_01/menus/dialog/sectionDetail.vue
Normal file
114
src/jmapNew/theme/datie_01/menus/dialog/sectionDetail.vue
Normal file
@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm section-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" label-position="left" :model="formModel" label-width="100px">
|
||||
<el-form-item label="区段名称">
|
||||
<el-input v-model="formModel.sectionName" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="车站名称">
|
||||
<el-input v-model="formModel.stationName" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="公里标(Km)">
|
||||
<el-input v-model="formModel.kmPost" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="长度(m)">
|
||||
<el-input v-model="formModel.lengthFact" disabled />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" style="margin-top: 50px">
|
||||
<el-col :span="7" :offset="17">
|
||||
<el-button :id="domIdConfirm" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
formModel: {
|
||||
sectionName: '',
|
||||
stationName: '',
|
||||
kmPost: '',
|
||||
lengthFact: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Section.detail.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '无岔区段属性对话框';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是因为断点激活则需要,初始化菜单初始值
|
||||
if (!this.dialogShow) {
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
const hasParentCode = (this.selected.type == '02');
|
||||
this.formModel.sectionName = hasParentCode ? selected.parentName + '-' + selected.name : selected.name;
|
||||
this.formModel.lengthFact = selected.lengthFact;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.formModel.stationName = station.name;
|
||||
this.formModel.kmPost = station.kmPost;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Section.detail.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
603
src/jmapNew/theme/datie_01/menus/dialog/standControl.vue
Normal file
603
src/jmapNew/theme/datie_01/menus/dialog/standControl.vue
Normal file
@ -0,0 +1,603 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-detain-train"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="11">
|
||||
<span>车站</span>
|
||||
<el-input v-model="stationName" style="width: 110px; margin-left: 10px;" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<span>站台</span>
|
||||
<el-input v-model="standName" style="width: 110px; margin-left: 10px;" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-if="DetainTrain">
|
||||
<div
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;"
|
||||
>
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-radio-group v-model="radio" @change="choose">
|
||||
<el-col :span="24">
|
||||
<el-radio
|
||||
:id="domIdDetainCar"
|
||||
label="01"
|
||||
style="display: block; text-align: left; float: left; margin-right: 10px;"
|
||||
>本站台
|
||||
</el-radio>
|
||||
<el-radio
|
||||
:id="isUpDirection? domIdDetainChoose: ''"
|
||||
v-if="radio1 == 2"
|
||||
:disabled="!isUpDirection"
|
||||
:label="`${isUpDirection}`"
|
||||
style="display: block; text-align: left; float: left; margin-right: 10px;"
|
||||
>上行全线
|
||||
</el-radio>
|
||||
<el-radio
|
||||
:id="isUpDirection ? '': domIdDetainChoose"
|
||||
v-if="radio1 == 2"
|
||||
:label="`${!isUpDirection}`"
|
||||
:disabled="isUpDirection"
|
||||
style="display: block; text-align: left; float: left;"
|
||||
>下行全线</el-radio>
|
||||
</el-col>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
label="1"
|
||||
:disabled="radio1 == '2'"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
扣车</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
label="2"
|
||||
:disabled="radio1 == '1'"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
取消扣车</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="JumpStop">
|
||||
<div
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 115px;"
|
||||
>
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="24">
|
||||
<el-radio-group v-model="radio" @change="chooseJumpStop">
|
||||
<el-radio
|
||||
:id="radio == '02' ? domIdChoose : ''"
|
||||
label="01"
|
||||
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 80px;"
|
||||
>
|
||||
站台跳停
|
||||
</el-radio>
|
||||
<el-radio
|
||||
:id="radio == '01' ? domIdChoose : ''"
|
||||
label="02"
|
||||
style="display: block; text-align: left; margin-left: 0; float: left;"
|
||||
>
|
||||
指定列车跳停</el-radio>
|
||||
<div style="float: left;">
|
||||
<span>车组号</span>
|
||||
<el-select
|
||||
:id="domIdCancelJumpStop"
|
||||
v-model="tripNumber"
|
||||
style="width: 120px; margin-left: 20px;"
|
||||
size="mini"
|
||||
:disabled="radio == '01'"
|
||||
@change="trainNoSelectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in trainList"
|
||||
:key="option.groupNumber"
|
||||
:label="option.groupNumber"
|
||||
:value="option.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
label="1"
|
||||
:disabled="radio1 == 2"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
跳停</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
label="2"
|
||||
:disabled="radio1 == 1"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
取消跳停</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="RunLevel">
|
||||
<div
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 105px;"
|
||||
>
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-radio-group v-model="radio" @change="chooseStopTime">
|
||||
<el-col :span="24">
|
||||
<el-radio
|
||||
:id="radio == '02' ? domIdChoose1 : ''"
|
||||
label="01"
|
||||
style="display: block; text-align: left; margin-right: 10px; margin-bottom:10px; width: 60px;"
|
||||
>
|
||||
自动
|
||||
</el-radio>
|
||||
<el-radio
|
||||
:id="radio == '01' ? domIdChoose1 : ''"
|
||||
label="02"
|
||||
style="display: block; text-align: left; margin-left: 0; float: left;"
|
||||
>
|
||||
人工</el-radio>
|
||||
<div v-if="radio2 == 2" style="float: left; margin-left: 20px;">
|
||||
<span>运行等级</span>
|
||||
<el-select
|
||||
:id="domIdRunLevel"
|
||||
v-model="trainRunlevel"
|
||||
style="width: 120px; margin-left: 20px;"
|
||||
size="mini"
|
||||
:disabled="radio == '01'"
|
||||
@change="trainNoSelectLevel"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in runLevelList"
|
||||
:key="option.value"
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div v-if="radio2 == 1" style="float: left; margin-left: 20px;">
|
||||
<span>停站时间</span>
|
||||
<el-input-number
|
||||
:id="domIdStopTime"
|
||||
v-model="trainStopTime"
|
||||
:min="15"
|
||||
:max="300"
|
||||
:step="1"
|
||||
size="mini"
|
||||
:controls="false"
|
||||
style="width:100px;display:inline-block;margin-left:10px;height:34px;"
|
||||
:disabled="radio == '01'"
|
||||
@blur="handleTrainStopTime"
|
||||
/>
|
||||
<div style="margin-left: 5px;display: inline-block;font-size: 14px;">秒</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
|
||||
<el-radio :id="effective === false? '': domIdChoose2" :label="false">一次有效</el-radio>
|
||||
<el-radio :id="effective === true? '': domIdChoose2" :label="true">一直有效</el-radio>
|
||||
</el-radio-group>
|
||||
<!-- <el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
:id="effective == '02' ? '': domIdChoose2"
|
||||
label="01"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
一次有效</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
:id="effective == '01' ? '': domIdChoose2"
|
||||
label="02"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
一直有效</el-radio>
|
||||
</el-col>
|
||||
</el-radio-group> -->
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
standName: '',
|
||||
stationName: '',
|
||||
selected: null,
|
||||
operation: null,
|
||||
isUpDirection:true,
|
||||
radio: '01',
|
||||
radio1: '1',
|
||||
radio2: '1',
|
||||
DetainTrain: false,
|
||||
JumpStop: false,
|
||||
RunLevel: false,
|
||||
trainList: [],
|
||||
runLevelList: [
|
||||
{ value: 2, label: '常速' },
|
||||
{ value: 1, label: '低速' },
|
||||
{ value: 3, label: '高速' }
|
||||
],
|
||||
tripNumber: '',
|
||||
effective: '01',
|
||||
trainRunlevel: 2,
|
||||
trainStopTime: 30,
|
||||
disabledTime: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map',
|
||||
'mapConfig'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
domIdDetainCar() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrain.choose.domId : '';
|
||||
},
|
||||
domIdDetainChoose() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
if (this.radio1 == '1') { // 跳停
|
||||
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
|
||||
} else { // 取消跳停
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
|
||||
}
|
||||
},
|
||||
// domIdJumpStop() {
|
||||
// return this.dialogShow ? OperationEvent.StationStand.setJumpStop.choose.domId : '';
|
||||
// },
|
||||
domIdCancelJumpStop() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.choose.domId : '';
|
||||
},
|
||||
domIdChoose1() {
|
||||
if (this.radio2 == '1') { // 设置停站时间
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose1.domId : '';
|
||||
} else { // 设置站间运行等级
|
||||
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose1.domId : '';
|
||||
}
|
||||
},
|
||||
domIdChoose2() {
|
||||
if (this.radio2 == '1') { // 设置停站时间
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose2.domId : '';
|
||||
} else { // 设置站间运行等级
|
||||
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose2.domId : '';
|
||||
}
|
||||
},
|
||||
domIdStopTime() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.input.domId : '';
|
||||
},
|
||||
domIdRunLevel() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.chooseTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
return '扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation || this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
|
||||
return '取消扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
return '设置跳停';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
return '取消跳停';
|
||||
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
return '设置停站时间';
|
||||
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
return '设置站间运行等级';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
operation(data) {
|
||||
if (data != OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
|
||||
this.JumpStop = false;
|
||||
this.RunLevel = false;
|
||||
this.DetainTrain = false;
|
||||
this.radio = '01';
|
||||
this.radio1 = '1';
|
||||
this.radio2 = '1';
|
||||
if (data == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
this.radio1 = '1';
|
||||
this.radio = '01';
|
||||
this.DetainTrain = true;
|
||||
} else if (data == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
this.radio1 = '2';
|
||||
this.radio = '01';
|
||||
this.DetainTrain = true;
|
||||
} else if (data == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
this.JumpStop = true;
|
||||
this.radio1 = '1';
|
||||
} else if (data == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
this.JumpStop = true;
|
||||
this.radio1 = '2';
|
||||
} else if (data == OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
this.RunLevel = true;
|
||||
this.radio2 = '1';
|
||||
} else if (data == OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
this.RunLevel = true;
|
||||
this.radio2 = '2';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempDate = null) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.tripNumber = '';
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
this.operation = operate.operation;
|
||||
if (selected) {
|
||||
this.getDirection(selected);
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.getDirection(selected);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
this.radio = selected.direction;
|
||||
}
|
||||
this.effective = false;
|
||||
this.radio = '01';
|
||||
this.disabledTime = true;
|
||||
this.trainList = this.map.trainList; // 加载列车数据
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
getDirection(selected) {
|
||||
if (this.mapConfig.upRight) {
|
||||
this.standName = selected.right ? '上行' : '下行';
|
||||
this.isUpDirection = selected.right;
|
||||
} else if (!this.mapConfig.upRight) {
|
||||
this.standName = selected.right ? '下行' : '上行';
|
||||
this.isUpDirection = !selected.right;
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.operation = '';
|
||||
this.trainStopTime = 30;
|
||||
},
|
||||
choose(upDown) { // 取消扣车 请求code码
|
||||
const operate = {
|
||||
operation: upDown == '01'
|
||||
? OperationEvent.StationStand.cancelDetainTrain.choose.operation
|
||||
: OperationEvent.Command.common.choose.operation,
|
||||
val: this.radio
|
||||
};
|
||||
if (this.radio == '02' || this.radio == '03') {
|
||||
this.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation;
|
||||
} else {
|
||||
this.operation = OperationEvent.StationStand.cancelDetainTrain.menu.operation;
|
||||
}
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
trainNoSelectChange(upDown) { // 跳停 选择车组号
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation
|
||||
};
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
chooseJumpStop(upDown) {
|
||||
const operate = {
|
||||
operation: ''
|
||||
};
|
||||
if (this.radio1 == '1') { // 跳停选择
|
||||
operate.operation = OperationEvent.StationStand.setJumpStop.select.operation;
|
||||
} else { // 取消跳停选择
|
||||
operate.operation = OperationEvent.StationStand.cancelJumpStop.select.operation;
|
||||
}
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
chooseEffective(effective) {
|
||||
const operate = {
|
||||
operation: '',
|
||||
val: effective
|
||||
};
|
||||
if (this.radio2 == '1') { // 设置停站时间
|
||||
operate.operation = OperationEvent.StationStand.setStopTime.choose2.operation;
|
||||
} else { // 设置站间运行等级
|
||||
operate.operation = OperationEvent.StationStand.setRunLevel.choose2.operation;
|
||||
}
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
chooseStopTime(upDown) {
|
||||
const operate = {
|
||||
operation: '',
|
||||
val: this.radio
|
||||
};
|
||||
if (this.radio2 == '1') { // 设置停站时间
|
||||
operate.operation = OperationEvent.StationStand.setStopTime.choose1.operation;
|
||||
} else { // 设置站间运行等级
|
||||
operate.operation = OperationEvent.StationStand.setRunLevel.choose1.operation;
|
||||
}
|
||||
if (this.radio === '01') {
|
||||
this.disabledTime = true;
|
||||
this.trainRunlevel = 2;
|
||||
this.effective = false;
|
||||
} else {
|
||||
this.disabledTime = false;
|
||||
this.effective = true;
|
||||
}
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
trainNoSelectLevel(upDown) {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setRunLevel.chooseTrain.operation,
|
||||
val: `${upDown}`,
|
||||
param: {
|
||||
standRunLevel: `${upDown}`
|
||||
}
|
||||
};
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
handleTrainStopTime() {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
||||
val: `${this.trainStopTime}`
|
||||
};
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
handleBreak(operate) { // 断点记录
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
valid && this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
this.setDetainTrain(); /** 设置扣车*/
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation || this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
|
||||
this.cancelDetainTrain(); /** 取消扣车*/
|
||||
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
this.setJumpStop(); /** 设置跳停*/
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
this.cancelJumpStop(); /** 取消跳停*/
|
||||
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
this.setStopTime(); /** 设置停站时间*/
|
||||
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
this.setRunLevel(); /** 设置站间运行等级*/
|
||||
}
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
this.sendCommand(menuOperate.StationStand.setDetainTrain);
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
|
||||
} else {
|
||||
this.sendCommand(menuOperate.StationStand.cancelDetainTrainAll);
|
||||
}
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
this.sendCommand(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.tripNumber});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
this.sendCommand(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.tripNumber});
|
||||
},
|
||||
// 设置停站时间
|
||||
setStopTime() {
|
||||
this.sendCommand(menuOperate.StationStand.setStopTime, {parkingTime: this.radio == '01' ? -1 : this.trainStopTime, parkingAlwaysValid: this.effective});
|
||||
},
|
||||
// 设置运行速度
|
||||
setRunLevel() {
|
||||
this.sendCommand(menuOperate.StationStand.setRunLevel, {runLevelTime:this.radio === '02' ? this.trainRunlevel : 2, runLevelTimeForever: this.effective});
|
||||
},
|
||||
sendCommand(operate, param) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, param, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.stand-detain-train .context {
|
||||
height: 80px !important;
|
||||
}
|
||||
/deep/ {
|
||||
.el-input--mini .el-input__icon{
|
||||
line-height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
223
src/jmapNew/theme/datie_01/menus/dialog/standDetail.vue
Normal file
223
src/jmapNew/theme/datie_01/menus/dialog/standDetail.vue
Normal file
@ -0,0 +1,223 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="380px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10">
|
||||
<span>车站</span>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<span>站台</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="header">
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="standName" style="padding: 0 3px;" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>停站时间</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.stopTime" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>运行等级</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.runLevel" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>扣车</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.detainCar" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>跳停</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.jumpStop" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="18">
|
||||
<span style="opacity: 0;">1</span>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'StandDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
standName: '',
|
||||
strategyMap: {
|
||||
'01': '无折返',
|
||||
'02': '无人折返',
|
||||
'03': '自动换端',
|
||||
'04': '默认'
|
||||
},
|
||||
runLevelList: [
|
||||
'自动',
|
||||
'低速',
|
||||
'常速',
|
||||
'高速'
|
||||
],
|
||||
modelData: {
|
||||
stopTime: '自动',
|
||||
runLevel: '自动',
|
||||
detainCar: '无扣车',
|
||||
jumpStop: '无跳停'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'mapConfig',
|
||||
'stationList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '站台信息';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
|
||||
// const stationList = this.stationList.slice();
|
||||
// const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
// let stationStand, station;
|
||||
// if (selected.direction == '01') { // 下行
|
||||
// // 下行时,此站不是最后一站
|
||||
// if (index != 0) {
|
||||
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
// }
|
||||
// } else {
|
||||
// // 上行时,此站不是最后一站
|
||||
// if (index != this.stationList.length - 1) {
|
||||
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
// }
|
||||
// }
|
||||
this.modelData = {
|
||||
stopTime: selected.parkingTime < 0 ? '自动' : `${selected.parkingTime} 秒`,
|
||||
runLevel: this.runLevelList[selected.runLevelTime],
|
||||
detainCar: selected.stationHoldTrain || selected.centerHoldTrain ? '已设置' : '无扣车',
|
||||
jumpStop: selected.allSkip || selected.assignSkip ? '已设置' : '无跳停'
|
||||
};
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
if (this.mapConfig.upRight) {
|
||||
this.standName = selected.right ? '上行' : '下行';
|
||||
} else if (!this.mapConfig.upRight) {
|
||||
this.standName = selected.right ? '下行' : '上行';
|
||||
}
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected, opts);
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.content {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
332
src/jmapNew/theme/datie_01/menus/dialog/trainControl.vue
Normal file
332
src/jmapNew/theme/datie_01/menus/dialog/trainControl.vue
Normal file
@ -0,0 +1,332 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm train-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item v-if="operation != '70c'" prop="sectionCode">
|
||||
<span slot="label">轨道</span>
|
||||
<el-input v-model="addModel.sectionCode" />
|
||||
</el-form-item>
|
||||
<el-form-item v-else prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车组号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item v-if="operation == '708'" prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" />
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="operation == '70c'" prop="targetCode">
|
||||
<span slot="label">目的地</span>
|
||||
<el-input v-model="addModel.targetCode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item v-if="operation == '708'" prop="trainCode">
|
||||
<span slot="label">序列号</span>
|
||||
<el-input v-model="addModel.trainCode" />
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="operation == '70c'" prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item v-if="operation == '70c'" prop="trainType">
|
||||
<span slot="label">运行模式</span>
|
||||
<br>
|
||||
<el-radio-group v-model="addModel.runningMode" style="margin-left: 15px;">
|
||||
<el-radio :label="'01'">普通</el-radio>
|
||||
<el-radio :label="'02'">专列</el-radio>
|
||||
<el-radio :label="'03'">不停站直达</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-train ref="confirmTrain" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import ConfirmTrain from './childDialog/confirmTrain';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainControl',
|
||||
components: {
|
||||
ConfirmTrain,
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
sectionCode: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
serviceNumber: '',
|
||||
targetCode: '',
|
||||
trainCode: '',
|
||||
runningMode: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
stationName: [
|
||||
{ required: true, message: '请输入车站', trigger: 'blur'}
|
||||
],
|
||||
sectionCode: [
|
||||
{ required: true, message: '请输入轨道', trigger: 'blur'}
|
||||
],
|
||||
trainWindowCode: [
|
||||
{ required: true, message: '请输入车次窗', trigger: 'blur'}
|
||||
],
|
||||
groupNumber: [
|
||||
{ required: true, message: '请选择车组号', trigger: 'change' }
|
||||
],
|
||||
serviceNumber: [
|
||||
{ required: true, message: '请输入服务号', trigger: 'blur'}
|
||||
],
|
||||
targetCode: [
|
||||
{ required: true, message: '请输入目的地号', trigger: 'blur'}
|
||||
],
|
||||
trainCode: [
|
||||
{ required: true, message: '请输入序列号', trigger: 'blur'}
|
||||
],
|
||||
runningMode: [
|
||||
{ required: true, message: '请选择运行模式', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
direction: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
|
||||
/* 设目的地*/
|
||||
return OperationEvent.Train.destinationTrainId.menu.domId;
|
||||
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation) {
|
||||
/* 设计划车*/
|
||||
return OperationEvent.Train.setPlanTrainId.menu.domId;
|
||||
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation) {
|
||||
/* 设人工车*/
|
||||
return OperationEvent.Train.artificialTrainId.menu.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
|
||||
return '设目的地车';
|
||||
} else if ( this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
|
||||
return '设计划车';
|
||||
} else if ( this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
|
||||
return '设人工车';
|
||||
}
|
||||
return '';
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.addModel = {
|
||||
tripNumber: '',
|
||||
groupNumber: '',
|
||||
trainType: '01',
|
||||
serviceNumber: '',
|
||||
targetCode: ''
|
||||
};
|
||||
/** 加载列车数据*/
|
||||
this.loadInitData(this.map);
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation ) {
|
||||
this.destinationTrainId();
|
||||
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
|
||||
this.setPlanTrainId();
|
||||
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
|
||||
this.artificialTrainId();
|
||||
}
|
||||
},
|
||||
// 设目的地车
|
||||
destinationTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Train.destinationTrainId.menu.operation,
|
||||
message: [`设目的地车:成功`],
|
||||
val: ''
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设计划车
|
||||
setPlanTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
|
||||
message: [`设计划车:成功`],
|
||||
val: ''
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设人工车
|
||||
artificialTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Train.artificialTrainId.menu.operation,
|
||||
message: [`设人工车:成功`],
|
||||
val: ''
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
133
src/jmapNew/theme/datie_01/menus/dialog/trainCreate.vue
Normal file
133
src/jmapNew/theme/datie_01/menus/dialog/trainCreate.vue
Normal file
@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="chengdou-03__systerm route-create" :title="title" :visible.sync="show" width="380px" label-position="top" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<el-form size="small" label-width="100px">
|
||||
<el-form-item label="列车:" prop="trainCode">
|
||||
<el-select v-model="trainCode" filterable placeholder="列车">
|
||||
<el-option
|
||||
v-for="item in trainList"
|
||||
:key="item.code"
|
||||
:label="item.groupNumber"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="列车方向:" prop="direction">
|
||||
<el-select v-model="direction" filterable placeholder="列车方向">
|
||||
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
|
||||
</el-select>
|
||||
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col style="text-align: right;">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteCreate',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
trainList: [],
|
||||
trainNoList: [],
|
||||
directionList: [
|
||||
{
|
||||
value: '2',
|
||||
label: '上行'
|
||||
},
|
||||
{
|
||||
value: '1',
|
||||
label: '下行'
|
||||
}
|
||||
],
|
||||
trainCode: '',
|
||||
tripNumber: '',
|
||||
direction: '',
|
||||
selected: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return OperationEvent.Section.newtrain.menu.domId;
|
||||
},
|
||||
title() {
|
||||
return '设置列车';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.dialogShow = true;
|
||||
this.selected = selected;
|
||||
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.trainCode = '';
|
||||
this.direction = '';
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
||||
cmdType: CMD.Section.CMD_NEW_TRAIN,
|
||||
val: '' + this.direction + '::' + this.trainCode
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
181
src/jmapNew/theme/datie_01/menus/dialog/trainCreateNumber.vue
Normal file
181
src/jmapNew/theme/datie_01/menus/dialog/trainCreateNumber.vue
Normal file
@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainCreateNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '新建车组号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.createTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
150
src/jmapNew/theme/datie_01/menus/dialog/trainDelete.vue
Normal file
150
src/jmapNew/theme/datie_01/menus/dialog/trainDelete.vue
Normal file
@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="90px" :model="addModel" :rules="rules">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import { getPublishMapTrainNos } from '@/api/runplan';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainDelete',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
groupNumber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除列车识别号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
// getPublishMapTrainNos(map.skinCode).then(response => {
|
||||
// this.trainNoList = response.data;
|
||||
// }).catch(() => {
|
||||
// this.$messageBox(`获取列车车组号失败`);
|
||||
// });
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.delTrainId.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
176
src/jmapNew/theme/datie_01/menus/dialog/trainDeleteNumber.vue
Normal file
176
src/jmapNew/theme/datie_01/menus/dialog/trainDeleteNumber.vue
Normal file
@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable disabled>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainDeleteNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:''
|
||||
},
|
||||
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除车组号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.deleteTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
378
src/jmapNew/theme/datie_01/menus/dialog/trainDetailInfo.vue
Normal file
378
src/jmapNew/theme/datie_01/menus/dialog/trainDetailInfo.vue
Normal file
@ -0,0 +1,378 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane :id="domIdBasicInfo" label="基本信息" name="first">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="groupNumber">
|
||||
<span slot="label">车组号</span>
|
||||
<el-input v-model="addModel.groupNumber" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="type">
|
||||
<span slot="label">服务类型</span>
|
||||
<el-input v-model="addModel.type" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainCode">
|
||||
<span slot="label">序列号</span>
|
||||
<el-input v-model="addModel.trainCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="driverCode">
|
||||
<span slot="label">司机号</span>
|
||||
<el-input v-model="addModel.driverCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="targetCode">
|
||||
<span slot="label">目的地号</span>
|
||||
<el-input v-model="addModel.targetCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="sectionCode">
|
||||
<span slot="label">轨道</span>
|
||||
<el-input v-model="addModel.sectionCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="nextStation">
|
||||
<span slot="label">下一站</span>
|
||||
<el-input v-model="addModel.nextStation" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="targetName">
|
||||
<span slot="label">目的地</span>
|
||||
<el-input v-model="addModel.targetName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="trackingMode">
|
||||
<span slot="label">跟踪模式</span>
|
||||
<el-input v-model="addModel.trackingMode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="runStatus">
|
||||
<span slot="label">运行状态</span>
|
||||
<el-input v-model="addModel.runStatus" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="departureTime">
|
||||
<span slot="label">出发时刻</span>
|
||||
<el-input v-model="addModel.departureTime" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="arrivedTime">
|
||||
<span slot="label">到达时刻</span>
|
||||
<el-input v-model="addModel.arrivedTime" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="planDeviation">
|
||||
<span slot="label">计划偏离</span>
|
||||
<el-input v-model="addModel.planDeviation" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdMarshalInfo" label="编组信息" name="second">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="marshallingNo">
|
||||
<span slot="label">编组号</span>
|
||||
<el-input v-model="addModel.marshallingNo" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="carNo1">
|
||||
<span slot="label">车头号1</span>
|
||||
<el-input v-model="addModel.carNo1" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="carNo2">
|
||||
<span slot="label">车头号2</span>
|
||||
<el-input v-model="addModel.carNo2" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table :data="tableData" style="width: 100%" height="250">
|
||||
<el-table-column prop="carriage" label="车厢" width="80" />
|
||||
<el-table-column prop="carriageNumber" label="车厢号" width="80" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdAtpInfo" label="ATP信息" name="third">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="trainId">
|
||||
<span slot="label">车载ID</span>
|
||||
<el-input v-model="addModel.trainId" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="directionType">
|
||||
<span slot="label">运行方向</span>
|
||||
<el-input v-model="addModel.directionType" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="drivingMode">
|
||||
<span slot="label">驾驶模式</span>
|
||||
<el-input v-model="addModel.drivingMode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="speed">
|
||||
<span slot="label">速度</span>
|
||||
<el-input v-model="addModel.speed" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stopQuasiState">
|
||||
<span slot="label">停准状态</span>
|
||||
<el-input v-model="addModel.stopQuasiState" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="doorStatus">
|
||||
<span slot="label">车门状态</span>
|
||||
<el-input v-model="addModel.doorStatus" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="runLevel">
|
||||
<span slot="label">运行等级</span>
|
||||
<el-input v-model="addModel.runLevel" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="stopState">
|
||||
<span slot="label">停跳状态</span>
|
||||
<el-input v-model="addModel.stopState" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="position">
|
||||
<span slot="label">车头位置</span>
|
||||
<el-input v-model="addModel.position" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="loadingRate">
|
||||
<span slot="label">载重率</span>
|
||||
<el-input v-model="addModel.loadingRate" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdCarAlarm" label="车辆报警" name="fourth" />
|
||||
</el-tabs>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="19">
|
||||
<el-button :id="domIdCancel" @click="cancel">退出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainDetailInfo',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName:'',
|
||||
groupNumber:'',
|
||||
type:'',
|
||||
serviceNumber:'',
|
||||
trainCode:'',
|
||||
driverCode:'',
|
||||
targetCode:'',
|
||||
sectionCode:'',
|
||||
nextStation:'',
|
||||
targetName:'',
|
||||
trackingMode:'',
|
||||
runStatus:'',
|
||||
departureTime:'',
|
||||
arrivedTime:'',
|
||||
planDeviation:'',
|
||||
marshallingNo:'',
|
||||
carNo1:'',
|
||||
carNo2:'',
|
||||
trainId:'',
|
||||
directionType:'',
|
||||
drivingMode:'',
|
||||
speed:'',
|
||||
stopQuasiState:'',
|
||||
doorStatus:'',
|
||||
runLevel:'',
|
||||
stopState:'',
|
||||
position:'',
|
||||
loadingRate:''
|
||||
},
|
||||
activeName:'first',
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tableData:[
|
||||
{carriage:'1', carriageNumber:'101'},
|
||||
{carriage:'2', carriageNumber:'102'},
|
||||
{carriage:'3', carriageNumber:'103'},
|
||||
{carriage:'4', carriageNumber:'104'},
|
||||
{carriage:'5', carriageNumber:'105'},
|
||||
{carriage:'6', carriageNumber:'106'}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdCarAlarm() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.carAlarm.domId : '';
|
||||
},
|
||||
domIdBasicInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.basicInfo.domId : '';
|
||||
},
|
||||
domIdMarshalInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.marshalInfo.domId : '';
|
||||
},
|
||||
domIdAtpInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.atpInfo.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '列车信息显示';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName:'',
|
||||
tripNumber: '',
|
||||
groupNumber:''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
handleClick() {
|
||||
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
174
src/jmapNew/theme/datie_01/menus/dialog/trainEditNumber.vue
Normal file
174
src/jmapNew/theme/datie_01/menus/dialog/trainEditNumber.vue
Normal file
@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-form-item>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="旧车组号" prop="oldGroupNumber">
|
||||
<el-select v-model="addModel.oldGroupNumber" filterable disabled>
|
||||
<el-option v-for="train in trainList" :key="train.oldGroupNumber" :label="train.oldGroupNumber" :value="train.oldGroupNumber" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item label="新车组号" prop="newGroupNumber">
|
||||
<el-select v-model="addModel.newGroupNumber">
|
||||
<el-option v-for="train in trainList" :key="train.newGroupNumber" :label="train.newGroupNumber" :value="train.newGroupNumber" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group-train">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainEditNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
oldGroupNumber: '',
|
||||
newGroupNumber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
newGroupNumber: [
|
||||
{ required: true, message: '请输入新车组号', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '修改车组号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
oldGroupNumber: '',
|
||||
newGroupNumber: ''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.editTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
200
src/jmapNew/theme/datie_01/menus/dialog/trainMove.vue
Normal file
200
src/jmapNew/theme/datie_01/menus/dialog/trainMove.vue
Normal file
@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="640px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="width: 46%;">
|
||||
<el-form-item label="车 组 号:" label-width="95px" prop="tripNumber">
|
||||
<el-input v-model="addModel.tripNumber" disabled />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="overflow: hidden;">
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;"
|
||||
>
|
||||
<span class="base-label">源车次窗</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandSource">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandSource" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 窗:" prop="trainSource">
|
||||
<el-input v-model="addModel.trainSource" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;"
|
||||
>
|
||||
<span class="base-label">目的车次窗</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 窗:" prop="trainGoal">
|
||||
<el-input v-model="addModel.trainGoal" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
tripNumber: '',
|
||||
trainSource: '',
|
||||
stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
tripNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandSource: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
],
|
||||
trainGoal: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '移动列车识别号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
193
src/jmapNew/theme/datie_01/menus/dialog/trainMoveNumber.vue
Normal file
193
src/jmapNew/theme/datie_01/menus/dialog/trainMoveNumber.vue
Normal file
@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="90px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable disabled>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="purposeStationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.purposeStationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="purposeTrainWindowCode">
|
||||
<span slot="label">目的车次窗</span>
|
||||
<el-input v-model="addModel.purposeTrainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainMoveNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
purposeStationName: '',
|
||||
purposeTrainWindowCode: ''
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '移动车组号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
purposeStationName: '',
|
||||
purposeTrainWindowCode: ''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
209
src/jmapNew/theme/datie_01/menus/dialog/trainSwitch.vue
Normal file
209
src/jmapNew/theme/datie_01/menus/dialog/trainSwitch.vue
Normal file
@ -0,0 +1,209 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="640px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="overflow: hidden;">
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px; margin-right: 4%;"
|
||||
>
|
||||
<span class="base-label">源车次窗</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item label="车 组 号:" prop="trainNumberSource">
|
||||
<el-input v-model="addModel.trainNumberSource" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="stationStandSource">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandSource" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 窗:" prop="trainSource">
|
||||
<el-input v-model="addModel.trainSource" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px;"
|
||||
>
|
||||
<span class="base-label">目的车次窗</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item label="车 组 号:" prop="trainNumberGoal">
|
||||
<el-input v-model="addModel.trainNumberGoal" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 窗:" prop="trainGoal">
|
||||
<el-input v-model="addModel.trainGoal" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainSwitch',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
trainNumberSource: '',
|
||||
trainSource: '',
|
||||
stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: '',
|
||||
trainNumberGoal: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
trainNumberSource: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandSource: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
],
|
||||
trainNumberGoal: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
],
|
||||
trainGoal: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '移动列车识别号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
364
src/jmapNew/theme/datie_01/menus/index.vue
Normal file
364
src/jmapNew/theme/datie_01/menus/index.vue
Normal file
@ -0,0 +1,364 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-button ref="menuButton" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuButton from './menuButton';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuBar from './menuBar';
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
|
||||
export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
MenuButton,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
MenuStationStand,
|
||||
MenuStation,
|
||||
MenuTrain,
|
||||
PassiveAlarm,
|
||||
PassiveContorl,
|
||||
PassiveTimeout
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('config', [
|
||||
'width'
|
||||
]),
|
||||
isShowBar() {
|
||||
return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
isShowBar(val) {
|
||||
val && this.$store.dispatch('config/updateMenuBar');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('config/updateMenuBar');
|
||||
const _that = this;
|
||||
window.onclick = function (e) {
|
||||
if (!_that.$store.state.training.trainingStart) {
|
||||
_that.$refs.menuBar && _that.$refs.menuBar.blankClickClose();
|
||||
}
|
||||
_that.$refs.menuStationStand.doClose();
|
||||
_that.$refs.menuSwitch.doClose();
|
||||
_that.$refs.menuSignal.doClose();
|
||||
_that.$refs.menuSection.doClose();
|
||||
_that.$refs.menuTrain.doClose();
|
||||
_that.$refs.menuStation.doClose();
|
||||
};
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.onclick = function (e) {};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.menus .pop-menu {
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
||||
.menus .pop-menu span {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.menus .pop-menu .is-disabled span {
|
||||
color: #B4B3B8;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog {
|
||||
background: #0055E8;
|
||||
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
|
||||
border: 1px solid rgb(69, 134, 247);
|
||||
border-radius: 6px;
|
||||
font-size: 13px !important;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog span {
|
||||
font-size: 13px !important;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog span .el-icon-arrow-up{
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__footer {
|
||||
background: #ECE9D8;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__body {
|
||||
padding: 20px;
|
||||
margin: 0px 3px 3px;
|
||||
border: 2px solid rgba(120, 121, 123, 0.5);
|
||||
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
|
||||
background: #ECE9D8;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__title {
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 7px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn {
|
||||
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
|
||||
border: 1px solid #fff;
|
||||
border-radius: 4px;
|
||||
top: 6px;
|
||||
right: 3px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-button {
|
||||
height: 24px;
|
||||
line-height: 22px;
|
||||
padding: 0px;
|
||||
width: 80px;
|
||||
border: 2px outset #E2E2E2;
|
||||
border-radius: 4px !important;
|
||||
color: #000;
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .expand {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-button:focus span {
|
||||
border: 1px dashed gray;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-button:active {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-button:disabled {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-button:disabled span {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-input {
|
||||
border: 2px inset #E9E9E9;
|
||||
height: 22px !important;
|
||||
line-height: 22px !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-input__inner {
|
||||
color: #000;
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
border-radius: 0px !important;
|
||||
box-sizing: border-box;
|
||||
height: 22px !important;
|
||||
line-height: 22px !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-input.is-disabled .el-input__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-textarea {
|
||||
border: 2px inset #E9E9E9;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-textarea .el-textarea__inner {
|
||||
color: #000;
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
border-radius: 0px !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table--border th.gutter {
|
||||
background: #EBEADB !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table {
|
||||
border: 2px inset #E9E9E9;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table .cell {
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table th.is-leaf {
|
||||
background: #F0F0F0 !important;
|
||||
border-right: 1px solid #BDBDBD !important;
|
||||
border-bottom: 1px solid #BDBDBD !important;
|
||||
color: #000 !important;
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table tr td {
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table .el-table__empty-text {
|
||||
top: 15px !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .current-row>td {
|
||||
background: #3399FF !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox__inner {
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox__label {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
|
||||
background: #E6E6E6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
|
||||
color: #C5C9CC !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
|
||||
background: #fff !important;
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
|
||||
position: absolute;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
content: "";
|
||||
border: 1px solid #000;
|
||||
border-left: 0;
|
||||
border-top: 0;
|
||||
height: 7px;
|
||||
left: 4px;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio__inner {
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio__label {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
|
||||
background: #fff !important;
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
border-radius: 100%;
|
||||
background-color: #000 !important;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
|
||||
background: #E6E6E6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
|
||||
color: #C5C9CC !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -15px;
|
||||
top: -18px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-form-item label {
|
||||
font-weight: normal !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .context {
|
||||
height: 100px;
|
||||
border: 2px inset #E2E2E2;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .table {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .notice {
|
||||
margin-left: 62px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .button-group {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
685
src/jmapNew/theme/datie_01/menus/menuBar.vue
Normal file
685
src/jmapNew/theme/datie_01/menus/menuBar.vue
Normal file
@ -0,0 +1,685 @@
|
||||
<template>
|
||||
<div id="menuBarChengdu3">
|
||||
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%" />
|
||||
<station-control-convert ref="stationControlConvert" />
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-name ref="viewName" />
|
||||
<train-add ref="trainAdd" />
|
||||
<train-transtalet ref="trainTranstalet" />
|
||||
<train-delete ref="trainDelete" />
|
||||
<manage-user ref="manageUser" />
|
||||
<help-about ref="helpAbout" />
|
||||
<set-limit-speed ref="setLimitSpeed" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuBar from '@/jmapNew/theme/components/menus/menuBar';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import StationControlConvert from './menuDialog/stationControlConvert';
|
||||
import TrainAdd from './menuDialog/trainAdd';
|
||||
import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
import TrainDelete from './menuDialog/trainDelete';
|
||||
import PasswordBox from './menuDialog/passwordBox';
|
||||
import ViewName from './menuDialog/viewName';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
import SetLimitSpeed from './menuDialog/setLimitSpeed';
|
||||
|
||||
export default {
|
||||
name: 'MenuBarChengdu03',
|
||||
components: {
|
||||
MenuBar,
|
||||
StationControlConvert,
|
||||
PasswordBox,
|
||||
ViewName,
|
||||
TrainAdd,
|
||||
TrainTranstalet,
|
||||
TrainDelete,
|
||||
ManageUser,
|
||||
HelpAbout,
|
||||
SetLimitSpeed
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
title: '系统',
|
||||
// operate: OperationEvent.Command.mBar.system,
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '登录',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '注销',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '连接主用中心',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '连接备用中心',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '退出',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '临时限速',
|
||||
operate: OperationEvent.Command.mBar.limitSpeed,
|
||||
children: [
|
||||
{
|
||||
title: '设置临时限速',
|
||||
operate: OperationEvent.Section.setLimitSpeed,
|
||||
click: this.setLimitSpeed
|
||||
},
|
||||
{
|
||||
title: '取消临时限速',
|
||||
operate: OperationEvent.Section.cancelSpeed,
|
||||
click: this.cancleLimitSpeed
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '查看',
|
||||
// operate: OperationEvent.Command.mBar.check,
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '运行图',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '报告分析',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '视图',
|
||||
click: this.undeveloped,
|
||||
operate: '',
|
||||
children: [{
|
||||
title: '报警',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车运行信息',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '设备状态',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车详细信息',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '站台详细信息',
|
||||
click: this.undeveloped
|
||||
}]
|
||||
},
|
||||
{
|
||||
title: '终端站发车列表',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '详细设备状态',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '查找列车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '显示目的地号',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示轨道名',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示道岔名',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示信号机名',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示车次窗位置',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '显示车次号',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示车组号',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '全屏',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '放大',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '缩小',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '恢复',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// title: '车站定位',
|
||||
// operate: '',
|
||||
// children: [
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
title: '显示',
|
||||
// operate: OperationEvent.Command.mBar.view,
|
||||
operate: '',
|
||||
hide: true,
|
||||
children: [
|
||||
{
|
||||
title: '设置列车识别号显示',
|
||||
click: this.setTrainIdDisplay,
|
||||
operate: OperationEvent.Command.view.setTrainIdDisplay
|
||||
},
|
||||
{
|
||||
title: '设置名称显示',
|
||||
click: this.setNameDisplay,
|
||||
operate: OperationEvent.Command.view.setNameDisplay
|
||||
},
|
||||
{
|
||||
title: '设置设备显示',
|
||||
click: this.setDeviceDisplay,
|
||||
operate: OperationEvent.Command.view.setDeviceDisplay
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'ATS终端操作',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '当天运行车计划',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '出入库预告',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '计划车操作',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '添加计划车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '平移计划车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '删除计划车',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '批处理命令',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '全线扣车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消全线扣车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消上行全线扣车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消下行全线扣车',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '信息管理',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '调度日志',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度留言提醒',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '报警设置',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '帮助',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '关于ITS GPC 工作站',
|
||||
click: this.about,
|
||||
operate: OperationEvent.Command.help.about
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
title: '系统',
|
||||
operate: OperationEvent.Command.mBar.system,
|
||||
children: [
|
||||
{
|
||||
title: '登录',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '注销',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '连接主用中心',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '连接备用中心',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '退出',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '临时限速',
|
||||
operate: OperationEvent.Command.mBar.limitSpeed,
|
||||
children: [
|
||||
{
|
||||
title: '设置临时限速',
|
||||
operate: OperationEvent.Section.setLimitSpeed,
|
||||
click: this.setLimitSpeed
|
||||
},
|
||||
{
|
||||
title: '取消临时限速',
|
||||
operate: OperationEvent.Section.cancelSpeed,
|
||||
click: this.cancleLimitSpeed
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '查看',
|
||||
operate: OperationEvent.Command.mBar.check,
|
||||
children: [
|
||||
{
|
||||
title: '运行图',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '报告分析',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '视图',
|
||||
click: this.undeveloped,
|
||||
operate: '',
|
||||
children: [{
|
||||
title: '报警',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车运行信息',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '设备状态',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车详细信息',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '站台详细信息',
|
||||
click: this.undeveloped
|
||||
}]
|
||||
},
|
||||
{
|
||||
title: '终端站发车列表',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '详细设备状态',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '查找列车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '显示目的地号',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示轨道名',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示道岔名',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示信号机名',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示车次窗位置',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '显示车次号',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示车组号',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '全屏',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '放大',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '缩小',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '恢复',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '车站定位',
|
||||
operate: '',
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
operate: OperationEvent.Command.mBar.view,
|
||||
hide: true,
|
||||
children: [
|
||||
{
|
||||
title: '设置列车识别号显示',
|
||||
click: this.setTrainIdDisplay,
|
||||
operate: OperationEvent.Command.view.setTrainIdDisplay
|
||||
},
|
||||
{
|
||||
title: '设置名称显示',
|
||||
click: this.setNameDisplay,
|
||||
operate: OperationEvent.Command.view.setNameDisplay
|
||||
},
|
||||
{
|
||||
title: '设置设备显示',
|
||||
click: this.setDeviceDisplay,
|
||||
operate: OperationEvent.Command.view.setDeviceDisplay
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'ATS终端操作',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '当天运行车计划',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '出入库预告',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '计划车操作',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '添加计划车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '平移计划车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '删除计划车',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '批处理命令',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '全线扣车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消全线扣车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消上行全线扣车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消下行全线扣车',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '信息管理',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '调度日志',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度留言提醒',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '报警设置',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '帮助',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '关于ITS GPC 工作站',
|
||||
click: this.about,
|
||||
operate: OperationEvent.Command.help.about
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.menuNormal['Center'][3].children = this.initStationList();
|
||||
},
|
||||
methods: {
|
||||
initStationList() {
|
||||
const list = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.visible) {
|
||||
const node = {
|
||||
title: station.name,
|
||||
operate: station.code,
|
||||
show: true,
|
||||
click: this.mapLocation,
|
||||
code: station.code
|
||||
};
|
||||
|
||||
list.push(node);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(code) {
|
||||
if (code) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: code });
|
||||
|
||||
}
|
||||
},
|
||||
// 关于
|
||||
about(order) {
|
||||
const operate = {
|
||||
operation: order.operate
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.helpAbout.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
getLoginResult(operate) {
|
||||
/** 密码校验*/
|
||||
if (operate.operation == OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation) {
|
||||
if (operate.success) {
|
||||
/** 校验成功*/
|
||||
this.$refs.stationControlConvert.doShow({ operation: OperationEvent.StationControl.forcedStationControl.mbar.operation });
|
||||
}
|
||||
}
|
||||
},
|
||||
setLimitSpeed(order) {
|
||||
const operate = {
|
||||
operation: order.operate
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.setLimitSpeed.doShow(operate, true);
|
||||
}
|
||||
});
|
||||
},
|
||||
blankClickClose() {
|
||||
this.$refs.menuBar.doClose();
|
||||
},
|
||||
cancleLimitSpeed(order) {
|
||||
const operate = {
|
||||
operation: order.operate
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.setLimitSpeed.doShow(operate, false);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.$refs.menuBar.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
#menuBarChengdu3{
|
||||
line-height:30px;
|
||||
}
|
||||
#menuBarChengdu3 #menuBar .menu-li-block .label{
|
||||
padding: 0px 30px 0px 5px !important;
|
||||
}
|
||||
</style>
|
778
src/jmapNew/theme/datie_01/menus/menuButton.vue
Normal file
778
src/jmapNew/theme/datie_01/menus/menuButton.vue
Normal file
@ -0,0 +1,778 @@
|
||||
<template>
|
||||
<div v-if="isShowBtn" id="menuButtons_box" class="menu menuButton" style="height: 45px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
|
||||
<button :id="Signal.arrangementRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.arrangementRoute.button.operation, ['Signal'])">
|
||||
<span style="color: black">
|
||||
<center><b>排</b><b>列</b></center>
|
||||
<center><b>进</b><b>路</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="MixinCommand.totalCancel.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.totalCancel.button.operation, ['Signal','AutoTurnBack','AutomaticRoute'])">
|
||||
<span style="color: black">
|
||||
<center><b>总</b></center>
|
||||
<center><b>取</b><b>消</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.guide.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.guide.button.operation, ['Signal'])">
|
||||
<span style="color: black">
|
||||
<center><b>引</b><b>导</b></center>
|
||||
<center><b>进</b><b>路</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<!-- 流程未做暂不显示 -->
|
||||
<button :id="Station.guideLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Station.guideLock.button.operation, ['GuideLock'])">
|
||||
<span style="color: #800000">
|
||||
<center><b>引</b><b>导</b></center>
|
||||
<center><b>总</b><b>锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.humanTrainRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['Signal'])">
|
||||
<span style="color: #800000">
|
||||
<center><b>总</b></center>
|
||||
<center><b>人</b><b>解</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Section.fault.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Section.fault.button.operation, ['Section'])">
|
||||
<span style="color: #800000">
|
||||
<center><b>区</b></center>
|
||||
<center><b>故</b><b>解</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.locate.button.domId" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown(Switch.locate.button.operation, ['Switch'])">
|
||||
<span style="color: black">
|
||||
<center><b>道</b><b>岔</b></center>
|
||||
<center><b>定</b><b>操</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.reverse.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.reverse.button.operation, ['Switch'])">
|
||||
<span style="color: black">
|
||||
<center><b>道</b><b>岔</b></center>
|
||||
<center><b>反</b><b>操</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.lock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.lock.button.operation, ['Switch'])">
|
||||
<span style="color: black">
|
||||
<center><b>道</b><b>岔</b></center>
|
||||
<center><b>单</b><b>锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.unlock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.unlock.button.operation, ['Switch'])">
|
||||
<span style="color: #800000">
|
||||
<center><b>道</b><b>岔</b></center>
|
||||
<center><b>解</b><b>锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="MixinCommand.block.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.block.button.operation, ['Switch', 'Signal'])">
|
||||
<span style="color: black">
|
||||
<center><b>封</b></center>
|
||||
<center><b>锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="MixinCommand.unblock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.unblock.button.operation, ['Switch', 'Signal'])">
|
||||
<span style="color: black">
|
||||
<center><b>解</b></center>
|
||||
<center><b>封</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="MixinCommand.functionButton.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.functionButton.button.operation, ['StationStand', 'AutoTurnBack', 'AutomaticRoute', 'Station'])">
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b style="color:#4B4B99">功</b>
|
||||
<b style="color:#943E3E">能</b>
|
||||
</center>
|
||||
<center>
|
||||
<b style="color:#E64BE6">按</b>
|
||||
<b style="color:#4C994C">钮</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.atsAutoControl.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.atsAutoControl.button.operation, ['Signal'])">
|
||||
<span style="color: black">
|
||||
<center><b>自</b></center>
|
||||
<center><b>动</b><b>控</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.humanControl.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.humanControl.button.operation, ['Signal'])">
|
||||
<span style="color: black">
|
||||
<center><b>人</b></center>
|
||||
<center><b>工</b><b>控</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Command.cancel.clearMbm.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Command.cancel.clearMbm.operation)">
|
||||
<span style="color: black">
|
||||
<center><b>清</b></center>
|
||||
<center><b>除</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="checkCancel" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import { getAutoReentryBySignalCode } from '@/utils/mapList';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'MapButtonMenu',
|
||||
components: {
|
||||
PasswordBox,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
point: {
|
||||
x: 0,
|
||||
y: 15
|
||||
},
|
||||
operation: '0',
|
||||
buttonName: '',
|
||||
buttonDownColor: '#A8A8A8',
|
||||
buttonUpColor: '#DCDCDC',
|
||||
width: 58,
|
||||
tempData: null,
|
||||
offset: {},
|
||||
commandTypeList: [],
|
||||
cmdTypeList: [],
|
||||
deviceList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'routeList',
|
||||
'routeData',
|
||||
'signalList',
|
||||
'autoReentryList',
|
||||
'autoReentryData'
|
||||
]),
|
||||
Switch() {
|
||||
return OperationEvent.Switch;
|
||||
},
|
||||
Section() {
|
||||
return OperationEvent.Section;
|
||||
},
|
||||
Station() {
|
||||
return OperationEvent.Station;
|
||||
},
|
||||
Signal() {
|
||||
return OperationEvent.Signal;
|
||||
},
|
||||
MixinCommand() {
|
||||
return OperationEvent.MixinCommand;
|
||||
},
|
||||
Command() {
|
||||
return OperationEvent.Command;
|
||||
},
|
||||
isShowBtn() {
|
||||
return this.$store.state.training.prdType == '01';
|
||||
},
|
||||
CMD() {
|
||||
return CMD;
|
||||
},
|
||||
cmdType() {
|
||||
switch (this.operation) {
|
||||
case this.Switch.lock.button.operation: // 道岔单锁
|
||||
return CMD.Switch.CMD_SWITCH_SINGLE_LOCK;
|
||||
case this.Switch.unlock.button.operation: // 道岔解锁
|
||||
return CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK;
|
||||
case this.Switch.locate.button.operation: // 道岔定位
|
||||
return CMD.Switch.CMD_SWITCH_NORMAL_POSITION;
|
||||
case this.Switch.reverse.button.operation: // 道岔反位
|
||||
return CMD.Switch.CMD_SWITCH_REVERSE_POSITION;
|
||||
case this.Signal.atsAutoControl.button.operation: // 自动控
|
||||
return CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING;
|
||||
case this.Signal.humanControl.button.operation: // 人工控
|
||||
return CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING;
|
||||
case this.Section.fault.button.operation: // 区故解
|
||||
return CMD.Section.CMD_SECTION_FAULT_UNLOCK;
|
||||
case this.Signal.humanTrainRoute.button.operation: // 总人解 (取消引导进路)
|
||||
return CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
case this.Signal.arrangementRoute.button.operation: // 排列进路
|
||||
return CMD.Signal.CMD_SIGNAL_SET_ROUTE;
|
||||
case this.Signal.guide.button.operation: // 办理引导
|
||||
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
|
||||
case this.Signal.reopenSignal.button.operation:
|
||||
return CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
|
||||
case this.Station.guideLock.button.operation:
|
||||
return CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||
this.updateButtonShow(val, old);
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function (val) {
|
||||
this.selectedChange();
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.resetMbmButton();
|
||||
},
|
||||
methods: {
|
||||
passWordCommit(data) {
|
||||
let operate = {};
|
||||
if (data.overNext) {
|
||||
operate = {
|
||||
over: true,
|
||||
code: data.code,
|
||||
operation: data.operation,
|
||||
cmdType: this.cmdType,
|
||||
param: data.param
|
||||
};
|
||||
|
||||
} else if (data.nextCmdType) {
|
||||
operate = {
|
||||
over: true,
|
||||
operation: data.operation,
|
||||
cmdType: data.nextCmdType
|
||||
};
|
||||
} else {
|
||||
operate = {
|
||||
operation: data.operateNext
|
||||
};
|
||||
}
|
||||
this.trainingOperation(operate);
|
||||
|
||||
},
|
||||
checkCancel() {
|
||||
Handler.clear(); // 清空操作组
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
},
|
||||
// 执行操作
|
||||
trainingOperation(operate) {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
updateButtonShow(val, old) {
|
||||
if (old) {
|
||||
// 恢复旧按钮显示
|
||||
const domId = OperationHandler.getDomIdByOperation(old);
|
||||
const dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = false;
|
||||
dom.style.backgroundColor = this.buttonUpColor;
|
||||
}
|
||||
}
|
||||
if (val) {
|
||||
// 新按钮按下效果
|
||||
const domId = OperationHandler.getDomIdByOperation(val);
|
||||
const dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = true;
|
||||
dom.style.backgroundColor = this.buttonDownColor;
|
||||
}
|
||||
}
|
||||
},
|
||||
buttonDown(operation, commandTypeList) {
|
||||
// 清空当前的选择的设备
|
||||
this.deviceList = [];
|
||||
if (operation != this.Command.cancel.clearMbm.operation) {
|
||||
const operate = {
|
||||
operation: operation
|
||||
};
|
||||
// 以下 会弹出密码框 (总人解,区故解,道岔解封,解封按钮,总取消,引导总锁)
|
||||
const operationList = [this.Signal.humanTrainRoute.button.operation,
|
||||
this.Section.fault.button.operation,
|
||||
this.Switch.unlock.button.operation,
|
||||
this.MixinCommand.unblock.button.operation,
|
||||
this.Station.guideLock.button.operation
|
||||
// this.MixinCommand.totalCancel.button.operation
|
||||
];
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.operation = operation;
|
||||
this.commandTypeList = commandTypeList;
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// 判断是否需要 弹窗密码框
|
||||
if (operationList.includes(operation)) {
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
const operate = {
|
||||
start: true,
|
||||
operation: operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.commandTypeList = [];
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
Handler.clear(); // 清空操作组
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
resetMbmButton() {
|
||||
this.commandTypeList = [];
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
Handler.clear(); // 清空操作组
|
||||
},
|
||||
// 排列进路 OR 信号重开操作
|
||||
arrangementRouteOperation(deviceList) {
|
||||
const operate = {
|
||||
operation: this.$store.state.menuOperation.buttonOperation
|
||||
};
|
||||
let isArrangementRoute = false;
|
||||
if (deviceList.length === 1) {
|
||||
const signal = deviceList[0];
|
||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](signal.sectionCode);
|
||||
if (sectionModel) {
|
||||
// 判断 信号机所在区段的 左右关联区段 是否有锁闭
|
||||
const sectionLeft = this.$store.getters['map/getDeviceByCode'](sectionModel.leftSectionCode);
|
||||
const sectionRight = this.$store.getters['map/getDeviceByCode'](sectionModel.rightSectionCode);
|
||||
if (sectionLeft.routeLock || sectionRight.routeLock) {
|
||||
isArrangementRoute = true;
|
||||
}
|
||||
}
|
||||
// 如果该信号机红灯亮 而且 所属区段左右两侧区段锁闭 执行信号重启操作
|
||||
if (signal.redOpen && !signal.greenOpen && !signal.yellowOpen && isArrangementRoute) { // 信号重启
|
||||
operate.over = true;
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
|
||||
operate.code = deviceList[0].code;
|
||||
operate.param = {signalCode: deviceList[0].code};
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
operate.code = deviceList[0].code; // 进路排列
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
} else if (deviceList.length === 2) {
|
||||
let flag = false;
|
||||
this.routeList.forEach(item => {
|
||||
// item.endButtonSignalCode
|
||||
// 起始信号机 和 结束信号机按钮 过滤进路
|
||||
if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) {
|
||||
operate.over = true;
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
|
||||
operate.code = deviceList[1].code;
|
||||
operate.param = {routeCode: item.code};
|
||||
this.deviceList = [];
|
||||
flag = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
});
|
||||
if (!flag) {
|
||||
this.deviceList = [];
|
||||
this.$refs.noticeInfo.doShow('未找到选择的进路!');
|
||||
}
|
||||
}
|
||||
},
|
||||
//
|
||||
handelFunctionButton(model, subType) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
param: {}
|
||||
};
|
||||
if (model._type === 'StationStand' && subType === 'StopJumpLamp') {
|
||||
operate.cmdType = CMD.Stand.CMD_STAND_SET_JUMP_STOP;
|
||||
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
||||
operate.code = model.code;
|
||||
} else if (model._type === 'StationStand' && subType === 'CancelStopJumpLamp') {
|
||||
operate.cmdType = CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP;
|
||||
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
||||
operate.code = model.code;
|
||||
} else if (model._type === 'AutoTurnBack' ) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK;
|
||||
operate.param = {cycleCode: model.cycleCode};
|
||||
operate.code = model.code;
|
||||
} else if (model._type === 'AutomaticRoute') {
|
||||
const route = this.routeData[model.automaticRouteCode];
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_CI_AUTO;
|
||||
operate.param = {signalCode: route.startSignalCode};
|
||||
operate.code = model.code;
|
||||
} else if (model._type === 'Station') {
|
||||
switch (subType) {
|
||||
case 'substation':
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
|
||||
operate.param = {stationCodes: [model.code]};
|
||||
operate.code = model.code;
|
||||
break;
|
||||
case 'center':
|
||||
// operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
|
||||
delete operate.over;
|
||||
operate.subType = 'center';
|
||||
operate.param = {stationCodes: [model.code]};
|
||||
operate.code = model.code;
|
||||
break;
|
||||
case 'emergency':
|
||||
// operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
|
||||
delete operate.over;
|
||||
operate.subType = 'emergency';
|
||||
operate.param = {stationCodes: [model.code]};
|
||||
operate.code = model.code;
|
||||
break;
|
||||
case 'interconnected':
|
||||
// operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
|
||||
delete operate.over;
|
||||
operate.subType = 'interconnected';
|
||||
operate.param = {stationCodes: [model.code]};
|
||||
operate.code = model.code;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
// 判断是否需要 弹窗密码框
|
||||
// const operate = Object.assign({}, operate);
|
||||
if (subType == 'center ' || subType == 'emergency' || subType == 'interconnected' ) {
|
||||
operate['operateNext'] = operate.operation = this.Command.close.password.operation;
|
||||
if (subType == 'center') {
|
||||
operate['nextCmdType'] = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
|
||||
} else if (subType == 'emergency') {
|
||||
operate['nextCmdType'] = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
|
||||
} else {
|
||||
operate['nextCmdType'] = CMD.ControlConvertMenu.CMD_CM_INTERLOCK_CONTROL;
|
||||
}
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.deviceList = [];
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
|
||||
});
|
||||
},
|
||||
handelTotalCancel(model, subType) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: '',
|
||||
param: {}
|
||||
};
|
||||
if (model._type === 'Signal') {
|
||||
const autoReentry = getAutoReentryBySignalCode(model.code, this.routeList, this.autoReentryList);
|
||||
let autoReentrySet = '';
|
||||
autoReentry.forEach(item => {
|
||||
const autoReentryRel = this.autoReentryData[item.code];
|
||||
if (autoReentryRel.setUp) {
|
||||
autoReentrySet = autoReentryRel;
|
||||
}
|
||||
});
|
||||
if (autoReentrySet) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK;
|
||||
operate.param = {cycleCode: autoReentrySet.code, cancelRoute: true};
|
||||
} else {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE;
|
||||
operate.param = {signalCode: model.code};
|
||||
}
|
||||
} else if (model._type === 'AutoTurnBack') {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK;
|
||||
operate.param = {cycleCode: model.cycleCode, cancelRoute: false};
|
||||
operate.code = model.code;
|
||||
} else if (model._type === 'AutomaticRoute') {
|
||||
const route = this.routeData[model.automaticRouteCode];
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO;
|
||||
operate.param = {signalCode: route.startSignalCode};
|
||||
operate.code = model.code;
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch((error) => {
|
||||
this.deviceList = [];
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleGuideRoute(deviceList) {
|
||||
if (deviceList.length === 1) {
|
||||
let route = '';
|
||||
this.routeList.forEach(item => {
|
||||
if (item.startSignalCode === deviceList[0].code && this.routeData[item.code].lock) {
|
||||
route = item;
|
||||
}
|
||||
});
|
||||
|
||||
if (!route) {
|
||||
const operate = {
|
||||
code: deviceList[0].code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
const operate = {
|
||||
code: deviceList[0].code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
overNext: true,
|
||||
param: {routeCode: route.code, signalCode: deviceList[0].code}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
operate['operation'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
} else if (deviceList.length === 2) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: deviceList[1].code,
|
||||
cmdType: this.cmdType,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
overNext: true
|
||||
};
|
||||
let flag = false;
|
||||
this.routeList.forEach(item => {
|
||||
if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) {
|
||||
operate.param = {routeCode: item.code, signalCode: deviceList[0].code};
|
||||
this.deviceList = [];
|
||||
flag = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
});
|
||||
if (!flag) {
|
||||
this.deviceList = [];
|
||||
this.$refs.noticeInfo.doShow('未找到选择进路!');
|
||||
}
|
||||
}
|
||||
},
|
||||
handleTotalHumanSolution(model) {
|
||||
const operate = {
|
||||
send: true,
|
||||
overNext: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation
|
||||
};
|
||||
|
||||
if (model.yellowOpen && model.redOpen) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CLOSE_GUIDE;
|
||||
operate.param = {signalCode: model.code};
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {});
|
||||
} else {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
operate.param = {signalCode: model.code};
|
||||
operate.val = model.code;
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
handelControlRoute(model) { // 自动控 人工控点击button 发送
|
||||
const routeCodeList = [];
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: this.cmdType,
|
||||
param: {}
|
||||
};
|
||||
this.routeList.forEach(item => {
|
||||
if (item.startSignalCode === model.code) {
|
||||
routeCodeList.push(item.code);
|
||||
}
|
||||
});
|
||||
operate.param = {signalCode: model.code, routeCodeList: routeCodeList};
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handelSwitchOperate(model) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: this.cmdType,
|
||||
param: { switchCode: model.code}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handelBlockOrUnblock(model) {
|
||||
const buttonOperation = this.$store.state.menuOperation.buttonOperation;
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: buttonOperation,
|
||||
cmdType: '',
|
||||
param: {}
|
||||
};
|
||||
if (model._type === 'Switch' && buttonOperation === this.MixinCommand.block.button.operation) {
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_BLOCK;
|
||||
operate.param = {switchCode: model.code};
|
||||
} else if (model._type === 'Switch' && buttonOperation === this.MixinCommand.unblock.button.operation) {
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK;
|
||||
operate.param = {switchCode: model.code};
|
||||
} else if (model._type === 'Signal' && buttonOperation === this.MixinCommand.block.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
|
||||
operate.param = {signalCode: model.code};
|
||||
} else if (model._type === 'Signal' && buttonOperation === this.MixinCommand.unblock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
|
||||
operate.param = {signalCode: model.code};
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handelGuideLock(model) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: '',
|
||||
param: {stationCode: model.stationCode}
|
||||
};
|
||||
if (model.totalGuideLock) {
|
||||
operate.cmdType = CMD.Station.CMD_STATION_CANCEL_MASTER_GUIDE_LOCK;
|
||||
} else {
|
||||
operate.cmdType = CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK;
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {
|
||||
this.resetMbmButton();
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handelFaultSection(model) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
||||
param: {sectionCode: model.code}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
selectedChange() {
|
||||
// 按钮按下时
|
||||
if (this.$store.state.training.prdType != '01') {
|
||||
return '';
|
||||
}
|
||||
|
||||
const buttonOperation = this.$store.state.menuOperation.buttonOperation;
|
||||
const model = this.$store.state.menuOperation.selected; // 选择设备
|
||||
const subType = this.$store.state.menuOperation.subType; // 选择设备的子元素
|
||||
const switchOperation = [this.Switch.lock.button.operation, this.Switch.unlock.button.operation, this.Switch.locate.button.operation, this.Switch.reverse.button.operation];
|
||||
if (!model._type && !model._code) {
|
||||
return;
|
||||
}
|
||||
if (buttonOperation && buttonOperation === this.MixinCommand.functionButton.button.operation) {
|
||||
this.handelFunctionButton(model, subType);
|
||||
} else {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](model.stationCode);
|
||||
if (station) {
|
||||
if (station.controlMode == 'Local' || station.controlMode == 'Emergency') {
|
||||
if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
||||
this.deviceList.push(model);
|
||||
if (buttonOperation === this.Signal.arrangementRoute.button.operation) {
|
||||
this.arrangementRouteOperation(this.deviceList);
|
||||
} else if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
||||
this.handelTotalCancel(model, subType);
|
||||
} else if (buttonOperation === this.Signal.humanTrainRoute.button.operation) {
|
||||
this.handleTotalHumanSolution(model);
|
||||
} else if (buttonOperation === this.Signal.guide.button.operation) {
|
||||
this.handleGuideRoute(this.deviceList);
|
||||
} else if (buttonOperation === this.Signal.atsAutoControl.button.operation || buttonOperation === this.Signal.humanControl.button.operation) {
|
||||
this.handelControlRoute(model);
|
||||
} else if (switchOperation.includes(buttonOperation)) {
|
||||
this.handelSwitchOperate(model);
|
||||
} else if (buttonOperation === this.MixinCommand.block.button.operation || buttonOperation === this.MixinCommand.unblock.button.operation) {
|
||||
this.handelBlockOrUnblock(model);
|
||||
} else if (buttonOperation === this.Station.guideLock.button.operation) {
|
||||
this.handelGuideLock(model);
|
||||
} else if (buttonOperation === this.Section.fault.button.operation) {
|
||||
this.handelFaultSection(model);
|
||||
} else {
|
||||
this.clearOperate();
|
||||
}
|
||||
} else {
|
||||
this.clearOperate();
|
||||
}
|
||||
} else {
|
||||
this.clearOperate();
|
||||
this.operatemode != OperateMode.FAULT && this.$message.info('请先切换到站控或紧急站控');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
clearOperate() {
|
||||
Handler.clear(); // 清空操作组
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
$bg: #fff;
|
||||
$hoverBg: #f5f7fa;
|
||||
.button_box{
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
.menu {
|
||||
background-color: $bg;
|
||||
position: fixed;
|
||||
border: 1px solid gray;
|
||||
z-index: 10;
|
||||
display: block;
|
||||
|
||||
.dsp-block {
|
||||
display: block;
|
||||
text-align: center;
|
||||
border-radius: unset;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dsp-block:hover {
|
||||
background-color: $hoverBg;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm two-confirmation"
|
||||
title="二次确认"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:show-close="false"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">确认</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TwoConfirmation',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: '',
|
||||
timer: null,
|
||||
domIdConfirm: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
messages() {
|
||||
if (this.operate) {
|
||||
return this.operate.messages;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.domIdConfirm = '';
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
||||
}
|
||||
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
|
||||
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operate && this.operate.selection) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
val: this.operate.val,
|
||||
selection: this.operate.selection
|
||||
};
|
||||
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.doClose();
|
||||
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}, 1000).catch(() => {
|
||||
this.loading = true;
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm user-add" :title="title" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
|
||||
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
|
||||
<el-form-item label="工号:" prop="jobNumber">
|
||||
<el-input v-model="model.jobNumber"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名:" prop="userName">
|
||||
<el-input v-model="model.userName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码:" prop="password">
|
||||
<el-input type="password" v-model="model.password"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码:" prop="confirm">
|
||||
<el-input type="password" v-model="model.confirm"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="0">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'UserAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: {},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
type: 'ADD',
|
||||
jobNumber: '',
|
||||
userName: '',
|
||||
password: '',
|
||||
confirm: '',
|
||||
},
|
||||
rules: {
|
||||
jobNumber: [
|
||||
{ required: true, message: '请输入工号', trigger: 'blur' }
|
||||
],
|
||||
userName: [
|
||||
{ required: true, message: '请输入用户名', trigger: 'blur' }
|
||||
],
|
||||
password: [
|
||||
{ required: true, message: '请输入密码', trigger: 'change' }
|
||||
],
|
||||
confirm: [
|
||||
{ required: true, message: '请再次输入密码', trigger: 'change' }
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '增加用户'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.resetFields();
|
||||
});
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
if (this.model.password === this.model.confirm) {
|
||||
this.doClose();
|
||||
this.$emit('operateUser', this.model);
|
||||
} else {
|
||||
this.$messageBox('二次输入密码不一致');
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); this.model });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm user-delete" :title="title" :visible.sync="show" width="260px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="padding-left: 10px; padding-bottom: 10px">
|
||||
<i class="el-icon-info"></i>
|
||||
<template v-for="message in messages">
|
||||
<span>{{message}}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="3">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'UserDelete',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: {},
|
||||
messages: [],
|
||||
model: {
|
||||
type: 'DELETE',
|
||||
jobNumber: '',
|
||||
userName: '',
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除用户'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.messages = operate.messages;
|
||||
this.model.userName = '';
|
||||
this.model.jobNumber = '';
|
||||
if (selected) {
|
||||
this.model.userName = selected.userName;
|
||||
this.model.jobNumber = selected.jobNumber;
|
||||
}
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.model.userName && this.model.jobNumber) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$emit('operateUser', this.model);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$messageBox('选择的用户名或工号为空');
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm user-edit" :title="title" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
|
||||
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
|
||||
<el-form-item label="工号:" prop="jobNumber">
|
||||
<el-input v-model="model.jobNumber" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名:" prop="userName">
|
||||
<el-input v-model="model.userName" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="原始密码:" prop="oldPassword">
|
||||
<el-input type="oldPassword" v-model="model.oldPassword"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码:" prop="password">
|
||||
<el-input type="password" v-model="model.password"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码:" prop="confirm">
|
||||
<el-input type="password" v-model="model.confirm"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="0">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'UserEdit',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: {},
|
||||
selected: {},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
type: 'EDIT',
|
||||
jobNumber: '',
|
||||
userName: '',
|
||||
oldPassword: '',
|
||||
password: '',
|
||||
confirm: '',
|
||||
},
|
||||
rules: {
|
||||
jobNumber: [
|
||||
{ required: true, message: '请输入工号', trigger: 'blur' }
|
||||
],
|
||||
userName: [
|
||||
{ required: true, message: '请输入用户名', trigger: 'blur' }
|
||||
],
|
||||
oldPassword: [
|
||||
{ required: true, message: '请输入原始密码', trigger: 'change' }
|
||||
],
|
||||
password: [
|
||||
{ required: true, message: '请输入新密码', trigger: 'change' }
|
||||
],
|
||||
confirm: [
|
||||
{ required: true, message: '请再次输入新密码', trigger: 'change' }
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '用户编辑页面'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.resetFields();
|
||||
this.selected = selected;
|
||||
if (selected) {
|
||||
this.model.jobNumber = selected.jobNumber;
|
||||
this.model.userName = selected.userName;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid)
|
||||
if (this.selected.password !== this.model.oldPassword) {
|
||||
this.$messageBox('原始密码错误');
|
||||
} else if (this.model.password !== this.model.confirm) {
|
||||
this.$messageBox('二次输入的密码错误');
|
||||
} else if (this.model.oldPassword === this.model.password) {
|
||||
this.$messageBox('老密码和新密相同');
|
||||
} else {
|
||||
this.doClose();
|
||||
this.$emit('operateUser', this.model);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
126
src/jmapNew/theme/datie_01/menus/menuDialog/helpAbout.vue
Normal file
126
src/jmapNew/theme/datie_01/menus/menuDialog/helpAbout.vue
Normal file
@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm manage-user" :title="title" :visible.sync="show" width="600px" :before-close="doClose"
|
||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="height: 70px;">
|
||||
<div style="position: relative; left: 10px;">
|
||||
</div>
|
||||
<div style="position: relative; left: 80px;">
|
||||
<div style="width:100%">
|
||||
<span style="padding-left: 60px">ControlMonitor 1.3.5.0</span>
|
||||
<el-button style="position: absolute; right: 95px;" :id="domIdConfirm" type="primary"
|
||||
:loading="loading" @click="commit">确定</el-button>
|
||||
</div>
|
||||
<div style="width:100%; padding-top: 20px">
|
||||
<span> 版权所有(C)2010-2011 北京玖琏科技有限公司</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 10px; margin: 5px; ">
|
||||
<el-table :data="tableData" style="width: 100%;" height="400">
|
||||
<el-table-column prop="moduleName" label="模块名称" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="version" label="版本" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="updateDate" label="修改日期">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'ManageUser',
|
||||
data() {
|
||||
return {
|
||||
tableData: [
|
||||
{
|
||||
moduleName: '主程序版本:',
|
||||
version: '123',
|
||||
updateDate: '123'
|
||||
}
|
||||
],
|
||||
operate: {},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '关于ControlMonitor'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.menu.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
138
src/jmapNew/theme/datie_01/menus/menuDialog/limitSpeed.vue
Normal file
138
src/jmapNew/theme/datie_01/menus/menuDialog/limitSpeed.vue
Normal file
@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
|
||||
},
|
||||
|
||||
rules: {
|
||||
// groupNumber: [
|
||||
// { required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
// ],
|
||||
// stationStandCode: [
|
||||
// { required: true, message: '请选择终端', trigger: 'change' }
|
||||
// ],
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '设置限速';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
285
src/jmapNew/theme/datie_01/menus/menuDialog/manageUser.vue
Normal file
285
src/jmapNew/theme/datie_01/menus/menuDialog/manageUser.vue
Normal file
@ -0,0 +1,285 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm manage-user" :title="title" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; ">
|
||||
<span class="base-label">用户列表</span>
|
||||
<el-row>
|
||||
<el-col :span="18">
|
||||
<el-table ref="multipleTable" :data="tableData" border row-key="code" style="width: 100%"
|
||||
height="450" center size="mini" highlight-current-row @row-click="chooseUser">
|
||||
<el-table-column prop="jobNumber" label="工号" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.jobNumber}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userName" label="用户名">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.userName}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="20">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button style="margin-top: 140px; margin-left: 10px;" :id="domIdFreshUser" @click="freshUser">刷新
|
||||
</el-button>
|
||||
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdAddUser" @click="addUser">增加
|
||||
</el-button>
|
||||
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdEditUser" @click="editUser">修改
|
||||
</el-button>
|
||||
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdDelUser" @click="delUser">删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="0">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<user-add ref="userAdd" @operateUser="operateUser"></user-add>
|
||||
<user-edit ref="userEdit" @operateUser="operateUser"></user-edit>
|
||||
<user-delete ref="userDelete" @operateUser="operateUser"></user-delete>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import UserAdd from './childDialog/userAdd';
|
||||
import UserEdit from './childDialog/userEdit';
|
||||
import UserDelete from './childDialog/userDelete';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'ManageUser',
|
||||
components: {
|
||||
UserAdd,
|
||||
UserEdit,
|
||||
UserDelete
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
operate: {},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdAddUser() {
|
||||
return this.dialogShow ? OperationEvent.Command.manage.addUser.domId : '';
|
||||
},
|
||||
domIdEditUser() {
|
||||
return this.dialogShow ? OperationEvent.Command.manage.editUser.domId : '';
|
||||
},
|
||||
domIdDelUser() {
|
||||
return this.dialogShow ? OperationEvent.Command.manage.delUser.domId : '';
|
||||
},
|
||||
domIdFreshUser() {
|
||||
return this.dialogShow ? OperationEvent.Command.manage.freshUser.domId : '';
|
||||
},
|
||||
domIdChooseUser() {
|
||||
return this.dialogShow ? OperationEvent.Command.manage.chooseUser.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '用户管理'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
//添加用户
|
||||
addUser() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.manage.addUser.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$refs.userAdd.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
//编辑用户
|
||||
editUser() {
|
||||
if (this.selected) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.manage.editUser.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$refs.userEdit.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
} else {
|
||||
this.$messageBox('请先选择用户');
|
||||
}
|
||||
},
|
||||
//删除用户
|
||||
delUser() {
|
||||
if (this.selected) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.manage.delUser.operation,
|
||||
messages: [`你确定删除用户${this.selected.userName}吗?`]
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$refs.userDelete.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
} else {
|
||||
this.$messageBox('请先选择用户');
|
||||
}
|
||||
},
|
||||
//刷新用户
|
||||
freshUser() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.manage.freshUser.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
//选择用户
|
||||
chooseUser(row) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.manage.chooseUser.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.selected = row;
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.menu.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
},
|
||||
//增删改函数处理
|
||||
operateUser(data) {
|
||||
if (data && data.type === 'ADD') {
|
||||
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
|
||||
if (index < 0) {
|
||||
this.tableData.push({
|
||||
jobNumber: data.jobNumber,
|
||||
userName: data.userName,
|
||||
password: data.password
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('添加失败,存在相同工号的用户');
|
||||
}
|
||||
} else if (data && data.type === 'EDIT') {
|
||||
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
|
||||
if (index >= 0) {
|
||||
this.tableData[index].password = data.password;
|
||||
this.tableData[index].userName = data.userName;
|
||||
} else {
|
||||
this.$messageBox('修改失败');
|
||||
}
|
||||
} else if (data && data.type === 'DELETE') {
|
||||
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
|
||||
if (index >= 0) {
|
||||
this.tableData.splice(index, 1);
|
||||
} else {
|
||||
this.$messageBox('删除失败');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
221
src/jmapNew/theme/datie_01/menus/menuDialog/passwordBox.vue
Normal file
221
src/jmapNew/theme/datie_01/menus/menuDialog/passwordBox.vue
Normal file
@ -0,0 +1,221 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm password-box"
|
||||
title="密码框"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="context" style="overflow:hidden">
|
||||
<el-form label-width="80px" size="mini">
|
||||
<el-form-item prop="username">
|
||||
<span slot="label">用户名:</span>
|
||||
<el-input v-model="model.username" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<span slot="label">密 码:</span>
|
||||
<el-input v-model="model.password" type="password" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="operate">
|
||||
<el-button-group v-model="key" class="left" size="mini">
|
||||
<el-button size="mini" @click="click(1)">1</el-button>
|
||||
<el-button size="mini" @click="click(2)">2</el-button>
|
||||
<el-button size="mini" @click="click(3)">3</el-button>
|
||||
<el-button size="mini" @click="click(4)">4</el-button>
|
||||
<el-button size="mini" @click="click(5)">5</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group v-model="key" class="right" size="mini">
|
||||
<el-button @click="esc">回退</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group v-model="key" class="left" size="mini">
|
||||
<el-button size="mini" @click="click(6)">6</el-button>
|
||||
<el-button size="mini" @click="click(7)">7</el-button>
|
||||
<el-button size="mini" @click="click(8)">8</el-button>
|
||||
<el-button size="mini" @click="click(9)">9</el-button>
|
||||
<el-button size="mini" @click="click(0)">0</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group v-model="key" class="right" size="mini">
|
||||
<el-button @click="clr">清空</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'PasswordBox',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: null,
|
||||
model: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
key: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
/** 强制站控*/
|
||||
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(operate) {
|
||||
this.model.username = '';
|
||||
this.model.password = '';
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.model.username = this.$store.state.user.name;
|
||||
},
|
||||
doShow(operate) {
|
||||
/** 如果不是断点激活,而是第一次显示需要初始化数据*/
|
||||
if (!this.dialogShow) {
|
||||
this.loadInitData(operate);
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.password.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.operate.type
|
||||
};
|
||||
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
/** 强制站控*/
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation;
|
||||
}
|
||||
|
||||
if (this.model.password == '123456') {
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setLoginResult', {
|
||||
operation: operate.operation,
|
||||
success: valid
|
||||
});
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('setLoginResult', {
|
||||
operation: operate.operation,
|
||||
success: false
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow('密码输入错误!');
|
||||
}
|
||||
},
|
||||
click(key) {
|
||||
if (!this.model.password) {
|
||||
this.model.password = '';
|
||||
}
|
||||
this.model.password += key;
|
||||
},
|
||||
esc() {
|
||||
if (this.model.password) {
|
||||
this.model.password = this.model.password.substring(0, this.model.password.length - 1);
|
||||
}
|
||||
},
|
||||
clr() {
|
||||
this.model.password = '';
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.password-box .el-form {
|
||||
margin-top: 10px !important;
|
||||
margin-right: 20px !important;
|
||||
}
|
||||
|
||||
.password-box .el-form-item {
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
|
||||
.password-box .context {
|
||||
height: 170px !important;
|
||||
}
|
||||
|
||||
.password-box .operate {
|
||||
margin-top: 10px !important;
|
||||
padding-bottom: 10px !important;
|
||||
}
|
||||
|
||||
.password-box .left {
|
||||
margin-left: 10px !important;
|
||||
}
|
||||
|
||||
.password-box .left .el-button {
|
||||
color: #000;
|
||||
background: #F0F0F0;
|
||||
text-align: center;
|
||||
width: 30px !important;
|
||||
}
|
||||
|
||||
.password-box .right {
|
||||
color: #000;
|
||||
margin-left: 10px !important;
|
||||
background: #F0F0F0;
|
||||
width: 80px !important;
|
||||
}
|
||||
</style>
|
286
src/jmapNew/theme/datie_01/menus/menuDialog/setLimitSpeed.vue
Normal file
286
src/jmapNew/theme/datie_01/menus/menuDialog/setLimitSpeed.vue
Normal file
@ -0,0 +1,286 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="800px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="14">
|
||||
<div class="card-box">
|
||||
<span class="tip-label">请求</span>
|
||||
<el-row style="margin: 5px">
|
||||
<el-col :span="6" class="item-label">线路选择</el-col>
|
||||
<el-col :span="6">
|
||||
<el-select v-model="data.path">
|
||||
<el-option
|
||||
v-for="item in pathList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6" class="item-label">限制速度</el-col>
|
||||
<el-col :span="6">
|
||||
<el-select v-model="data.speed">
|
||||
<el-option
|
||||
v-for="item in speedList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6" class="item-label">起始公里标</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="data.begKmPost" />
|
||||
</el-col>
|
||||
<el-col :span="6" class="item-label">结束公里标</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="data.endKmPost" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6" class="item-label">限速区段长度</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="data.length" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button>查看</el-button>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button>请求</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="card-box">
|
||||
<span class="tip-label">执行</span>
|
||||
<el-row style="margin: 5px">
|
||||
<el-col :span="6" class="item-label">线路选择</el-col>
|
||||
<el-col :span="6">
|
||||
<el-select v-model="form.path">
|
||||
<el-option
|
||||
v-for="item in pathList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6" class="item-label">限制速度</el-col>
|
||||
<el-col :span="6">
|
||||
<el-select v-model="form.speed">
|
||||
<el-option
|
||||
v-for="item in speedList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6" class="item-label">起始公里标</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="form.begKmPost" />
|
||||
</el-col>
|
||||
<el-col :span="6" class="item-label">结束公里标</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="form.endKmPost" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6" class="item-label">限速区段长度</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="form.length" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button>查看</el-button>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button>请求</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="card-box">
|
||||
<span class="tip-label">操作提示</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="9" :offset="1">
|
||||
<div class="card-box">
|
||||
<span class="tip-label">设备列表</span>
|
||||
<el-table class="card-table" :data="deviceData" border style="width: 100%" height="300">
|
||||
<el-table-column prop="stationName" label="站名" />
|
||||
<el-table-column prop="deviceCode" label="设备号" />
|
||||
<el-table-column prop="deviceName" label="设备名" />
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
data: {
|
||||
path: '',
|
||||
speed: '',
|
||||
begKmPost: '',
|
||||
endKmPost: '',
|
||||
length: ''
|
||||
},
|
||||
form: {
|
||||
path: '',
|
||||
speed: '',
|
||||
begKmPost: '',
|
||||
endKmPost: '',
|
||||
length: ''
|
||||
},
|
||||
pathList: [
|
||||
{ name: '上行站线', value: '01' },
|
||||
{ name: '下行站线', value: '02' }
|
||||
],
|
||||
speedList: [
|
||||
{ name: '10Km/h', value: '10' },
|
||||
{ name: '15Km/h', value: '15' },
|
||||
{ name: '20Km/h', value: '20' },
|
||||
{ name: '25Km/h', value: '25' }
|
||||
],
|
||||
deviceData: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '设置临时限速';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
|
||||
.card-box {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.card-table {
|
||||
position: relative;
|
||||
top: -15px;
|
||||
}
|
||||
|
||||
.tip-label {
|
||||
position: relative;
|
||||
left: 5px;
|
||||
top: -15px;
|
||||
background: #ECE9D8;
|
||||
}
|
||||
|
||||
.item-label {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,433 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm station-control-convert"
|
||||
title="控制模式转换"
|
||||
:visible.sync="show"
|
||||
width="700px"
|
||||
:before-close="doClose"
|
||||
:show-close="true"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="tableData"
|
||||
border
|
||||
row-key="code"
|
||||
style="width: 100%"
|
||||
height="250"
|
||||
center
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column :id="domIdChoose" prop="check" label="选择" width="60" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox ref="check" v-model="scope.row.check" :disabled="scope.row.disabled" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="operate" label="操作区域" width="140">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="control" label="控制模式" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="中心-车站通信状态" width="140">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.status }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="result" label="转换执行状态">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.result }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button v-if="isFork" :id="domIdFork" :disabled="disabledCommit" @click="forkCommit">强制站控</el-button>
|
||||
<el-button v-if="isRequest" :id="domIdRequest" :disabled="disabledCommit" @click="requestCommit">请求站控
|
||||
</el-button>
|
||||
<el-button v-if="isConter" :id="domIdConter" :disabled="disabledCommit" @click="conterCommit">请求中控
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<two-confirmation ref="twoConfirmation" @setOperate="getOperate" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import TwoConfirmation from './childDialog/twoConfirmation';
|
||||
|
||||
export default {
|
||||
name: 'StationControlConvert',
|
||||
components: {
|
||||
TwoConfirmation
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: null,
|
||||
dialogShow: false,
|
||||
disabledSend: false,
|
||||
disabledSure: false,
|
||||
disabledClose: false,
|
||||
operation: '',
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
},
|
||||
selection: [],
|
||||
tableData: [],
|
||||
timer: null,
|
||||
count: 0,
|
||||
backOperate: '',
|
||||
timeout: 61
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started'
|
||||
]),
|
||||
disabledCommit() {
|
||||
return this.disabledSend || this.disabledSure;
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
isFork() {
|
||||
if (this.dialogShow) {
|
||||
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl);
|
||||
}
|
||||
return '';
|
||||
},
|
||||
isRequest() {
|
||||
if (this.dialogShow) {
|
||||
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl);
|
||||
}
|
||||
return '';
|
||||
},
|
||||
isConter() {
|
||||
if (this.dialogShow) {
|
||||
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl);
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdChoose() {
|
||||
if (this.dialogShow) {
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
return OperationEvent.StationControl.forcedStationControl.choose.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
return OperationEvent.StationControl.requestStationControl.choose.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
return OperationEvent.StationControl.requestCentralControl.choose.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConter() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.requestCentralControl.menu.domId : '';
|
||||
},
|
||||
domIdFork() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.forcedStationControl.menu.domId : '';
|
||||
},
|
||||
domIdRequest() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.requestStationControl.menu.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem) {
|
||||
if (elem.hasOwnProperty('timeout')) {
|
||||
this.updateTableValue(elem.stationControlCode, { result: `接受转换应答超时` }, false);
|
||||
} else if (elem.hasOwnProperty('success')) {
|
||||
if (elem.success) {
|
||||
this.updateTableValue(elem.stationControlCode, { result: '控制模式转换成功' }, true);
|
||||
} else {
|
||||
this.updateTableValue(elem.stationControlCode, { result: `控制模式转换失败` }, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
backOperate: function (operate) {
|
||||
if (this.dialogShow && operate) {
|
||||
if (operate.selection && operate.selection.length) {
|
||||
operate.selection.forEach(elem => {
|
||||
if (operate.commit) {
|
||||
this.updateTableValue(elem.code, { result: `已发送转换请求,${this.timeout}秒后超时.` }, false);
|
||||
} else if (operate.cancel) {
|
||||
this.updateTableValue(elem.code, { result: '' }, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
// 深度数据状态
|
||||
tableData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadTableData();
|
||||
},
|
||||
methods: {
|
||||
updateTableValue(code, result, success) {
|
||||
this.tableData.forEach((row, index) => {
|
||||
if (row.code == code) {
|
||||
for (const prop in result) {
|
||||
row[prop] = result[prop];
|
||||
}
|
||||
if (success) {
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
row.control = this.controlProps['02']; // 01:中控, 02:站控
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
row.control = this.controlProps['01']; // 01:中控, 02:站控
|
||||
}
|
||||
row.disabled = true;
|
||||
row.check = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
checkTableDataSelction(data) {
|
||||
const selection = [];
|
||||
if (data && data.length > 0) {
|
||||
data.forEach(row => {
|
||||
if (row.check && !row.disabled) {
|
||||
selection.push(row);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.disabledSend = !selection.length;
|
||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||
this.handleChooseChange(selection);
|
||||
this.selection = selection;
|
||||
}
|
||||
},
|
||||
checkBoxDisabled(row) {
|
||||
const control = (this.$store.getters('map/getDeviceByCode')(row.code) || {});
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
if (control && control.status == '02') { // 01:中控, 02:站控
|
||||
return true;
|
||||
}
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
if (control && control.status == '01') { // 01:中控, 02:站控
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
loadTableData() {
|
||||
this.tableData = [];
|
||||
this.stationList.forEach(station => {
|
||||
// const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||
this.tableData.push({
|
||||
code: station.code,
|
||||
operate: station.name || '',
|
||||
control: '',
|
||||
check: false,
|
||||
disabled: false,
|
||||
status: '正常',
|
||||
result: ''
|
||||
});
|
||||
});
|
||||
},
|
||||
initTableDataStatus() {
|
||||
this.tableData.forEach(row => {
|
||||
row.disabled = this.checkBoxDisabled(row);
|
||||
row.check = false;
|
||||
row.result = '';
|
||||
const control = (this.$store.getters('map/getDeviceByCode')(row.code) || {}).state;
|
||||
if (control) {
|
||||
row.control = this.controlProps[control.status];
|
||||
}
|
||||
});
|
||||
},
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.disabledSure = false;
|
||||
this.initTableDataStatus();
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$refs.multipleTable.setCurrentRow();
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
clearTimer() {
|
||||
this.count = 0;
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
},
|
||||
serializeCodeListWithSeparator(sep) {
|
||||
const codeList = [];
|
||||
if (this.selection && this.selection.length) {
|
||||
this.selection.forEach(elem => {
|
||||
codeList.push(elem.code);
|
||||
});
|
||||
}
|
||||
return codeList.join(sep);
|
||||
},
|
||||
handleChooseChange(selection) {
|
||||
this.selection = selection;
|
||||
if (selection && selection.length) {
|
||||
const operate = {
|
||||
|
||||
operation: '',
|
||||
val: this.serializeCodeListWithSeparator('::'),
|
||||
selection: selection
|
||||
};
|
||||
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.choose.operation;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestStationControl.choose.operation;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestCentralControl.choose.operation;
|
||||
}
|
||||
|
||||
this.disabledSure = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.disabledSure = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
} else if (!selection) {
|
||||
this.$messageBox('请选择一条数据');
|
||||
}
|
||||
},
|
||||
requestCommit() {
|
||||
const operate = {
|
||||
|
||||
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
|
||||
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
||||
val: this.serializeCodeListWithSeparator('::'),
|
||||
selection: this.selection
|
||||
};
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
this.disabledClose = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.twoConfirmation.doShow(operate);
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.disabledSure = false;
|
||||
this.disabledClose = false;
|
||||
});
|
||||
},
|
||||
forkCommit() {
|
||||
const operate = {
|
||||
|
||||
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
|
||||
operation: OperationEvent.StationControl.forcedStationControl.menu.operation,
|
||||
val: this.serializeCodeListWithSeparator('::'),
|
||||
selection: this.selection
|
||||
};
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
this.disabledClose = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.twoConfirmation.doShow(operate);
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.disabledSure = false;
|
||||
this.disabledClose = false;
|
||||
});
|
||||
},
|
||||
conterCommit() { // 请求中控
|
||||
const operate = {
|
||||
|
||||
messages: ['确认将如下操作区域的控制模式由站控转为中控:'],
|
||||
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
||||
val: this.serializeCodeListWithSeparator('::'),
|
||||
selection: this.selection
|
||||
};
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
this.disabledClose = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.twoConfirmation.doShow(operate);
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.disabledSure = false;
|
||||
this.disabledClose = false;
|
||||
});
|
||||
},
|
||||
getOperate(operate) {
|
||||
this.backOperate = operate;
|
||||
if (operate.cancel) {
|
||||
this.disabledClose = false;
|
||||
this.disabledSure = this.disabledSend = false;
|
||||
}
|
||||
if (operate.commit || operate.timeout) {
|
||||
this.disabledSend = this.disabledSure = true;
|
||||
this.disabledClose = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
168
src/jmapNew/theme/datie_01/menus/menuDialog/trainAdd.vue
Normal file
168
src/jmapNew/theme/datie_01/menus/menuDialog/trainAdd.vue
Normal file
@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">添加位置</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终   端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="前车车次号:" prop="trainNumberLimber">
|
||||
<el-input v-model="addModel.trainNumberLimber" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item label="添加车次号:" label-width="115px" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
trainNumberLimber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
// trainNumberLimber: [
|
||||
// { required: true, message: '请输入前车车次号', trigger: 'blur' }
|
||||
// ],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '添加计划车';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
151
src/jmapNew/theme/datie_01/menus/menuDialog/trainDelete.vue
Normal file
151
src/jmapNew/theme/datie_01/menus/menuDialog/trainDelete.vue
Normal file
@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除计划车';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Command.planTrain.delPlanTrain.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
158
src/jmapNew/theme/datie_01/menus/menuDialog/trainTranstalet.vue
Normal file
158
src/jmapNew/theme/datie_01/menus/menuDialog/trainTranstalet.vue
Normal file
@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<el-form-item label="车 次 号:" label-width="115px" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">目的</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="trainNumberLimber">
|
||||
<el-input v-model="addModel.trainNumberLimber" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainTranstalet',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
trainNumberLimber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
trainNumberLimber: [
|
||||
{ required: true, message: '请输入前车车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '平移计划车';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
256
src/jmapNew/theme/datie_01/menus/menuDialog/viewName.vue
Normal file
256
src/jmapNew/theme/datie_01/menus/menuDialog/viewName.vue
Normal file
@ -0,0 +1,256 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm view-name"
|
||||
title="名称显示设置"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-checkbox-group v-model="nameLevels">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="1">信号机名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="2">站台轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="3" disabled>按钮名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="4">折返轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="5">轨道名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="7">道岔名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="8">标识灯名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="9">道岔区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="10">目的地名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="11">计轴区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="12">公里标</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ViewName',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setNameDisplay();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活显示,而是第一次显示时,需要初始化参数
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.nameLevels.sort().join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setNameDisplay();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setNameDisplay() {
|
||||
const deviceList = [];
|
||||
|
||||
// 信号机
|
||||
let nameShow = this.nameLevels.includes(1);
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 按钮名称
|
||||
nameShow = this.nameLevels.includes(3);
|
||||
|
||||
// 道岔
|
||||
nameShow = this.nameLevels.includes(7); // 道岔名称
|
||||
const switchSectionNameShow = this.nameLevels.includes(9); // 道岔轨名称
|
||||
const switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 控制模式
|
||||
const indicatorShow = this.nameLevels.includes(8);
|
||||
const control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); // 标识灯名称
|
||||
});
|
||||
}
|
||||
|
||||
// 区段
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
// if (elem.switchSection && elem.parentCode) {
|
||||
// // 道岔轨的区段名称默认不显示
|
||||
// nameShow = false;
|
||||
if (elem.type == '03') {
|
||||
nameShow = false;
|
||||
} else if (elem.type === '01') {
|
||||
// 计轴区段名称
|
||||
nameShow = this.nameLevels.includes(11);
|
||||
} else if (elem.type === '02') {
|
||||
// 轨道轨名称
|
||||
nameShow = this.nameLevels.includes(5);
|
||||
} else if (elem.type === '04') {
|
||||
// 道岔区段名称
|
||||
nameShow = this.nameLevels.includes(9);
|
||||
}
|
||||
|
||||
// 站台轨名称
|
||||
if (elem.standTrack) {
|
||||
standTrackNameShow = this.nameLevels.includes(2);
|
||||
}
|
||||
|
||||
// 折返轨名称
|
||||
if (elem.reentryTrack) {
|
||||
reentryTrackNameShow = this.nameLevels.includes(4);
|
||||
}
|
||||
|
||||
// 转换轨名称
|
||||
if (elem.transferTrack) {
|
||||
transferTrackNameShow = this.nameLevels.includes(6);
|
||||
}
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 停车点
|
||||
const destCodeShow = this.nameLevels.includes(10);
|
||||
const stopPointList = this.$store.getters['map/stopPointList'];
|
||||
if (stopPointList && stopPointList.length > 0) {
|
||||
stopPointList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 车站
|
||||
const kmPostShow = this.nameLevels.includes(12);
|
||||
const stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); // 公里标
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
222
src/jmapNew/theme/datie_01/menus/menuSection.vue
Normal file
222
src/jmapNew/theme/datie_01/menus/menuSection.vue
Normal file
@ -0,0 +1,222 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" pop-class="chengdou-03__systerm" />
|
||||
<section-detail ref="sectionDetail" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<train-add-plan ref="trainAddPlan" pop-class="chengdou-03__systerm" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
<load-spare-train ref="loadSpareTrain" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import SectionDetail from './dialog/sectionDetail';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SectionControl,
|
||||
SectionDetail,
|
||||
NoticeInfo,
|
||||
TrainAddPlan,
|
||||
SetFault,
|
||||
LoadSpareTrain
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '区故解',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '属性',
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Section.CMD_SECTION_DETAILS
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
},
|
||||
{
|
||||
label: '设置备用车',
|
||||
handler: this.loadSpare,
|
||||
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
if (isDev) {
|
||||
this.menuNormal.Center.push( {
|
||||
label: '新建计划列车',
|
||||
handler: this.createPlanTrain,
|
||||
cmdType: CMD.Section.CMD_Train_Init_Plan
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.selected.type != '04') {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
} else {
|
||||
this.menu = [];
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
loadSpare() {
|
||||
commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.loadSpareTrain.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置计轴失效
|
||||
alxeFailure() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.alxeFailure.menu.operation,
|
||||
cmdType: '',
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 故障解锁
|
||||
fault() {
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
detail() {
|
||||
commitOperate(menuOperate.Section.detail, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionDetail.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 新建计划车(开发专用)
|
||||
createPlanTrain() {
|
||||
commitOperate(menuOperate.Train.createPlanTrain, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.trainAddPlan.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
350
src/jmapNew/theme/datie_01/menus/menuSignal.vue
Normal file
350
src/jmapNew/theme/datie_01/menus/menuSignal.vue
Normal file
@ -0,0 +1,350 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<route-selection ref="routeSelection" />
|
||||
<route-control ref="routeControl" pop-class="chengdou-03__systerm" />
|
||||
<route-detail ref="routeDetail" />
|
||||
<route-guide ref="routeGuide" />
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<password-box ref="passwordBox" pop-class="chengdou-03__systerm" @checkOver="passWordCommit" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import RouteSelection from './dialog/routeSelection';
|
||||
import RouteDetail from './dialog/routeDetail';
|
||||
import RouteHandControl from './dialog/routeHandControl';
|
||||
import RouteGuide from './dialog/routeGuide';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import PasswordBox from '@/jmapNew/theme/components/menus/childDialog/passwordInputBox';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
RouteControl,
|
||||
RouteSelection,
|
||||
RouteHandControl,
|
||||
RouteDetail,
|
||||
RouteGuide,
|
||||
NoticeInfo,
|
||||
PasswordBox,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
// {
|
||||
// label: '办理进路',
|
||||
// handler: this.arrangementRoute,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
// },
|
||||
// {
|
||||
// label: '办理引导进路',
|
||||
// handler: this.guide,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
// },
|
||||
// {
|
||||
// label: '取消进路',
|
||||
// handler: this.cancelTrainRoute,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
// },
|
||||
// {
|
||||
// label: '总人解', // 取消引导进路
|
||||
// handler: this.humanTrainRoute,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
// },
|
||||
// {
|
||||
// label: '进路收人工控',
|
||||
// handler: this.humanControl,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
// },
|
||||
// {
|
||||
// label: '进路交自动控',
|
||||
// handler: this.atsAutoControl,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
// },
|
||||
// {
|
||||
// label: '进路信息',
|
||||
// handler: this.detail,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
// }
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '办理进路',
|
||||
handler: this.arrangementRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
{
|
||||
label: '办理引导进路',
|
||||
handler: this.guide,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
{
|
||||
label: '取消进路',
|
||||
handler: this.cancelTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
{
|
||||
label: '总人解',
|
||||
handler: this.humanTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '信号封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
},
|
||||
{
|
||||
label: '信号解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '进路收人工控',
|
||||
handler: this.humanControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '进路交自动控',
|
||||
handler: this.atsAutoControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '进路信息',
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'routeList'
|
||||
]),
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取进路列表
|
||||
getRouteList(selectType) {
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === selectType.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
return routes;
|
||||
},
|
||||
// 设置进路
|
||||
arrangementRoute() {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路引导
|
||||
guide() {
|
||||
commitOperate(menuOperate.Signal.guide, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.passwordBox.doShow({...operate, ...{selected: this.selected}, ...{routesList: this.getRouteList(this.selected)}});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 总人解
|
||||
humanTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
Object.assign(operate, {operation: OperationEvent.Signal.humanTrainRoute.button.operation });
|
||||
this.$refs.passwordBox.doShow({...operate, ...{selected: this.selected}});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号封锁
|
||||
lock() {
|
||||
commitOperate(menuOperate.Signal.lock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号解封
|
||||
unlock() {
|
||||
commitOperate(menuOperate.Signal.unlock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
commitOperate(menuOperate.Signal.humanControl, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询进路状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
passWordCommit(data) {
|
||||
const step = {
|
||||
operation: data.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
switch (data.operation) {
|
||||
case OperationEvent.Signal.guide.menu.operation:
|
||||
this.$refs.routeGuide.doShow(data, data.selected, data.routesList);
|
||||
break;
|
||||
case OperationEvent.Signal.humanTrainRoute.button.operation:
|
||||
Object.assign(data, {operation: OperationEvent.Signal.humanTrainRoute.menu.operation});
|
||||
this.$refs.routeControl.doShow(data, data.selected);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
130
src/jmapNew/theme/datie_01/menus/menuStation.vue
Normal file
130
src/jmapNew/theme/datie_01/menus/menuStation.vue
Normal file
@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StationMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SetFault,
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置ZC故障',
|
||||
handler: this.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消ZC故障',
|
||||
handler: this.cancelStoppage
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
|
||||
if (valid && this.selected.zcCode) {
|
||||
const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected);
|
||||
} else if (!this.selected.zcCode) {
|
||||
console.error('该车站无zc设备');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
|
||||
if (valid && this.selected.zcCode) {
|
||||
const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected);
|
||||
} else if (!this.selected.zcCode) {
|
||||
console.error('该车站无zc设备');
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
220
src/jmapNew/theme/datie_01/menus/menuStationStand.vue
Normal file
220
src/jmapNew/theme/datie_01/menus/menuStationStand.vue
Normal file
@ -0,0 +1,220 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<stand-control ref="standControl" />
|
||||
<stand-detail ref="standDetail" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StandControl from './dialog/standControl';
|
||||
import StandDetail from './dialog/standDetail';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
StandControl,
|
||||
StandDetail,
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '设置扣车',
|
||||
handler: this.setDetainTrain,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '取消扣车',
|
||||
handler: this.cancelDetainTrain,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '设置跳停',
|
||||
handler: this.setJumpStop,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
},
|
||||
{
|
||||
label: '取消跳停',
|
||||
handler: this.cancelJumpStop,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
},
|
||||
{
|
||||
label: '设置停站时间',
|
||||
handler: this.setStopTime,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
},
|
||||
{
|
||||
label: '设置站间运行等级',
|
||||
handler: this.setRunLevel,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
},
|
||||
{
|
||||
label: '显示站台信息',
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 停站时间控制
|
||||
setStopTime() {
|
||||
commitOperate(menuOperate.StationStand.setStopTime, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置运行等级
|
||||
setRunLevel() {
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询站台状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.StationStand.detail, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standDetail.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
258
src/jmapNew/theme/datie_01/menus/menuSwitch.vue
Normal file
258
src/jmapNew/theme/datie_01/menus/menuSwitch.vue
Normal file
@ -0,0 +1,258 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" pop-class="chengdou-03__systerm" />
|
||||
<switch-control ref="switchControl" pop-class="chengdou-03__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<switch-hook-lock ref="switchHookLock" pop-class="chengdou-03__systerm" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import SwitchHookLock from '@/jmapNew/theme/components/menus/dialog/switchHookLock';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SectionControl,
|
||||
SwitchControl,
|
||||
NoticeInfo,
|
||||
SetFault,
|
||||
SwitchHookLock
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [],
|
||||
Center: [
|
||||
{
|
||||
label: '单操到定位',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
{
|
||||
label: '单操到反位',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
{
|
||||
label: '道岔单锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
{
|
||||
label: '道岔解锁',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔封锁',
|
||||
handler: this.block,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔解封',
|
||||
handler: this.unblock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '区故解',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
}
|
||||
// {
|
||||
// label: '属性',
|
||||
// handler: this.undeveloped,
|
||||
// auth: { station: true, center: true },
|
||||
// cmdType: CMD.Switch.
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
const menuHook = [{
|
||||
label: '道岔钩锁',
|
||||
handler: this.hookLock
|
||||
}];
|
||||
this.menu = [...this.menuForce, ...menuHook];
|
||||
} else {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
lock() {
|
||||
commitOperate(menuOperate.Switch.lock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔解锁
|
||||
unlock() {
|
||||
commitOperate(menuOperate.Switch.unlock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔封锁
|
||||
block() {
|
||||
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔解封
|
||||
unblock() {
|
||||
commitOperate(menuOperate.Switch.unblock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔故障解锁/ 区故解
|
||||
fault() {
|
||||
commitOperate(menuOperate.Switch.fault, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 单操到定位
|
||||
locate() {
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 单操到反位
|
||||
reverse() {
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔钩锁
|
||||
hookLock() {
|
||||
this.$refs.switchHookLock.doShow(this.selected);
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
211
src/jmapNew/theme/datie_01/menus/menuTool.vue
Normal file
211
src/jmapNew/theme/datie_01/menus/menuTool.vue
Normal file
@ -0,0 +1,211 @@
|
||||
<template>
|
||||
<div id="menuTool">
|
||||
<div class="nav">
|
||||
<div v-for="(item,index) in tools" :key="index" class="tool">
|
||||
<img :src="item.src" :alt="item.title">
|
||||
</div>
|
||||
<img class="logo" :src="logoImg">
|
||||
<system-time
|
||||
v-if="isShowSystemTime"
|
||||
class="time"
|
||||
:time="time"
|
||||
:zoom="2"
|
||||
:width="180"
|
||||
:height="48"
|
||||
:fine="2"
|
||||
:top="6"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
|
||||
export default {
|
||||
name: 'MenuTool',
|
||||
components: {
|
||||
SystemTime
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
logoImg: logo_,
|
||||
time: '00:0000',
|
||||
tools: [
|
||||
{
|
||||
title: '服务器1',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '服务器2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '主调',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台3',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '大屏',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '维护工作站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '运行图显示人工站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '跳停',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '扣车',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车报警',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isShowSystemTime() {
|
||||
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
const date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initTools();
|
||||
},
|
||||
methods: {
|
||||
initTools() {
|
||||
this.tools = [];
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
$top: 30px;
|
||||
$width: 50px;
|
||||
$height: 50px;
|
||||
|
||||
#menuTool {
|
||||
z-index: 5;
|
||||
position: absolute;
|
||||
top: $top;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: block;
|
||||
height: $height;
|
||||
line-height: $height;
|
||||
color: #0000;
|
||||
background: #ECE9D8;
|
||||
border: 1px solid #B6BCCC !important;
|
||||
border-bottom: 2px solid #B6BCCC !important;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.tool {
|
||||
background: #808080;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
float: left;
|
||||
height: $height - 2;
|
||||
width: $width + 15;
|
||||
margin: 1px;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding-top: 4px;
|
||||
height: $height - 10;
|
||||
width: $width - 10;
|
||||
}
|
||||
}
|
||||
|
||||
.time {
|
||||
position: relative;
|
||||
float: right;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
position: relative;
|
||||
float: right;
|
||||
text-align: center;
|
||||
margin: 1px 10px;
|
||||
height: $height - 4;
|
||||
width: $width - 4;
|
||||
}
|
||||
</style>
|
422
src/jmapNew/theme/datie_01/menus/menuTrain.vue
Normal file
422
src/jmapNew/theme/datie_01/menus/menuTrain.vue
Normal file
@ -0,0 +1,422 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<train-control ref="trainControl" />
|
||||
<train-edit-number ref="trainEditNumber" />
|
||||
<train-create-number ref="trainCreateNumber" />
|
||||
<train-move-number ref="trainMoveNumber" />
|
||||
<train-delete-number ref="trainDeleteNumber" />
|
||||
<train-detail-info ref="trainDetailInfo" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import TrainControl from './dialog/trainControl';
|
||||
import TrainEditNumber from './dialog/trainEditNumber';
|
||||
import TrainMoveNumber from './dialog/trainMoveNumber';
|
||||
import TrainCreateNumber from './dialog/trainCreateNumber';
|
||||
import TrainDeleteNumber from './dialog/trainDeleteNumber';
|
||||
import TrainDetailInfo from './dialog/trainDetailInfo';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'MenuTrain',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
TrainControl,
|
||||
TrainEditNumber,
|
||||
TrainMoveNumber,
|
||||
TrainCreateNumber,
|
||||
TrainDeleteNumber,
|
||||
TrainDetailInfo,
|
||||
SetFault
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '新建计划列车',
|
||||
handler: this.createPlanTrain,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '新建车组号',
|
||||
handler: this.createTrainNo
|
||||
},
|
||||
{
|
||||
label: '移动车组号',
|
||||
handler: this.moveTrainNo
|
||||
},
|
||||
{
|
||||
label: '删除车组号',
|
||||
handler: this.deleteTrainNo
|
||||
},
|
||||
{
|
||||
label: '修改车组号',
|
||||
handler: this.editTrainNo
|
||||
},
|
||||
{
|
||||
label: '设计划车',
|
||||
handler: this.setPlanTrainId
|
||||
},
|
||||
{
|
||||
label: '设目的地',
|
||||
handler: this.destinationTrainId
|
||||
},
|
||||
{
|
||||
label: '设人工车',
|
||||
handler: this.artificialTrainId
|
||||
},
|
||||
{
|
||||
label: '设特殊人工车',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '详细列车信息',
|
||||
handler: this.detailTrainInfo
|
||||
},
|
||||
{
|
||||
label: '属性',
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage
|
||||
}
|
||||
],
|
||||
menuDirective: [
|
||||
{
|
||||
label: '确认运行至前方站',
|
||||
handler: this.nextStation
|
||||
},
|
||||
{
|
||||
label: '进路闭塞法行车',
|
||||
handler: this.routeBlockRun
|
||||
},
|
||||
{
|
||||
label: '越引导信号行驶',
|
||||
handler: this.handleOverFuideSignal
|
||||
},
|
||||
{
|
||||
label: '越红灯行驶',
|
||||
handler: this.handleOverEedLight
|
||||
}
|
||||
],
|
||||
menuSpeed: [
|
||||
{
|
||||
label: '确认运行至前方站',
|
||||
handler: this.limitSpeed
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode',
|
||||
'memberList'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function () {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Train) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
this.menu = [...this.menuForce, ...this.menuDirective];
|
||||
} else {
|
||||
this.menu = [...this.menuForce];
|
||||
}
|
||||
}
|
||||
// 指令模式列表
|
||||
if (this.operatemode === OperateMode.DIRECTIVE) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
this.menu = [...this.menuDirective];
|
||||
}
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
nextStation() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Drive_Ahead',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
routeBlockRun() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Route_Block_Drive',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleOverFuideSignal() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Drive_Through_The_Guide_Signal',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleOverEedLight() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Drive_Through_The_Red_Light',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 限速行驶
|
||||
limitSpeed() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.limitSpeed.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 设计划车
|
||||
setPlanTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.setPlanTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainControl.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设目的地车
|
||||
destinationTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.destinationTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainControl.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设人工车
|
||||
artificialTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.artificialTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainControl.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 详细列车信息
|
||||
detailTrainInfo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.detailTrainInfo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDetailInfo.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 创建车组号
|
||||
createTrainNo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.createTrainNo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainCreateNumber.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除车组号
|
||||
deleteTrainNo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.deleteTrainNo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDeleteNumber.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改车组号
|
||||
editTrainNo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.editTrainNo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainEditNumber.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 移动车组号
|
||||
moveTrainNo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainNo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainMoveNumber.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
216
src/jmapNew/theme/datie_01/menus/passiveDialog/alarm.vue
Normal file
216
src/jmapNew/theme/datie_01/menus/passiveDialog/alarm.vue
Normal file
@ -0,0 +1,216 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm alarm-detail"
|
||||
:title="level+'级告警详细信息'"
|
||||
:visible.sync="show"
|
||||
width="760px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form label-width="80px" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="线路名称">
|
||||
<el-input v-model="model.lineName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位名称">
|
||||
<el-input v-model="model.unitName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="模块名称">
|
||||
<el-input v-model="model.moduleName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="报警时间">
|
||||
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item>
|
||||
<span slot="label">等 级</span>
|
||||
<el-input v-model="model.level" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="确认状态">
|
||||
<el-input v-model="model.confirm" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9" class="alarm-type">
|
||||
<el-form-item>
|
||||
<span slot="label">类  型</span>
|
||||
<el-input v-model="model.type" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="15" class="alarm-child-type">
|
||||
<el-form-item label="子类型">
|
||||
<el-input v-model="model.childType" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="时间摘要">
|
||||
<el-input v-model="model.timeSummary" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="推荐操作">
|
||||
<el-input v-model="model.recommendedOperation" disabled />
|
||||
</el-form-item>
|
||||
<div class="alarm-detail-description">
|
||||
<span> 报警详细描述</span><br>
|
||||
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" placeholder="请输入内容" disabled />
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="3" :offset="9">
|
||||
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确 定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<span style="line-height:26px">未确认{{ level }}级报警数目:1</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'AlarmDetail',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
level: 0,
|
||||
operate: null,
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
},
|
||||
model: {
|
||||
lineName: '',
|
||||
unitName: '',
|
||||
moduleName: '',
|
||||
level: '',
|
||||
confirm: '',
|
||||
alarmDate: '',
|
||||
type: '',
|
||||
childType: '',
|
||||
timeSummary: '',
|
||||
recommendedOperation: '',
|
||||
alarmDetail: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'name'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// '$store.state.socket.msgHead': function (elem) {
|
||||
// if (elem && elem.hasOwnProperty('success')) {
|
||||
// if (elem.success) {
|
||||
// const operate = this.$store.state.training.operate;
|
||||
// console.log(elem);
|
||||
// elem.stationCodes.forEach(stationCode => {
|
||||
// const station = this.$store.getters['map/getDeviceByCode'](elem.stationCodes);
|
||||
// const newOperate = {
|
||||
// type: operate.type,
|
||||
// name: station.name
|
||||
// };
|
||||
|
||||
// this.doShow(newOperate);
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.model = {
|
||||
lineName: this.name,
|
||||
unitName: this.operate.name,
|
||||
moduleName: 'CMM控制模式转换模式',
|
||||
level: '0级告警',
|
||||
confirm: '确认状态',
|
||||
alarmDate: new Date(),
|
||||
type: '系统事件',
|
||||
childType: '依据信号设备操作命令设置控制模式',
|
||||
timeSummary: '控制模式摘要',
|
||||
recommendedOperation: '',
|
||||
alarmDetail: `控制模式转换:${this.operate.name}由中控转为站控模式!`
|
||||
};
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
if (this.dialogShow) {
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
}
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.alarm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.alarm.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
isClose() {
|
||||
return this.dialogShow;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.alarm-type .el-input {
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
.alarm-detail-description {
|
||||
padding-left: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
109
src/jmapNew/theme/datie_01/menus/passiveDialog/timeout.vue
Normal file
109
src/jmapNew/theme/datie_01/menus/passiveDialog/timeout.vue
Normal file
@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm cmd-notice"
|
||||
title="操作命令提示"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<span>{{ name }},{{ msg }}!</span>
|
||||
<el-row class="button-group">
|
||||
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确认</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
export default {
|
||||
name: 'CmdNotice',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
name: '',
|
||||
msg: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// '$store.state.socket.msgHead': function (elem) {
|
||||
// if (elem && (elem.hasOwnProperty('success') || elem.hasOwnProperty('timeout'))) {
|
||||
// let operate = this.$store.state.training.operate;
|
||||
// let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
||||
// let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||
// let newOperate = {
|
||||
// type: operate.type,
|
||||
// name: station.name,
|
||||
// }
|
||||
|
||||
// if (elem.timeout) {
|
||||
// newOperate['msg'] = '请求超时';
|
||||
// this.doShow(newOperate);
|
||||
// } else if (!elem.success) {
|
||||
// newOperate['msg'] = '请求拒绝';
|
||||
// this.doShow(newOperate);
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.name = this.operate.name || '';
|
||||
this.msg = this.operate.msg || '';
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
if (this.dialogShow) {
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
}
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.notice.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.notice.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
isClose() {
|
||||
return this.dialogShow;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
71
src/jmapNew/theme/datie_01/model.js
Normal file
71
src/jmapNew/theme/datie_01/model.js
Normal file
@ -0,0 +1,71 @@
|
||||
import deviceType from '../../constant/deviceType';
|
||||
|
||||
class Model {
|
||||
constructor() {
|
||||
this.screenLine = 3;
|
||||
// 公共字段部分默认初始值
|
||||
this['public'] = {};
|
||||
this['public'][deviceType.Signal] = {
|
||||
lampPositionType: '02',
|
||||
lampPostType: '02'
|
||||
};
|
||||
|
||||
// 私有字段部分默认初始值
|
||||
this['private'] = {};
|
||||
this['private'][deviceType.StationControl] = {
|
||||
indicatorShow: true // 标识灯名称显示
|
||||
};
|
||||
this['private'][deviceType.Station] = {
|
||||
kmPostShow: true // 公里标显示
|
||||
};
|
||||
this['private'][deviceType.Switch] = {
|
||||
nameShow: true
|
||||
};
|
||||
this['private'][deviceType.Section] = {
|
||||
nameShow: true,
|
||||
borderBorderShow: true, // 区段边界显示
|
||||
destinationNameShow: true, // 目的地码名称显示
|
||||
standTrackNameShow: true, // 站台轨名称显示
|
||||
reentryTrackNameShow: true, // 折返轨名称显示
|
||||
transferTrackNameShow: true // 转换轨名称显示
|
||||
};
|
||||
this['private'][deviceType.Signal] = {
|
||||
nameShow: true, // 信号机名称显示
|
||||
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
|
||||
atsAutoTriggerShow: true // ATS自动触发表示灯显示
|
||||
};
|
||||
this['private'][deviceType.Train] = {
|
||||
};
|
||||
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();
|
945
src/jmapNew/theme/datie_01/operationConfig.js
Normal file
945
src/jmapNew/theme/datie_01/operationConfig.js
Normal file
@ -0,0 +1,945 @@
|
||||
// SECTION 区段
|
||||
// SWITCH 道岔
|
||||
// SIGNAL 信号机
|
||||
// START_SIGNAL 进路起始信号机
|
||||
// END_SIGNAL 进路终端信号机
|
||||
|
||||
// STATION 车站
|
||||
// STAND 站台
|
||||
// ROUTE 进路
|
||||
// CYCLE 自动折返
|
||||
|
||||
// {id: "1", trainingType: "ControlConvertMenu", name: "车站名称"}
|
||||
// {id: "2", trainingType: "ControlConvertMenu", name: "车站控制模式编号"}
|
||||
// {id: "3", trainingType: "Signal", name: "进路名称"}
|
||||
// {id: "4", trainingType: "Signal", name: "进路编号"}
|
||||
// {id: "5", trainingType: "Signal", name: "信号机名称"}
|
||||
// {id: "6", trainingType: "Signal", name: "信号机编号"}
|
||||
|
||||
// {id: "7", trainingType: "Switch", name: "道岔名称"}
|
||||
|
||||
// {id: "8", trainingType: "Section", name: "物理区段名称"}
|
||||
// {id: "9", trainingType: "Section", name: "逻辑区段名称"}
|
||||
|
||||
// {id: "10", trainingType: "Stand", name: "车站名称"}
|
||||
// {id: "11", trainingType: "Stand", name: "站台行驶方向编号"}
|
||||
// {id: "12", trainingType: "Stand", name: "站台行驶方向"}
|
||||
// {id: "13", trainingType: "Stand", name: "站台行驶方向编号(反)"}
|
||||
// {id: "14", trainingType: "Stand", name: "站台行驶方向(反)"}
|
||||
// {id: "29", trainingType: "Stand", name: "站台名称"}
|
||||
// {id: "30", trainingType: "Stand", name: "站台编码"}
|
||||
|
||||
// {id: "15", trainingType: "Switch", name: "道岔位置"}
|
||||
// {id: "16", trainingType: "Switch", name: "道岔位置(反)"}
|
||||
// {id: "17", trainingType: "Switch", name: "道岔编码"}
|
||||
|
||||
// {id: "18", trainingType: "Section", name: "逻辑区段编码"}
|
||||
// {id: "19", trainingType: "Section", name: "区段编号"}
|
||||
// {id: "20", trainingType: "Section", name: "车站名称"}
|
||||
|
||||
// {id: "21", trainingType: "Switch", name: "车站名称"}
|
||||
// {id: "22", trainingType: "Section", name: "车站编号"}
|
||||
// {id: "23", trainingType: "Switch", name: "车站编号"}
|
||||
// {id: "24", trainingType: "Switch", name: "道岔计轴区段编号"}
|
||||
// {id: "25", trainingType: "Switch", name: "道岔计轴区段名称"}
|
||||
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
export default {
|
||||
list: [
|
||||
// 控制模式
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '请求站控({2})',
|
||||
trainingRemark: '请求站控功能',
|
||||
trainingType: 'ControlConvertMenu',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【站控】', codeType:'STATION', subType:'substation' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '请求紧急站控({2})',
|
||||
trainingRemark: '请求紧急站控功能',
|
||||
trainingType: 'ControlConvertMenu',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【紧急站控】', codeType:'STATION', subType:'emergency' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '请求中控({2})',
|
||||
trainingRemark: '请求中控功能',
|
||||
trainingType: 'ControlConvertMenu',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【中控】', codeType:'STATION', subType:'center' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.ControlConvertMenu.CMD_CM_INTERLOCK_CONTROL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '请求联锁控({2})',
|
||||
trainingRemark: '请求联锁控功能',
|
||||
trainingType: 'ControlConvertMenu',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【联锁控】', codeType:'STATION', subType:'interconnected' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// 信号机列表
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_SET_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '办理进路({3} 进路)',
|
||||
trainingRemark: '办理进路功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【办理进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3012', tip: '鼠标左键点击【执行】按钮' },
|
||||
{ deviceType: '04', orderNum: 4, operateCode: '301', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_SET_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '办理进路({3} 进路)',
|
||||
trainingRemark: '办理进路功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3010', tip: '鼠标左键点击【排列进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'START_SIGNAL' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'END_SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '办理引导进路({3})',
|
||||
trainingRemark: '进路办理信号引导',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【办理引导进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '308', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3086', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
|
||||
{ deviceType: '04', orderNum: 4, operateCode: '3082', tip: '鼠标左键点击【执行】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '引导进路({3})[进路已锁闭]',
|
||||
trainingRemark: '进路办理信号引导',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3080', tip: '鼠标左键点击【引导进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3080', tip: '鼠标左键点击【{5}】', codeType:'START_SIGNAL'}, // 进路编号值不正确
|
||||
{ deviceType: 'mbm', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮', codeType: 'START_SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消进路({3} 进路)',
|
||||
trainingRemark: '取消进路功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消进路({3} 进路)',
|
||||
trainingRemark: '取消进路功能(总取消)',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消引导({3})',
|
||||
trainingRemark: '取消引导进路功能(总取消)',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '总人解({3})',
|
||||
trainingRemark: '总人解',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '305', tip: '鼠标右键菜单选择【总人解】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3050', tip: '输入密码123,点击【执行】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '305', tip: '鼠标左键点击【确定】按钮' },
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '总人解({3})',
|
||||
trainingRemark: '总人解',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3050', tip: '鼠标左键点击【总人解】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3050', tip: '鼠标左键点击【{5}】', val: '{6}', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 8,
|
||||
minDuration: 5,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号重开({5})',
|
||||
trainingRemark: '信号重开功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 8,
|
||||
minDuration: 5,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号重开({5})',
|
||||
trainingRemark: '信号重开功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3010', tip: '鼠标左键点击【排列进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_BLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号封锁({5})',
|
||||
trainingRemark: '信号封锁',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封锁】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_BLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号封锁({5})',
|
||||
trainingRemark: '信号封锁功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【封锁】' },
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_UNBLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号解封({5})',
|
||||
trainingRemark: '信号解封',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3072', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '307', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_UNBLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号解封({5})',
|
||||
trainingRemark: '信号解封功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2992', tip: '鼠标左键点击【解封】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING.value,
|
||||
skinCode: '04',
|
||||
trainingName: '进路收人工控({3})',
|
||||
trainingRemark: '进路收人工控',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【进路收人工控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING.value,
|
||||
skinCode: '04',
|
||||
trainingName: '人工控({5})',
|
||||
trainingRemark: '人工控',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3140', tip: '鼠标左键点击【人工控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3140', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{onlySignalOP:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING.value,
|
||||
skinCode: '04',
|
||||
trainingName: '进路交自动控({3})',
|
||||
trainingRemark: '进路交自动控',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【进路交自动控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING.value,
|
||||
skinCode: '04',
|
||||
trainingName: '自动控({5})',
|
||||
trainingRemark: '自动控',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3150', tip: '鼠标左键点击【自动控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3150', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
],
|
||||
config:{onlySignalOP:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType:CMD.Signal.CMD_SIGNAL_DETAIL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '查询进路信息({5} 信号机)',
|
||||
trainingRemark: '查询进路信息',
|
||||
trainingType:'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【进路信息】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// 道岔列表
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION.value, // 0312 新增定位字典
|
||||
skinCode: '04',
|
||||
trainingName: '单操到定位({7})',
|
||||
trainingRemark: '单操到定位({15})',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '101', tip: '鼠标右键菜单选择【单操到定位】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '101', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION.value,
|
||||
skinCode: '04',
|
||||
trainingName: '单操到定位({7})',
|
||||
trainingRemark: '单操到定位({7})',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1010', tip: '鼠标左键点击【道岔定操】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1010', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION.value, // 0313 新增定位字典
|
||||
skinCode: '04',
|
||||
trainingName: '单操到反位({7})',
|
||||
trainingRemark: '单操到反位({7})',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '102', tip: '鼠标右键菜单选择【单操到反位】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '102', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION.value,
|
||||
skinCode: '04',
|
||||
trainingName: '单操到反位({7})',
|
||||
trainingRemark: '单操到反位({7})',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1020', tip: '鼠标左键点击【道岔反操】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1020', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔单锁({7})',
|
||||
trainingRemark: '道岔单锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '103', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔单锁({7})',
|
||||
trainingRemark: '道岔单锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'], // 现地操作
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1030', tip: '鼠标左键点击【道岔单锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1030', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔解锁({7})',
|
||||
trainingRemark: '道岔解锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔解锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '104', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔解锁({7})',
|
||||
trainingRemark: '道岔解锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1040', tip: '鼠标左键点击【道岔解锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '1040', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_BLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔封锁({7})',
|
||||
trainingRemark: '道岔封锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔封锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1051', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '105', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_BLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔封锁({7})',
|
||||
trainingRemark: '道岔封锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【封锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '2991', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_UNBLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔解封({7})',
|
||||
trainingRemark: '道岔解封功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔解封】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1062', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '106', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_UNBLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔解封({7})',
|
||||
trainingRemark: '道岔解封功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '2992', tip: '鼠标左键点击【解封】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 20,
|
||||
minDuration: 10,
|
||||
operateType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '区故解({7})',
|
||||
trainingRemark: '道岔区段故障解锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【区故解】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1092', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '109', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// 区段列表
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Section.CMD_SECTION_FAULT_UNLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '区故解({8}{9})',
|
||||
trainingRemark: '故障解锁功能',
|
||||
trainingType: 'Section',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '402', tip: '鼠标右键菜单选择【区故解】' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '4023', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '402', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Section.CMD_SECTION_FAULT_UNLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '区故解({8}{9})',
|
||||
trainingRemark: '故障解锁功能',
|
||||
trainingType: 'Section',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '4020', tip: '鼠标左键点击【区故解】'},
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '4020', tip: '鼠标左键点击【{8}{9}】', codeType:'SECTION' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Section.CMD_SECTION_DETAILS.value,
|
||||
skinCode: '04',
|
||||
trainingName: '属性({8}{9})',
|
||||
trainingRemark: '区段详情({8}{9})',
|
||||
trainingType: 'Section',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '410', tip: '鼠标右键菜单选择【属性】' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '410', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// 站台列表
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置扣车({10}-{12}站台)',
|
||||
trainingRemark: '设置扣车功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消扣车({10}-{12}站台)',
|
||||
trainingRemark: '设置取消扣车功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN.value,
|
||||
skinCode: '04',
|
||||
trainingName: '全线取消扣车',
|
||||
trainingRemark: '设置取消扣车功能({12}全线)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: 'com01', tip: '鼠标左键点击【{12}全线】按钮', val: 'true' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_JUMP_STOP.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置跳停({10}-{12}站台)',
|
||||
trainingRemark: '设置跳停功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】'},
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【跳停】', codeType:'STAND', subType:'StopJumpLamp' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_JUMP_STOP.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置跳停({10}-{12}站台)',
|
||||
trainingRemark: '设置跳停功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消跳停({10}-{12}站台)',
|
||||
trainingRemark: '设置取消跳停功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】'},
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【取消跳停】', codeType:'STAND', subType:'CancelStopJumpLamp' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消跳停({10}-{12}站台)',
|
||||
trainingRemark: '设置取消跳停功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_PARK_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置停站时间({10}-{12}站台)',
|
||||
trainingRemark: '设置停站时间(自动, 一直有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_PARK_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置停站时间({10}-{12}站台)',
|
||||
trainingRemark: '设置停站时间(人工, 20秒, 一直有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '5093', tip: '标左键点击,选择【一直有效】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_PARK_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置停站时间({10}-{12}站台)',
|
||||
trainingRemark: '设置停站时间(人工, 20秒, 一次有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_RUN_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置站间运行等级({10}-{12}站台)',
|
||||
trainingRemark: '设置站间运行等级(自动, 一直有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_RUN_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置站间运行等级({10}-{12}站台)',
|
||||
trainingRemark: '设置站间运行等级(人工, 常速, 一直有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '5107', tip: '鼠标左键点击,取消选择【一直有效】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_RUN_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置站间运行等级({10}-{12}站台)',
|
||||
trainingRemark: '设置站间运行等级(人工, 常速, 一次有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 8, // 自动生成实训失败
|
||||
minDuration: 5,
|
||||
operateType: CMD.Stand.CMD_STAND_VIEW_STATUS.value,
|
||||
skinCode: '04',
|
||||
trainingName: '显示站台信息({10}-{12}站台)',
|
||||
trainingRemark: '查询站台状态功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【显示站台信息】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【退出】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置自动进路({3})',
|
||||
trainingRemark: '设置自动进路功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【{3}】', codeType:'BUTTON' }
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{autoRouteBT:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消自动进路({3})',
|
||||
trainingRemark: '取消自动进路功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{3}】', codeType:'BUTTON' }
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{autoRouteBT:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置自动折返({3})',
|
||||
trainingRemark: '设置自动折返功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【{3}】', codeType:'BUTTON' }
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{autoCycleBT:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消自动折返({3})',
|
||||
trainingRemark: '取消自动折返功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{3}】', codeType:'BUTTON' }
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{autoCycleBT:true}
|
||||
},
|
||||
/** 引导总锁 */
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '引导总锁({26})',
|
||||
trainingRemark: '设置引导总锁',
|
||||
trainingType: 'Station',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '609', tip: '鼠标左键点击【引导总锁】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '609', tip: '鼠标左键点击【{26}】', codeType:'BUTTON' }
|
||||
],
|
||||
config:{guideTotalLockBT:true}
|
||||
},
|
||||
/** 取消引导总锁 */
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Station.CMD_STATION_CANCEL_MASTER_GUIDE_LOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消引导总锁({26})',
|
||||
trainingRemark: '取消引导总锁',
|
||||
trainingType: 'Station',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '609', tip: '鼠标左键点击【引导总锁】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '609', tip: '鼠标左键点击【{26}】', codeType:'BUTTON' }
|
||||
],
|
||||
config:{guideTotalLockBT:true}
|
||||
}
|
||||
// totalGuideLock
|
||||
//
|
||||
]
|
||||
};
|
74
src/jmapNew/theme/datie_01/planConfig.js
Normal file
74
src/jmapNew/theme/datie_01/planConfig.js
Normal file
@ -0,0 +1,74 @@
|
||||
import { convertSheetToList } from '../parser/util';
|
||||
|
||||
export default {
|
||||
/** 运行图解析方式*/
|
||||
type: 'Ratio',
|
||||
|
||||
/** 边缘高度*/
|
||||
edge: 600,
|
||||
|
||||
/** 间隔高度*/
|
||||
multiple: 1,
|
||||
|
||||
/** 偏移时间*/
|
||||
translation: 60 * 60 * 2,
|
||||
|
||||
/** excel解析配置*/
|
||||
excelConfig: {
|
||||
beginRow: 1,
|
||||
beginCol: 0,
|
||||
fieldNum: 8,
|
||||
sepField: '车次',
|
||||
columns: {
|
||||
'车站名称': { key: 'stationName', formatter: (val) => { return val; } },
|
||||
'到点': { key: 'arriveTime', formatter: (val) => { return val; } },
|
||||
'发点': { key: 'departureTime', formatter: (val) => { return val; } }
|
||||
}
|
||||
},
|
||||
|
||||
/** 解析excel数据转换为Json后台数据*/
|
||||
importData(Sheet, JsonData) {
|
||||
var dataList = convertSheetToList(Sheet, false);
|
||||
var needList = Object.keys(this.excelConfig.columns);
|
||||
if (dataList && dataList.length) {
|
||||
for (var rowIndex = this.excelConfig.beginRow; rowIndex < dataList.length; rowIndex += 1) {
|
||||
for (var colIndex = this.excelConfig.beginCol; colIndex < dataList[this.excelConfig.beginCol].length; colIndex += this.excelConfig.fieldNum + 1) {
|
||||
var tripNew, tripObj;
|
||||
var stationObj = {};
|
||||
|
||||
tripNew = tripObj = { code: '', arrivalList: [] };
|
||||
for (var index = 0; index < this.excelConfig.fieldNum; index += 1) {
|
||||
var title = dataList[0][colIndex + index];
|
||||
var value = dataList[rowIndex][colIndex + index];
|
||||
|
||||
if (title && value) {
|
||||
var titleStr = `${title}`.trim();
|
||||
var valueStr = `${value}`.trim();
|
||||
|
||||
if (titleStr.includes(this.excelConfig.sepField)) {
|
||||
tripObj.code = valueStr;
|
||||
JsonData.forEach(elem => {
|
||||
if (elem.code == valueStr) {
|
||||
tripObj = elem;
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 取需要的字段
|
||||
if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) {
|
||||
stationObj[this.excelConfig.columns[titleStr].key] = this.excelConfig.columns[titleStr].formatter(valueStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tripObj.arrivalList.push(stationObj);
|
||||
if (tripObj.code && tripObj == tripNew) {
|
||||
JsonData.push(tripObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return JsonData;
|
||||
}
|
||||
};
|
@ -49,7 +49,8 @@ class Theme {
|
||||
'11': 'xian_01',
|
||||
'12': 'ningbo_03',
|
||||
'13': 'race_01',
|
||||
'14': 'nanjing_02' // 南京二号线
|
||||
'14': 'nanjing_02', // 南京二号线
|
||||
'15': 'datie_01'
|
||||
};
|
||||
this._localShowMode = { // 现地显示模式
|
||||
'01': 'all', // 成都一 全显
|
||||
@ -65,7 +66,8 @@ class Theme {
|
||||
'11': 'all',
|
||||
'12': 'all',
|
||||
'13':'all',
|
||||
'14':'ecStation'
|
||||
'14':'ecStation',
|
||||
'15':'all'
|
||||
};
|
||||
}
|
||||
|
||||
@ -74,10 +76,10 @@ class Theme {
|
||||
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/index`).default);
|
||||
}
|
||||
|
||||
// 新版本
|
||||
loadPlanParser(code) {
|
||||
// 新版本
|
||||
loadPlanParser(code) {
|
||||
return PlanParser.load(require(`./${this._mapMenu[code || this._code]}/planConfig`).default);
|
||||
}
|
||||
}
|
||||
|
||||
// 共有字段转换
|
||||
loadPropConvert(code) {
|
||||
|
@ -3,11 +3,11 @@
|
||||
<el-row>
|
||||
<el-col :span="sure? 18: 24">
|
||||
<el-table
|
||||
:id="domIdChoose"
|
||||
ref="table"
|
||||
:data="tempList"
|
||||
highlight-current-row
|
||||
height="300px"
|
||||
:id="domIdChoose"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<el-table-column prop="name" label="信号机" />
|
||||
@ -29,7 +29,7 @@
|
||||
<el-table-column prop="unblockProcess" width="150" label="区间信号引导过程" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="sure">
|
||||
<el-col v-if="sure" :span="6">
|
||||
<div class="radio-box-title">命令</div>
|
||||
<div class="radio-box">
|
||||
<el-radio v-model="command" :label="true" style="display: block;margin-bottom: 10px;">确认</el-radio>
|
||||
@ -62,40 +62,39 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
initCacheMap: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
initInfo: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
updateDone: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
initCacheMap: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
initInfo: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
updateDone: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
status: false,
|
||||
standStatus: true,
|
||||
allChecked: false,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
command: true,
|
||||
sure: false,
|
||||
currentSelect: null,
|
||||
noInit: true,
|
||||
changeIgnore: false
|
||||
sure: false,
|
||||
currentSelect: null,
|
||||
noInit: true,
|
||||
changeIgnore: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -105,20 +104,20 @@ export default {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
tempList() {
|
||||
return this.signalList;
|
||||
},
|
||||
initSelect() {
|
||||
return this.initInfo.initSelect||{};
|
||||
},
|
||||
cmdType() {
|
||||
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
disabled() {
|
||||
return !this.currentSelect || !this.currentSelect.callOn || this.noInit;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.choose.domId : ''
|
||||
tempList() {
|
||||
return this.signalList;
|
||||
},
|
||||
initSelect() {
|
||||
return this.initInfo.initSelect || {};
|
||||
},
|
||||
cmdType() {
|
||||
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
|
||||
},
|
||||
disabled() {
|
||||
return !this.currentSelect || !this.currentSelect.callOn || this.noInit;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.confirm.domId : '';
|
||||
@ -128,7 +127,10 @@ export default {
|
||||
},
|
||||
domIdApply() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.apply.domId : '';
|
||||
}
|
||||
},
|
||||
title() {
|
||||
return this.sure ? '确认/取消引导' : '初始化引导';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
@ -136,76 +138,89 @@ export default {
|
||||
this.commit();
|
||||
}
|
||||
},
|
||||
updateDone() {
|
||||
if (this.currentSelect) {
|
||||
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code]||{}).done != 'one';
|
||||
}
|
||||
}
|
||||
updateDone() {
|
||||
if (this.currentSelect) {
|
||||
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCacheMap() {
|
||||
return this.initCacheMap[this.cmdType.value]||{};
|
||||
},
|
||||
getCacheMap() {
|
||||
return this.initCacheMap[this.cmdType.value] || {};
|
||||
},
|
||||
doShow(operate, sure) {
|
||||
this.operate = operate;
|
||||
this.sure = sure;
|
||||
if (!sure) this.command = true;
|
||||
this.title = `${sure? '确认/取消引导': '初始化引导'}`;
|
||||
this.sure = sure;
|
||||
if (!sure) this.command = true;
|
||||
|
||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
|
||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.changeIgnore = sure;
|
||||
this.$refs.table.setCurrentRow(sure? this.tempList.find(el => el.code == this.initSelect.code): null);
|
||||
this.changeIgnore = sure;
|
||||
this.$refs.table.setCurrentRow(sure ? this.tempList.find(el => el.code == this.initSelect.code) : null);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
rightClickShow(operate, sure, selected) {
|
||||
this.operate = operate;
|
||||
this.sure = sure;
|
||||
if (!sure) this.command = true;
|
||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](selected.code);
|
||||
console.log(this.currentSelect, '==========', this.currentSelect.callOn, this.noInit);
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.changeIgnore = sure;
|
||||
this.$refs.table.setCurrentRow(this.tempList.find(el => el.code == selected.code));
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$emit('updateDone');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.sure && (this.currentSelect = null);
|
||||
this.sure && (this.currentSelect = null);
|
||||
this.sure && this.$refs.table.setCurrentRow();
|
||||
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
||||
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
||||
)
|
||||
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
||||
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
||||
);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit(isClose = false) {
|
||||
if (this.currentSelect &&
|
||||
if (this.currentSelect &&
|
||||
this.currentSelect.code == this.initSelect.code) {
|
||||
const cacheMap= this.getCacheMap();
|
||||
const isOK = this.command&&(!this.sure || this.sure&&cacheMap[this.currentSelect.code])
|
||||
const operate = {
|
||||
cmdType: this.sure&&isOK? this.cmdType: null,
|
||||
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
||||
over: this.sure,
|
||||
param: {signalCode: this.currentSelect.code}
|
||||
};
|
||||
const cacheMap = this.getCacheMap();
|
||||
const isOK = this.command && (!this.sure || this.sure && cacheMap[this.currentSelect.code]);
|
||||
const operate = {
|
||||
cmdType: this.sure && isOK ? this.cmdType : null,
|
||||
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
||||
over: this.sure,
|
||||
param: {signalCode: this.currentSelect.code}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (isOK) {
|
||||
this.$root.$emit('appendCache', this.cmdType.value, this.currentSelect.code, { done: this.sure? 'two': 'one'});
|
||||
} else {
|
||||
this.$root.$emit('removeCache', this.cmdType.value, this.currentSelect.code);
|
||||
}
|
||||
this.$emit('updateDone')
|
||||
this.$store.dispatch('map/flushMapRef');
|
||||
isClose && this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
isClose && this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('两次选择不一致');
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (isOK) {
|
||||
this.$root.$emit('appendCache', this.cmdType.value, this.currentSelect.code, { done: this.sure ? 'two' : 'one'});
|
||||
} else {
|
||||
this.$root.$emit('removeCache', this.cmdType.value, this.currentSelect.code);
|
||||
}
|
||||
this.$emit('updateDone');
|
||||
this.$store.dispatch('map/flushMapRef');
|
||||
isClose && this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
isClose && this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('两次选择不一致');
|
||||
}
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
if (!val) { return; }
|
||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||
this.$emit('updateDone')
|
||||
handleCurrentChange(val) {
|
||||
if (!val) { return; }
|
||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||
this.$emit('updateDone');
|
||||
if (this.changeIgnore) { return; }
|
||||
|
||||
const step = {
|
||||
@ -214,12 +229,12 @@ export default {
|
||||
val: val.code
|
||||
};
|
||||
|
||||
this.changeIgnore = false;
|
||||
this.$emit('updateDone')
|
||||
this.changeIgnore = false;
|
||||
this.$emit('updateDone');
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||
}
|
||||
}).catch(_ => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
@ -241,19 +256,19 @@ export default {
|
||||
},
|
||||
getCanGuide(code) {
|
||||
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return elem.callOn ? '是': '否';
|
||||
return elem.callOn ? '是' : '否';
|
||||
},
|
||||
getProcess(code) {
|
||||
const cacheMap = this.getCacheMap();
|
||||
const cache = cacheMap[code];
|
||||
if (cache) {
|
||||
if (this.sure) {
|
||||
return cache.done == 'two' ? '确认引导完成' : '等待确认/取消';
|
||||
} else {
|
||||
return cache.done == 'one' ? '已初始化' : ''
|
||||
}
|
||||
}
|
||||
return '';
|
||||
const cacheMap = this.getCacheMap();
|
||||
const cache = cacheMap[code];
|
||||
if (cache) {
|
||||
if (this.sure) {
|
||||
return cache.done == 'two' ? '确认引导完成' : '等待确认/取消';
|
||||
} else {
|
||||
return cache.done == 'one' ? '已初始化' : '';
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
@ -1,36 +1,31 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<route-un-lock ref="routeUnLock" pop-class="ningbo-01__systerm" />
|
||||
<route-control ref="routeControl" pop-class="ningbo-01__systerm" />
|
||||
<router-command ref="routerCommand" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||
<signal-guide-init ref="signalGuideInit" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import RouteUnLock from '@/jmapNew/theme/components/menus/dialog/sectionUnLock';
|
||||
import RouterCommand from './dialog/routerCommand';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import SignalGuideInit from './menuDialog/signalGuide';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
RouteControl,
|
||||
RouteUnLock,
|
||||
RouterCommand,
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
SetFault,
|
||||
SignalGuideInit
|
||||
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -45,38 +40,109 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
// {
|
||||
// label: '人工解锁进路', // 信号机引导取消
|
||||
// handler: this.humanTrainRoute,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
// },
|
||||
// {
|
||||
// label: 'Fleet进路办理',
|
||||
// handler: this.singalPassModel,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
// },
|
||||
// {
|
||||
// label: 'Fleet进路取消',
|
||||
// handler: this.singalCancelPassModel,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
// },
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
// label: '人工解锁进路', // 信号机引导取消
|
||||
// handler: this.humanTrainRoute,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
// label: '引导',
|
||||
// children: [
|
||||
// {
|
||||
// label: '初始化',
|
||||
// handler: this.initGuide
|
||||
// },
|
||||
// {
|
||||
// label: '确定/取消',
|
||||
// handler: this.undeveloped
|
||||
// },
|
||||
// {
|
||||
// label: '清除',
|
||||
// handler: this.undeveloped
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// label: '设置通过模式',
|
||||
// handler: this.singalPassModel,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
// label: '取消允许锁闭',
|
||||
// children: [
|
||||
// {
|
||||
// label: '初始化',
|
||||
// handler: this.undeveloped
|
||||
// },
|
||||
// {
|
||||
// label: '确定/取消',
|
||||
// handler: this.undeveloped
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// label: '取消通过模式',
|
||||
// handler: this.singalCancelPassModel,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
// label: '进路',
|
||||
// children: [
|
||||
// {
|
||||
// label: '命令',
|
||||
// handler: this.undeveloped
|
||||
// },
|
||||
// {
|
||||
// label: '显示',
|
||||
// children: [
|
||||
// {
|
||||
// label: 'CBTC进路信息',
|
||||
// handler: this.undeveloped
|
||||
// },
|
||||
// {
|
||||
// label: '后备进路信息',
|
||||
// handler: this.undeveloped
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// label: '信号指示模式',
|
||||
// handler: this.undeveloped,
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '封锁',
|
||||
// children: [
|
||||
// {
|
||||
// label: '初始化',
|
||||
// handler: this.undeveloped
|
||||
// },
|
||||
// {
|
||||
// label: '确认/取消',
|
||||
// handler: this.undeveloped
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// label: '解除封锁',
|
||||
// children: [
|
||||
// {
|
||||
// label: '初始化',
|
||||
// handler: this.undeveloped
|
||||
// },
|
||||
// {
|
||||
// label: '确认/取消',
|
||||
// handler: this.undeveloped
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// label: '解除封锁',
|
||||
// handler: this.undeveloped,
|
||||
// children: [
|
||||
// {
|
||||
// label: '初始化',
|
||||
// handler: this.undeveloped
|
||||
// },
|
||||
// {
|
||||
// label: '确认/取消',
|
||||
// handler: this.undeveloped
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// label: '显示',
|
||||
// handler: this.undeveloped
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
@ -116,7 +182,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Center;
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
@ -173,6 +240,12 @@ export default {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
|
||||
},
|
||||
initGuide() {
|
||||
this.$refs.signalGuideInit.rightClickShow(OperationEvent.Signal.guide.initMenu, false, this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ export function createBoundingRect(view) {
|
||||
}
|
||||
|
||||
export function calculateDCenter(viewRect, offsetX) {
|
||||
var dx = offsetX - viewRect.width/2 - viewRect.x;
|
||||
var dx = offsetX - viewRect.width / 2 - viewRect.x;
|
||||
var dy = 0;
|
||||
return { dx: dx, dy: dy };
|
||||
}
|
||||
@ -264,6 +264,10 @@ export function parser(data, skinCode, showConfig) {
|
||||
mapDevice[elem.code] = createDevice(deviceType.DirectionRod, elem, propConvert, showConfig);
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.signalButtonList || [], elem=> {
|
||||
mapDevice[elem.code] = createDevice(deviceType.SignalButton, elem, propConvert, showConfig);
|
||||
});
|
||||
|
||||
zrUtil.each(data.responderList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.Responder, elem, propConvert, showConfig);
|
||||
}, this);
|
||||
@ -283,14 +287,14 @@ export function parser(data, skinCode, showConfig) {
|
||||
mapDevice[elem.code] = createDevice(deviceType.OverAp, elem, propConvert, showConfig);
|
||||
});
|
||||
|
||||
// 二次处理
|
||||
zrUtil.each(data.signalList || [], elem => {
|
||||
const actual = mapDevice[elem.linkSignalCode];
|
||||
if (actual && elem.type == 'TRANSMISSION') {
|
||||
// 信号机别名列表
|
||||
if (!actual.aliasCodes) { actual.aliasCodes = []; }
|
||||
actual.aliasCodes.push(elem.code);
|
||||
}
|
||||
// 二次处理
|
||||
zrUtil.each(data.signalList || [], elem => {
|
||||
const actual = mapDevice[elem.linkSignalCode];
|
||||
if (actual && elem.type == 'TRANSMISSION') {
|
||||
// 信号机别名列表
|
||||
if (!actual.aliasCodes) { actual.aliasCodes = []; }
|
||||
actual.aliasCodes.push(elem.code);
|
||||
}
|
||||
}, this);
|
||||
}
|
||||
|
||||
@ -373,6 +377,7 @@ export function updateMapData(state, model) {
|
||||
case deviceType.FloodGate: updateForList(model, state, 'floodGateList'); break;
|
||||
case deviceType.DirectionRod: updateForList(model, state, 'directionRodList'); break;
|
||||
case deviceType.Responder: updateForList(model, state, 'responderList'); break;
|
||||
case deviceType.SignalButton: updateForList(model, state, 'signalButtonList'); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -75,12 +75,13 @@ export default {
|
||||
handle: this.switchLanguage,
|
||||
hidden: false,
|
||||
tip: true
|
||||
},
|
||||
{
|
||||
name: 'global.help',
|
||||
handle: this.goToHelp,
|
||||
hidden: false
|
||||
// hidden: this.hideHelp
|
||||
}
|
||||
// {
|
||||
// name: 'global.help',
|
||||
// handle: this.goToHelp,
|
||||
// hidden: getSessionStorage('project').endsWith('heb')
|
||||
// }
|
||||
|
||||
],
|
||||
caseList: [
|
||||
@ -109,6 +110,9 @@ export default {
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
}
|
||||
// hideHelp() {
|
||||
// return !(getSessionStorage('project') == 'login' || getSessionStorage('project') == 'design');
|
||||
// }
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
@ -133,11 +137,12 @@ export default {
|
||||
},
|
||||
goToHelp() {
|
||||
let href = '';
|
||||
if (getSessionStorage('project').startsWith('design')) {
|
||||
href = 'https://joylink.club/docs-design';
|
||||
} else {
|
||||
href = 'https://joylink.club/docs';
|
||||
}
|
||||
// if (getSessionStorage('project').startsWith('design')) {
|
||||
// href = 'https://joylink.club/docs-design';
|
||||
// } else {
|
||||
// href = 'https://joylink.club/docs';
|
||||
// }
|
||||
href = 'https://test.joylink.club/cbtc/docs/';
|
||||
window.open(href, '_blank');
|
||||
},
|
||||
goEmpty() {},
|
||||
|
@ -31,6 +31,7 @@ const Jlmap3dOtherVR = () => import('@/views/jlmap3d/maintainer/jl3dothervr');
|
||||
// const Jl3dMaintainer = () => import('@/views/jlmap3d/maintainer/jl3dmaintainer');
|
||||
|
||||
const DisplayNew = () => import('@/views/newMap/displayNew/index');
|
||||
const DisplayCity = () => import('@/views/newMap/displayCity/index');
|
||||
const DesignDisplayNew = () => import('@/views/newMap/displayNew/scriptDisplay/scriptPreview/index');
|
||||
const PracticeDisplay = () => import('@/views/newMap/displayNew/practiceDisplay');
|
||||
const BigLPFStrategy = () => import('@/views/newMap/displayNew/bigLPFStrategy');
|
||||
@ -371,6 +372,11 @@ export const publicAsyncRoute = [
|
||||
component: DisplayNew,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/displayCity/:mode',
|
||||
component: DisplayCity,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/design/displayNew/:mode',
|
||||
component: DesignDisplayNew,
|
||||
|
@ -1488,6 +1488,10 @@ export const OperationEvent = {
|
||||
password: {
|
||||
operation: '3088',
|
||||
domId: '_Tips-Signal-Guide-Password'
|
||||
},
|
||||
initMenu: {
|
||||
operation: '3089',
|
||||
domId: '_Tips-Signal-Guide-InitMenu'
|
||||
}
|
||||
},
|
||||
// 设置联锁自动进路
|
||||
|
@ -538,6 +538,13 @@ const map = {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
signalButtonList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.signalButtonList || [];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
responderList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.responderList || [];
|
||||
|
284
src/views/newMap/displayCity/demon/addFault.vue
Normal file
284
src/views/newMap/displayCity/demon/addFault.vue
Normal file
@ -0,0 +1,284 @@
|
||||
<template>
|
||||
<div class="addRules">
|
||||
<div class="addRulesInner">
|
||||
<div class="addRulesInnerTitle">新增故障</div>
|
||||
<div class="closeAddRulesInner" @click="addRulesClose">
|
||||
<span class="el-icon-close closeAddRulesIn" />
|
||||
</div>
|
||||
<el-form ref="form" :model="faultRule" label-width="100px" style="margin-left:15px;">
|
||||
<el-form-item label="目标设备">
|
||||
<!-- faultRule.targetDeviceCode -->
|
||||
<el-input v-model="targetDevice.name" disabled size="small" class="inputModelClass" />
|
||||
<!--<el-button :type="field === 'targetActive' ? 'danger' : 'primary'" size="small" @click="hover('targetActive')">{{ $t('map.activate') }}</el-button>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="触发方式">
|
||||
<el-select v-model="triggerMode" @change="changeTriggerMode">
|
||||
<el-option
|
||||
v-for="item in triggerModeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="故障类型">
|
||||
<el-select v-model="faultRule.faultType" placeholder="请选择" class="inputModelClass">
|
||||
<el-option
|
||||
v-for="item in faultTypeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="triggerMode === 'DEVICE'" label="触发设备">
|
||||
<!-- faultRule.condition.triggerDeviceCode -->
|
||||
<el-input v-model="triggerDevice" size="small" disabled class="inputModelClass" />
|
||||
<el-button :type="field === 'triggerActive' ? 'danger' : 'primary'" size="small" @click="hover('triggerActive')">{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="triggerMode === 'DEVICE'" label="触发状态">
|
||||
<!-- <el-input v-model="faultRule.condition.triggerDeviceStatus" size="small" class="inputModelClass" /> -->
|
||||
<el-select v-model="faultRule.condition.triggerDeviceStatus" placeholder="请选择" class="inputModelClass">
|
||||
<el-option
|
||||
v-for="item in triggerStatusList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="triggerMode === 'DEVICE'" label="关联设备">
|
||||
<el-input v-model="triggerAssociatedDevice" size="small" disabled class="inputModelClass" />
|
||||
<el-button :type="field === 'triggerAssociated'? 'danger': 'primary'" size="small" @click="hover('triggerAssociated')">{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="triggerMode === 'TIME'" label="触发时间">
|
||||
<el-date-picker
|
||||
v-model="faultRule.condition.triggeringTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span class="addRulesFooter">
|
||||
<el-button size="medium" type="primary" @click="addRulesCreate">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button size="medium" @click="addRulesClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { FaultStatusEnum } from '@/scripts/FaultDicNew';
|
||||
import { setFailureModeNew} from '@/api/simulation';
|
||||
import { deviceFaultType} from '@/scripts/cmdPlugin/Config';
|
||||
// 添加故障
|
||||
export default {
|
||||
name: 'AddChoose',
|
||||
props: {
|
||||
targetDevice: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
field:'',
|
||||
triggerStatusList:[],
|
||||
faultTypeList:[],
|
||||
faultRule:{
|
||||
targetDeviceCode:'',
|
||||
targetDeviceType:'',
|
||||
faultType:'',
|
||||
condition:{
|
||||
triggerDeviceCode:'',
|
||||
triggerDeviceStatus:'',
|
||||
triggerDeviceType :'',
|
||||
type:'DEVICE',
|
||||
triggeringTime: '',
|
||||
triggerAssociatedDeviceCode: ''
|
||||
}
|
||||
},
|
||||
// targetDevice:'',
|
||||
triggerDevice:'',
|
||||
triggerAssociatedDevice: '',
|
||||
triggerMode: 'DEVICE',
|
||||
triggerModeList: [
|
||||
{label: '设备触发', value: 'DEVICE'},
|
||||
{label: '时间触发', value: 'TIME'}
|
||||
]
|
||||
// rules:{
|
||||
// targetDevice:[
|
||||
// { required: true, message:'请选择目标设备', trigger: 'blur' }
|
||||
// ],
|
||||
// triggerDevice:[
|
||||
// { required: true, message:'请选择触发设备', trigger: 'blur' }
|
||||
// ],
|
||||
// faultRule:{
|
||||
// faultType:[
|
||||
// { required: true, message:'请选择故障类型', trigger: 'blur' },
|
||||
// { required: true, message:'请选择故障类型', trigger: 'change' }
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.selectedCount':function(em) {
|
||||
const device = this.$store.state.menuOperation.selected;
|
||||
if (device.code) {
|
||||
this.deviceSelect(device);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods:{
|
||||
deviceSelect(em) {
|
||||
if (this.field.toUpperCase() === 'triggerAssociated'.toUpperCase()) {
|
||||
// if (em._type == 'Station') {
|
||||
// em = this.$store.getters['map/getDeviceByCode'](em.zcCode);
|
||||
// }
|
||||
// this.faultRule.targetDeviceType = this.covertType(em._type);
|
||||
// this.faultRule.targetDeviceCode = em.code;
|
||||
if (em._type.toUpperCase() === 'Section'.toUpperCase() && em.parentName) {
|
||||
this.triggerAssociatedDevice = em._type + '-' + em.parentName + '-' + em.name;
|
||||
} else {
|
||||
this.triggerAssociatedDevice = em._type + '-' + em.name;
|
||||
}
|
||||
this.faultRule.condition.triggerAssociatedDeviceCode = em.code;
|
||||
} else if (this.field.toUpperCase() === 'triggerActive'.toUpperCase()) {
|
||||
this.faultRule.condition.triggerDeviceType = this.covertType(em._type);
|
||||
this.faultRule.condition.triggerDeviceCode = em.code;
|
||||
if (em._type.toUpperCase() === 'Section'.toUpperCase() && em.parentName) {
|
||||
this.triggerDevice = em._type + '-' + em.parentName + '-' + em.name;
|
||||
} else if (em._type.toUpperCase() === 'Train'.toUpperCase()) {
|
||||
this.triggerDevice = em._type + '-' + em.code;
|
||||
} else {
|
||||
this.triggerDevice = em._type + '-' + em.name;
|
||||
}
|
||||
this.triggerStatusList = [];
|
||||
const faultStatus = FaultStatusEnum[this.faultRule.condition.triggerDeviceType];
|
||||
if (faultStatus) {
|
||||
const list = Object.keys(faultStatus);
|
||||
list.forEach(key=>{
|
||||
this.triggerStatusList.push({label:faultStatus[key], value:key});
|
||||
});
|
||||
}
|
||||
this.field = '';
|
||||
this.faultRule.condition.triggerDeviceStatus = '';
|
||||
}
|
||||
},
|
||||
covertType(type) {
|
||||
switch (type) {
|
||||
case 'Section':return 'SECTION';
|
||||
case 'Signal':return 'SIGNAL';
|
||||
case 'Switch':return 'SWITCH';
|
||||
case 'Station':return 'STATION';
|
||||
case 'ZcControl':return 'ZC';
|
||||
case 'StationStand':return 'STAND';
|
||||
case 'Train':return 'TRAIN';
|
||||
}
|
||||
},
|
||||
hover(field) {
|
||||
if (this.field == '') {
|
||||
this.field = field;
|
||||
} else {
|
||||
this.field = '';
|
||||
}
|
||||
},
|
||||
addRulesCreate() {
|
||||
if (this.triggerDevice == '') {
|
||||
this.$messageBox('请选择触发设备');
|
||||
return;
|
||||
}
|
||||
if (this.faultRule.condition.triggerDeviceStatus == '') {
|
||||
this.$messageBox('请选择触发状态');
|
||||
return;
|
||||
}
|
||||
if (this.faultRule.faultType == '') {
|
||||
this.$messageBox('请选择故障类型');
|
||||
return;
|
||||
}
|
||||
console.log(this.faultRule, '-------------');
|
||||
setFailureModeNew(this.faultRule, this.$route.query.group).then(res=>{
|
||||
this.$emit('closeAddRules');
|
||||
this.$emit('reload');
|
||||
}).catch((error)=>{
|
||||
this.$messageBox('创建故障失败: ' + error.message);
|
||||
});
|
||||
},
|
||||
addRulesClose() {
|
||||
this.resetForm();
|
||||
this.$emit('closeAddRules');
|
||||
},
|
||||
|
||||
initValue() {
|
||||
this.faultTypeList = deviceFaultType[this.targetDevice._type];
|
||||
this.faultRule.targetDeviceCode = this.targetDevice.code;
|
||||
this.faultRule.targetDeviceType = this.covertType(this.targetDevice._type);
|
||||
},
|
||||
resetForm() {
|
||||
this.triggerDevice = '';
|
||||
this.faultRule = {
|
||||
targetDeviceCode:'',
|
||||
targetDeviceType:'',
|
||||
faultType:'',
|
||||
condition:{
|
||||
triggerDeviceCode:'',
|
||||
triggerDeviceStatus:'',
|
||||
triggerDeviceType :'',
|
||||
type:'DEVICE',
|
||||
triggeringTime: '',
|
||||
triggerAssociatedDeviceCode: ''
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.addRules{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 40px;
|
||||
}
|
||||
.addRulesInner{
|
||||
position: relative;
|
||||
width: 380px;
|
||||
margin-top:6px;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
border: 1px #ccc solid;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
box-shadow: 3px 3px 3px #a0a0a0;
|
||||
z-index:2;
|
||||
}
|
||||
.queryList{
|
||||
height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
.inputModelClass{
|
||||
width:150px;
|
||||
}
|
||||
.addRulesInnerTitle{
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.closeAddRulesInner{
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 9px;
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.closeAddRulesIn{
|
||||
font-size: 19px;
|
||||
}
|
||||
.addRulesFooter{
|
||||
margin-left: 116px;
|
||||
display: inline-block;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
196
src/views/newMap/displayCity/demon/equipment.vue
Normal file
196
src/views/newMap/displayCity/demon/equipment.vue
Normal file
@ -0,0 +1,196 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-drawer
|
||||
title="设备管理"
|
||||
:visible.sync="show"
|
||||
direction="ltr"
|
||||
:before-close="doClose"
|
||||
custom-class="dialog_box"
|
||||
size="43%"
|
||||
>
|
||||
<div style="margin-bottom: 3px; overflow: hidden; padding: 0 10px;">
|
||||
<div class="plc_box">名称: {{ plcInfo.name }}</div>
|
||||
<div class="plc_box">状态: <span :style="{'color': plcInfo.status ? 'green' : 'red'}">{{ plcInfo.status ? '在线' : '不在线' }}</span></div>
|
||||
<el-button type="text" size="small" class="freshen_box" @click="getList">刷新</el-button>
|
||||
</div>
|
||||
<el-table :data="tableData" border style="width: 100%; max-height: calc(100% - 24px); overflow: auto;">
|
||||
<el-table-column prop="code" label="设备编号" width="180" />
|
||||
<el-table-column prop="typeName" label="设备类型" width="180" />
|
||||
<el-table-column prop="vrDeviceCode" label="连接设备编码">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.vrDeviceCode" class="flex_box">{{ scope.row.vrDeviceName }}</div>
|
||||
<div v-if="!scope.row.vrDeviceCode" class="flex_box">(空)</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button :type="scope.row.buttonShowType ? 'danger' : 'primary'" size="small" @click="handleClick(scope.row, scope.$index)">连接</el-button>
|
||||
<el-button size="small" @click="cancel(scope.row, scope.$index)">断开</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAllSimulationList, postSimulationConnectById, putSimulationDisconnectById } from '@/api/simulation.js';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
export default {
|
||||
name: 'Equipment',
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
group: '',
|
||||
tableData: [],
|
||||
typeList: ConstConfig.ConstSelect.projectDeviceTypeList,
|
||||
plcInfo: {
|
||||
name: '',
|
||||
status: ''
|
||||
},
|
||||
index: 0,
|
||||
selected: {},
|
||||
typeObj: {
|
||||
Section: '区段',
|
||||
Signal: '信号机',
|
||||
Switch: '道岔',
|
||||
Psd: '屏蔽门',
|
||||
StationStand: '站台'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
EventBus.$on('selectDevice', (data) => {
|
||||
this.selected = data;
|
||||
this.tableData[this.index]['buttonShowType'] = false;
|
||||
this.tableData.splice(this.index, 1, this.tableData[this.index]);
|
||||
this.$store.dispatch('map/selectDeviceCode', {flag: false, type: ''});
|
||||
this.connect(this.tableData[this.index]);
|
||||
});
|
||||
},
|
||||
async beforeDestroy() {
|
||||
EventBus.$off('selectDevice');
|
||||
},
|
||||
methods: {
|
||||
async doShow() {
|
||||
this.show = true;
|
||||
this.group = this.$route.query.group;
|
||||
this.getList();
|
||||
},
|
||||
async getList() {
|
||||
try {
|
||||
const res = await getAllSimulationList(this.group);
|
||||
this.tableData = [];
|
||||
res.data.forEach((item, index) => {
|
||||
if (item.type == 'PLC_GATEWAY') {
|
||||
this.plcInfo = {
|
||||
name: 'PLC网关',
|
||||
status: item.online
|
||||
};
|
||||
} else {
|
||||
item.buttonShowType = false;
|
||||
item.typeName = this.typeList.find(el => el.value == item.type).label;
|
||||
if (item.vrDeviceCode) {
|
||||
item.vrDeviceName = this.$store.getters['map/getDeviceByCode'](item.vrDeviceCode).name;
|
||||
}
|
||||
if (this.project == 'heb' || this.project == 'designheb') {
|
||||
if (item.type == 'SWITCH') {
|
||||
this.tableData.push(item);
|
||||
}
|
||||
} else {
|
||||
this.tableData.push(item);
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
handleClick(row, index) {
|
||||
row.buttonShowType = !row.buttonShowType;
|
||||
this.index = index;
|
||||
this.tableData.splice(index, 1, row);
|
||||
this.$store.dispatch('map/selectDeviceCode', {flag: row.buttonShowType, type: row.type});
|
||||
},
|
||||
async connect(row) {
|
||||
this.$confirm(`您确定连接${this.typeObj[this.selected._type] || '设备'}: ${this.selected.name}, 是否继续?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
try {
|
||||
const res = await postSimulationConnectById(this.group, row.id, this.selected.code);
|
||||
if (res && res.code == 200) {
|
||||
this.$message.success('连接成功!');
|
||||
this.tableData[this.index]['vrDeviceCode'] = this.selected.code;
|
||||
this.tableData[this.index]['vrDeviceName'] = this.selected.name;
|
||||
this.tableData.splice(this.index, 1, this.tableData[this.index]);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
},
|
||||
async cancel(row, index) {
|
||||
this.$confirm('您确定将次设备断开, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
if (row.vrDeviceCode) {
|
||||
row.vrDeviceCode = '';
|
||||
row.vrDeviceName = '';
|
||||
this.tableData.splice(index, 1, row);
|
||||
try {
|
||||
const res = await putSimulationDisconnectById(this.group, row.id);
|
||||
if (res && res.code == 200) {
|
||||
this.$message.success('断开成功!');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.plc_box{
|
||||
float: left;
|
||||
margin-right: 40px;
|
||||
padding: 9px;
|
||||
}
|
||||
.freshen_box{
|
||||
float: right;
|
||||
}
|
||||
.flex_box{
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
line-height: 30px;
|
||||
}
|
||||
/deep/ {
|
||||
.el-dialog__wrapper{
|
||||
width: 800px;
|
||||
}
|
||||
.dialog_box{
|
||||
height: 100%;
|
||||
}
|
||||
.el-dialog__body{
|
||||
padding-top: 6px;
|
||||
height: calc(100% - 54px);
|
||||
}
|
||||
}
|
||||
</style>
|
600
src/views/newMap/displayCity/demon/faultChoose.vue
Normal file
600
src/views/newMap/displayCity/demon/faultChoose.vue
Normal file
@ -0,0 +1,600 @@
|
||||
<template>
|
||||
<div v-if="dialogShow" id="faultChoose">
|
||||
<div class="falutChooseTitle">{{ title }}</div>
|
||||
<div class="closeFalutChoose" @click="closeFaultChoose">
|
||||
<span class="el-icon-close closeFalutChooseIn" />
|
||||
</div>
|
||||
<el-card class="triggerFaultInfo">
|
||||
<el-button type="primary" size="small" style="margin-bottom:10px;" @click="isTableShow=!isTableShow">{{ isTableShow?'隐藏列表':'显示列表' }}</el-button>
|
||||
<el-table v-if="isTableShow" :data="faultList" height="300" border style="width: 100%;font-size:13px;">
|
||||
<el-table-column prop="targetDeviceCode" label="目标设备" width="220">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ `${deviceMap[scope.row.targetDeviceType]}${formatNameByCode(scope.row.targetDeviceCode)}` }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="faultType" label="故障类型">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ covertFaultType(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="condition" label="列车" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ `${deviceMap[scope.row.condition.triggerDeviceType] || ''}${formatNameByCode(scope.row.condition.triggerDeviceCode)}` }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="condition" label="到达区段" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ `${formatNameByCode(scope.row.condition.triggerAssociatedDeviceCode)}` }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="condition.condition.triggerTime" label="触发时间" width="150" />
|
||||
<el-table-column prop="triggeringTime" label="故障状态">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.triggeringTime? '已触发': '未触发' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="!scope.row.triggeringTime" type="text" size="small" @click="handleDelete(scope.row)">取消</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div class="targetCard">
|
||||
<div class="targetCardHead">
|
||||
<el-button style="padding:3px 0" type="text" @click="addRulesCreate">新增</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-form ref="form" :model="faultRule" :inline="true" label-width="100px" style="margin-left:15px;">
|
||||
<el-form-item label="目标设备" class="targetFormItem">
|
||||
<el-input v-model="targetDeviceName" disabled size="small" class="inputModelClass" style="width: 300px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="故障类型" class="targetFormItem">
|
||||
<el-select v-model="faultRule.faultType" placeholder="请选择" class="inputModelClass" size="small" style="width: 300px;">
|
||||
<el-option
|
||||
v-for="item in faultTypeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="triggerMode === 'DEVICE'" label="列车" class="targetFormItem">
|
||||
<el-input v-model="triggerDevice" size="small" disabled class="inputModelClass" style="width: 240px;" />
|
||||
<el-button :type="field === 'triggerActive' ? 'danger' : 'primary'" size="small" @click="hover('triggerActive')">{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="triggerMode === 'DEVICE'" label="到达区段" class="targetFormItem">
|
||||
<el-input v-model="triggerAssociatedDevice" size="small" disabled class="inputModelClass" style="width: 240px;" />
|
||||
<el-button :type="field === 'triggerAssociated'? 'danger': 'primary'" size="small" @click="hover('triggerAssociated')">{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="triggerMode === 'TIME'" label="触发时间" class="targetFormItem">
|
||||
<el-date-picker
|
||||
v-model="faultRule.condition.triggerTime"
|
||||
size="small"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSimulationFaultRules, setFailureModeNew, deleteFailureRule, cancelFailureModeNew } from '@/api/simulation';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import { FaultStatusEnum } from '@/scripts/FaultDicNew';
|
||||
import ModelType from '@/jmapNew/constant/deviceType';
|
||||
import { deviceFaultType } from '@/scripts/cmdPlugin/Config';
|
||||
|
||||
// 故障列表
|
||||
export default {
|
||||
name: 'FaultChoose',
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
offset: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
isAdd:false,
|
||||
isTableShow:true,
|
||||
deviceMap: {},
|
||||
simulationFault:{},
|
||||
faultList: [],
|
||||
faultRule:{
|
||||
targetDeviceCode:'',
|
||||
targetDeviceType:'',
|
||||
faultType:'',
|
||||
condition:{
|
||||
triggerDeviceCode:'',
|
||||
triggerDeviceStatus:'',
|
||||
triggerDeviceType :'',
|
||||
type:'DEVICE',
|
||||
triggerTime: '',
|
||||
triggerAssociatedDeviceCode: ''
|
||||
}
|
||||
},
|
||||
triggerDevice:'',
|
||||
triggerAssociatedDevice: '',
|
||||
triggerMode: 'DEVICE',
|
||||
triggerModeList: [
|
||||
{label: '设备触发', value: 'DEVICE'},
|
||||
{label: '时间触发', value: 'TIME'}
|
||||
],
|
||||
field:'',
|
||||
triggerStatusList:[],
|
||||
faultTypeList:[],
|
||||
targetDeviceName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '自动故障设置';
|
||||
},
|
||||
lineCode() {
|
||||
return this.$route.query.lineCode;
|
||||
},
|
||||
targetDevice() {
|
||||
return this.$store.state.training.triggerFaultDevice;
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'$store.state.socket.autoFaultTrigger':function(val) {
|
||||
this.dialogShow && this.getSimulationFaultRules();
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount':function(em) {
|
||||
const device = this.$store.state.menuOperation.selected;
|
||||
if (device && device.code) {
|
||||
this.deviceSelect(device);
|
||||
}
|
||||
},
|
||||
targetDevice: function(device) {
|
||||
this.targetDeviceName = this.targetDevice.name || this.targetDevice.code;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.deviceMap = [];
|
||||
ConstConfig.ConstSelect.simulationDeviceList.forEach(elem => {
|
||||
this.deviceMap[elem.value] = elem.label;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
formatNameByCode(code) {
|
||||
let name = '';
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (device) {
|
||||
switch (device._type) {
|
||||
case ModelType.Signal:
|
||||
case ModelType.Switch:
|
||||
case ModelType.Station:
|
||||
case ModelType.Section: {
|
||||
if (device.parentName) {
|
||||
name += device.parentName + '-' + device.name;
|
||||
} else {
|
||||
name += device.name;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case ModelType.Train:
|
||||
name = device.code;
|
||||
break;
|
||||
}
|
||||
if (device.stationCode) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
|
||||
if (station) {
|
||||
name += '【' + station.name + '】';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return name;
|
||||
},
|
||||
hover(field) {
|
||||
if (this.field == '') {
|
||||
this.field = field;
|
||||
} else {
|
||||
this.field = '';
|
||||
}
|
||||
},
|
||||
handleDelete(row) {
|
||||
cancelFailureModeNew(row.id, this.$route.query.group).then(resp => {
|
||||
this.getSimulationFaultRules();
|
||||
}).catch(() => {
|
||||
this.$message.error('取消故障失败!');
|
||||
});
|
||||
},
|
||||
covertType(type) {
|
||||
switch (type) {
|
||||
case 'SECTION':return 'Section';
|
||||
case 'SIGNAL':return 'Signal';
|
||||
case 'SWITCH':return 'Switch';
|
||||
case 'STATION':return 'Station';
|
||||
case 'ZC':return 'ZcControl';
|
||||
case 'STAND':return 'StationStand';
|
||||
case 'TRAIN':return 'Train';
|
||||
case 'Section':return 'SECTION';
|
||||
case 'Signal':return 'SIGNAL';
|
||||
case 'Switch':return 'SWITCH';
|
||||
case 'Station':return 'STATION';
|
||||
case 'ZcControl':return 'ZC';
|
||||
case 'StationStand':return 'STAND';
|
||||
case 'Train':return 'TRAIN';
|
||||
}
|
||||
},
|
||||
covertFaultType(row) {
|
||||
let faultType = '';
|
||||
if (row && row.id) {
|
||||
let type = this.covertType(row.targetDeviceType);
|
||||
if (type == 'Station') {
|
||||
type = 'ZcControl';
|
||||
}
|
||||
const currentList = deviceFaultType[type];
|
||||
currentList.forEach(temp=>{
|
||||
if (temp.value === row.faultType) {
|
||||
faultType = temp.label;
|
||||
}
|
||||
});
|
||||
}
|
||||
return faultType;
|
||||
},
|
||||
closeFaultChoose() {
|
||||
this.dialogShow = false;
|
||||
this.isAdd = false;
|
||||
if (this.$refs.addFault) {
|
||||
this.$refs.addFault.resetForm();
|
||||
}
|
||||
},
|
||||
closeAddRules() {
|
||||
this.isAdd = false;
|
||||
},
|
||||
getSimulationFaultRules() {
|
||||
if (this.dialogShow) {
|
||||
getSimulationFaultRules(this.$route.query.group).then(resp => {
|
||||
this.faultList = resp.data;
|
||||
}).catch(() => {
|
||||
this.$messageBox('获取数据异常');
|
||||
});
|
||||
}
|
||||
},
|
||||
changeTriggerMode(val) {
|
||||
this.resetForm();
|
||||
this.triggerMode = val;
|
||||
this.faultRule.condition.type = val;
|
||||
},
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
this.getSimulationFaultRules();
|
||||
this.resetForm();
|
||||
this.faultTypeList = deviceFaultType[this.targetDevice._type];
|
||||
this.faultRule.targetDeviceCode = this.targetDevice.code;
|
||||
this.faultRule.targetDeviceType = this.covertType(this.targetDevice._type);
|
||||
this.faultRule.faultType = (this.faultTypeList[0] || {}).value;
|
||||
this.$nextTick(()=>{
|
||||
this.dragEvent();
|
||||
});
|
||||
},
|
||||
resetForm() {
|
||||
this.getSimulationFaultRules();
|
||||
this.field = '';
|
||||
this.triggerDevice = '';
|
||||
this.triggerAssociatedDevice = '';
|
||||
this.faultRule = {
|
||||
targetDeviceCode:this.targetDevice.code,
|
||||
targetDeviceType:this.covertType(this.targetDevice._type),
|
||||
faultType:'',
|
||||
condition:{
|
||||
triggerDeviceCode:'',
|
||||
triggerDeviceStatus:'',
|
||||
triggerDeviceType :'',
|
||||
type:'DEVICE',
|
||||
triggerTime: '',
|
||||
triggerAssociatedDeviceCode: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleAdd() {
|
||||
this.isAdd = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addFault.initValue();
|
||||
});
|
||||
},
|
||||
deleteFailure(index, row) {
|
||||
event.cancelBubble = true;
|
||||
this.$confirm('删除故障规则,是否继续?', '提 示', {
|
||||
confirmButtonText: '确 定',
|
||||
cancelButtonText: '取 消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteFailureRule(row.id).then(resp => {
|
||||
}).catch(error => {
|
||||
this.$message.error(`删除故障规则失败: ${error.message}`);
|
||||
});
|
||||
}).catch( () => { });
|
||||
},
|
||||
settingFailure(index, row, idx) {
|
||||
const faultModel = {ruleId: row.id, auto:true};
|
||||
// row['loading' + idx] = true;
|
||||
setFailureModeNew(faultModel, this.group).then(() => {
|
||||
this.getSimulationFaultRules();
|
||||
this.$message.success('设置自动故障成功');
|
||||
}).catch(() => {
|
||||
this.$messageBox('设置自动故障失败');
|
||||
});
|
||||
},
|
||||
cancleAutoFault() {
|
||||
const faultModel = {auto:false};
|
||||
setFailureModeNew(faultModel, this.group).then(() => {
|
||||
this.getSimulationFaultRules();
|
||||
this.$message.success('取消自动故障成功');
|
||||
}).catch(() => {
|
||||
this.$messageBox('取消自动故障失败');
|
||||
});
|
||||
},
|
||||
addRulesCreate() {
|
||||
if (this.triggerMode === 'DEVICE' && this.triggerDevice == '') {
|
||||
this.$messageBox('请选择触发设备');
|
||||
return;
|
||||
}
|
||||
if (this.triggerMode === 'DEVICE' && this.faultRule.condition.triggerDeviceStatus == '') {
|
||||
this.$messageBox('请选择触发状态');
|
||||
return;
|
||||
}
|
||||
if (this.faultRule.faultType == '') {
|
||||
this.$messageBox('请选择故障类型');
|
||||
return;
|
||||
}
|
||||
if (this.triggerMode === 'TIME' && this.faultRule.condition.triggerTime == '') {
|
||||
this.$messageBox('请选择触发时间');
|
||||
return;
|
||||
}
|
||||
if (this.triggerMode === 'DEVICE' && this.faultRule.condition.triggerDeviceType === 'TRAIN' && this.faultRule.condition.triggerDeviceStatus === 'Section' && this.faultRule.condition.triggerAssociatedDeviceCode == '') {
|
||||
this.$messageBox('请选择关联设备');
|
||||
return;
|
||||
}
|
||||
const param = {
|
||||
targetDeviceCode:this.targetDevice.code,
|
||||
targetDeviceType:this.covertType(this.targetDevice._type),
|
||||
faultType: this.faultRule.faultType,
|
||||
condition:{
|
||||
triggerDeviceCode: this.faultRule.condition.triggerDeviceCode || null,
|
||||
triggerDeviceStatus:this.faultRule.condition.triggerDeviceStatus || null,
|
||||
triggerDeviceType :this.faultRule.condition.triggerDeviceType || null,
|
||||
type:this.faultRule.condition.type,
|
||||
triggerTime: this.faultRule.condition.triggerTime || null,
|
||||
triggerAssociatedDeviceCode: this.faultRule.condition.triggerAssociatedDeviceCode || null
|
||||
}
|
||||
};
|
||||
setFailureModeNew(param, this.$route.query.group).then(res=>{
|
||||
this.$message.success('创建故障成功!');
|
||||
this.resetForm();
|
||||
}).catch((error)=>{
|
||||
this.$messageBox('创建故障失败: ' + error.message);
|
||||
});
|
||||
},
|
||||
deviceSelect(em) {
|
||||
if (this.field.toUpperCase() === 'triggerAssociated'.toUpperCase() && em._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (em._type.toUpperCase() === 'Section'.toUpperCase() && em.parentName) {
|
||||
this.triggerAssociatedDevice = em._type + '-' + em.parentName + '-' + em.name;
|
||||
} else {
|
||||
this.triggerAssociatedDevice = em._type + '-' + em.name;
|
||||
}
|
||||
this.faultRule.condition.triggerAssociatedDeviceCode = em.code;
|
||||
} else if (this.field.toUpperCase() === 'triggerActive'.toUpperCase() && em._type.toUpperCase() === 'Train'.toUpperCase()) {
|
||||
this.faultRule.condition.triggerDeviceType = this.covertType(em._type);
|
||||
this.faultRule.condition.triggerDeviceCode = em.code;
|
||||
if (em._type.toUpperCase() === 'Section'.toUpperCase() && em.parentName) {
|
||||
this.triggerDevice = em._type + '-' + em.parentName + '-' + em.name;
|
||||
} else if (em._type.toUpperCase() === 'Train'.toUpperCase()) {
|
||||
this.triggerDevice = em._type + '-' + em.code;
|
||||
} else {
|
||||
this.triggerDevice = em._type + '-' + em.name;
|
||||
}
|
||||
this.triggerStatusList = [];
|
||||
const faultStatus = FaultStatusEnum[this.faultRule.condition.triggerDeviceType];
|
||||
if (faultStatus) {
|
||||
const list = Object.keys(faultStatus);
|
||||
list.forEach(key=>{
|
||||
this.triggerStatusList.push({label:faultStatus[key], value:key});
|
||||
});
|
||||
}
|
||||
this.field = '';
|
||||
this.faultRule.condition.triggerDeviceStatus = (this.triggerStatusList[0] || {}).value;
|
||||
}
|
||||
},
|
||||
dragEvent() {
|
||||
const offset = this.offset;
|
||||
const dialogHeaderEl = document.querySelector('.falutChooseTitle');
|
||||
const dragDom = document.querySelector('#faultChoose');
|
||||
dialogHeaderEl.style.cursor = 'move';
|
||||
|
||||
/** 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);*/
|
||||
const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
|
||||
|
||||
dialogHeaderEl.onmousedown = (e) => {
|
||||
/** 鼠标按下,计算当前元素距离可视区的距离*/
|
||||
const disX = e.clientX - dialogHeaderEl.offsetLeft;
|
||||
const disY = e.clientY - dialogHeaderEl.offsetTop;
|
||||
|
||||
/** 获取到的值带px 正则匹配替换*/
|
||||
let styL, styT;
|
||||
|
||||
/** 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px*/
|
||||
if (sty.left.includes('%')) {
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100);
|
||||
styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
|
||||
} else {
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
styL = +sty.left.replace(/\px/g, '');
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
styT = +sty.top.replace(/\px/g, '');
|
||||
}
|
||||
|
||||
document.onmousemove = function (e) {
|
||||
/** 通过事件委托,计算移动的距离*/
|
||||
const l = e.clientX - disX;
|
||||
const t = e.clientY - disY;
|
||||
|
||||
/** 移动当前元素*/
|
||||
// dragDom.style.left = `${l + styL}px`;
|
||||
// dragDom.style.top = `${t + styT}px`;
|
||||
|
||||
/** 移动当前元素*/
|
||||
if (l + styL < 0) {
|
||||
dragDom.style.left = `0px`;
|
||||
} else if (l + styL > document.body.clientWidth - dragDom.clientWidth - 10) {
|
||||
dragDom.style.left = `${document.body.clientWidth - dragDom.clientWidth - 10}px`;
|
||||
} else {
|
||||
dragDom.style.left = `${l + styL}px`;
|
||||
}
|
||||
if (t + styT <= offset) {
|
||||
dragDom.style.top = offset + `px`;
|
||||
} else if (t + styT > document.body.clientHeight - dragDom.clientHeight - 10) {
|
||||
dragDom.style.top = `${document.body.clientHeight - dragDom.clientHeight - 10}px`;
|
||||
} else {
|
||||
dragDom.style.top = `${t + styT}px`;
|
||||
}
|
||||
|
||||
/** 将此时的位置传出去*/
|
||||
// binding.value({ x: e.pageX, y: e.pageY });
|
||||
};
|
||||
|
||||
document.onmouseup = function () {
|
||||
document.onmousemove = null;
|
||||
document.onmouseup = null;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
#faultChoose .card .queryList .el-card .el-card__body .el-table--border .el-table__body-wrapper{
|
||||
height: 135px !important;
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
#faultChoose .el-button--mini {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.triggerFaultListLeft{
|
||||
display: inline-block;
|
||||
float: left;
|
||||
width: 730px;
|
||||
}
|
||||
// 谷歌、safari、qq浏览器、360浏览器滚动条样式
|
||||
// 定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸
|
||||
#faultChoose .el-table__body-wrapper::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
// height: 110px;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
/*定义滚动条轨道 内阴影+圆角*/
|
||||
#faultChoose .el-table__body-wrapper::-webkit-scrollbar-track {
|
||||
// box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
|
||||
border-radius: 10px;
|
||||
background-color: #FFFFFF;;
|
||||
}
|
||||
/*定义滑块 内阴影+圆角*/
|
||||
#faultChoose .el-table__body-wrapper::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
// box-shadow: inset 0 0 6px rgba(0,0,0,.3);
|
||||
background-color: #eaeaea;
|
||||
}
|
||||
/*滑块效果*/
|
||||
#faultChoose .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
|
||||
border-radius: 5px;
|
||||
// box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
||||
background: rgba(0,0,0,0.4);
|
||||
}
|
||||
/*IE滚动条颜色*/
|
||||
html {
|
||||
scrollbar-face-color:#bfbfbf;/*滚动条颜色*/
|
||||
scrollbar-highlight-color:#000;
|
||||
scrollbar-3dlight-color:#000;
|
||||
scrollbar-darkshadow-color:#000;
|
||||
scrollbar-Shadow-color:#adadad;/*滑块边色*/
|
||||
scrollbar-arrow-color:rgba(0,0,0,0.4);/*箭头颜色*/
|
||||
scrollbar-track-color:#eeeeee;/*背景颜色*/
|
||||
}
|
||||
</style>
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
.triggerFaultInfo{
|
||||
margin-bottom:10px;
|
||||
padding: 10px 10px 10px 15px;
|
||||
}
|
||||
.triggerFaultList{
|
||||
font-size: 14px;
|
||||
margin-top: 10px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.triggerFaultTitle{
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.falutChooseTitle{
|
||||
padding: 15px;
|
||||
cursor: all-scroll;
|
||||
}
|
||||
#faultChoose{
|
||||
width: 1000px;
|
||||
position: absolute;
|
||||
left: 30%;
|
||||
top: 20%;
|
||||
background: #fff;
|
||||
padding:0px 0px 15px 0px;
|
||||
// transform: translate3d(-50%,-50%,0);
|
||||
border-radius: 6px;
|
||||
z-index:999;
|
||||
}
|
||||
.faultChooseFoot{
|
||||
display: inline-block;
|
||||
float: right;
|
||||
margin-right: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.closeFalutChoose{
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.closeFalutChooseIn{
|
||||
font-size: 20px;
|
||||
margin-left: 5px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.targetCard{
|
||||
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
|
||||
border-top: 1px #ebeef5 solid;
|
||||
}
|
||||
.targetFormItem{
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.targetCardHead{
|
||||
padding: 5px;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px #f4f4f4 solid;
|
||||
text-align: right;
|
||||
padding-right: 15px;
|
||||
}
|
||||
</style>
|
118
src/views/newMap/displayCity/demon/setTime.vue
Normal file
118
src/views/newMap/displayCity/demon/setTime.vue
Normal file
@ -0,0 +1,118 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="title" :visible.sync="show" width="550px" :before-close="doClose">
|
||||
<el-form ref="form" label-width="120px" :model="formModel" :rules="rules">
|
||||
<el-form-item :label="$t('display.setTime.systemTime')" prop="initTime">
|
||||
<el-time-picker
|
||||
v-model="formModel.initTime"
|
||||
:picker-options="pickerOptions"
|
||||
:placeholder="$t('display.setTime.anyTime')"
|
||||
@change="handleChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="hasNumber" :label="$t('display.setTime.loadTrainNum')" prop="loadNum">
|
||||
<el-input-number v-model="formModel.loadNum" :min="1" :max="maxNumber" :label="$t('display.setTime.selectLoadTrainNum')" />
|
||||
<span> {{ ` (${$t('display.setTime.maxTrainNum')} :${maxNumber}) ` }} </span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="show = false">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" :loading="status" @click="handleSure">{{ $t('global.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import { getLoadTrainNumber } from '@/api/simulation';
|
||||
|
||||
// 计划行车时间选择
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
formModel: {
|
||||
initTime: new Date(),
|
||||
loadNum: 1
|
||||
},
|
||||
maxNumber: 1,
|
||||
pickerOptions: { selectableRange: '00:00:00 - 23:59:59' },
|
||||
status: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.$t('display.setTime.setSimulationSystemTime');
|
||||
},
|
||||
hasNumber() {
|
||||
return this.$route.params.mode == 'demon' && this.$route.query.prdType == '04';
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
rules() {
|
||||
return {
|
||||
initTime: [
|
||||
{ required: true, message: this.$t('display.setTime.selectSystemTime'), trigger: 'change' },
|
||||
{
|
||||
validator(rule, value, callback) {
|
||||
if (this.maxNumber == 0) {
|
||||
callback(new Error(this.$t('display.setTime.selectValidStartTime')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: 'change',
|
||||
maxNumber: this.maxNumber
|
||||
}
|
||||
],
|
||||
loadNum: [
|
||||
{ required: true, message: this.$t('display.setTime.selectTrainNum'), trigger: 'change' }
|
||||
|
||||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.formModel.initTime = new Date(this.$store.state.training.initTime || null);
|
||||
this.handleChange(this.formModel.initTime);
|
||||
this.show = true;
|
||||
},
|
||||
doClose() {
|
||||
this.status = false;
|
||||
this.show = false;
|
||||
},
|
||||
handleChange(initTime) {
|
||||
this.formModel.loadNum = 0;
|
||||
if (this.hasNumber) {
|
||||
getLoadTrainNumber({ time: this.formatTime(initTime) }, this.group).then(resp => {
|
||||
this.maxNumber = parseInt(resp.data);
|
||||
});
|
||||
}
|
||||
},
|
||||
formatTime(initTime) {
|
||||
const hh = prefixIntrger(initTime.getHours(), 2);
|
||||
const mm = prefixIntrger(initTime.getMinutes(), 2);
|
||||
const ss = prefixIntrger(initTime.getSeconds(), 2);
|
||||
return `${hh}:${mm}:${ss}`;
|
||||
},
|
||||
handleSure() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.status = true;
|
||||
const model = {
|
||||
initTime: this.formatTime(this.formModel.initTime)
|
||||
};
|
||||
|
||||
if (this.hasNumber) {
|
||||
model['loadNum'] = this.formModel.loadNum;
|
||||
}
|
||||
|
||||
this.$emit('ConfirmSelectBeginTime', model);
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
190
src/views/newMap/displayCity/demonMenu.vue
Normal file
190
src/views/newMap/displayCity/demonMenu.vue
Normal file
@ -0,0 +1,190 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="isAllShow&&project != 'bjd'" class="display_top_draft" :style="allStyle">
|
||||
<div class="btn_hover" @click="menuClick">菜单</div>
|
||||
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`">
|
||||
<el-button v-if="jl3dmodelShow && !isContest && project !== 'bjd'" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<Jl3d-Device
|
||||
v-if="deviceif"
|
||||
v-show="deviceShow"
|
||||
ref="Jl3dDevice"
|
||||
:panel-show="deviceShow"
|
||||
@closedevice3dview="jumpjlmap3dmodel"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Jl3dDevice from '@/views/jlmap3d/device/jl3ddevice';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { getPostByProjectCode } from '@/api/learn';
|
||||
import { ProjectCode } from '@/scripts/ProjectConfig';
|
||||
export default {
|
||||
name:'DemonMenu',
|
||||
components:{
|
||||
Jl3dDevice,
|
||||
},
|
||||
props:{
|
||||
isAllShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
jl3dmodelShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
jl3dnameShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
cctvShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
trafficplanShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
traffictrainShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
scheduleLoadShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
driverShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
schedulePreviewShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
jlmap3dFaultShow:{
|
||||
type:Boolean,
|
||||
require:true
|
||||
},
|
||||
allStyle:{
|
||||
type:String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
hoverBtn: false,
|
||||
btnWidth: 0,
|
||||
group:'',
|
||||
mapId:'',
|
||||
lineCode:'',
|
||||
practiceDisabled:false,
|
||||
deviceif:false,
|
||||
deviceShow: true,
|
||||
drivingShow: false,
|
||||
messageBoard: false,
|
||||
jl3dtrafficplan:this.$t('display.demon.trafficplantext'),
|
||||
jl3dtraffictrain:this.$t('display.demon.traffictraintext'),
|
||||
jl3dpassflow:this.$t('display.demon.passengerflow'),
|
||||
jl3dname: this.$t('display.demon.threeDimensionalView'),
|
||||
jl3dmodel: this.$t('display.demon.deviceView')
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
isDrive() {
|
||||
return this.$route.query.prdType == '04';
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
},
|
||||
isContest() {
|
||||
return this.$route.params.mode === 'demon' && this.project == 'drts';
|
||||
},
|
||||
running() {
|
||||
return this.$store.state.training.started;
|
||||
},
|
||||
isLocal() { // 是否为本地项目
|
||||
return process.env.VUE_APP_PRO === 'local';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.group = this.$route.query.group;
|
||||
this.mapId = this.$route.query.mapId;
|
||||
this.lineCode = this.$route.query.lineCode;
|
||||
EventBus.$on('loadScene', () => {
|
||||
this.practiceDisabled = true;
|
||||
});
|
||||
EventBus.$on('quitScene', () => {
|
||||
this.practiceDisabled = false;
|
||||
});
|
||||
if (this.project) {
|
||||
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
|
||||
if (resp.data) {
|
||||
this.messageBoard = true;
|
||||
}
|
||||
}).catch(() => {
|
||||
console.log('获取留言板信息失败');
|
||||
});
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
menuClick() {
|
||||
this.hoverBtn = !this.hoverBtn;
|
||||
if (this.hoverBtn) {
|
||||
this.btnWidth = 600;
|
||||
} else {
|
||||
this.btnWidth = 0;
|
||||
}
|
||||
},
|
||||
jumpjlmap3dmodel() {
|
||||
if (this.deviceif == false) {
|
||||
this.deviceif = true;
|
||||
} else {
|
||||
if (this.deviceShow == false) {
|
||||
this.deviceShow = true;
|
||||
} else {
|
||||
this.deviceShow = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.display_top_draft{
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
top: 15px;
|
||||
height: 32px;
|
||||
overflow: hidden;
|
||||
padding-left: 44px;
|
||||
z-index: 35;
|
||||
.btn_hover{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
color: #4e4d4d;
|
||||
font-size: 14px;
|
||||
background: #fff;
|
||||
padding: 8px;
|
||||
border-radius: 5px;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
height: 32px;
|
||||
}
|
||||
.button_group_box{
|
||||
float: left;
|
||||
transition: all 0.5s;
|
||||
overflow: hidden;
|
||||
margin-left: -700px;
|
||||
// transform: translateX(0px);
|
||||
}
|
||||
}
|
||||
</style>
|
307
src/views/newMap/displayCity/index.vue
Normal file
307
src/views/newMap/displayCity/index.vue
Normal file
@ -0,0 +1,307 @@
|
||||
<template>
|
||||
<div class="main" :style="{width: canvasWidth+'px',height:'100%',position:'absolute',overflow:'hidden'}">
|
||||
<template>
|
||||
<transition name="el-zoom-in-bottom">
|
||||
<map-system-draft ref="mapCanvas" @back="back" />
|
||||
</transition>
|
||||
<menu-demon v-if="isDemon" ref="menuDemon" :offset="offset" :offset-bottom="offsetBottom" :data-error="dataError" :text-status-height="textStatusHeight" @start="start" @end="end" />
|
||||
</template>
|
||||
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import MapSystemDraft from '@/views/newMap/mapsystemNew/index';
|
||||
import MenuDemon from './menuDemon';
|
||||
import MenuSystemTime from '@/views/newMap/displayCity/menuSystemTime';
|
||||
import { clearSimulation, getSimulationInfoNew, ranAsPlan, exitRunPlan } from '@/api/simulation';
|
||||
import { loadMapDataById } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'DisplayDraft',
|
||||
components: {
|
||||
MapSystemDraft,
|
||||
MenuDemon,
|
||||
MenuSystemTime
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
offset: 15,
|
||||
offsetBottom: 15,
|
||||
tipBottom: 0,
|
||||
textStatusHeight: 0,
|
||||
planRunning:false,
|
||||
dataError: false,
|
||||
group:''
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapGetters([
|
||||
'canvasWidth'
|
||||
]),
|
||||
mode() {
|
||||
return this.$route.params.mode;
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
},
|
||||
isDemon() {
|
||||
return this.mode === 'demon' && this.project != 'drts';
|
||||
},
|
||||
isContest() {
|
||||
return this.mode === 'demon' && this.project == 'drts';
|
||||
},
|
||||
isExam() {
|
||||
return this.mode === 'exam';
|
||||
},
|
||||
isLesson() {
|
||||
return (this.mode === 'teach' || this.mode === 'manage');
|
||||
},
|
||||
isScript() {
|
||||
return this.mode === 'script';
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
width() {
|
||||
return this.$store.state.app.width;
|
||||
},
|
||||
height() {
|
||||
return this.$store.state.app.height;
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'$store.state.socket.permissionOver': function () {
|
||||
this.$alert('用户权限已被收回', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
this.back();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 此处代码似乎没什么用,之前从menuSchema复制过来的
|
||||
'$store.state.training.prdType':function(val) {
|
||||
if (val == '01') { this.switchModeInner('01'); } else { this.switchModeInner('02'); }
|
||||
},
|
||||
'$store.state.config.menuBarLoadedCount': function (val) { // menuBar加载完成
|
||||
this.setPosition();
|
||||
},
|
||||
'$store.state.app.windowSizeCount': function() { // 窗口缩放
|
||||
this.setWindowSize();
|
||||
},
|
||||
'$store.state.training.prdType': function (val) { // 根据权限类型计算高度
|
||||
this.setPosition();
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态
|
||||
if (this.planRunning) {
|
||||
this.$store.dispatch('training/simulationStart');
|
||||
}
|
||||
},
|
||||
$route() {
|
||||
if (!this.isLesson && !this.isExam) {
|
||||
this.initLoadData();
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearSimulation(this.group);
|
||||
this.$store.dispatch('training/reset');
|
||||
// this.$store.dispatch('map/mapClear');
|
||||
},
|
||||
async mounted() {
|
||||
this.setWindowSize();
|
||||
this.initLoadData();
|
||||
},
|
||||
methods:{
|
||||
// 结束加载状态
|
||||
endViewLoading(isSuccess) {
|
||||
if (!isSuccess) {
|
||||
this.$store.dispatch('map/mapClear');
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
EventBus.$emit('viewLoading', false);
|
||||
});
|
||||
},
|
||||
// 仿真错误时,被动退出时调用
|
||||
async back() {
|
||||
if (this.isExam) {
|
||||
await this.$refs.menuExam.back();
|
||||
} else if (this.isLesson) {
|
||||
await this.$refs.lessonMenu.back();
|
||||
} else if (this.isDemon) {
|
||||
await this.$refs.menuDemon.back();
|
||||
} else if (this.isScript) {
|
||||
await this.$refs.menuScript.back();
|
||||
} else if (this.isContest) {
|
||||
await this.$refs.menuDispatherContest.back();
|
||||
}
|
||||
},
|
||||
// 设置各个按钮的定位
|
||||
setPosition() {
|
||||
this.$nextTick(() => {
|
||||
this.offset = 10;
|
||||
this.offsetBottom = 15;
|
||||
const menuBar = document.getElementById('menuBar');
|
||||
const menuTool = document.getElementById('menuTool');
|
||||
const menuBottom = document.getElementById('menuButton');
|
||||
const menuButtonsBox = document.getElementById('menuButtons_box');
|
||||
const textStatus = document.getElementById('textStatus');
|
||||
if (menuBar) {
|
||||
this.offset = (menuBar.offsetHeight || 0) + 15;
|
||||
}
|
||||
if (menuTool) {
|
||||
this.offset = (menuTool.offsetHeight || 0) + 15;
|
||||
}
|
||||
const buttonWidth = this.width - 1200; // B box widht
|
||||
if (menuBottom && buttonWidth < 780) {
|
||||
this.offsetBottom = (menuBottom.offsetHeight || 0) + 15;
|
||||
}
|
||||
if (menuButtonsBox) {
|
||||
this.tipBottom = (menuButtonsBox.offsetHeight || 0) + 15;
|
||||
}
|
||||
if (textStatus) {
|
||||
this.textStatusHeight = textStatus.offsetHeight || 0;
|
||||
textStatus.style.top = this.offset - 15 + 'px';
|
||||
}
|
||||
});
|
||||
},
|
||||
// 缩放设置
|
||||
setWindowSize() {
|
||||
const width = this.width;
|
||||
const height = this.height;
|
||||
this.$store.dispatch('config/resize', { width, height });
|
||||
// this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
|
||||
},
|
||||
// 初始化
|
||||
initLoadData() {
|
||||
this.group = this.$route.query.group;
|
||||
this.$store.dispatch('training/reset');
|
||||
this.loadSimulationInfo();
|
||||
this.loadMapData();
|
||||
},
|
||||
// 新版地图根据仿真group获取仿真基础信息
|
||||
async loadSimulationInfo() {
|
||||
const resp = await getSimulationInfoNew(this.group);
|
||||
if (resp && resp.code == 200 && resp.data) {
|
||||
if (!resp.data.dataError) {
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); // 是否暂停判断
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
||||
this.$store.dispatch('training/countTime');
|
||||
this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan);
|
||||
this.planRunning = resp.data.planRunning;
|
||||
if (resp.data.planRunning) {
|
||||
this.$store.commit('training/start');
|
||||
}
|
||||
} else {
|
||||
this.$messageBox('此地图数据正在维护中,无法运行!');
|
||||
}
|
||||
this.dataError = resp.data.dataError;
|
||||
}
|
||||
},
|
||||
// 通过showMode切换显示效果
|
||||
switchModeInner(swch) {
|
||||
let showMode = '03';
|
||||
if (swch == '01') {
|
||||
showMode = '03';
|
||||
} else if (swch == '02') {
|
||||
showMode = '02';
|
||||
}
|
||||
|
||||
const nameList = Object.keys(this.$store.state.map.map || {});
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
if (item !== 'skinVO') {
|
||||
const data = this.$store.state.map.map[item];
|
||||
if (data && data.constructor === Array) {
|
||||
list = [...list, ...data];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (swch == '01') {
|
||||
this.$jlmap.updateShowStation(list, this.$store.state.training.centerStationCode); // 显示全部元素
|
||||
} else {
|
||||
this.$jlmap.updateShowStation(list, ''); // 显示全部元素
|
||||
}
|
||||
|
||||
this.$jlmap.updateShowMode(list, showMode); // 二次过滤
|
||||
},
|
||||
// 加载地图数据
|
||||
loadMapData() {
|
||||
if (parseInt(this.mapId)) {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
loadMapDataById(this.mapId, 'simulation');
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
start(model) { // 开始仿真
|
||||
const data = {
|
||||
time: model.initTime
|
||||
};
|
||||
if (this.$route.query.prdType === '04') {
|
||||
data.loadNumber = model.loadNum;
|
||||
}
|
||||
ranAsPlan(data, this.group).then(res => {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
||||
}).catch(error => {
|
||||
let message = '';
|
||||
switch (error.code) {
|
||||
case '5001':
|
||||
message = this.$t('error.mapDataError');
|
||||
break;
|
||||
case '5002':
|
||||
message = this.$t('error.runningChartDataError');
|
||||
break;
|
||||
case '5003':
|
||||
message = this.$t('error.runningChartIsNotLoaded');
|
||||
break;
|
||||
case '5004':
|
||||
message = this.$t('error.runningDataError');
|
||||
break;
|
||||
case '5000':
|
||||
message = this.$t('error.systemError');
|
||||
break;
|
||||
case '4000':
|
||||
message = this.$t('error.simulationDoesNotExist');
|
||||
break;
|
||||
case '4001':
|
||||
message = this.$t('error.simulationOperationIsNotDefined');
|
||||
break;
|
||||
case '4002':
|
||||
message = this.$t('error.simulationOperationProcessingMethodNotFound');
|
||||
break;
|
||||
case '4003':
|
||||
message = this.$t('error.simulationOperationFailed');
|
||||
break;
|
||||
case '4004':
|
||||
message = this.$t('error.operationConflict');
|
||||
break;
|
||||
default:
|
||||
message = '按计划行车异常,请退出重试!';
|
||||
// this.$messageBox('按计划行车异常,请退出重试!');
|
||||
break;
|
||||
}
|
||||
this.$messageBox(message + ',' + this.$t('error.startSimulationFailed'));
|
||||
});
|
||||
},
|
||||
end() {
|
||||
exitRunPlan(this.group).then(() => {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||
this.$store.dispatch('map/clearJlmapTrainView');
|
||||
this.$store.dispatch('map/resetActiveTrainList', false);
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
});
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('display.demon.endSimulationFail'));
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
306
src/views/newMap/displayCity/menuDemon.vue
Normal file
306
src/views/newMap/displayCity/menuDemon.vue
Normal file
@ -0,0 +1,306 @@
|
||||
<template>
|
||||
<div>
|
||||
<demon-menu
|
||||
ref="demonMenu"
|
||||
:is-all-show="!dataError"
|
||||
:jl3dmodel-show="isShow3dmodel && !isShowScheduling && !isDrive"
|
||||
:jl3dname-show="!isShowScheduling&&!isDrive"
|
||||
:cctv-show="!isShowScheduling"
|
||||
:trafficplan-show="!isShowScheduling"
|
||||
:schedule-load-show="isShowScheduling && !runing"
|
||||
:schedule-preview-show="isShowScheduling && runing"
|
||||
:jlmap3d-fault-show="false"
|
||||
:driver-show="isDrive"
|
||||
:all-style="'top:'+(offset+textStatusHeight)+'px'"
|
||||
/>
|
||||
|
||||
<menu-schema
|
||||
ref="menuSchema"
|
||||
:offset="offset"
|
||||
:data-error="dataError"
|
||||
:offset-bottom="offsetBottom"
|
||||
/>
|
||||
|
||||
<div class="display-draft" :class="{'haerbin_btn_box': $route.query.lineCode == '07'||$route.query.lineCode == '14'}" :style="{bottom: offsetBottom + 'px'}">
|
||||
<el-button-group class="button-group-box">
|
||||
<template v-if="!dataError">
|
||||
<template v-if="!projectDevice">
|
||||
<el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
|
||||
</template>
|
||||
</template>
|
||||
<el-button v-if="project !='bjd'" type="primary" size="small" @click="back">{{ projectDevice?'退出':$t('display.demon.back') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<!-- 单人仿真 -->
|
||||
<script>
|
||||
import DemonMenu from './demonMenu';
|
||||
import { Notification } from 'element-ui';
|
||||
import MenuSchema from '@/views/newMap/displayCity/menuSchema';
|
||||
import { getGoodsTryUse } from '@/api/management/goods';
|
||||
import {getSimulationInfoNew, clearSimulation } from '@/api/simulation';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { getCountTime } from '@/utils/index';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { quitScriptNew } from '@/api/simulation';
|
||||
import { setGoodsTryUse } from '@/api/management/goods';
|
||||
import {loadScriptNew } from '@/api/simulation';
|
||||
import StatusIcon from '@/views/components/StatusIcon/statusIcon';
|
||||
import Vue from 'vue';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'MenuDemon',
|
||||
components: {
|
||||
MenuSchema,
|
||||
DemonMenu,
|
||||
StatusIcon
|
||||
},
|
||||
props: {
|
||||
offset: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
offsetBottom: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
dataError: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
textStatusHeight: {
|
||||
type: Number,
|
||||
default() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tryTime: 0, // 进入页面多少秒
|
||||
timeNow: 0, // 进入页面 相对时间
|
||||
time: null, // 定时器
|
||||
countTime: 0, // 显示 倒计时
|
||||
remainingTime: 0,
|
||||
userRole:'AUDIENCE',
|
||||
goodsId: this.$route.query.goodsId,
|
||||
try: this.$route.query.try, // 是否是试用权限
|
||||
training: {
|
||||
id: '',
|
||||
name: '',
|
||||
remarks: ''
|
||||
},
|
||||
isScriptRun:false,
|
||||
jl3dname: this.$t('display.demon.threeDimensionalView'),
|
||||
jl3dmodel: this.$t('display.demon.deviceView'),
|
||||
isShow3dmodel :true,
|
||||
isGoback: false,
|
||||
runing:false,
|
||||
prdTypeMap: {
|
||||
'01': '01', // 现地 => 现地
|
||||
'02': '02', // 行调 => 行调
|
||||
'04': '02', // 司机 => 行调
|
||||
'05': '' // 派班 => null
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isShowScheduling() {
|
||||
return this.$route.query.prdType == '05';
|
||||
},
|
||||
isDrive() {
|
||||
return this.$route.query.prdType == '04';
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
projectDevice() {
|
||||
return this.$route.query.projectDevice;
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.subscribeCount': function () {
|
||||
this.group && this.initLoadPage();
|
||||
},
|
||||
'$store.state.socket.simulationRoleList':function(val) {
|
||||
(val || []).forEach(item => {
|
||||
if (item.messageType === 'KICK_OUT' && item.userId == this.$store.state.user.id) {
|
||||
!this.isGoback && this.back();
|
||||
}
|
||||
});
|
||||
},
|
||||
'$store.state.socket.simulationOver':function(val) {
|
||||
!this.isGoback && this.back();
|
||||
},
|
||||
'$store.state.socket.simulationStart':function(val) {
|
||||
if (val) {
|
||||
this.setRuning(true);
|
||||
this.$store.dispatch('training/simulationStart').then(() => {
|
||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
});
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationReset':function(val) {
|
||||
this.setRuning(false);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$store.dispatch('training/setPrdType', this.$route.query.prdType);
|
||||
switch (this.$store.state.training.prdType) {
|
||||
case '02': { this.userRole = 'DISPATCHER'; break; }
|
||||
case '01': { this.userRole = 'STATION_SUPERVISOR'; break; }
|
||||
case '04': { this.userRole = 'DRIVER'; break; }
|
||||
case '05': { this.userRole = 'DEPOT_DISPATCHER'; break; }
|
||||
default: { this.userRole = 'AUDIENCE'; break; }
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.time) {
|
||||
this.setTryTime();
|
||||
clearTimeout(this.time);
|
||||
}
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', false);
|
||||
this.$store.dispatch('map/resetActiveTrainList', true);
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||
this.$nextTick(() => {
|
||||
this.$refs.demonMenu.menuClick();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
async initLoadPage() {
|
||||
try {
|
||||
if (this.try != '0') {
|
||||
this.loadInitData();
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
loadInitData() {
|
||||
const data = {
|
||||
mapId: this.$route.query.mapId,
|
||||
prdType: this.$route.query.prdType,
|
||||
permissionType: PermissionType.SIMULATION
|
||||
};
|
||||
getGoodsTryUse(data).then(res => {
|
||||
this.remainingTime = res.data.tryTime;
|
||||
this.timeNow = Date.parse(new Date()) / 1000 + this.remainingTime;
|
||||
if (this.try) {
|
||||
this.time = setInterval(() => {
|
||||
this.tryTime += 1;
|
||||
this.countTime = getCountTime(this.timeNow);
|
||||
if (this.countTime == -1) {
|
||||
this.back();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('display.demon.getTimeFail'));
|
||||
});
|
||||
},
|
||||
selectBeginTime() {
|
||||
this.$refs.setTime.doShow();
|
||||
},
|
||||
start(model) {
|
||||
this.$emit('start', model);
|
||||
},
|
||||
setRuning(run) {
|
||||
this.runing = run;
|
||||
},
|
||||
end() {
|
||||
this.$emit('end');
|
||||
},
|
||||
clearAllData() {
|
||||
this.$refs.chatbox.clearAllData();
|
||||
},
|
||||
async back() {
|
||||
this.isGoback = true;
|
||||
if (this.projectDevice) {
|
||||
clearSimulation(this.group).then(res=>{
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
if (this.project === 'bjd') {
|
||||
window.close();
|
||||
} else {
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', '');
|
||||
history.go(-1);
|
||||
Notification.closeAll();
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
setTryTime() {
|
||||
if (this.try) {
|
||||
const data = { time: this.tryTime, goodsId: this.goodsId };
|
||||
if (data.goodsId) {
|
||||
setGoodsTryUse(data);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
quit() {
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.display-card {
|
||||
z-index: 9;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: 17px;
|
||||
left: 160px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.display-card .el-row {
|
||||
line-height: 32px !important;
|
||||
}
|
||||
|
||||
.display-score {
|
||||
background-color: black;
|
||||
display: -moz-inline-box;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
height: 32px;
|
||||
line-height: 24px;
|
||||
border-radius: 4px;
|
||||
padding-left: 2px;
|
||||
margin-left: 10px;
|
||||
font-family: "Microsoft" !important;
|
||||
font-size: 18px !important;
|
||||
color: #fff;
|
||||
}
|
||||
.haerbin_btn_box{
|
||||
width: 450px;
|
||||
bottom: 15px!important;
|
||||
}
|
||||
.display-draft {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 15px;
|
||||
.button-group-box{
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
</style>
|
111
src/views/newMap/displayCity/menuSchema.vue
Normal file
111
src/views/newMap/displayCity/menuSchema.vue
Normal file
@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<div class="schema" :style="{top: offset+'px'}">
|
||||
<el-button v-if="!isScheduling" size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式[Tab]':'切换到故障模式[Tab]' }}</el-button>
|
||||
<fault-choose ref="faultChoose" :group="group" :offset="offset" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import FaultChoose from './demon/faultChoose';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { loadRunPlanData } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
// 右上角操作
|
||||
export default {
|
||||
name: 'MenuSchema',
|
||||
components: {
|
||||
FaultChoose
|
||||
},
|
||||
props: {
|
||||
offset: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
dataError: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mode: OperateMode.NORMAL,
|
||||
OperateMode: OperateMode,
|
||||
viewDisabled: true,
|
||||
faultMode: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
isScript() {
|
||||
return this.$route.params.mode === 'script';
|
||||
},
|
||||
isDemon() {
|
||||
return this.$route.params.mode === 'demon';
|
||||
},
|
||||
isScheduling() {
|
||||
return this.$route.query.prdType === '05';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.triggerFaultCount': function () {
|
||||
this.setFault();
|
||||
},
|
||||
'$store.state.runPlan.loadRunPlanCount': function () {
|
||||
this.viewDisabled = false;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
EventBus.$on('CheckFaultModeEvent', () => {
|
||||
if (!this.isScheduling) {
|
||||
this.changeOperateMode();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadRunData() {
|
||||
this.$store.dispatch('runPlan/clear').then(() => {
|
||||
if (this.group) {
|
||||
this.viewDisabled = true;
|
||||
// 获取排序的车站列表
|
||||
getByGroupStationList(this.group).then(response => {
|
||||
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
||||
loadRunPlanData(this.group, this.dataError);
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('display.schema.getStationListFail'));
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
changeOperateMode() {
|
||||
this.faultMode = !this.faultMode;
|
||||
let mode = OperateMode.NORMAL;
|
||||
if (this.faultMode) {
|
||||
mode = OperateMode.FAULT;
|
||||
}
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: mode });
|
||||
},
|
||||
setFault() {
|
||||
this.$refs.faultChoose.doShow();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.schema {
|
||||
z-index: 36;
|
||||
display: inline;
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
/deep/ .el-button+.el-button {
|
||||
margin-left: 0px;
|
||||
}
|
||||
</style>
|
154
src/views/newMap/displayCity/menuSystemTime.vue
Normal file
154
src/views/newMap/displayCity/menuSystemTime.vue
Normal file
@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<div v-if="isShowSystemTime" class="display-card" :style="{top: top+'px', right: newRight+'px'}">
|
||||
<template v-if="pause">
|
||||
<span class="display-pause">{{ $t('display.systemTime.timePause') }}</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<system-time
|
||||
class="display-time"
|
||||
:time="time"
|
||||
/>
|
||||
<div v-if="isShowDate" style="width: 80px;height: 58px;float: right;box-shadow: 0 0 5px #eee;">
|
||||
<div class="display-date-box">{{ dateString }}</div>
|
||||
<div class="display-date-box">{{ dayString }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
|
||||
// 顶部时间栏显示
|
||||
export default {
|
||||
name: 'MenuSystemTime',
|
||||
components: {
|
||||
SystemTime
|
||||
},
|
||||
props: {
|
||||
offset: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
time: '00:0000',
|
||||
dateString: '00/00/00',
|
||||
dayString: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isShowSystemTime() {
|
||||
return this.$route.params.mode == 'demon' ||
|
||||
this.$route.params.mode == 'dp' ||
|
||||
this.$route.params.mode == 'plan' ||
|
||||
this.$route.params.mode == 'script' ||
|
||||
this.$route.params.mode == 'practice' ||
|
||||
!this.$route.params.mode;
|
||||
},
|
||||
pause() {
|
||||
return this.$store.state.scriptRecord.simulationPause;
|
||||
},
|
||||
isDisplay() {
|
||||
return this.$route.path.includes('displayCity') || this.$route.path.includes('scriptdisplayCity');
|
||||
},
|
||||
isShowDate() { // 西安一 三号线
|
||||
return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.isDisplay;
|
||||
},
|
||||
top() {
|
||||
return this.isShowDate ? (this.$route.query.prdType == '05' ? 5 : this.offset - 10) : this.offset;
|
||||
},
|
||||
newRight() {
|
||||
return this.isShowDate ? this.$store.state.config.width - 420 : this.$store.state.config.width / 2 - 55;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
const date = new Date(initTime);
|
||||
this.initDate(date);
|
||||
},
|
||||
'$store.state.socket.simulationTimeSync': function (time) { // 仿真时间更新
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
|
||||
const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
|
||||
this.initDate(date);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const initTime = this.$store.state.training.initTime;
|
||||
if (initTime > 0) {
|
||||
const date = new Date(initTime);
|
||||
this.initDate(date);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initDate(date) {
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
const years = date.getFullYear() + '';
|
||||
let months = date.getMonth() + 1 + '';
|
||||
let dates = date.getDate() + '';
|
||||
if (months.length < 2) { months = '0' + months; }
|
||||
if (dates.length < 2) { dates = '0' + dates; }
|
||||
this.dateString = dates + '/' + months + '/' + years.slice(2);
|
||||
const day = date.getDay();
|
||||
switch (day) {
|
||||
case 0:
|
||||
this.dayString = '星 期 日';
|
||||
break;
|
||||
case 1:
|
||||
this.dayString = '星 期 一';
|
||||
break;
|
||||
case 2:
|
||||
this.dayString = '星 期 二';
|
||||
break;
|
||||
case 3:
|
||||
this.dayString = '星 期 三';
|
||||
break;
|
||||
case 4:
|
||||
this.dayString = '星 期 四';
|
||||
break;
|
||||
case 5:
|
||||
this.dayString = '星 期 五';
|
||||
break;
|
||||
case 6:
|
||||
this.dayString = '星 期 六';
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.display-card {
|
||||
z-index: 9;
|
||||
display: inline;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.display-pause {
|
||||
font-size: 21px;
|
||||
font-weight: bold;
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.display-time{
|
||||
padding: 3px 5px;
|
||||
border: 1px solid rgba(255,255,255,.2);
|
||||
box-shadow: 0 2px 12px 0 rgba(255,255,255,.3);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.display-card .el-row {
|
||||
line-height: 32px !important;
|
||||
}
|
||||
.display-date-box{
|
||||
height: 29px;
|
||||
line-height: 29px;
|
||||
background: #404040;
|
||||
color: #1DEA1E;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
58
src/views/newMap/displayCity/utils.js
Normal file
58
src/views/newMap/displayCity/utils.js
Normal file
@ -0,0 +1,58 @@
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import store from '@/store/index';
|
||||
export function covertMemberData (activeTrainList, resp) {
|
||||
let lastData = JSON.stringify(resp);
|
||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
||||
roleTypeList.forEach(function(element) {
|
||||
const rolename = element.value;
|
||||
if (Cookies.get('user_lang') == 'en') {
|
||||
lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
|
||||
} else {
|
||||
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
|
||||
}
|
||||
});
|
||||
lastData = JSON.parse(lastData);
|
||||
const lastMemberList = [];
|
||||
// const electricDispatcherList = [];
|
||||
const deviceListData = [[], [], [], [], [], [], [], []];
|
||||
const driverList = [];
|
||||
lastData.forEach((member, index)=>{
|
||||
if (member.userId && member.userId == store.state.user.id) {
|
||||
member.disabled = true;
|
||||
member.userName = store.state.user.nickname;
|
||||
store.dispatch('training/setOrignalUserRoleId', member.id);
|
||||
} else {
|
||||
member.disabled = false;
|
||||
}
|
||||
const userName = member.userName ? '-' + member.userName : '';
|
||||
const name = member.name ? '-' + member.name : '';
|
||||
if (member.deviceCode) {
|
||||
const device = store.getters['map/getDeviceByCode'](member.deviceCode);
|
||||
member.deviceName = device.name || device.groupNumber;
|
||||
member.label = member.type + member.deviceName + name + userName;
|
||||
member.normalName = member.type + member.deviceName + name;
|
||||
} else {
|
||||
member.deviceName = '';
|
||||
member.label = member.type + name + userName;
|
||||
member.normalName = member.type + name;
|
||||
}
|
||||
const deviceType = ['行调', '通号', '行值', '司机', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼'];
|
||||
const deviceTypeIndex = deviceType.indexOf(member.type);
|
||||
if (deviceTypeIndex >= 0) {
|
||||
if (deviceTypeIndex == 3) {
|
||||
if (activeTrainList.length > 0) {
|
||||
if (activeTrainList.includes(member.deviceCode)) {
|
||||
deviceListData[deviceTypeIndex].push(member);
|
||||
}
|
||||
}
|
||||
lastMemberList.push(member);
|
||||
driverList.push(member);
|
||||
} else {
|
||||
deviceListData[deviceTypeIndex].push(member);
|
||||
lastMemberList.push(member);
|
||||
}
|
||||
}
|
||||
});
|
||||
return {lastMemberList:lastMemberList, deviceListData:deviceListData, driverList:driverList};
|
||||
}
|
@ -67,6 +67,7 @@ import Arrow from './arrow';
|
||||
import SplitScreen from './splitScreen';
|
||||
import FloodGate from './floodGate';
|
||||
import DirectionRod from './directionRod';
|
||||
import SignalButton from './signalButton';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
@ -97,7 +98,8 @@ export default {
|
||||
Arrow,
|
||||
SplitScreen,
|
||||
FloodGate,
|
||||
DirectionRod
|
||||
DirectionRod,
|
||||
SignalButton
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -138,7 +140,8 @@ export default {
|
||||
{label: '站间分隔', name:'SplitStation', menus:SplitStation},
|
||||
{label: '箭头', name:'Arrow', menus:Arrow},
|
||||
{label: '防淹门', name: 'FloodGate', menus: FloodGate},
|
||||
{label: '方向杆', name: 'DirectionRod', menus: DirectionRod}
|
||||
{label: '方向杆', name: 'DirectionRod', menus: DirectionRod},
|
||||
{label: '信号按钮', name: 'SignalButton', menus: SignalButton }
|
||||
],
|
||||
selectDevice:'',
|
||||
enabledTab: 'Section',
|
||||
|
299
src/views/newMap/newMapdraft/mapoperate/signalButton.vue
Normal file
299
src/views/newMap/newMapdraft/mapoperate/signalButton.vue
Normal file
@ -0,0 +1,299 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" class="card">
|
||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
||||
<operate-property
|
||||
ref="dataform"
|
||||
:form="form"
|
||||
:edit-model="editModel"
|
||||
:rules="rules"
|
||||
type="Text"
|
||||
@updateMapModel="updateMapModel"
|
||||
@clearDeviceSelect="clearDeviceSelect"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||
<create-operate
|
||||
ref="createForm"
|
||||
:create-form="createForm"
|
||||
:add-model="addModel"
|
||||
:create-rules="rules"
|
||||
@create="create"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getUID } from '@/jmapNew/utils/Uid';
|
||||
import OperateProperty from './components/operateProperty';
|
||||
import CreateOperate from './components/createOperate';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
|
||||
export default {
|
||||
name: 'SignalButton',
|
||||
components: {
|
||||
OperateProperty,
|
||||
CreateOperate
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'first',
|
||||
lazy: true,
|
||||
field: '',
|
||||
editModel: {
|
||||
code: '',
|
||||
name: '',
|
||||
type: '',
|
||||
signalCode: '',
|
||||
sectionCode: '',
|
||||
switchCode: '',
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
},
|
||||
stationCode: ''
|
||||
},
|
||||
addModel: {
|
||||
name: '',
|
||||
type: '',
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
},
|
||||
typeList: [
|
||||
{ value: 'PICK', label: '接车按钮' },
|
||||
{ value: 'PASS', label: '通过按钮' },
|
||||
{ value: 'GUIDE', label: '引导按钮' },
|
||||
{ value: 'FLEXIBLE', label: '变通按钮' },
|
||||
{ value: 'RAMP_TERMINAL', label: '坡道终端按钮' },
|
||||
{ value: 'TRAIN_TERMINAL', label: '列车终端按钮'},
|
||||
{ value: 'SHUNT_TERMINAL', label: '调车终端按钮'}
|
||||
],
|
||||
centralizedStationList: [], // 设备集中站列表
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: this.$t('rules.selectText'), trigger: 'blur' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '请输入按钮名称', trigger: 'blur' }
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: '请选择按钮类型', trigger: 'change' }
|
||||
],
|
||||
signalCode: [
|
||||
{ required: true, message: '请选择关联的信号机设备', trigger: 'change' }
|
||||
],
|
||||
sectionCode: [
|
||||
{ required: true, message: '请选择关联的区段设备', trigger: 'change' }
|
||||
],
|
||||
switchCode: [
|
||||
{ required: true, message: '请选择关联的道岔设备', trigger: 'change' }
|
||||
],
|
||||
'position.x': [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterXCoordinate'), trigger: 'blur' }
|
||||
],
|
||||
'position.y': [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterYCoordinate'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalButtonList',
|
||||
'stationList',
|
||||
'lineCode',
|
||||
'signalList',
|
||||
'sectionList',
|
||||
'switchList'
|
||||
]),
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '130px',
|
||||
items: {
|
||||
code: {
|
||||
name: '',
|
||||
item: []
|
||||
},
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop: 'code', label: '按钮编码:', type: 'select', optionLabel: 'code', optionValue: 'code', options: this.signalButtonList, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: '按钮名称:', type: 'input' },
|
||||
{ prop: 'type', label: '按钮类型:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.typeList},
|
||||
{ prop: 'signalCode', label: '关联信号机:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.signalList, hover: this.hover, buttonType: 'linkSignal', buttonShowType: this.isLinkSignalShow, isHidden: !this.isLinkSignal },
|
||||
{ prop: 'sectionCode', label: '关联区段:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.sectionList, hover: this.hover, buttonType: 'linkSection', buttonShowType: this.isLinkSectionShow, isHidden: !this.isLinkSection },
|
||||
{ prop: 'switchCode', label: '关联道岔:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.switchList, hover: this.hover, buttonType: 'linkSwitch', buttonShowType: this.isLinkSwitchShow, isHidden: !this.isLinkSwitch },
|
||||
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '120px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px', disabled: false },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px', disabled: false }
|
||||
] },
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList }
|
||||
]
|
||||
},
|
||||
map: {
|
||||
name: this.$t('map.mapData'),
|
||||
item: [
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
return form;
|
||||
},
|
||||
createForm() {
|
||||
const form = {
|
||||
labelWidth: '110px',
|
||||
items:{
|
||||
all:{
|
||||
name:'',
|
||||
item: [
|
||||
{ prop: 'name', label: '按钮名称:', type: 'input' },
|
||||
{ prop: 'type', label: '按钮类型:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.typeList},
|
||||
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '120px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px', disabled: false },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px', disabled: false }
|
||||
] }
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
return form;
|
||||
},
|
||||
isLinkSignalShow() {
|
||||
return this.field === 'linkSignal';
|
||||
},
|
||||
isLinkSignal() {
|
||||
const list = ['PICK', 'PASS', 'GUIDE'];
|
||||
return list.includes(this.editModel.type);
|
||||
},
|
||||
isLinkSectionShow() {
|
||||
return this.field === 'linkSection';
|
||||
},
|
||||
isLinkSwitchShow() {
|
||||
return this.field === 'linkSwitch';
|
||||
},
|
||||
isLinkSection() {
|
||||
const list = ['RAMP_TERMINAL', 'TRAIN_TERMINAL', 'SHUNT_TERMINAL'];
|
||||
return list.includes(this.editModel.type);
|
||||
},
|
||||
isLinkSwitch() {
|
||||
return this.editModel.type === 'flexible';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleInit() {
|
||||
if (this.stationList && this.stationList.length) {
|
||||
this.centralizedStationList = this.stationList.filter(station=> station.centralized);
|
||||
}
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field == this.field ? '' : field;
|
||||
if (this.field) {
|
||||
this.$emit('deviceSelect', 'SignalButton');
|
||||
} else {
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
deviceChange(code) {
|
||||
this.$emit('setCenter', code);
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() === 'SignalButton'.toUpperCase()) {
|
||||
this.handleInit();
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
} else if (this.field === 'linkSignal' && selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.activeName = 'first';
|
||||
this.editModel.signalCode = selected.code;
|
||||
} else if (this.field === 'linkSection' && selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
this.activeName = 'first';
|
||||
this.editModel.sectionCode = selected.code;
|
||||
} else if (this.field === 'linkSwitch' && selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
this.activeName = 'first';
|
||||
this.editModel.switchCode = selected.code;
|
||||
}
|
||||
},
|
||||
clearDeviceSelect() {
|
||||
this.$emit('deviceSelect', '');
|
||||
},
|
||||
create() {
|
||||
const model = {
|
||||
_type: 'SignalButton',
|
||||
code: getUID('SignalButton', this.signalButtonList),
|
||||
type: this.addModel.type,
|
||||
name: this.addModel.name,
|
||||
position: {
|
||||
x: this.addModel.position.x,
|
||||
y: this.addModel.position.y
|
||||
}
|
||||
};
|
||||
this.$refs.createForm.resetForm();
|
||||
this.$emit('updateMapModel', model);
|
||||
},
|
||||
deleteObj() {
|
||||
this.$refs.dataform.deleteObj();
|
||||
},
|
||||
// 修改对象
|
||||
edit() {
|
||||
this.$refs.dataform.edit();
|
||||
},
|
||||
updateMapModel(data) {
|
||||
if (this.isLinkSignal) {
|
||||
data.sectionCode = ''; data.switchCode = '';
|
||||
} else if (this.isLinkSection) {
|
||||
data.signalCode = ''; data.switchCode = '';
|
||||
} else if (this.isLinkSwitch) {
|
||||
data.signalCode = ''; data.sectionCode = '';
|
||||
}
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.card {
|
||||
height: 100%;
|
||||
}
|
||||
.coordinate {
|
||||
overflow: hidden;
|
||||
|
||||
.title {
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
line-height: 40px;
|
||||
padding: 0 12px 0 0;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
line-height: 28px;
|
||||
width: 120px;
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
float: left;
|
||||
margin-right: 7px;
|
||||
}
|
||||
}
|
||||
/deep/ {
|
||||
.el-select .el-input {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.input-with-select .el-input-group__prepend {
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -28,7 +28,7 @@ export default {
|
||||
isEdit: false,
|
||||
typeList: [{ label: '数据', value: 'DATA' }, { label: '运行线', value: 'RUNPLAN' }],
|
||||
formModel: {
|
||||
id: '',
|
||||
groupId: '',
|
||||
name: '',
|
||||
type: '',
|
||||
mapIds: []
|
||||
@ -70,7 +70,7 @@ export default {
|
||||
this.dialogVisible = true;
|
||||
if (row) {
|
||||
this.isEdit = true;
|
||||
this.formModel.id = row.id;
|
||||
this.formModel.groupId = row.id;
|
||||
this.formModel.name = row.name;
|
||||
this.formModel.type = row.type;
|
||||
this.formModel.mapIds = [...row.mapIds];
|
||||
@ -82,17 +82,21 @@ export default {
|
||||
}
|
||||
},
|
||||
doCreate() {
|
||||
const _that = this;
|
||||
const _that = this;
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
if (_that.isEdit) {
|
||||
updateMapGroup(_that.formModel).then(resp => {
|
||||
_that.$message.success('修改成功!');
|
||||
_that.$emit('refresh');
|
||||
_that.doClose();
|
||||
}).catch(error => {
|
||||
_that.$message.error('修改失败:' + error.message);
|
||||
});
|
||||
} else {
|
||||
createMapGroup(_that.formModel).then(resp => {
|
||||
_that.$message.success('创建成功!');
|
||||
_that.$emit('refresh');
|
||||
_that.doClose();
|
||||
}).catch(error => {
|
||||
_that.$message.error('创建失败:' + error.message);
|
||||
});
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<script>
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
import { queryMapGroupPaging, deleteMapGroup } from '@/api/mapGroup';
|
||||
import { queryMapGroupPaging, deleteMapGroup, importMapGroupData } from '@/api/mapGroup';
|
||||
import EditGroup from './editGroup';
|
||||
export default {
|
||||
name: 'Index',
|
||||
@ -39,9 +39,7 @@ export default {
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
queryList: {
|
||||
query: queryMapGroupPaging,
|
||||
@ -71,7 +69,7 @@ export default {
|
||||
title: '归属地图',
|
||||
prop: 'mapIds',
|
||||
type: 'tagMore',
|
||||
columnValue: (row) => { return this.$convertField(row.mapIds, this.$ConstSelect.roleList, ['value', 'label'], true); },
|
||||
columnValue: (row) => { return this.$convertField(row.mapIds, this.mapList, ['id', 'name'], true); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
// {
|
||||
@ -85,7 +83,13 @@ export default {
|
||||
buttons: [
|
||||
{
|
||||
name: '编辑',
|
||||
handleClick: this.handleCopy
|
||||
handleClick: this.handleEdit
|
||||
},
|
||||
{
|
||||
name: '导入',
|
||||
handleClick: this.handleImport,
|
||||
type: 'file',
|
||||
class: 'queryPagesFilesInput'
|
||||
},
|
||||
{
|
||||
name: this.$t('global.delete'),
|
||||
@ -107,7 +111,11 @@ export default {
|
||||
methods: {
|
||||
loadInitData() {
|
||||
getPublishMapListOnline().then(resp => {
|
||||
this.mapList = resp.data;
|
||||
// this.mapList = resp.data;
|
||||
this.mapList = [];
|
||||
resp.data.forEach(item => {
|
||||
this.mapList.push({ id: parseInt(item.id), name: item.name });
|
||||
});
|
||||
}).catch(e => {
|
||||
console.error(e);
|
||||
this.$message.error('获取地图数据列表失败!');
|
||||
@ -122,6 +130,33 @@ export default {
|
||||
handleEdit(index, row) {
|
||||
this.$refs.editGroup.doShow(row);
|
||||
},
|
||||
handleImport(index, row, idx) {
|
||||
setTimeout(() => {
|
||||
this.$set(row, 'loading' + idx, true);
|
||||
const objInput = document.getElementsByClassName('queryPagesFilesInput');
|
||||
let obj = {files: null};
|
||||
if (objInput.length) {
|
||||
obj = objInput[index];
|
||||
}
|
||||
if (!obj.files) return;
|
||||
const f = obj.files[0];
|
||||
const reader = new FileReader();
|
||||
const that = this;
|
||||
reader.readAsText(f, 'utf-8');
|
||||
reader.onload = function(e) {
|
||||
const data = e.target.result;
|
||||
importMapGroupData(row.id, JSON.parse(data)).then(res => {
|
||||
that.$message.success('导入成功!');
|
||||
that.$set(row, 'loading' + idx, false);
|
||||
that.refresh();
|
||||
}).catch(error => {
|
||||
that.$message.error('导入失败' + error.message);
|
||||
that.$set(row, 'loading' + idx, false);
|
||||
});
|
||||
obj.value = '';
|
||||
};
|
||||
});
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
const _that = this;
|
||||
this.$confirm('是否确认删除分组《' + row.name + '》 ' + ' ?', this.$t('tip.hint'), {
|
||||
|
Loading…
Reference in New Issue
Block a user