Merge branch 'test'
This commit is contained in:
commit
197e6a8d36
@ -511,3 +511,12 @@ export function getRunLevelDetail(id) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 更新站间运行等级数据
|
||||
export function updateRunlevelDistance(mapId) {
|
||||
return request({
|
||||
url: `/api/runPlan/userData/${mapId}/runlevelDistance`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
|
||||
|
BIN
src/assets/icon/favicon_cgy.png
Normal file
BIN
src/assets/icon/favicon_cgy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 228 KiB |
@ -213,13 +213,8 @@ export function SectionList() {
|
||||
stopsections.push(realstopsection);
|
||||
}
|
||||
|
||||
|
||||
console.log(stopsections);
|
||||
|
||||
stopsections.sort(compare("posx"))
|
||||
|
||||
|
||||
|
||||
let leng1 = 0;
|
||||
let leng2 = 0;
|
||||
|
||||
@ -330,13 +325,12 @@ export function SectionList() {
|
||||
createsection(stopsections[0].reals[1].code,downstartpoint,stopsections[0].reals[1].code,34.8);
|
||||
|
||||
for(let i=1,leni=stopsections.length;i<leni;i++){
|
||||
console.log(stopsections[i]);
|
||||
|
||||
if(stopsections[i+1] ){
|
||||
for(let j=0,lenj=stopsections[i].reals.length;j<lenj;j++){
|
||||
|
||||
let topnextpoint = {};
|
||||
console.log(stopsections[i].reals[j].section.code);
|
||||
console.log(scope.sections.datalist[stopsections[i].reals[j].section.code]);
|
||||
|
||||
if(scope.sections.datalist[stopsections[i].reals[j].section.code].railpoint.length == 0){
|
||||
let
|
||||
topnextpoint = {
|
||||
@ -391,10 +385,9 @@ export function SectionList() {
|
||||
//根据站台区段创建站台位置 120停车点距离
|
||||
for(let j=0,lenj=stations.length;j<lenj;j++){
|
||||
// console.log(j);
|
||||
console.log(stations[j]);
|
||||
let direction1 = scope.sections.datalist[stations[j].stands[0].section];
|
||||
let direction2 = scope.sections.datalist[stations[j].stands[1].section];
|
||||
console.log(direction1);
|
||||
|
||||
let x = direction1.railpoint[0].x+direction1.leftStopPointOffset+60;
|
||||
let z = (direction1.railpoint[0].z+direction2.railpoint[0].z)/2;
|
||||
let mesh;
|
||||
@ -427,9 +420,7 @@ export function SectionList() {
|
||||
position.z = py;
|
||||
let len = scope.sections.datalist[start].lengthFact;
|
||||
let height = Math.random()/1000;
|
||||
console.log(origin);
|
||||
console.log(start);
|
||||
console.log("++++++++++++++++++");
|
||||
|
||||
scope.sections.datalist[start].railpoint = [
|
||||
new THREE.Vector3(position.x,height,position.z),
|
||||
new THREE.Vector3(position.x+0.5,height,position.z+0.0001),
|
||||
@ -504,7 +495,6 @@ export function SectionList() {
|
||||
// console.log(origin+"******************************");
|
||||
// console.log(start);
|
||||
// console.log(origin);
|
||||
console.log(scope.sections.datalist[start]);
|
||||
if(scope.sections.datalist[start].standTrack == true && start != origin){
|
||||
// console.log(start+"到达");
|
||||
// console.log("++++++++++++++++++++++++");
|
||||
|
@ -108,13 +108,13 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
|
||||
if(Math.abs(newsection.railpoint[0].y-newsection.railpoint[2].y)>0.01){
|
||||
closedSpline = new THREE.CatmullRomCurve3( [
|
||||
new THREE.Vector3(newsection.railpoint[0].x,newsection.railpoint[0].y,newsection.railpoint[0].z),
|
||||
new THREE.Vector3(newsection.railpoint[1].x,newsection.railpoint[1].y,newsection.railpoint[1].z+0.001),
|
||||
new THREE.Vector3(newsection.railpoint[1].x,newsection.railpoint[1].y,newsection.railpoint[1].z+0.0001),
|
||||
new THREE.Vector3(newsection.railpoint[2].x,newsection.railpoint[2].y,newsection.railpoint[2].z)
|
||||
] );
|
||||
}else{
|
||||
closedSpline = new THREE.CatmullRomCurve3( [
|
||||
new THREE.Vector3(newsection.railpoint[0].x,newsection.railpoint[2].y,newsection.railpoint[0].z),
|
||||
new THREE.Vector3(newsection.railpoint[1].x,newsection.railpoint[2].y,newsection.railpoint[1].z+0.0015),
|
||||
new THREE.Vector3(newsection.railpoint[1].x,newsection.railpoint[2].y,newsection.railpoint[1].z+0.0001),
|
||||
new THREE.Vector3(newsection.railpoint[2].x,newsection.railpoint[2].y,newsection.railpoint[2].z)
|
||||
] );
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ export function TdtList() {
|
||||
stopSections[sectionData[i].code] = sectionData[i];
|
||||
}
|
||||
}
|
||||
|
||||
console.log(stationData);
|
||||
for(let k in stationData){
|
||||
for(let i=0;i<stationData[k].stands.length;i++){
|
||||
let newmesh = object.clone(true);
|
||||
@ -32,15 +32,15 @@ export function TdtList() {
|
||||
|
||||
materialList[stationData[k].stands[i].code] = newmesh;
|
||||
let sectionCode = stationData[k].stands[i].section;
|
||||
|
||||
let pos = stationData[k].mesh.position;
|
||||
if(stationData[k].stands[i].right == true){
|
||||
newmesh.rotation.y = -Math.PI/2;
|
||||
let pos = railData[sectionCode].lineleft.getPointAt(stopSections[sectionCode].rightStopPointOffset/stopSections[sectionCode].lengthFact);
|
||||
newmesh.position.set(pos.x+10,0,pos.z-1.8);
|
||||
newmesh.position.set(pos.x+75,0,pos.z+14.8);
|
||||
|
||||
}else{
|
||||
newmesh.rotation.y = Math.PI/2;
|
||||
let pos = railData[sectionCode].lineright.getPointAt(stopSections[sectionCode].rightStopPointOffset/stopSections[sectionCode].lengthFact);
|
||||
newmesh.position.set(pos.x-10,0,pos.z+1.8);
|
||||
newmesh.position.set(pos.x-75,0,pos.z-14.8);
|
||||
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ class SkinCode extends defaultStyle {
|
||||
nameBackgroundBorderColor: '#C00808', // 限速值背景边框颜色
|
||||
limitValueDistance: 18,
|
||||
kilometerFontSize: 0, // 公里标大小
|
||||
nameAlone: true, // 只显示一个限速名称
|
||||
switchSectionNoShow: true, // 道岔区段不展示限速
|
||||
nameNumberFontSize: 11, // 限速值大小
|
||||
nameNumberColor: '#C00808', // 限速值颜色
|
||||
nameBackground: 'rgba(0,0,0,0)', // 限速名称背景颜色
|
||||
@ -177,6 +177,8 @@ class SkinCode extends defaultStyle {
|
||||
|
||||
this[deviceType.Signal] = {
|
||||
distance: 10, // 设备距离区段的距离
|
||||
highlightColor: '#00FFFF',
|
||||
highlightZ: 2,
|
||||
post: {
|
||||
standardShow: true, // 灯柱显示
|
||||
reblockHorColor: '#000080', // 信号机重复封锁灯柱颜色
|
||||
@ -601,6 +603,10 @@ class SkinCode extends defaultStyle {
|
||||
show: true, // 显示
|
||||
coverBlockColor: '#0010FF', // 遮挡物颜色
|
||||
preResetColor: '#FFBEC9' // 区段计轴预复位
|
||||
},
|
||||
limitNameText: { // 道岔限速值
|
||||
fillColor: '#C00808', // 填充颜色
|
||||
fontSize: 11 // 字体大小
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -241,7 +241,6 @@ class Jlmap {
|
||||
const rect = {x: 0, y: 0, width: Number(splitList[i]) + 5, height: opts.height};
|
||||
rectList.push(rect);
|
||||
}
|
||||
console.log(screenList, rectList);
|
||||
this.$painter.updateTransform1(screenList, rectList);
|
||||
}
|
||||
|
||||
@ -386,6 +385,7 @@ class Jlmap {
|
||||
}
|
||||
});
|
||||
this.$painter.$transformHandle.revisibleAll();
|
||||
this.$painter.$transformHandle.setStationFlag(stationCode);
|
||||
}
|
||||
showStationHandlePsd(oDevice, stationCode) {
|
||||
const standDevice = this.mapDevice[oDevice.standCode];
|
||||
|
@ -376,9 +376,14 @@ export default class ELines extends Group {
|
||||
this.crossSection && this.crossSection.setStyle(styles);
|
||||
}
|
||||
|
||||
setOrignalCross() {
|
||||
this.crossSection && this.crossSection.setStyle({lineWidth:0 });
|
||||
// fill:this.model.style.Section.cross.crossSection.fillColor
|
||||
setOrignalCross(isModifyFill = false) {
|
||||
if (this.crossSection) {
|
||||
if (isModifyFill) {
|
||||
this.crossSection.setStyle({lineWidth:0, fill:this.model.style.Section.cross.crossSection.fillColor });
|
||||
} else {
|
||||
this.crossSection.setStyle({lineWidth:0 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setCrossBlock() {
|
||||
|
@ -190,11 +190,12 @@ export default class Section extends Group {
|
||||
/** 封锁 06*/
|
||||
block(routeLock) {
|
||||
if (this.sectionMiddle && this.model.type !== '03' && this.style.Section.sectionMiddle && this.style.Section.sectionMiddle.blockColor) {
|
||||
this.sectionMiddle.setStyle({stroke: this.style.Section.line.blockColor});
|
||||
this.sectionMiddle.setStyle({stroke: this.style.Section.sectionMiddle.blockColor});
|
||||
this.sectionMiddle.show();
|
||||
routeLock && this.style.Section.line.routeBlockFlashing && this.sectionMiddle.animateStyle(true, [
|
||||
{ time: 0, styles: { stroke: this.style.Section.sectionMiddle.blockColor } },
|
||||
{ time: 500, styles: { stroke: this.style.backgroundColor } },
|
||||
{ time: 1000, styles: { stroke: this.style.Section.line.blockColor } }
|
||||
{ time: 1000, styles: { stroke: this.style.Section.sectionMiddle.blockColor } }
|
||||
]);
|
||||
} else if (this.model.type !== '03') {
|
||||
this.line && this.line.setStyle({
|
||||
@ -269,14 +270,11 @@ export default class Section extends Group {
|
||||
|
||||
/** 设置限速*/
|
||||
setSpeedUpperLimit(speedUpLimit) {
|
||||
if (this.style.Section.line.speedLimitColor) { // 宁波三号线 独有
|
||||
if (this.style.Section.speedLimitName && this.style.Section.speedLimitName.switchSectionNoShow && this.model.type == '03') {
|
||||
// 南京二号线 岔区设限 在道岔下显示
|
||||
return;
|
||||
} else if (this.style.Section.line.speedLimitColor) { // 宁波三号线 独有
|
||||
this.line.setStyle({stroke: this.style.Section.line.speedLimitColor});
|
||||
} else if (this.style.Section.speedLimitName && this.style.Section.speedLimitName.nameAlone && this.model.type == '03') { // 南京2,道岔区段只显示一个名称
|
||||
const switchModel = Vue.prototype.$jlmap.mapDevice[this.model.relSwitchCode];
|
||||
if (switchModel && switchModel.sectionACode == this._code) {
|
||||
this.speedLimit && this.speedLimit.show();
|
||||
this.speedLimitName && this.speedLimitName.show(speedUpLimit);
|
||||
}
|
||||
} else if (this.style.Section.cross && this.model.type == '05') {
|
||||
this.line.setCrossSpeedUpperLimit(speedUpLimit);
|
||||
} else {
|
||||
@ -390,6 +388,7 @@ export default class Section extends Group {
|
||||
const sectionSwitch = store.getters['map/getDeviceByCode'](model.switch.code);
|
||||
if (sectionSwitch && sectionSwitch.sectionACode === model.code) {
|
||||
sectionSwitch.instance && sectionSwitch.instance.setState(sectionSwitch);
|
||||
sectionSwitch.instance && sectionSwitch.instance.setLimitState(model.speedUpLimit > 0, model.speedUpLimit);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -424,7 +423,7 @@ export default class Section extends Group {
|
||||
this.on('mouseout', () => { // 移出
|
||||
if (!this.selectedType && !this.selected && this.line ) {
|
||||
this.line.setStyle({ stroke: this.style.Section.line.spareColor, lineWidth: this.style.Section.line.width });
|
||||
this.line.setOrignalCross();
|
||||
this.line.setOrignalCross(true);
|
||||
}
|
||||
if (this.style.Switch.sectionAction.flag && this.model.relSwitchCode) {
|
||||
const switchModel = Vue.prototype.$jlmap.mapDevice[this.model.relSwitchCode];
|
||||
@ -456,7 +455,7 @@ export default class Section extends Group {
|
||||
} else {
|
||||
this.lineBorder && this.lineBorder.setStyle({ lineWidth: 0 });
|
||||
!this.selectedType && this.setState(this.model);
|
||||
this.line.setOrignalCross();
|
||||
this.line.setOrignalCross(false);
|
||||
}
|
||||
}
|
||||
drawBatchSelected(selected, type) {
|
||||
|
44
src/jmapNew/shape/Switch/ELimitName.js
Normal file
44
src/jmapNew/shape/Switch/ELimitName.js
Normal file
@ -0,0 +1,44 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
|
||||
class ESwName extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
|
||||
this.limitNameText = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 6,
|
||||
style: {
|
||||
x: model.nameTextX,
|
||||
y: model.nameTextY,
|
||||
fontWeight: style.Switch.text.fontWeight,
|
||||
fontSize: model.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: '0',
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: 'middle',
|
||||
textFill: model.fillColor
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.limitNameText);
|
||||
this.limitNameText.hide();
|
||||
}
|
||||
|
||||
limitNameShow(text) {
|
||||
this.limitNameText.show();
|
||||
this.limitNameText.setStyle({ text: text });
|
||||
}
|
||||
limitNameHide() {
|
||||
this.limitNameText.hide();
|
||||
}
|
||||
}
|
||||
|
||||
export default ESwName;
|
@ -3,6 +3,7 @@ import Text from 'zrender/src/graphic/Text';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import JTriangle from '../../utils/JTriangle';
|
||||
import ESwName from './ESwName.js';
|
||||
import ELimitName from './ELimitName.js';
|
||||
import ESwLocal from './ESwLocal.js';
|
||||
import ESwLnversion from './ESwLnversion';
|
||||
import ELockRect from './ELockRect';
|
||||
@ -167,6 +168,20 @@ export default class Switch extends Group {
|
||||
nameShow: style.Switch.text.show,
|
||||
triangle: this.triangle
|
||||
});
|
||||
if (this.style.Switch.limitNameText) { // 道岔限速
|
||||
const limitTextX = model.intersection.x + directx * (style.Section.line.width * 3 + style.Switch.text.offset.x) * this.triangle.getCotRate();
|
||||
const limitTextY = model.intersection.y - style.Switch.text.offset.y * directy;
|
||||
this.limitName = new ELimitName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
fillColor: style.Switch.limitNameText.fillColor,
|
||||
fontSize: style.Switch.limitNameText.fontSize,
|
||||
nameTextX: limitTextX,
|
||||
nameTextY: limitTextY
|
||||
});
|
||||
this.add(this.limitName);
|
||||
}
|
||||
|
||||
this.enabledName = new Text({ // 道岔使能 E 西安二号线独有
|
||||
zlevel: this.zlevel,
|
||||
@ -572,7 +587,14 @@ export default class Switch extends Group {
|
||||
section.show();
|
||||
}
|
||||
if (sectionModel.cutOff) {
|
||||
section.hide();
|
||||
const lineWidth = sectionModel.instance.line.section.style.lineWidth;
|
||||
section && section.animateStyle(item => {
|
||||
let an = item.animateStyle(true);
|
||||
an = an.when(0, {lineWidth: lineWidth});
|
||||
an = an.when(1000, {stroke: this.style.backgroundColor});
|
||||
an = an.when(2000, {lineWidth: lineWidth});
|
||||
an.start();
|
||||
});
|
||||
}
|
||||
}
|
||||
setAshShow() {
|
||||
@ -629,7 +651,13 @@ export default class Switch extends Group {
|
||||
}
|
||||
model.noStatus && this.setAshShow();
|
||||
}
|
||||
|
||||
setLimitState(flag, limitValue) {
|
||||
if (flag) {
|
||||
this.limitName && this.limitName.limitNameShow(limitValue);
|
||||
} else {
|
||||
this.limitName && this.limitName.limitNameHide();
|
||||
}
|
||||
}
|
||||
getBoundingRect() {
|
||||
return this.name.getBoundingRect();
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ class EHighlight extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.style = device.style;
|
||||
this.selected = false;
|
||||
this.create();
|
||||
}
|
||||
@ -13,11 +14,19 @@ class EHighlight extends Group {
|
||||
let fill = 'rgba(0,255,255,0.6)';
|
||||
if (this.device._type === 'Psd') {
|
||||
fill = 'rgba(255,0,0,0.6)';
|
||||
} else if (this.device._type === 'Signal' && this.style.Signal.highlightColor) {
|
||||
fill = this.style.Signal.highlightColor;
|
||||
}
|
||||
let z = this.device.z + 1;
|
||||
if (this.device._type === 'StationStand') {
|
||||
z = this.device.z + 3;
|
||||
} else if (this.device._type === 'Signal' && this.style.Signal.highlightZ) {
|
||||
z = this.style.Signal.highlightZ;
|
||||
}
|
||||
const rect = this.device.getBoundingRect();
|
||||
this.lineBorder = new Rect({
|
||||
zlevel: this.device.zlevel,
|
||||
z: this.device._type === 'StationStand' ? this.device.z + 3 : this.device.z + 1,
|
||||
z: z,
|
||||
shape: rect,
|
||||
style: {
|
||||
fill: fill
|
||||
|
@ -119,7 +119,7 @@ export default {
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'END_SIGNAL' }
|
||||
]
|
||||
},
|
||||
|
||||
/** 暂不生成实训 */
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -136,6 +136,7 @@ export default {
|
||||
{ deviceType: '04', orderNum: 4, operateCode: '3082', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
/** 暂不生成实训 */
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -186,14 +187,13 @@ export default {
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '总取消({3} 进路)',
|
||||
trainingRemark: '总取消功能',
|
||||
trainingName: '取消进路({3} 进路)',
|
||||
trainingRemark: '取消进路功能(总取消)',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{ // 不生成实训
|
||||
@ -245,7 +245,7 @@ export default {
|
||||
minDuration: 5,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号重开({3} 进路)',
|
||||
trainingName: '信号重开({5})',
|
||||
trainingRemark: '信号重开功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
@ -339,7 +339,9 @@ export default {
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3140', tip: '鼠标左键点击【人工控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3140', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{onlySignalOP:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
@ -368,7 +370,8 @@ export default {
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3150', tip: '鼠标左键点击【自动控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3150', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
],
|
||||
config:{onlySignalOP:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
|
@ -91,7 +91,6 @@ export default {
|
||||
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
|
||||
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
|
||||
pointdata.color = '#000' || lineStyle.color;
|
||||
// pointdata.directionCode = train.directionCode;
|
||||
pointdata.directionCode = train.right ? '2' : '1';
|
||||
if (!store.state.map.mapConfig.upRight) {
|
||||
pointdata.directionCode = train.right ? '1' : '2';
|
||||
@ -110,7 +109,6 @@ export default {
|
||||
if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
|
||||
index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
|
||||
index > 0 && index < train.stationTimeList.length - 1) {
|
||||
// ${train.directionCode}
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
|
||||
}
|
||||
@ -121,7 +119,6 @@ export default {
|
||||
lastPoint = train.stationTimeList[idx - 1];
|
||||
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
|
||||
num = this.computedReentryNumber(train.tripNumber);
|
||||
// ${train.directionCode}
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]);
|
||||
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]);
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-bar v-if="$store.state.training.prdType === '01' || $store.state.training.prdType === '02'" ref="menuBar" :selected="selected" />
|
||||
<menu-bar v-if="$store.state.training.prdType === '01' || $store.state.training.prdType === '02'" ref="menuBar" :selected="selected" :loginActive="loginActive" @login="login" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<menu-button v-if="isShowButton" ref="menuButton" :selected="selected" />
|
||||
<menu-button v-if="isShowButton" ref="menuButton" :selected="selected" :loginActive="loginActive" :inputStr="inputStr" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" pop-class="haerbin-01__systerm" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
@ -50,7 +50,13 @@ export default {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loginActive: false,
|
||||
inputStr: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('config', [
|
||||
'width'
|
||||
@ -68,7 +74,13 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('config/updateMenuBar');
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
login(inputStr) {
|
||||
this.loginActive = !!inputStr
|
||||
this.inputStr = inputStr;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -3,13 +3,12 @@
|
||||
<div class="haerbin-01__systerm nav">
|
||||
<el-row v-if="$store.state.training.prdType === '01'">
|
||||
<el-col :span="2">
|
||||
<div class="nav-border">
|
||||
<div class="nav-border login">
|
||||
<el-row>
|
||||
<el-button v-if="loginActive" style="width: 100px;line-height: 19px;" plain @click="login">{{ loginText }}</el-button>
|
||||
<div v-else class="loginClass" style="width: 100px;height:20px;text-align:center;border:1px #ccc solid">{{ loginText }}</div>
|
||||
<el-button style="width: 100px;line-height: 19px;" plain @click="login">{{ loginText }}</el-button>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<input v-model="loginParam" :type="modelType" style="width: 100px;height:20px;" :disabled="loginActive" @keyup.enter="validateData">
|
||||
<input v-model="inputStr" :type="modelType" style="width: 100px;height:20px;" :disabled="isLogin||this.loginText == '登录'" @keyup.enter="validateData">
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
@ -17,16 +16,16 @@
|
||||
<el-row>
|
||||
<template v-for="(item, index) in centralizedStationList1">
|
||||
<el-col :key="index" :span="colsNum">
|
||||
<el-button v-if="stationCode === item.code" class="fake-button-active" @click="switchShowStation(item.code)">{{ item.name }}</el-button>
|
||||
<el-button v-else class="fake-button" @click="switchShowStation(item.code)">{{ item.name }}</el-button>
|
||||
<el-button v-if="stationCode === item.code" class="fake-button-active" @click="interceptLogin(switchShowStation)(item.code)">{{ item.name }}</el-button>
|
||||
<el-button v-else :class="isLogin? 'fake-button':'fake-button-disabled'" @click="interceptLogin(switchShowStation)(item.code)">{{ item.name }}</el-button>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<template v-for="(item, index) in centralizedStationList2">
|
||||
<el-col :key="index" :span="colsNum">
|
||||
<el-button v-if="stationCode === item.code" class="fake-button-active" @click="switchShowStation(item.code)">{{ item.name }}</el-button>
|
||||
<el-button v-else class="fake-button" @click="switchShowStation(item.code)">{{ item.name }}</el-button>
|
||||
<el-button v-if="stationCode === item.code" class="fake-button-active" @click="interceptLogin(switchShowStation)(item.code)">{{ item.name }}</el-button>
|
||||
<el-button v-else :class="isLogin? 'fake-button':'fake-button-disabled'" @click="interceptLogin(switchShowStation)(item.code)">{{ item.name }}</el-button>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
@ -34,16 +33,16 @@
|
||||
<el-col :span="10">
|
||||
<div class="nav-border">
|
||||
<el-row>
|
||||
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelA || isNoConfirmLevelA?'#FFF':'#DDD' }" plain :class="{'headerBox' :isNoConfirmLevelA}" @click="showLowAlarm('A')">A级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelB || isNoConfirmLevelB?'#FFF':'#DDD' }" plain :class="{'headerBox' :isNoConfirmLevelB}" @click="showLowAlarm('B')">B级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelC?'#FFF':'#DDD' }" plain>C级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">记录</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelA || isNoConfirmLevelA?'#FFF':'#DDD' }" plain :class="{'headerBox' :isNoConfirmLevelA, 'fake-button-disabled': !isLogin}" @click="interceptLogin(showLowAlarm)('A')">A级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelB || isNoConfirmLevelB?'#FFF':'#DDD' }" plain :class="{'headerBox' :isNoConfirmLevelB, 'fake-button-disabled': !isLogin}" @click="interceptLogin(showLowAlarm)('B')">B级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelC?'#FFF':'#DDD' }" :class="{'fake-button-disabled': !isLogin}" plain>C级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="interceptLogin(undeveloped)()" :class="{'fake-button-disabled': !isLogin}">记录</el-button></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="controlAudio(false)">声音</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">双屏</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">TGI</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">管理</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="interceptLogin(controlAudio)(false)" :class="{'fake-button-disabled': !isLogin}">声音</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="interceptLogin(undeveloped)()" :class="{'fake-button-disabled': !isLogin}">双屏</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="interceptLogin(undeveloped)()" :class="{'fake-button-disabled': !isLogin}">TGI</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="interceptLogin(undeveloped)()" :class="{'fake-button-disabled': !isLogin}">管理</el-button></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
@ -170,15 +169,21 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
loginActive: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loginActive:true,
|
||||
loginText:'登录',
|
||||
modelType:'text',
|
||||
modelType:'text',
|
||||
inputStr: '',
|
||||
station: {},
|
||||
keydownTimes:0,
|
||||
loginParam:'',
|
||||
classA: -1,
|
||||
classB: -1,
|
||||
tempClassA: -1,
|
||||
@ -236,7 +241,10 @@ export default {
|
||||
},
|
||||
isNoRecoverLevelC() {
|
||||
return this.confirmNoRecoverMapCString !== '{}';
|
||||
}
|
||||
},
|
||||
isLogin() {
|
||||
return this.loginActive
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
tempClassA() {
|
||||
@ -321,6 +329,13 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
interceptLogin(cb) {
|
||||
return (args) => {
|
||||
if (this.isLogin) {
|
||||
cb(args)
|
||||
}
|
||||
}
|
||||
},
|
||||
handleAlarm(val) {
|
||||
if (val.level === 'A' || val.level === 'B') {
|
||||
this.controlAudio(true);
|
||||
@ -357,9 +372,9 @@ export default {
|
||||
}
|
||||
},
|
||||
switchShowStation(stationCode) {
|
||||
this.stationCode = stationCode;
|
||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', stationCode);
|
||||
this.stationCode = stationCode;
|
||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', stationCode);
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
@ -373,27 +388,32 @@ export default {
|
||||
this.$refs.logDetail.doShow();
|
||||
},
|
||||
login() {
|
||||
if (this.loginActive) {
|
||||
if (this.loginText === '退出') {
|
||||
this.loginText = '登录';
|
||||
} else {
|
||||
this.loginText = '用户';
|
||||
this.loginActive = false;
|
||||
}
|
||||
}
|
||||
const mapText = {
|
||||
'注销': '登录',
|
||||
'登录': '名称',
|
||||
}
|
||||
this.loginText = mapText[this.loginText]||this.loginText;
|
||||
this.inputStr = '';
|
||||
this.$emit('login', '');
|
||||
},
|
||||
validateData() {
|
||||
if (this.keydownTimes === 0 && this.loginParam == 'admin') {
|
||||
this.loginText = '密码';
|
||||
this.modelType = 'password';
|
||||
this.keydownTimes++;
|
||||
this.loginParam = '';
|
||||
} else if (this.keydownTimes === 1 && this.loginParam == '123456') {
|
||||
this.loginText = '退出';
|
||||
if (this.keydownTimes === 0) {
|
||||
const station = this.stationList.find(el => el.depot ? false: el.jp == this.inputStr );
|
||||
if (station) {
|
||||
this.loginText = '密码';
|
||||
this.modelType = 'password';
|
||||
this.inputStr = '';
|
||||
this.$emit('login', '');
|
||||
this.keydownTimes++;
|
||||
this.station = station;
|
||||
}
|
||||
} else if (this.keydownTimes === 1 && this.inputStr == '123456') {
|
||||
this.loginText = '注销';
|
||||
this.keydownTimes = 0;
|
||||
this.loginParam = '';
|
||||
this.modelType = 'text';
|
||||
this.loginActive = true;
|
||||
this.modelType = 'text';
|
||||
this.inputStr = this.station.jp;
|
||||
this.$emit('login', this.inputStr);
|
||||
EventBus.$emit('switchStationMode', this.station.code);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
@ -412,21 +432,21 @@ export default {
|
||||
this.$refs.alarmTableHmi.doShow(level);
|
||||
},
|
||||
showLowAlarm(level) {
|
||||
this.$refs.alarmTableLow.doShow(level);
|
||||
this.$refs.alarmTableLow.doShow(level);
|
||||
},
|
||||
trainControlShow() {
|
||||
this.$refs.trainControl.doShow();
|
||||
},
|
||||
controlAudio(val) {
|
||||
const audio = document.getElementById('buzzer');
|
||||
this.sound = val;
|
||||
if (audio !== null) {
|
||||
if (val) {
|
||||
audio.play();
|
||||
} else if (val === false) {
|
||||
audio.pause();
|
||||
}
|
||||
}
|
||||
const audio = document.getElementById('buzzer');
|
||||
this.sound = val;
|
||||
if (audio !== null) {
|
||||
if (val) {
|
||||
audio.play();
|
||||
} else if (val === false) {
|
||||
audio.pause();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -442,10 +462,17 @@ export default {
|
||||
$menuItemPadding: 5px;
|
||||
|
||||
#menuBar {
|
||||
z-index: 16;
|
||||
z-index: 37;
|
||||
position: absolute;
|
||||
width: inherit;
|
||||
}
|
||||
|
||||
.login {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.nav-border {
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
@ -570,6 +597,29 @@ export default {
|
||||
background: #DDD;
|
||||
margin: 5px auto;
|
||||
}
|
||||
|
||||
.fake-button-disabled {
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
padding: 0px;
|
||||
width: 80px;
|
||||
border: 1px solid #1F313F !important;
|
||||
font-size: 12px;
|
||||
border-radius: 1px !important;
|
||||
color: #8f8f8f !important;
|
||||
background: #DDD im !important;
|
||||
margin: 5px auto;
|
||||
cursor: not-allowed;
|
||||
&:hover {
|
||||
color: #8f8f8f !important;
|
||||
background: #DDD im !important;
|
||||
}
|
||||
&:disabled {
|
||||
color: #8f8f8f !important;
|
||||
background: #DDD im !important;
|
||||
}
|
||||
}
|
||||
|
||||
.fake-button-active{
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
|
@ -34,8 +34,8 @@
|
||||
<template v-for="(item, index) in centralizedStationList">
|
||||
<div :key="index" class="nav-border-row row-width-box flex-row">
|
||||
<div v-if="item.name && (item.disabled || !item.cmdType)" :id="item.operate.domId" class="fake-button-disabled">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button-active': 'fake-button-disabled']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button': 'fake-button-disabled', (stationContorl.controlMode != item.mode || item.mode == 'None') && item.next && paramIndex == index ? 'active': '']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[isLogin && (stationContorl.controlMode != item.mode || item.mode == 'None')? 'fake-button-active': 'fake-button-disabled']" @click="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand" :id="item.operate.domId" :class="[isLogin && (stationContorl.controlMode != item.mode || item.mode == 'None')? 'fake-button': 'fake-button-disabled', (stationContorl.controlMode != item.mode || item.mode == 'None') && item.next && paramIndex == index ? 'active': '']" @click="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button-grayk" />
|
||||
</div>
|
||||
</template>
|
||||
@ -45,11 +45,11 @@
|
||||
<el-col v-if="!trainOperationShow" :span="10">
|
||||
<div class="nav-border">
|
||||
<div class="nav-border-top">
|
||||
<el-button :id="commandId" class="fl" :class="{'disabled': canCommand || secondConfirm}" style="line-height: 18px; margin-top: 4px;" plain :disabled="canCommand || secondConfirm" @click="command">执行</el-button>
|
||||
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain @click="cancle">取消</el-button>
|
||||
<el-button :id="commandId" class="fl" :class="{'disabled': !isLogin||canCommand||secondConfirm}" style="line-height: 18px; margin-top: 4px;" plain :disabled="!isLogin||canCommand||secondConfirm" @click="interceptLogin(command)()">执行</el-button>
|
||||
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain :class="{'disabled': !isLogin}" :disabled="!isLogin" @click="interceptLogin(cancle)()">取消</el-button>
|
||||
</div>
|
||||
<div class="el-print">
|
||||
<div v-for="(el,i) in tempData" :key="i" class="selected-row" :class="{'active' : route&&el.code===route.code}" @click="selectRouteParam(el.code)">
|
||||
<div v-for="(el,i) in tempData" :key="i" class="selected-row" :class="{'active' : route&&el.code===route.code}" @click="interceptLogin(selectRouteParam)(el.code)">
|
||||
{{ el.name }}
|
||||
</div>
|
||||
</div>
|
||||
@ -105,9 +105,9 @@
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="nav-border flex-box">
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain @click="changeShowMode(false)">联锁操作</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain>时刻表操作</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain @click="changeShowMode(true)">ATS操作</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin" @click="interceptLogin(changeShowMode)(false)">联锁操作</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin">时刻表操作</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin" @click="interceptLogin(changeShowMode)(true)">ATS操作</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -157,8 +157,8 @@
|
||||
<template v-for="(item, index) in centralizedStationList">
|
||||
<div :key="index" class="nav-border-row row-width-box flex-row">
|
||||
<div v-if="item.name && (item.disabled || !item.cmdType)" :id="item.operate.domId" class="fake-button-disabled">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button-active': 'fake-button-disabled']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button': 'fake-button-disabled', (stationContorl.controlMode != item.mode || item.mode == 'None') && item.next && paramIndex == index ? 'active': '']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[(isLogin && stationContorl.controlMode != item.mode || item.mode == 'None')? 'fake-button-active': 'fake-button-disabled']" @click="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand" :id="item.operate.domId" :class="[isLogin && (stationContorl.controlMode != item.mode || item.mode == 'None')? 'fake-button': 'fake-button-disabled', (stationContorl.controlMode != item.mode || item.mode == 'None') && item.next && paramIndex == index ? 'active': '']" @click="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button-grayk" />
|
||||
</div>
|
||||
</template>
|
||||
@ -166,8 +166,8 @@
|
||||
</template>
|
||||
</div>
|
||||
<div class="separator">
|
||||
<el-button :id="commandId" class="fl" :class="{'disabled': canCommand || secondConfirm}" style="line-height: 18px; margin-top: 4px;" plain :disabled="canCommand || secondConfirm" @click="command">执行</el-button>
|
||||
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain @click="cancle">取消</el-button>
|
||||
<el-button :id="commandId" class="fl" :class="{'disabled': !isLogin || canCommand || secondConfirm}" style="line-height: 18px; margin-top: 4px;" plain :disabled="!isLogin || canCommand || secondConfirm" @click="interceptLogin(command)()">执行</el-button>
|
||||
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain :class="{'disabled': !isLogin}" :disabled="!isLogin" @click="interceptLogin(cancle)()">取消</el-button>
|
||||
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain @click="handleClose">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -208,8 +208,8 @@
|
||||
<template v-for="(item, index) in centralizedStationList">
|
||||
<div :key="index" class="nav-border-row row-width-box flex-row">
|
||||
<div v-if="item.name && (item.disabled || !item.cmdType)" :id="item.operate.domId" class="fake-button-disabled">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button-active': 'fake-button-disabled']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button': 'fake-button-disabled', (stationContorl.controlMode != item.mode || item.mode == 'None') && item.next && paramIndex == index ? 'active': '']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button-active': 'fake-button-disabled']" @click="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button': 'fake-button-disabled', (stationContorl.controlMode != item.mode || item.mode == 'None') && item.next && paramIndex == index ? 'active': '']" @click="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button-grayk" />
|
||||
</div>
|
||||
</template>
|
||||
@ -237,6 +237,16 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
loginActive: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
inputStr: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -317,20 +327,20 @@ export default {
|
||||
cr2ConfirmId() {
|
||||
return OperationEvent.Command.commandHaerbin.confrimCr2.domId;
|
||||
},
|
||||
stationContorl() {
|
||||
return this.getStationControl(this.selectedObj || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {};
|
||||
},
|
||||
isLocal() {
|
||||
return this.$store.state.training.prdType == '01';
|
||||
},
|
||||
stationContorl() {
|
||||
return this.getStationControl(this.selected || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {};
|
||||
isLogin() {
|
||||
return this.isLocal ? this.loginActive && this.checkBelongCentralizedStationByInputStr(this.inputStr, this.stationContorl) : true;
|
||||
},
|
||||
menuPosition() {
|
||||
return this.$store.state.menuOperation.menuPosition;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.setMenuChangeCount': function (val) {
|
||||
|
||||
},
|
||||
'$store.state.training.prdType': function (val) {
|
||||
this.trainOperationShow = false;
|
||||
this.initMenus();
|
||||
@ -340,8 +350,8 @@ export default {
|
||||
if (!val) {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
'selected': function (val) {
|
||||
},
|
||||
'selected': function (val) {
|
||||
this.initMenus();// 初始化菜单数据
|
||||
this.pushTempData([]); // 清空执行栏
|
||||
this.selectedObj = this.selected;
|
||||
@ -375,14 +385,13 @@ export default {
|
||||
}
|
||||
},
|
||||
'$store.state.map.showCentralizedStationCode': function(val) {
|
||||
this.cancle();
|
||||
if (!this.oldSelected) {
|
||||
this.handleBasicMenu();
|
||||
}
|
||||
},
|
||||
'$store.state.map.mapStationStateUpdateCount': function() {
|
||||
if (!this.selected || !this.selected.code) {
|
||||
this.handleBasicMenu();
|
||||
}
|
||||
this.initCentralizedStationList([...this.centralizedStationList])
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -390,6 +399,29 @@ export default {
|
||||
this.handleBasicMenu();
|
||||
},
|
||||
methods: {
|
||||
initCentralizedStationList(list, selectedObj=this.selectedObj) {
|
||||
const stationContorl = this.getStationControl(selectedObj || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {};
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
list.forEach((el, index) => {
|
||||
if (el.disabledCb && stationContorl) {
|
||||
el.disabled = el.disabledCb(stationContorl);
|
||||
}
|
||||
this.centralizedStationList[index] = el;
|
||||
});
|
||||
},
|
||||
checkBelongCentralizedStationByInputStr(inputStr, station) {
|
||||
const child= this.stationList.find(el => el.depot ? false : el.jp == inputStr );
|
||||
if (child && station) {
|
||||
return station.code == child.code || station.chargeStationCodeList && station.chargeStationCodeList.includes(child.code);
|
||||
}
|
||||
},
|
||||
interceptLogin(cb) {
|
||||
return (args) => {
|
||||
if (this.isLogin) {
|
||||
cb(args);
|
||||
}
|
||||
};
|
||||
},
|
||||
// 高亮设备
|
||||
deviceHighLight(device, flag) {
|
||||
if (device && device.instance && typeof device.instance.drawSelected === 'function' ) {
|
||||
@ -438,7 +470,10 @@ export default {
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selectedObj, true);
|
||||
this.oldDevice = this.selectedObj;
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
this.handleBasicMenu();
|
||||
break;
|
||||
}
|
||||
},
|
||||
handleIbpShow() {
|
||||
@ -501,13 +536,7 @@ export default {
|
||||
});
|
||||
this.oldDevice = section;
|
||||
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.switchParamList.forEach((swicth, index) => {
|
||||
this.centralizedStationList[index] = swicth;
|
||||
if (swicth.disabledCb && this.selectedObj) {
|
||||
swicth.disabled = swicth.disabledCb(this.selectedObj);
|
||||
}
|
||||
});
|
||||
this.initCentralizedStationList(this.switchParamList);
|
||||
this.pushTempData([this.selectedObj]);
|
||||
this.param = {
|
||||
switchCode: this.selectedObj.code,
|
||||
@ -522,16 +551,8 @@ export default {
|
||||
this.deviceHighLight(this.oldClickObj, false);
|
||||
}
|
||||
|
||||
this.oldClickObj = deepAssign({}, this.selectedObj);
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.signalParamList.forEach((singal, index) => {
|
||||
if (singal.disabledCb && this.selectedObj) {
|
||||
singal.disabled = singal.disabledCb(this.selectedObj);
|
||||
}
|
||||
|
||||
this.centralizedStationList[index] = singal;
|
||||
});
|
||||
|
||||
this.oldClickObj = deepAssign({}, this.selectedObj);
|
||||
this.initCentralizedStationList(this.signalParamList);
|
||||
this.pushTempData([this.selectedObj]);
|
||||
this.param = {
|
||||
signalCode: this.selectedObj.code
|
||||
@ -540,16 +561,9 @@ export default {
|
||||
handleSectionMenu() {
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selectedObj, true);
|
||||
this.oldDevice = this.selectedObj;
|
||||
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.sectionParamList.forEach((section, index) => {
|
||||
this.centralizedStationList[index] = section;
|
||||
if (section.disabledCb && this.selectedObj) {
|
||||
section.disabled = section.disabledCb(this.selectedObj);
|
||||
}
|
||||
});
|
||||
this.oldClickObj = deepAssign({}, this.selectedObj);
|
||||
|
||||
this.initCentralizedStationList(this.sectionParamList);
|
||||
this.pushTempData([this.selectedObj]);
|
||||
this.param = {
|
||||
sectionCode: this.selectedObj.code
|
||||
@ -560,17 +574,10 @@ export default {
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
if (this.oldClickObj) {
|
||||
this.deviceHighLight(this.oldClickObj, false);
|
||||
}
|
||||
this.oldClickObj = null; // 清空上次点击信号机
|
||||
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.basicParamList.forEach((basic, index) => {
|
||||
this.centralizedStationList[index] = basic;
|
||||
if (basic.disabledCb && station) {
|
||||
basic.disabled = basic.disabledCb(station);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.oldClickObj = null; // 清空上次点击信号机
|
||||
this.initCentralizedStationList(this.basicParamList, station);
|
||||
this.pushTempData(station ? [station] : []);
|
||||
|
||||
this.param = {
|
||||
@ -579,14 +586,7 @@ export default {
|
||||
};
|
||||
},
|
||||
handleStationMenu() {
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.stationParamList.forEach((station, index) => {
|
||||
this.centralizedStationList[index] = station;
|
||||
if (station.disabledCb && this.selectedObj) {
|
||||
station.disabled = station.disabledCb(this.selectedObj);
|
||||
}
|
||||
});
|
||||
|
||||
this.initCentralizedStationList(this.stationParamList);
|
||||
this.pushTempData([this.selectedObj]);
|
||||
this.param = { stationCode: this.selectedObj.code };
|
||||
},
|
||||
@ -595,15 +595,9 @@ export default {
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selectedObj, true);
|
||||
this.oldDevice = this.selectedObj;
|
||||
}
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.standParamList.forEach((stand, index) => {
|
||||
this.centralizedStationList[index] = stand;
|
||||
if (stand.disabledCb && this.selectedObj) {
|
||||
stand.disabled = stand.disabledCb(this.selectedObj);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.initCentralizedStationList(this.standParamList);
|
||||
const data = Object.assign(this.selectedObj);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](this.selectedObj.stationCode);
|
||||
data.name = `${station.name} ${data.right ? '上行' : '下行'}`;
|
||||
@ -612,14 +606,8 @@ export default {
|
||||
standCode: this.selectedObj.code
|
||||
};
|
||||
},
|
||||
handleRouteMenu() { // 进路命令覆盖
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.routeParamList.forEach((swicth, index) => {
|
||||
this.centralizedStationList[index] = swicth;
|
||||
if (swicth.disabledCb && this.selectedObj) {
|
||||
swicth.disabled = swicth.disabledCb(this.selectedObj);
|
||||
}
|
||||
});
|
||||
handleRouteMenu() { // 进路命令覆盖
|
||||
this.initCentralizedStationList(this.routeParamList);
|
||||
if (this.selectedObj._event === MouseEvent.Right) {
|
||||
this.rightClickDialogVisible = true;
|
||||
}
|
||||
@ -792,13 +780,15 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.pushTempData([{ name: `${this.cmdType.label}成功` }]);
|
||||
this.doClose();
|
||||
this.doClose();
|
||||
this.handleDeviceMenu();
|
||||
this.handleClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.pushTempData([{ name: `${this.cmdType.label}失败` }]);
|
||||
this.doClose();
|
||||
this.doClose();
|
||||
this.handleDeviceMenu();
|
||||
this.handleClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
@ -818,9 +808,8 @@ export default {
|
||||
this.operate = ''; // 清空指令
|
||||
this.cmdType = '';
|
||||
this.securityCommand = '';
|
||||
// this.speedLimitValue = 15;
|
||||
this.speedLimitValue = '';
|
||||
this.secondConfirm = false;
|
||||
this.secondConfirm = false;
|
||||
this.cr1Confrim = false;
|
||||
if (this.oldClickObj) {
|
||||
this.deviceHighLight(this.oldClickObj, false);
|
||||
@ -833,6 +822,7 @@ export default {
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
handleClose() {
|
||||
this.secondConfirm = false;
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
handleStationClose() {
|
||||
@ -960,14 +950,14 @@ export default {
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, securityCommand: true, disabledCb: (selectedObj) => ['Local'].includes(selectedObj.controlMode) },
|
||||
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, disabledCb: (selectedObj) => ['Local'].includes(selectedObj.controlMode) },
|
||||
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (selectedObj) => ['Center'].includes(selectedObj.controlMode) },
|
||||
{ name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, securityCommand: true, disabledCb: (stationControl) => ['Local'].includes(stationControl.controlMode) },
|
||||
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, disabledCb: (stationControl) => ['Local'].includes(stationControl.controlMode) },
|
||||
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (stationControl) => ['Center'].includes(stationControl.controlMode) },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '关闭索引', cmdType: '', operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (selectedObj) => ['None'].includes(selectedObj.controlMode) }
|
||||
{ name: '关闭索引', cmdType: '', operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (stationControl) => ['None'].includes(stationControl.controlMode) }
|
||||
] : [
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
@ -986,79 +976,79 @@ export default {
|
||||
{ name: '' }
|
||||
];
|
||||
this.sectionParamList = this.selected && this.selected.type == '05' ? [
|
||||
{ name: '岔芯设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '岔芯消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '强行消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '预复位', cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '封锁岔心', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '解封岔心', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '强解岔心', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }
|
||||
{ name: '岔芯设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '岔芯消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '强行消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '预复位', cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '封锁岔心', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '解封岔心', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '强解岔心', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
|
||||
] : [
|
||||
{ name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '强行消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '预复位', cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '解封区段', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }
|
||||
{ name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '强行消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '预复位', cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '解封区段', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
|
||||
];
|
||||
this.switchParamList = [
|
||||
{ name: '岔区设限', cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED, operate: OperationEvent.Switch.setSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch},
|
||||
{ name: '岔区消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '转换道岔', cmdType: CMD.Switch.CMD_SWITCH_TURN, operate: OperationEvent.Switch.locate.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '强行转岔', cmdType: CMD.Switch.CMD_SWITCH_FORCE_TURN, operate: OperationEvent.Switch.locate.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '强解道岔', cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '挤岔恢复', cmdType: CMD.Switch.CMD_SWITCH_SQUEEZE_RECOVERY, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch || selectedObj.fault !== 'SQUEEZE' },
|
||||
{ name: '单独锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '取消锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, operate: OperationEvent.Switch.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '预复位', cmdType: CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET, operate: OperationEvent.Switch.axlePreReset.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '封锁道岔', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '解封道岔', cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK, operate: OperationEvent.Switch.unblock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '强行消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }
|
||||
{ name: '岔区设限', cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED, operate: OperationEvent.Switch.setSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch},
|
||||
{ name: '岔区消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '转换道岔', cmdType: CMD.Switch.CMD_SWITCH_TURN, operate: OperationEvent.Switch.locate.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '强行转岔', cmdType: CMD.Switch.CMD_SWITCH_FORCE_TURN, operate: OperationEvent.Switch.locate.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '强解道岔', cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '挤岔恢复', cmdType: CMD.Switch.CMD_SWITCH_SQUEEZE_RECOVERY, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '单独锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '取消锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, operate: OperationEvent.Switch.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '预复位', cmdType: CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET, operate: OperationEvent.Switch.axlePreReset.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '封锁道岔', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '解封道岔', cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK, operate: OperationEvent.Switch.unblock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '强行消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
|
||||
];
|
||||
this.signalParamList = this.$store.state.training.prdType === '01' ? [
|
||||
{ name: '关闭信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '开放信号', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '关闭信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '开放信号', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
|
||||
{ name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, disabledCb: (selectedObj) => selectedObj.atsControl || !this.modeMatch },
|
||||
{ name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, disabledCb: (selectedObj) => !selectedObj.atsControl || !this.modeMatch },
|
||||
{ name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, disabledCb: (selectedObj) => selectedObj.atsControl || !this.modeMatch },
|
||||
{ name: '追踪单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.cancelAutoTrigger.menuButton, disabledCb: (selectedObj) => !selectedObj.atsControl || !this.modeMatch },
|
||||
{ name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '追踪单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.cancelAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
|
||||
{ name: '开放引导', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '车队单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '车队单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }
|
||||
{ name: '开放引导', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '车队单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '车队单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
|
||||
] : [
|
||||
{ name: '关闭信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '开放信号', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '关闭信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '开放信号', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
|
||||
{ name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, disabledCb: (selectedObj) => selectedObj.atsControl || !this.modeMatch },
|
||||
{ name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, disabledCb: (selectedObj) => !selectedObj.atsControl || !this.modeMatch },
|
||||
{ name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, disabledCb: (selectedObj) => selectedObj.ciControl || !this.modeMatch },
|
||||
{ name: '追踪单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.cancelAutoTrigger.menuButton, disabledCb: (selectedObj) => !selectedObj.ciControl || !this.modeMatch },
|
||||
{ name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, disabledCb: (stationControl) => !this.modeMatch || stationControl.atsControl },
|
||||
{ name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, disabledCb: (stationControl) => !this.modeMatch || !stationControl.atsControl },
|
||||
{ name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch || stationControl.ciControl },
|
||||
{ name: '追踪单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.cancelAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch || !stationControl.ciControl },
|
||||
|
||||
{ name: '开放引导', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '车队单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '车队单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }
|
||||
{ name: '开放引导', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '车队单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '车队单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
|
||||
];
|
||||
this.stationParamList = this.$store.state.training.prdType === '01' ? [
|
||||
{ name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, disabledCb: (selectedObj) => !['Local'].includes(selectedObj.controlMode) || !this.modeMatch }
|
||||
{ name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, disabledCb: (stationControl) => !this.modeMatch || !['Local'].includes(stationControl.controlMode) }
|
||||
] : [
|
||||
{ name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, disabledCb: (selectedObj) => !['Local'].includes(selectedObj.controlMode) || !this.modeMatch },
|
||||
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, disabledCb: (selectedObj) => ['Center'].includes(selectedObj.controlMode) },
|
||||
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (selectedObj) => ['Local', 'None'].includes(selectedObj.controlMode) }
|
||||
{ name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, disabledCb: (stationControl) => !this.modeMatch || !['Local'].includes(stationControl.controlMode) },
|
||||
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, disabledCb: (stationControl) => ['Center'].includes(stationControl.controlMode) },
|
||||
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (stationControl) => ['Local', 'None'].includes(stationControl.controlMode) }
|
||||
];
|
||||
this.routeParamList = [
|
||||
{ name: '排列进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
|
||||
{ name: '取消进路', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menuButton, disabledCb: (selectedObj) => !this.modeMatch }
|
||||
{ name: '排列进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '取消进路', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menuButton, disabledCb: (stationControl) => !this.modeMatch }
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm manage-user" title="报警列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-dialog class="haerbin-01__systerm manage-user" title="报警列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div style="text-align: center;">
|
||||
<div style="text-align: left;width: 90%;margin-left: 5%;border: 1px solid #808080;border-radius: 5px;padding: 10px;">
|
||||
<el-row>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm manage-user" title="报警列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-dialog class="haerbin-01__systerm manage-user" title="报警列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div style="text-align: center;">
|
||||
<div style="text-align: left;">
|
||||
<div style="display: inline-block;margin-right: 5px;">开始时间:</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm manage-user" title="操作列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-dialog class="haerbin-01__systerm manage-user" title="操作列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div style="text-align: center;">
|
||||
<div style="text-align: left;">
|
||||
<div style="display: inline-block;margin-right: 5px;">开始时间:</div>
|
||||
|
@ -2,10 +2,10 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, pre
|
||||
import store from '@/store/index';
|
||||
export default {
|
||||
/** 边缘高度*/
|
||||
EdgeHeight: 3,
|
||||
EdgeHeight: 600,
|
||||
|
||||
/** 间隔高度*/
|
||||
CoordMultiple: 3,
|
||||
CoordMultiple: 1,
|
||||
|
||||
/** 偏移时间*/
|
||||
TranslationTime: 60 * 60 * 2,
|
||||
@ -165,67 +165,72 @@ export default {
|
||||
/** 按服务遍历数据*/
|
||||
data.serviceNumberDataList.forEach((service) => {
|
||||
/** 按车次遍历数据*/
|
||||
var isBackup = true;
|
||||
// var isBackup = true;
|
||||
var opt = { name: '', markPointData: [], data: [] };
|
||||
if (service.tripNumberDataList && service.tripNumberDataList.length) {
|
||||
service.tripNumberDataList.forEach((train, j) => {
|
||||
var pointdata = {};
|
||||
var idx = 0;
|
||||
var num = 0;
|
||||
var lastPoint = null;
|
||||
var nextPoint = null;
|
||||
|
||||
/** 创建标记点名称和坐标*/
|
||||
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
|
||||
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
|
||||
pointdata.color = '#000' || lineStyle.color;
|
||||
pointdata.directionCode = train.right ? '2' : '1';
|
||||
if (!store.state.map.mapConfig.upRight) {
|
||||
pointdata.directionCode = train.right ? '1' : '2';
|
||||
/** 如果车次号为空,不显示名称*/
|
||||
if (train.tripNumber) {
|
||||
/** 创建标记点名称和坐标*/
|
||||
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
|
||||
pointdata.color = '#000' || lineStyle.color;
|
||||
pointdata.directionCode = train.right ? '2' : '1';
|
||||
if (!store.state.map.mapConfig.upRight) {
|
||||
pointdata.directionCode = train.right ? '1' : '2';
|
||||
}
|
||||
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
|
||||
// pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[0], train.directionCode, false)];
|
||||
/** 给服务对象添加服务名称和标记点*/
|
||||
opt.markPointData.push(createMartPoint(pointdata));
|
||||
/** 创建服务号名称*/
|
||||
opt.name = `${service.serviceNumber}`;
|
||||
}
|
||||
pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[0], train.directionCode, false)];
|
||||
|
||||
/** 给服务对象添加服务名称和标记点*/
|
||||
opt.name = '' + service.serviceNumber;
|
||||
opt.markPointData.push(createMartPoint(pointdata));
|
||||
|
||||
/** 计算非折返点车次点坐标集合*/
|
||||
train.stationTimeList.forEach((elem, index) => {
|
||||
idx = index;
|
||||
// ${train.directionCode}
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
|
||||
if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
|
||||
index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
|
||||
index > 0 && index < train.stationTimeList.length - 1) {
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
|
||||
}
|
||||
});
|
||||
|
||||
/** 计算折返点车次坐标点集合*/
|
||||
if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) {
|
||||
lastPoint = train.stationTimeList[idx];
|
||||
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0];
|
||||
lastPoint = train.stationTimeList[idx - 1];
|
||||
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
|
||||
num = this.computedReentryNumber(train.tripNumber);
|
||||
// ${train.directionCode}
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true), lastPoint.stationCode, aa, '折返轨']);
|
||||
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true), lastPoint.stationCode, aa, '折返轨']);
|
||||
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]);
|
||||
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]);
|
||||
}
|
||||
|
||||
/** 如果是备用车,按车次添加线*/
|
||||
if (train.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
opt.name += j;
|
||||
// var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
|
||||
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
// var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
|
||||
if (model) {
|
||||
models.push(model);
|
||||
opt = { name: '', markPointData: [], data: [] };
|
||||
}
|
||||
}
|
||||
|
||||
isBackup = train.backup;
|
||||
});
|
||||
|
||||
// 不是备用车,按服务添加线
|
||||
if (!isBackup) {
|
||||
if (!service.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
// var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
|
||||
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
if (model) {
|
||||
models.push(model);
|
||||
}
|
||||
@ -280,7 +285,8 @@ export default {
|
||||
}
|
||||
serie.markPoint.data.push(createMartPoint({
|
||||
directionCode: directionCode,
|
||||
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)],
|
||||
// coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)],
|
||||
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
|
||||
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
|
||||
color: lineStyle.color || '#000'
|
||||
}));
|
||||
@ -288,12 +294,16 @@ export default {
|
||||
}
|
||||
|
||||
/** 计算折返点*/
|
||||
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem), elem.directionCode];
|
||||
// var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem), elem.directionCode];
|
||||
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
|
||||
if (serie.data.length > 0) {
|
||||
var lastPoint = serie.data[serie.data.length - 1];
|
||||
if (lastPoint[2] !== nextPoint[2]) {
|
||||
serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[2]), lastPoint[2]]);
|
||||
serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[2]), lastPoint[2]]);
|
||||
var num = this.computedReentryNumber(elem.tripNumber);
|
||||
serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[2], num), lastPoint[2]]);
|
||||
serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[2], num), lastPoint[2]]);
|
||||
// serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[2]), lastPoint[2]]);
|
||||
// serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[2]), lastPoint[2]]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -311,8 +321,15 @@ export default {
|
||||
return series;
|
||||
},
|
||||
|
||||
/** 初始化Y轴*/
|
||||
initializeYaxis(stations) {
|
||||
return createMarkLineModels(stations, (elem) => {
|
||||
return this.EdgeHeight + elem.kmRange * this.CoordMultiple;
|
||||
});
|
||||
},
|
||||
|
||||
getYaxisValueByStation(station, index) {
|
||||
return this.EdgeHeight + index * this.CoordMultiple;
|
||||
return this.EdgeHeight + station.kmRange * this.CoordMultiple;
|
||||
},
|
||||
|
||||
/** 将后台数据转换为试图序列模型*/
|
||||
@ -326,52 +343,55 @@ export default {
|
||||
|
||||
return map;
|
||||
},
|
||||
/** 初始化Y轴*/
|
||||
initializeYaxis(stations) {
|
||||
return createMarkLineModels(stations, (elem, index) => {
|
||||
return this.EdgeHeight + index * this.CoordMultiple;
|
||||
});
|
||||
},
|
||||
|
||||
/** 计算y轴最小值*/
|
||||
computedYaxisMinValue() {
|
||||
return 0;
|
||||
computedYaxisMinValue(stations) {
|
||||
return stations[0].kmRange * this.CoordMultiple;
|
||||
},
|
||||
|
||||
/** 计算y轴最大值*/
|
||||
computedYaxisMaxValue(stations) {
|
||||
return this.EdgeHeight * 2 + (stations.length - 1) * this.CoordMultiple;
|
||||
return stations[stations.length - 1].kmRange * this.CoordMultiple + this.EdgeHeight * 2;
|
||||
},
|
||||
|
||||
/** 格式化y轴数据*/
|
||||
computedFormatYAxis(stations, params) {
|
||||
var yText = '0m';
|
||||
var index = Math.floor((parseInt(params.value) - this.EdgeHeight) / this.CoordMultiple);
|
||||
if (index >= 0 && index < stations.length) {
|
||||
yText = Math.floor(stations[index].kmRange) + 'm';
|
||||
}
|
||||
|
||||
stations.forEach(elem => {
|
||||
if (elem.kmRange < parseInt(params.value) / this.CoordMultiple - this.EdgeHeight) {
|
||||
yText = Math.floor(elem.kmRange) + 'm';
|
||||
}
|
||||
});
|
||||
|
||||
return yText;
|
||||
},
|
||||
|
||||
/** 根据是否和上一个车次是否相交,计算下一个车次的折返的高度*/
|
||||
computedReentryNumber(code) {
|
||||
// return parseInt(code || 1) % 2 ? 1 : 2;
|
||||
return 1;
|
||||
},
|
||||
|
||||
/** 根据方向计算y折返偏移量*/
|
||||
getYvalueByDirectionCode(defaultVlue, directionCode) {
|
||||
getYvalueByDirectionCode(defaultVlue, directionCode, num) {
|
||||
if (directionCode === '1') {
|
||||
defaultVlue -= this.EdgeHeight / 2;
|
||||
defaultVlue -= this.EdgeHeight / 2 * num;
|
||||
} else if (directionCode === '2') {
|
||||
defaultVlue += this.EdgeHeight / 2;
|
||||
defaultVlue += this.EdgeHeight / 2 * num;
|
||||
}
|
||||
|
||||
return defaultVlue;
|
||||
},
|
||||
|
||||
/** 根据elem计算y值*/
|
||||
getCoordYByElem(stations, kmRangeCoordMap, elem, directionCode, isSpecial) {
|
||||
getCoordYByElem(stations, kmRangeCoordMap, elem, directionCode, isSpecial, num) {
|
||||
var defaultVlue = 0;
|
||||
var station = stations.find(it => { return it.code == elem.stationCode; });
|
||||
if (station) {
|
||||
defaultVlue = kmRangeCoordMap[`${station.kmRange}`];
|
||||
if (isSpecial) {
|
||||
defaultVlue = this.getYvalueByDirectionCode(defaultVlue, directionCode);
|
||||
defaultVlue = this.getYvalueByDirectionCode(defaultVlue, directionCode, num);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -935,8 +935,8 @@ export default {
|
||||
// trainingName: '上电解锁({1})',
|
||||
// trainingRemark: '上电解锁',
|
||||
// trainingType: 'Station',
|
||||
// productTypes: ['01'],
|
||||
// stepVOList:[
|
||||
// productTypes: ['01'],
|
||||
// stepVOList:[
|
||||
// {deviceType: '05', orderNum: 1, operateCode: '603', tip: '鼠标右键菜单'}
|
||||
// ]
|
||||
// }
|
||||
|
@ -412,139 +412,139 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '线路(G)',
|
||||
operate: OperationEvent.Command.commandNingBo.line,
|
||||
operate: OperationEvent.Command.commandNingBo3.line,
|
||||
children: [
|
||||
{
|
||||
title: '站台',
|
||||
operate: OperationEvent.Command.commandNingBo.line_stand,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_stand,
|
||||
children: [
|
||||
{
|
||||
title: '开放/关闭',
|
||||
click: this.standOpenOrClose,
|
||||
operate: OperationEvent.Command.commandNingBo.line_stand_openOrClose
|
||||
operate: OperationEvent.Command.commandNingBo3.line_stand_openOrClose
|
||||
},
|
||||
{
|
||||
title: '设置/取消扣车',
|
||||
click: this.setStandDetain,
|
||||
operate: OperationEvent.Command.commandNingBo.line_stand_holdOrNot
|
||||
operate: OperationEvent.Command.commandNingBo3.line_stand_holdOrNot
|
||||
},
|
||||
{
|
||||
title: '设置站间列车数量',
|
||||
click: this.undeveloped,
|
||||
operate: OperationEvent.Command.commandNingBo.line_stand_trainNum
|
||||
operate: OperationEvent.Command.commandNingBo3.line_stand_trainNum
|
||||
},
|
||||
{
|
||||
title: '分配停站时间',
|
||||
click: this.setAllocateTime,
|
||||
operate: OperationEvent.Command.commandNingBo.line_stand_stopTime
|
||||
operate: OperationEvent.Command.commandNingBo3.line_stand_stopTime
|
||||
},
|
||||
{
|
||||
title: '授权转移',
|
||||
click: this.authorizeTransfer,
|
||||
operate: OperationEvent.Command.commandNingBo.line_stand_transfer
|
||||
operate: OperationEvent.Command.commandNingBo3.line_stand_transfer
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
click: this.showStandDetail,
|
||||
operate: OperationEvent.Command.commandNingBo.line_stand_detail
|
||||
operate: OperationEvent.Command.commandNingBo3.line_stand_detail
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '道岔',
|
||||
operate: OperationEvent.Command.commandNingBo.line_switch,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_switch,
|
||||
children: [
|
||||
{
|
||||
title: '命令',
|
||||
operate: OperationEvent.Command.commandNingBo.line_switch_cmd,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_switch_cmd,
|
||||
click: this.setSwitchCommand
|
||||
},
|
||||
{
|
||||
title: '封锁',
|
||||
operate: OperationEvent.Command.commandNingBo.line_switch_block,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_switch_block,
|
||||
click: this.setBlockSwitch
|
||||
},
|
||||
{
|
||||
title: '解除封锁',
|
||||
operate: OperationEvent.Command.commandNingBo.line_switch_unblock,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_switch_unblock,
|
||||
click: this.setUnblockSwitch
|
||||
},
|
||||
{
|
||||
title: '请求动岔/请求或授权/取消',
|
||||
operate: OperationEvent.Command.commandNingBo.line_switch_empower,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_switch_empower,
|
||||
click: this.setSwitchActive
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
operate: OperationEvent.Command.commandNingBo.line_switch_detail,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_switch_detail,
|
||||
click: this.showSwitchDetail
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '信号机',
|
||||
operate: OperationEvent.Command.commandNingBo.line_signal,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_signal,
|
||||
children: [
|
||||
|
||||
{
|
||||
title: '引导',
|
||||
operate: OperationEvent.Command.commandNingBo.line_signal_guide,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_signal_guide,
|
||||
click: this.setSignalGuide
|
||||
},
|
||||
{
|
||||
title: '取消允许锁闭',
|
||||
operate: OperationEvent.Command.commandNingBo.line_signal_lockOrNot,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_signal_lockOrNot,
|
||||
click: this.setSignalCanBlock
|
||||
},
|
||||
{
|
||||
title: '进路/命令',
|
||||
operate: OperationEvent.Command.commandNingBo.line_signal_cmd,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_signal_cmd,
|
||||
click: this.setRouteCommand
|
||||
},
|
||||
{
|
||||
title: '信号指示模式',
|
||||
operate: OperationEvent.Command.commandNingBo.line_signal_indicator,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_signal_indicator,
|
||||
click: this.setSignalModel
|
||||
},
|
||||
{
|
||||
title: '封锁',
|
||||
operate: OperationEvent.Command.commandNingBo.line_signal_block,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_signal_block,
|
||||
click: this.setSignalBlock
|
||||
},
|
||||
{
|
||||
title: '解除封锁',
|
||||
operate: OperationEvent.Command.commandNingBo.line_signal_unblock,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_signal_unblock,
|
||||
click: this.setSignalCancelBlock
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
operate: OperationEvent.Command.commandNingBo.line_signal_detail,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_signal_detail,
|
||||
click: this.showSignalDetail
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '轨道',
|
||||
operate: OperationEvent.Command.commandNingBo.line_section,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_section,
|
||||
children: [
|
||||
{
|
||||
title: '开放',
|
||||
operate: OperationEvent.Command.commandNingBo.line_section_open,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_section_open,
|
||||
click: this.handleOpenSection
|
||||
},
|
||||
{
|
||||
title: '关闭',
|
||||
operate: OperationEvent.Command.commandNingBo.line_section_close,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_section_close,
|
||||
click: this.handleCloseSection
|
||||
},
|
||||
{
|
||||
title: '临时限速',
|
||||
operate: OperationEvent.Command.commandNingBo.line_section_limitSpeed,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed,
|
||||
click: this.handleLimitSpeed
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
operate: OperationEvent.Command.commandNingBo.line_section_detail,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_section_detail,
|
||||
click: this.handleSectionShow
|
||||
}
|
||||
]
|
||||
@ -908,138 +908,138 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '线路(G)',
|
||||
operate: OperationEvent.Command.commandNingBo.line,
|
||||
operate: OperationEvent.Command.commandNingBo3.line,
|
||||
children: [
|
||||
{
|
||||
title: '站台',
|
||||
operate: OperationEvent.Command.commandNingBo.line_stand,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_stand,
|
||||
children: [
|
||||
{
|
||||
title: '开放/关闭',
|
||||
click: this.standOpenOrClose,
|
||||
operate: OperationEvent.Command.commandNingBo.line_stand_openOrClose
|
||||
operate: OperationEvent.Command.commandNingBo3.line_stand_openOrClose
|
||||
},
|
||||
{
|
||||
title: '设置/取消扣车',
|
||||
click: this.setStandDetain,
|
||||
operate: OperationEvent.Command.commandNingBo.line_stand_holdOrNot
|
||||
operate: OperationEvent.Command.commandNingBo3.line_stand_holdOrNot
|
||||
},
|
||||
{
|
||||
title: '设置站间列车数量',
|
||||
click: this.undeveloped,
|
||||
operate: OperationEvent.Command.commandNingBo.line_stand_trainNum
|
||||
operate: OperationEvent.Command.commandNingBo3.line_stand_trainNum
|
||||
},
|
||||
{
|
||||
title: '分配停站时间',
|
||||
click: this.setAllocateTime,
|
||||
operate: OperationEvent.Command.commandNingBo.line_stand_stopTime
|
||||
operate: OperationEvent.Command.commandNingBo3.line_stand_stopTime
|
||||
},
|
||||
{
|
||||
title: '授权转移',
|
||||
click: this.authorizeTransfer,
|
||||
operate: OperationEvent.Command.commandNingBo.line_stand_transfer
|
||||
operate: OperationEvent.Command.commandNingBo3.line_stand_transfer
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
click: this.showStandDetail,
|
||||
operate: OperationEvent.Command.commandNingBo.line_stand_detail
|
||||
operate: OperationEvent.Command.commandNingBo3.line_stand_detail
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '道岔',
|
||||
operate: OperationEvent.Command.commandNingBo.line_switch,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_switch,
|
||||
children: [
|
||||
{
|
||||
title: '命令',
|
||||
operate: OperationEvent.Command.commandNingBo.line_switch_cmd,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_switch_cmd,
|
||||
click: this.setSwitchCommand
|
||||
},
|
||||
{
|
||||
title: '封锁',
|
||||
operate: OperationEvent.Command.commandNingBo.line_switch_block,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_switch_block,
|
||||
click: this.setBlockSwitch
|
||||
},
|
||||
{
|
||||
title: '解除封锁',
|
||||
operate: OperationEvent.Command.commandNingBo.line_switch_unblock,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_switch_unblock,
|
||||
click: this.setUnblockSwitch
|
||||
},
|
||||
{
|
||||
title: '请求动岔/请求或授权/取消',
|
||||
operate: OperationEvent.Command.commandNingBo.line_switch_empower,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_switch_empower,
|
||||
click: this.setSwitchActive
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
operate: OperationEvent.Command.commandNingBo.line_switch_detail,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_switch_detail,
|
||||
click: this.showSwitchDetail
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '信号机',
|
||||
operate: OperationEvent.Command.commandNingBo.line_signal,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_signal,
|
||||
children: [
|
||||
{
|
||||
title: '引导',
|
||||
operate: OperationEvent.Command.commandNingBo.line_signal_guide,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_signal_guide,
|
||||
click: this.setSignalGuide
|
||||
},
|
||||
{
|
||||
title: '取消允许锁闭',
|
||||
operate: OperationEvent.Command.commandNingBo.line_signal_lockOrNot,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_signal_lockOrNot,
|
||||
click: this.setSignalCanBlock
|
||||
},
|
||||
{
|
||||
title: '进路/命令',
|
||||
operate: OperationEvent.Command.commandNingBo.line_signal_cmd,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_signal_cmd,
|
||||
click: this.setRouteCommand
|
||||
},
|
||||
{
|
||||
title: '信号指示模式',
|
||||
operate: OperationEvent.Command.commandNingBo.line_signal_indicator,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_signal_indicator,
|
||||
click: this.setSignalModel
|
||||
},
|
||||
{
|
||||
title: '封锁',
|
||||
operate: OperationEvent.Command.commandNingBo.line_signal_block,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_signal_block,
|
||||
click: this.setSignalBlock
|
||||
},
|
||||
{
|
||||
title: '解除封锁',
|
||||
operate: OperationEvent.Command.commandNingBo.line_signal_unblock,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_signal_unblock,
|
||||
click: this.setSignalCancelBlock
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
operate: OperationEvent.Command.commandNingBo.line_signal_detail,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_signal_detail,
|
||||
click: this.showSignalDetail
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '轨道',
|
||||
operate: OperationEvent.Command.commandNingBo.line_section,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_section,
|
||||
children: [
|
||||
{
|
||||
title: '开放',
|
||||
operate: OperationEvent.Command.commandNingBo.line_section_open,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_section_open,
|
||||
click: this.handleOpenSection
|
||||
},
|
||||
{
|
||||
title: '关闭',
|
||||
operate: OperationEvent.Command.commandNingBo.line_section_close,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_section_close,
|
||||
click: this.handleCloseSection
|
||||
},
|
||||
{
|
||||
title: '临时限速',
|
||||
operate: OperationEvent.Command.commandNingBo.line_section_limitSpeed,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_section_limitSpeed,
|
||||
click: this.handleLimitSpeed
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
operate: OperationEvent.Command.commandNingBo.line_section_detail,
|
||||
operate: OperationEvent.Command.commandNingBo3.line_section_detail,
|
||||
click: this.handleSectionShow
|
||||
}
|
||||
]
|
||||
|
@ -7,6 +7,7 @@
|
||||
:data="stationStandList"
|
||||
highlight-current-row
|
||||
height="350px"
|
||||
:id="domIdChoose"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<el-table-column prop="name" label="站台" />
|
||||
@ -35,7 +36,7 @@
|
||||
<el-button :id="domIdApply" :disabled="!selected" :loading="loading" @click="commit(false)">应用(A)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" :disabled="!selected" :loading="loading" @click="cancel">关闭(C)</el-button>
|
||||
<el-button :id="domIdClose" :disabled="!selected" :loading="loading" @click="cancel">关闭(C)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>帮助(H)</el-button>
|
||||
@ -73,17 +74,17 @@ export default {
|
||||
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 : '';
|
||||
return this.dialogShow ? OperationEvent.Command.common.choose.domId : ''
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Command.common.confirm.domId : '';
|
||||
},
|
||||
domIdClose() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.close.domId : '';
|
||||
},
|
||||
domIdApply() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menuButton.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Command.common.apply.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '站台开放/关闭';
|
||||
@ -120,7 +121,7 @@ export default {
|
||||
const step = {
|
||||
over: true,
|
||||
cmdType:this.status ? CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP : CMD.Stand.CMD_STAND_SET_JUMP_STOP,
|
||||
operation:this.status ? OperationEvent.StationStand.cancelJumpStop.confirm.operation : OperationEvent.StationStand.setJumpStop.confirm.operation,
|
||||
operation: isClose? OperationEvent.Command.common.confirm.operation: OperationEvent.Command.common.apply.operation,
|
||||
param: {standCode: this.selected.code}
|
||||
};
|
||||
|
||||
@ -147,9 +148,9 @@ export default {
|
||||
if (!val) { return; }
|
||||
const standEle = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||
const step = {
|
||||
code: `${val.code}`,
|
||||
operation:standEle.allSkip ? OperationEvent.StationStand.setJumpStop.choose.operation : OperationEvent.StationStand.cancelJumpStop.choose.operation,
|
||||
param: {}
|
||||
code: val.code,
|
||||
operation: OperationEvent.Command.common.choose.operation,
|
||||
val: val.code
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -164,7 +165,7 @@ export default {
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
operation: OperationEvent.Command.common.close.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
|
@ -803,10 +803,12 @@ export default {
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo.line_stand.operation, tip: '鼠标右键菜单选择【站台】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo.line_stand_openOrClose.operation, tip: '鼠标右键菜单选择【开放/关闭】' }
|
||||
// { deviceType: '02', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo.line_stand_openOrClose.operation, tip: '鼠标右键菜单选择【开放/关闭】' }
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_stand.operation, tip: '鼠标右键菜单选择【站台】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_stand_openOrClose.operation, tip: '鼠标右键菜单选择【开放/关闭】' },
|
||||
{ deviceType: 'bar', orderNum: 4, operateCode: OperationEvent.Command.common.choose.operation, tip: '请选择站台【{10}】', codeType: 'STAND', val: '{10}' },
|
||||
{ deviceType: '04', orderNum: 5, operateCode: OperationEvent.Command.common.apply.operation, tip: '请点击【应用】' },
|
||||
{ deviceType: '04', orderNum: 6, operateCode: OperationEvent.Command.common.close.operation, tip: '请点击【关闭】' },
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -819,9 +821,12 @@ export default {
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo.line_stand.operation, tip: '鼠标右键菜单选择【站台】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo.line_stand_openOrClose.operation, tip: '鼠标右键菜单选择【开放/关闭】' }
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_stand.operation, tip: '鼠标右键菜单选择【站台】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_stand_openOrClose.operation, tip: '鼠标右键菜单选择【开放/关闭】' },
|
||||
{ deviceType: 'bar', orderNum: 4, operateCode: OperationEvent.Command.common.choose.operation, tip: '请选择站台【{10}】', codeType: 'STAND', val: '{10}' },
|
||||
{ deviceType: '04', orderNum: 5, operateCode: OperationEvent.Command.common.apply.operation, tip: '请点击【应用】' },
|
||||
{ deviceType: '04', orderNum: 6, operateCode: OperationEvent.Command.common.close.operation, tip: '请点击【关闭】' },
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -834,9 +839,9 @@ export default {
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo.line_stand.operation, tip: '鼠标右键菜单选择【站台】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo.line_stand_holdOrNot.operation, tip: '鼠标右键菜单选择【设置/取消扣车】' }
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_stand.operation, tip: '鼠标右键菜单选择【站台】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_stand_holdOrNot.operation, tip: '鼠标右键菜单选择【设置/取消扣车】' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -849,24 +854,56 @@ export default {
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo.line_stand.operation, tip: '鼠标右键菜单选择【站台】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo.line_stand_holdOrNot.operation, tip: '鼠标右键菜单选择【设置/取消扣车】' }
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_stand.operation, tip: '鼠标右键菜单选择【站台】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_stand_holdOrNot.operation, tip: '鼠标右键菜单选择【设置/取消扣车】' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 8,
|
||||
minDuration: 5,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_PARK_TIME.value,
|
||||
skinCode: '12',
|
||||
trainingName: '信号机分配停站时间({10}-{12} 站台)',
|
||||
trainingRemark: '信号机分配停站时间',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_stand.operation, tip: '鼠标右键菜单选择【站台】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_stand_stopTime.operation, tip: '鼠标右键菜单选择【分配停站时间】' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 8,
|
||||
minDuration: 5,
|
||||
operateType: CMD.Stand.CMD_STAND_VIEW_STATUS.value,
|
||||
skinCode: '12',
|
||||
trainingName: '信号机显示({10}-{12} 站台)',
|
||||
trainingRemark: '信号机显示',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_stand.operation, tip: '鼠标右键菜单选择【站台】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_stand_detail.operation, tip: '鼠标右键菜单选择【显示】' }
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION.value,
|
||||
skinCode: '12',
|
||||
trainingName: '道岔反位({7})',
|
||||
trainingName: '道岔定位({7})',
|
||||
trainingRemark: '道岔定位操作({7})',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo.line_switch.operation, tip: '鼠标右键菜单选择【道岔】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo.line_switch_cmd.operation, tip: '鼠标右键菜单选择【命令】' }
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_switch.operation, tip: '鼠标右键菜单选择【道岔】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_switch_cmd.operation, tip: '鼠标右键菜单选择【命令】' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -879,11 +916,71 @@ export default {
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo.line_switch.operation, tip: '鼠标右键菜单选择【道岔】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo.line_switch_cmd.operation, tip: '鼠标右键菜单选择【命令】' }
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_switch.operation, tip: '鼠标右键菜单选择【道岔】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_switch_cmd.operation, tip: '鼠标右键菜单选择【命令】' }
|
||||
]
|
||||
},
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_BLOCK.value,
|
||||
skinCode: '12',
|
||||
trainingName: '道岔封锁({7})',
|
||||
trainingRemark: '道岔封锁操作({7})',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_switch.operation, tip: '鼠标右键菜单选择【道岔】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_switch_block.operation, tip: '鼠标右键菜单选择【封锁】' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_UNBLOCK.value,
|
||||
skinCode: '12',
|
||||
trainingName: '道岔解除封锁({7})',
|
||||
trainingRemark: '道岔解除封锁操作({7})',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_switch.operation, tip: '鼠标右键菜单选择【道岔】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_switch_unblock.operation, tip: '鼠标右键菜单选择【解除封锁】' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_ACTIVE.value,
|
||||
skinCode: '12',
|
||||
trainingName: '道岔激活({7})',
|
||||
trainingRemark: '道岔激活操作({7})',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_switch.operation, tip: '鼠标右键菜单选择【道岔】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_switch_empower.operation, tip: '鼠标右键菜单选择【请求动岔/请求或授权/取消】' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_CUT_OFF.value,
|
||||
skinCode: '12',
|
||||
trainingName: '道岔取消激活({7})',
|
||||
trainingRemark: '道岔取消激活操作({7})',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_switch.operation, tip: '鼠标右键菜单选择【道岔】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_switch_empower.operation, tip: '鼠标右键菜单选择【请求动岔/请求或授权/取消】' }
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
maxDuration: 15,
|
||||
@ -895,11 +992,102 @@ export default {
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo.line_signal.operation, tip: '鼠标右键菜单选择【信号机】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo.line_signal_guide.operation, tip: '鼠标右键菜单选择【引导】' }
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_signal.operation, tip: '鼠标右键菜单选择【信号机】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_signal_guide.operation, tip: '鼠标右键菜单选择【引导】' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE.value, //暂不清楚是那个指令
|
||||
skinCode: '12',
|
||||
trainingName: '信号机取消允许锁闭({3})',
|
||||
trainingRemark: '信号机开始锁闭解除',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_signal.operation, tip: '鼠标右键菜单选择【信号机】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_signal_lockOrNot.operation, tip: '鼠标右键菜单选择【开始锁闭解除】' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_BLOCK.value,
|
||||
skinCode: '12',
|
||||
trainingName: '信号机封锁({3})',
|
||||
trainingRemark: '信号机封锁',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_signal.operation, tip: '鼠标右键菜单选择【信号机】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_signal_block.operation, tip: '鼠标右键菜单选择【封锁】' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_UNBLOCK.value,
|
||||
skinCode: '12',
|
||||
trainingName: '信号机解除封锁({3})',
|
||||
trainingRemark: '信号机解除封锁',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_signal.operation, tip: '鼠标右键菜单选择【信号机】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_signal_unblock.operation, tip: '鼠标右键菜单选择【解除封锁】' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL.value,
|
||||
skinCode: '12',
|
||||
trainingName: '信号机灭灯({3})',
|
||||
trainingRemark: '信号机灭灯',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_signal.operation, tip: '鼠标右键菜单选择【信号机】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_signal_indicator.operation, tip: '鼠标右键菜单选择【信号指示模式】' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL.value,
|
||||
skinCode: '12',
|
||||
trainingName: '信号机点灯({3})',
|
||||
trainingRemark: '信号机点灯',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_signal.operation, tip: '鼠标右键菜单选择【信号机】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_signal_indicator.operation, tip: '鼠标右键菜单选择【信号指示模式】' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_DETAIL.value,
|
||||
skinCode: '12',
|
||||
trainingName: '信号机显示({3})',
|
||||
trainingRemark: '信号机显示',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_signal.operation, tip: '鼠标右键菜单选择【信号机】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_signal_detail.operation, tip: '鼠标右键菜单选择【显示】' }
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -910,9 +1098,9 @@ export default {
|
||||
trainingType: 'Section',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo.line_section.operation, tip: '鼠标右键菜单选择【轨道】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo.line_section_open.operation, tip: '鼠标右键菜单选择【开放】' }
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_section.operation, tip: '鼠标右键菜单选择【轨道】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_section_open.operation, tip: '鼠标右键菜单选择【开放】' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -925,9 +1113,9 @@ export default {
|
||||
trainingType: 'Section',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo.line_section.operation, tip: '鼠标右键菜单选择【轨道】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo.line_section_close.operation, tip: '鼠标右键菜单选择【关闭】' }
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_section.operation, tip: '鼠标右键菜单选择【轨道】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_section_close.operation, tip: '鼠标右键菜单选择【关闭】' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -940,9 +1128,9 @@ export default {
|
||||
trainingType: 'Section',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo.line_section.operation, tip: '鼠标右键菜单选择【轨道】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo.line_section_limitSpeed.operation, tip: '鼠标右键菜单选择【临时限速】' }
|
||||
{ deviceType: 'bar', orderNum: 1, operateCode: OperationEvent.Command.commandNingBo3.line.operation, tip: '鼠标右键菜单选择【线路】' },
|
||||
{ deviceType: 'bar', orderNum: 2, operateCode: OperationEvent.Command.commandNingBo3.line_section.operation, tip: '鼠标右键菜单选择【轨道】' },
|
||||
{ deviceType: 'bar', orderNum: 3, operateCode: OperationEvent.Command.commandNingBo3.line_section_limitSpeed.operation, tip: '鼠标右键菜单选择【临时限速】' }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -47,7 +47,7 @@
|
||||
<el-row style="margin-top: 30px; height: 40px;">
|
||||
<el-col :span="20" :offset="4">
|
||||
<el-form-item label-width="140px" label="默认停站时间" prop="defaultDwellTime">
|
||||
<el-input v-model="addModel.defaultDwellTime" style="width: 50px; position: absolute;left: 40px;" />
|
||||
<el-input v-model="addModel.defaultDwellTime" :disabled="addModel.mode === '2'" style="width: 50px; position: absolute;left: 40px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -55,14 +55,14 @@
|
||||
<el-row>
|
||||
<el-col :span="20" :offset="4">
|
||||
<el-form-item label-width="140px" label="最小停站时间" prop="minimumDwell">
|
||||
<el-input v-model="addModel.minimumDwell" style="width: 50px;position: absolute;left: 40px;" />
|
||||
<el-input v-model="addModel.minimumDwell" :disabled="addModel.mode === '1'" style="width: 50px;position: absolute;left: 40px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="20" :offset="4">
|
||||
<el-form-item label-width="140px" label="最大停站时间" prop="maximumDwell">
|
||||
<el-input v-model="addModel.maximumDwell" style="width: 50px;position: absolute;left: 40px;" />
|
||||
<el-input v-model="addModel.maximumDwell" :disabled="addModel.mode === '1'" style="width: 50px;position: absolute;left: 40px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -354,6 +354,13 @@ export default {
|
||||
});
|
||||
if (strategy) {
|
||||
commitOperate(menuOperate.StationControl.setBackStrategy, {stationCode: this.selected.code, id:strategy.id}, 3).then(({valid, operate})=>{
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
device: this.selected,
|
||||
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: type},
|
||||
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY,
|
||||
param: {stationCodes:[this.selected.code]}
|
||||
});
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
|
@ -1,10 +1,12 @@
|
||||
|
||||
import store from '@/store/index';
|
||||
import {createTransform, createBoundingRect} from './utils/parser';
|
||||
|
||||
class TransformHandle {
|
||||
constructor(painter) {
|
||||
this.$painter = painter;
|
||||
|
||||
this.stationFlag = false;
|
||||
|
||||
this.parentLevel = painter.getParentLevel();
|
||||
|
||||
this.rect = { x: 0, y: 0, width: 0, height: 0 };
|
||||
@ -25,16 +27,50 @@ class TransformHandle {
|
||||
}
|
||||
view.dirty();
|
||||
}
|
||||
|
||||
setStationFlag(stationCode) {
|
||||
this.stationFlag = !!stationCode;
|
||||
}
|
||||
// 视图进行缩放/平移
|
||||
transformView(view) {
|
||||
if (view) {
|
||||
view.transform = this.transform;
|
||||
if (this.stationFlag) {
|
||||
this.handleStationShow(view);
|
||||
}
|
||||
view.decomposeTransform();
|
||||
this.revisibleView(view);
|
||||
}
|
||||
}
|
||||
|
||||
handleStationShow(view) {
|
||||
if (view.model && view.model._type === 'Station') {
|
||||
const station = view.model;
|
||||
this.handleStationViewTransform(view, station);
|
||||
} else if (view.model && view.model._type === 'StationStand') {
|
||||
const station = store.getters['map/getDeviceByCode'](view.model.stationCode);
|
||||
this.handleStationViewTransform(view, station);
|
||||
} else if (view.model && view.model._type === 'Psd') {
|
||||
const stand = store.getters['map/getDeviceByCode'](view.model.standCode);
|
||||
const station = store.getters['map/getDeviceByCode'](stand.stationCode);
|
||||
this.handleStationViewTransform(view, station);
|
||||
} else if (view.model && view.model._type === 'Train' && view.model.sectionModel) {
|
||||
const belongStation = view.model.sectionModel.belongStation;
|
||||
const station = store.getters['map/getDeviceByCode'](belongStation);
|
||||
this.handleStationViewTransform(view, station);
|
||||
} else if (view.model && (view.model.belongStation || view.model.belongStationCode)) {
|
||||
const belongStation = view.model.belongStation || view.model.belongStationCode;
|
||||
const station = store.getters['map/getDeviceByCode'](belongStation);
|
||||
this.handleStationViewTransform(view, station);
|
||||
}
|
||||
}
|
||||
handleStationViewTransform(view, station) {
|
||||
if (station.foldLine) {
|
||||
view.transform = createTransform({
|
||||
scaleRate: this.$painter.$jmap.$options.scaleRate,
|
||||
offsetX: this.$painter.$jmap.$options.offsetX + station.foldLineOffset.x * this.$painter.$jmap.$options.scaleRate,
|
||||
offsetY: this.$painter.$jmap.$options.offsetY - station.foldLineOffset.y * this.$painter.$jmap.$options.scaleRate
|
||||
});
|
||||
}
|
||||
}
|
||||
// 处理所有视图缩放/平移
|
||||
transformAll() {
|
||||
this.traverse(this.transformView, this);
|
||||
|
@ -14,6 +14,7 @@ import FaviconCrsc from '@/assets/icon/favicon_crsc.png';
|
||||
import FaviconNty from '@/assets/icon/favicon_nty.png';
|
||||
import FaviconBjd from '@/assets/icon/favicon_bjd.png';
|
||||
import FaviconSdy from '@/assets/icon/favicon_jdy.png';
|
||||
import FaviconCgy from '@/assets/icon/favicon_cgy.png';
|
||||
import Link_Bxkc from '@/assets/icon/link_bxkc.png';
|
||||
import Link_Crsc from '@/assets/icon/link_crsc.png';
|
||||
import Link_Hls from '@/assets/icon/link_hls.png';
|
||||
@ -190,6 +191,24 @@ export const loginInfo = {
|
||||
navigationMarginLeft: '60px',
|
||||
systemType: '014'
|
||||
},
|
||||
cgy: {
|
||||
title: '成都工业职业技术学院轨道交通虚拟仿真实训平台',
|
||||
loginPath: '/login?project=cgy',
|
||||
loginParam: 'CGY',
|
||||
titleDistance: '-150px',
|
||||
navigationLogoWidth: '40px',
|
||||
navigationMarginLeft: '60px',
|
||||
systemType: '011'
|
||||
},
|
||||
designcgy: {
|
||||
title: '成都工业职业技术学院轨道交通虚拟仿真设计平台',
|
||||
loginPath: '/design/login?project=cgy',
|
||||
loginParam: 'CGY',
|
||||
titleDistance: '-150px',
|
||||
navigationLogoWidth: '40px',
|
||||
navigationMarginLeft: '60px',
|
||||
systemTYpe: '011'
|
||||
},
|
||||
heb: {
|
||||
title: '城市轨道交通综合行车模拟仿真系统V1.0',
|
||||
loginTitle: '城市轨道交通综合行车模拟仿真系统V1.0',
|
||||
@ -422,7 +441,9 @@ export const ProjectIcon = {
|
||||
bjd: FaviconBjd,
|
||||
designbjd: FaviconBjd,
|
||||
sdy: FaviconSdy,
|
||||
designsdy: FaviconSdy
|
||||
designsdy: FaviconSdy,
|
||||
cgy: FaviconCgy,
|
||||
designcgy: FaviconCgy
|
||||
};
|
||||
|
||||
export const ProjectCode = {
|
||||
@ -447,15 +468,17 @@ export const ProjectCode = {
|
||||
bjd: 'BJD',
|
||||
designbjd: 'BJD',
|
||||
sdy: 'SDY',
|
||||
designsdy: 'SDY'
|
||||
designsdy: 'SDY',
|
||||
cgy: 'CGY',
|
||||
designcgy: 'CGY'
|
||||
};
|
||||
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 底部栏仅展示公司信息不展示备案号
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目
|
||||
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示
|
||||
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示
|
||||
export const ProjectLoginStyleList = ['gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc',
|
||||
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl']; // 登录页样式
|
||||
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'cgy', 'designcgy']; // 登录页样式
|
||||
export const NoQrcodeList = ['heb', 'designheb'];
|
||||
export const NoSimulationQrCodeList = ['heb', 'bjd'];
|
||||
export const goOtherPlatformMenu = { // 导航栏快速切换平台
|
||||
@ -490,7 +513,9 @@ export const goOtherPlatformMenu = { // 导航栏快速切换平台
|
||||
ntyl: '/design/login?project=ntyl',
|
||||
designntyl: '/login?project=ntyl',
|
||||
ntyc: '/design/login?project=ntyc',
|
||||
designntyc: '/login?project=ntyc'
|
||||
designntyc: '/login?project=ntyc',
|
||||
cgy: '/design/login?project=cgy',
|
||||
designcgy: '/login?project=cgy'
|
||||
};
|
||||
export const ProjectList = [
|
||||
{value:'xty', label:'西铁院'},
|
||||
@ -503,7 +528,8 @@ export const ProjectList = [
|
||||
{value: 'ntyl', label: '南铁院(本地版)'},
|
||||
{value: 'bjd', label: '北交大'},
|
||||
{value: 'urtss', label: '陪标项目'},
|
||||
{value: 'sdy', label: '苏电院'}
|
||||
{value: 'sdy', label: '苏电院'},
|
||||
{value: 'cgy', label: '成都工业'}
|
||||
];
|
||||
export const localPackageProject = {
|
||||
localdesign: 'designheb',
|
||||
|
@ -65,11 +65,11 @@ class Handler {
|
||||
}
|
||||
|
||||
getCommand(operation) {
|
||||
let command = null;
|
||||
let command = null;
|
||||
if (operation.cmdType) {
|
||||
const cmdType = operation.cmdType;
|
||||
const wholeParam = this.getWholeParam();
|
||||
command = CommandHandler.getCommand(cmdType, wholeParam);
|
||||
command = CommandHandler.getCommand(cmdType, wholeParam);
|
||||
if (command && command.isError) {
|
||||
this.operations.pop();
|
||||
command = null;
|
||||
|
@ -1,6 +1,42 @@
|
||||
export const OperationEvent = {
|
||||
// 直接指令
|
||||
Command: {
|
||||
// 对话框
|
||||
common: {
|
||||
choose: {
|
||||
operation: 'com01',
|
||||
domId: '_Tips-Cmd-Common-Choose'
|
||||
},
|
||||
confirm: {
|
||||
operation: 'com02',
|
||||
domId: '_Tips-Cmd-Common-Confirm'
|
||||
},
|
||||
apply: {
|
||||
operation: 'com04',
|
||||
domId: '_Tips-Cmd-Common-Apply'
|
||||
},
|
||||
close: {
|
||||
operation: 'com05',
|
||||
domId: '_Tips-Cmd-Common-Close'
|
||||
},
|
||||
choose1: {
|
||||
operation: 'com06',
|
||||
domId: '_Tips-Cmd-Common-Choose1'
|
||||
},
|
||||
confirm1: {
|
||||
operation: 'com07',
|
||||
domId: '_Tips-Cmd-Common-Confirm1'
|
||||
},
|
||||
apply1: {
|
||||
operation: 'com08',
|
||||
domId: '_Tips-Cmd-Common-Apply1'
|
||||
},
|
||||
close1: {
|
||||
operation: 'com09',
|
||||
domId: '_Tips-Cmd-Common-Close1'
|
||||
},
|
||||
},
|
||||
|
||||
// 取消操作
|
||||
cancel: {
|
||||
menu: {
|
||||
@ -251,7 +287,7 @@ export const OperationEvent = {
|
||||
}
|
||||
},
|
||||
// 宁波三
|
||||
commandNingBo: {
|
||||
commandNingBo3: {
|
||||
// 线路
|
||||
line: {
|
||||
operation: '00a',
|
||||
|
@ -2,10 +2,10 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://api.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.8.129:9000'; // 旭强
|
||||
BASE_API = 'http://192.168.8.119:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.119:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
|
@ -208,10 +208,11 @@ export default {
|
||||
}, 3000);
|
||||
});
|
||||
},
|
||||
async prdChoose(queryData) {
|
||||
this.trainingTypeMap = {};
|
||||
const lineCode = this.$route.query.lineCode;
|
||||
const res = await getCmdList(lineCode, {prdType:queryData.prdType});
|
||||
async prdChoose(form) {
|
||||
this.trainingTypeMap = {};
|
||||
|
||||
const lineCode = this.$route.query.lineCode;
|
||||
const res = await getCmdList(lineCode, {prdType:form.prdType});
|
||||
const trainingOperateList = [];
|
||||
const trainingOperateConfigList = [];
|
||||
const operateTypeMap = {
|
||||
@ -224,7 +225,13 @@ export default {
|
||||
LimitControl: [],
|
||||
TrainWindow: [],
|
||||
Driver: []
|
||||
};
|
||||
};
|
||||
|
||||
form.type = '';
|
||||
form.operateType = '';
|
||||
this.queryForm.queryObject.type.config.data = [];
|
||||
this.queryForm.queryObject.operateType.config.data = [];
|
||||
|
||||
if (res && res.code === 200) {
|
||||
res.data.forEach(item => {
|
||||
if (this.trainingOperateTypeMap[item.operateObject]) {
|
||||
@ -240,8 +247,9 @@ export default {
|
||||
trainingOperateConfigList.push({value: item.operateObject, label: Cookies.get('user_lang') == 'en' ? objectLabel.enlabel : objectLabel.label});
|
||||
}
|
||||
});
|
||||
this.queryForm.queryObject.type.config.data = trainingOperateConfigList;
|
||||
this.trainingTypeList = trainingOperateConfigList;
|
||||
this.queryForm.queryObject.type.config.data = trainingOperateConfigList;
|
||||
|
||||
this.trainingTypeList = trainingOperateConfigList;
|
||||
this.trainingTypeMap = operateTypeMap;
|
||||
} else {
|
||||
this.$message.error(this.$t('error.failedToObtainTrainingType'));
|
||||
@ -249,7 +257,7 @@ export default {
|
||||
},
|
||||
typeChoose(form) {
|
||||
this.queryForm.queryObject.operateType.config.data = [];
|
||||
form.operateType = '';
|
||||
form.operateType = '';
|
||||
if (form && form.type && this.trainingTypeMap[form.type]) {
|
||||
this.trainingTypeMap[form.type].forEach(elem => {
|
||||
this.queryForm.queryObject.operateType.config.data.push({ value: elem.value, label: elem.label });
|
||||
|
@ -37,7 +37,7 @@ export default {
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
position: absolute;
|
||||
z-index: 36;
|
||||
z-index: 38;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
background: white;
|
||||
|
@ -73,7 +73,7 @@ export default {
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
position: absolute;
|
||||
z-index: 36;
|
||||
z-index: 38;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
background: white;
|
||||
|
@ -134,7 +134,7 @@ export default {
|
||||
if (!this.isScheduling) {
|
||||
this.changeOperateMode();
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadRunData() {
|
||||
|
@ -6,6 +6,8 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { assignUsersPlayRoles } from '@/api/jointSimulation';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name:'SelectStation',
|
||||
props:{
|
||||
@ -31,31 +33,24 @@ export default {
|
||||
},
|
||||
watch:{
|
||||
'$store.state.training.memberData': function (val) {
|
||||
this.$store.state.training.memberList.forEach(item => {
|
||||
if (item.type === 'STATION_SUPERVISOR') {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
||||
this.stationListMode.push({value:item.id, name: station.name});
|
||||
}
|
||||
});
|
||||
this.initStationListMode();
|
||||
},
|
||||
'$store.state.training.simulationUserList': function(val) {
|
||||
this.$store.state.training.simulationUserList.forEach(item => {
|
||||
if (item.userId == this.$store.state.user.id) {
|
||||
this.showMemberId = item.memberId;
|
||||
this.oldShowMemberId = item.memberId;
|
||||
}
|
||||
});
|
||||
this.stationList.forEach(item => {
|
||||
if (item.centralized) {
|
||||
this.stationCentralizedMap[item.code] = item.code;
|
||||
item.chargeStationCodeList.forEach(ele => {
|
||||
this.stationCentralizedMap[ele] = item.code;
|
||||
});
|
||||
}
|
||||
});
|
||||
this.switchStationMode( this.showMemberId);
|
||||
this.initData();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initStationListMode();
|
||||
this.initData();
|
||||
EventBus.$on('switchStationMode', (stationCode) => {
|
||||
this.$store.state.training.memberList.filter(el => el.type == 'STATION_SUPERVISOR').find(el => {
|
||||
if (el.deviceCode == stationCode) {
|
||||
this.oldShowMemberId = el.id;
|
||||
this.switchStationMode(el.id);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
switchStationMode(val) {
|
||||
assignUsersPlayRoles([{ userId: this.$store.state.user.id, memberId: val}], this.$route.query.group).then(resp => {
|
||||
@ -86,6 +81,34 @@ export default {
|
||||
},
|
||||
setCenter(code) {
|
||||
this.$jlmap.setCenter(code);
|
||||
},
|
||||
initStationListMode() {
|
||||
this.stationListMode = [];
|
||||
this.$store.state.training.memberList.forEach(item => {
|
||||
if (item.type === 'STATION_SUPERVISOR') {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
||||
this.stationListMode.push({value:item.id, name: station.name});
|
||||
}
|
||||
});
|
||||
},
|
||||
initData() {
|
||||
this.$store.state.training.simulationUserList.forEach(item => {
|
||||
if (item.userId == this.$store.state.user.id) {
|
||||
this.showMemberId = item.memberId;
|
||||
this.oldShowMemberId = item.memberId;
|
||||
}
|
||||
});
|
||||
this.stationList.forEach(item => {
|
||||
if (item.centralized) {
|
||||
this.stationCentralizedMap[item.code] = item.code;
|
||||
item.chargeStationCodeList.forEach(ele => {
|
||||
this.stationCentralizedMap[ele] = item.code;
|
||||
});
|
||||
}
|
||||
});
|
||||
if (this.showMemberId) {
|
||||
this.switchStationMode( this.showMemberId);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -139,10 +139,14 @@ export default {
|
||||
} else if (em.subType == 'enabled' && em.deviceType == 'Switch') {
|
||||
menu = getDeviceMenuByDeviceType('Enabled');
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
|
||||
device = this.getDeviceByEm(em);
|
||||
this.selected = { ...device, _event: MouseEvent.Right};
|
||||
return;
|
||||
} else if (em.subType === 'enabled' && em.deviceType === 'Signal') {
|
||||
menu = getDeviceMenuByDeviceType('Enabled');
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu});
|
||||
device = this.getDeviceByEm(em);
|
||||
this.selected = { ...device, _event: MouseEvent.Right};
|
||||
return;
|
||||
} else if (em.deviceCode && !this.isScreen) {
|
||||
device = this.getDeviceByEm(em);
|
||||
|
@ -44,6 +44,7 @@ export default {
|
||||
if (this.$store.state.training.trainingStart) {
|
||||
const order = this.$store.state.training.order;
|
||||
const steps = this.$store.state.training.steps;
|
||||
|
||||
if (order > -1 && order < steps.length) {
|
||||
const step = steps[order];
|
||||
const distance = 5;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="view-control">
|
||||
<div class="content-box">
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tabs v-model="activeName" type="card">
|
||||
<el-tab-pane label="批量设置集中站" name="first">
|
||||
<div class="select-box">
|
||||
<el-select v-model="stationCode" filterable size="mini">
|
||||
@ -35,7 +35,7 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div v-for="item in showList" :key="item.type" class="content-box-list" style="margin-top: 10px;">
|
||||
<div v-for="item in modelList" :key="item.type" class="content-box-list" style="margin-top: 10px;">
|
||||
<div class="title-box">{{ item.name }}</div>
|
||||
<div class="list-box">
|
||||
<div v-for="nor in item.list" :key="nor.code" class="list-content" @mouseenter="mouseenter(nor)" @mouseleave="mouseleave(nor)">
|
||||
@ -69,7 +69,6 @@ export default {
|
||||
stationCode: '',
|
||||
belongStationCode: '',
|
||||
activeName: 'first',
|
||||
showList: [],
|
||||
modelList: [
|
||||
{
|
||||
type: 'Section',
|
||||
@ -86,13 +85,6 @@ export default {
|
||||
name: '信号机列表',
|
||||
list: []
|
||||
}
|
||||
],
|
||||
modelSignalList: [
|
||||
{
|
||||
type: 'Signal',
|
||||
name: '信号机列表',
|
||||
list: []
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
@ -116,13 +108,6 @@ export default {
|
||||
// this.$emit('setCenter', code);
|
||||
// this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
// },
|
||||
handleClick() {
|
||||
if (this.activeName === 'first') {
|
||||
this.showList = this.modelList;
|
||||
} else {
|
||||
this.showList = this.modelSignalList;
|
||||
}
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() == 'CheckBox'.toUpperCase()) {
|
||||
this.activeName = 'first';
|
||||
@ -137,7 +122,6 @@ export default {
|
||||
this.modelList[1].list.push(item);
|
||||
} else if (item._type == 'Signal') {
|
||||
this.modelList[2].list.push(item);
|
||||
this.modelSignalList[0].list.push(item);
|
||||
}
|
||||
if (item.stationCode == this.seclectDeviceList[0].stationCode) {
|
||||
count++;
|
||||
@ -149,15 +133,12 @@ export default {
|
||||
this.stationCode = '';
|
||||
}
|
||||
this.belongStationCode = this.stationList[0].code;
|
||||
this.showList = this.modelList;
|
||||
}
|
||||
},
|
||||
clearModelList() {
|
||||
this.showList = [];
|
||||
this.modelList.forEach(item => {
|
||||
item.list = [];
|
||||
});
|
||||
this.modelSignalList[0].list = [];
|
||||
},
|
||||
// 删除当前选中
|
||||
delList(model, list) {
|
||||
@ -196,23 +177,35 @@ export default {
|
||||
}
|
||||
},
|
||||
handleBelongStationCode() {
|
||||
if (this.belongStationCode && this.modelSignalList[0].list.length) {
|
||||
if (this.belongStationCode && this.seclectDeviceList && this.seclectDeviceList.length > 0) {
|
||||
const models = [];
|
||||
this.modelSignalList[0].list.forEach(item => {
|
||||
const Model = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item.code));
|
||||
Model.belongStationCode = this.belongStationCode;
|
||||
models.push(Model);
|
||||
this.modelList.forEach(model => { // 通过物理区段调整逻辑区段设备集中站
|
||||
model.list.forEach(item => {
|
||||
const Model = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item.code));
|
||||
if (Model._type == 'Section') {
|
||||
Model.belongStation = this.belongStationCode;
|
||||
} else {
|
||||
Model.belongStationCode = this.belongStationCode;
|
||||
}
|
||||
if (Model._type == 'Section' && Model.logicSectionCodeList && Model.logicSectionCodeList.length) {
|
||||
Model.logicSectionCodeList.forEach(children => {
|
||||
const ModelChild = deepAssign({}, this.$store.getters['map/getDeviceByCode'](children));
|
||||
ModelChild.belongStation = this.belongStationCode;
|
||||
models.push(ModelChild);
|
||||
});
|
||||
}
|
||||
models.push(Model);
|
||||
});
|
||||
});
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$message.success('设置所属车站成功!');
|
||||
this.belongStationCode = '';
|
||||
this.$message.success('设置所属车站成功');
|
||||
this.stationCode = '';
|
||||
}
|
||||
},
|
||||
clearList() { // 清空数据
|
||||
this.stationCode = '';
|
||||
this.belongStationCode = '';
|
||||
this.$store.commit('map/setSeclectDeviceList', []);
|
||||
this.showList = [];
|
||||
this.modelList = [
|
||||
{
|
||||
type: 'Section',
|
||||
@ -230,13 +223,6 @@ export default {
|
||||
list: []
|
||||
}
|
||||
];
|
||||
this.modelSignalList = [
|
||||
{
|
||||
type: 'Signal',
|
||||
name: '信号机列表',
|
||||
list: []
|
||||
}
|
||||
];
|
||||
},
|
||||
mouseenter(model) {
|
||||
if (model._type == 'Section') {
|
||||
|
@ -102,6 +102,7 @@ class Model {
|
||||
this.sectionBCode = '';
|
||||
this.sectionCCode = '';
|
||||
this.tp = { x: 0, y: 0 };
|
||||
this.belongStationCode = '';
|
||||
}
|
||||
StationModel() {
|
||||
this._type = 'Station';
|
||||
@ -140,6 +141,8 @@ class Model {
|
||||
this.createTurnBack = false;
|
||||
// this.turnBackPoint = {x: 0, y: 0}; // 按图折返坐标
|
||||
this.controlModePoint = { x: 0, y: 0 }; // 控制模式坐标
|
||||
this.foldLine = false; // 现地显示是否折行
|
||||
this.foldLineOffset = { x: 0, y: 0 }; // 折行显示偏移
|
||||
}
|
||||
StationStandModel() {
|
||||
this._type = 'StationStand';
|
||||
|
@ -205,13 +205,14 @@ export default {
|
||||
name: this.$t('map.mapData'),
|
||||
item: [
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.centralizedStationList, isHidden: this.isStationCodeDisabled },
|
||||
{ prop: 'belongStation', label: '所属车站:', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, isHidden: !this.editModel.standTrack && !this.editModel.reentryTrack && !this.editModel.transferTrack },
|
||||
{ prop: 'belongStation', label: '所属车站:', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', options: this.stationList},
|
||||
{ prop: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter'), disabled: this.isStationCodeDisabled, isHidden: !this.isSwitchSectionType || !this.isCrossSectionType, button:true, clickFunction: this.divideLength, buttonText: '均分长度' },
|
||||
{ prop: 'logicLengthList', label: '逻辑区段实际长度:', type: 'lengthFact', isHidden: !this.isHasLogicPhysicalSection, mergeLength: this.mergeLength, width: '160px'},
|
||||
{ prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, max: this.maxLengthFact, isHidden: !this.isStopPointOffset }, // 左向停车点偏移量
|
||||
{ prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, max: this.maxLengthFact, isHidden: !this.isStopPointOffset }, // 右向停车点偏移量
|
||||
{ prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList, isHidden: !this.sectionColonShow },
|
||||
{ prop: 'trainWindowCode', label: '关联车次窗', type: 'input', disabled: true, isHidden: !this.isSwitchSectionShow || !this.isCrossSectionType }
|
||||
{ prop: 'trainWindowCode', label: '关联车次窗', type: 'input', disabled: true, isHidden: !this.isSwitchSectionShow }
|
||||
// || !this.isCrossSectionType
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -227,6 +228,13 @@ export default {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
var validateBelongStation = (rule, value, callback) => {
|
||||
if ((this.editModel.transferTrack || this.editModel.reentryTrack || this.editModel.standTrack) && !value) {
|
||||
callback(new Error( '请选择所属车站' ));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
const rules = {
|
||||
code: [
|
||||
{ required: true, message: this.$t('rules.selectEquipment'), trigger: 'change' }
|
||||
@ -262,7 +270,7 @@ export default {
|
||||
{ required: true, message: this.$t('rules.sectionRelSwitchCode'), trigger: 'change' }
|
||||
],
|
||||
belongStation: [
|
||||
{ required: true, message: '请选择所属车站', trigger: 'change' }
|
||||
{ validator: validateBelongStation, trigger: 'change' }
|
||||
],
|
||||
leftSectionCode: [
|
||||
{ validator: validateAssociatedSection, trigger: 'change' }
|
||||
@ -543,7 +551,6 @@ export default {
|
||||
this.$message('还有属性未填写,修改未生效!');
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
// debugger;
|
||||
});
|
||||
},
|
||||
handleRelevanceStand(model) { // 站台轨关联站台调整 所属集中站
|
||||
@ -569,6 +576,7 @@ export default {
|
||||
if (section.parentCode == model.code && section.type == '02') { // 逻辑区段
|
||||
const copySection = deepAssign({}, section);
|
||||
copySection.stationCode = model.stationCode; // 给元素 子逻辑区段设置 设备集中站
|
||||
copySection.belongStation = model.belongStation;
|
||||
copySection.lengthFact = logicLengthMap[copySection.code];
|
||||
if (this.checkPointsCoincide(this.oldPoint[0], copySection.points[0])) {
|
||||
copySection.points[0] = model.points[0];
|
||||
|
@ -217,7 +217,12 @@ export default {
|
||||
{ prop: 'relStationCodeList', label: '联锁站关联车站:', type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.relStationList, isHidden: !this.idCiStation},
|
||||
{ prop: 'routingStationList', label: '生成交路的车站:', type: 'multiSelectHover', optionLabel: 'name', optionValue: 'code', options: this.stationList, hover: this.hover, buttonType: 'routingStation', buttonShowType: this.routingStationButtonShow },
|
||||
{ prop: 'runPlanName', label: this.$t('map.stationRunPlanName'), type: 'input' },
|
||||
{ prop: 'jp', label: '车站简称', type: 'input' }
|
||||
{ prop: 'jp', label: '车站简称:', type: 'input' },
|
||||
{ prop: 'foldLine', label: '现地显示是否折行:', type: 'checkbox' },
|
||||
{ prop: 'foldLineOffset', label: '折行偏移:', type: 'coordinate', width: '120px', isHidden: !this.editModel.foldLine, children: [
|
||||
{ prop: 'foldLineOffset.x', firstLevel: 'foldLineOffset', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px'},
|
||||
{ prop: 'foldLineOffset.y', firstLevel: 'foldLineOffset', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||
] }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -56,6 +56,7 @@ export default {
|
||||
name: this.$t('map.mapData'),
|
||||
item: [
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList },
|
||||
{ prop: 'belongStationCode', label: '所属车站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
|
||||
{ prop: 'turnTime', label: this.$t('map.turnTime'), type: 'number', min: 0, max: 1000, placeholder: 's' }
|
||||
]
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ export default {
|
||||
rules:{
|
||||
serviceNumber:[
|
||||
{required: true, validator: this.validateServiceNumber, trigger: 'blur'},
|
||||
{required: true, validator: this.validateServiceNumber, trigger: 'change'}
|
||||
{required: true, validator: this.validateServiceNo, trigger: 'change'}
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -65,18 +65,35 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
validateServiceNo(rule, value, callback) {
|
||||
if (typeof value == 'string' && value.trim().length == 0) {
|
||||
return callback(new Error('请填写服务号'));
|
||||
} else {
|
||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||
if (serviceNumberList.includes(value)) {
|
||||
// new Error('该服务号已存在')
|
||||
return callback();
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
}
|
||||
},
|
||||
validateServiceNumber(rule, value, callback) {
|
||||
if (typeof value == 'string' && value.trim().length == 0) {
|
||||
return callback(new Error('请填写服务号'));
|
||||
} else {
|
||||
const newValue = parseInt(value);
|
||||
let newValue = parseInt(value);
|
||||
if (newValue) {
|
||||
if (newValue.toString() != value) {
|
||||
this.formModel.serviceNumber = newValue;
|
||||
if (newValue > 0 & newValue < 9) {
|
||||
newValue = '00' + newValue;
|
||||
} else if (newValue > 10 & newValue < 99) {
|
||||
newValue = '0' + newValue;
|
||||
}
|
||||
this.formModel.serviceNumber = newValue;
|
||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||
if (serviceNumberList.includes(value)) {
|
||||
return callback(new Error('该服务号已存在,请重新填写'));
|
||||
// new Error('该服务号已存在')
|
||||
return callback();
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
|
@ -54,7 +54,8 @@
|
||||
</el-select> -->
|
||||
<!-- </el-col> -->
|
||||
<el-col :span="3" style="margin-left:10px;height: 28px;line-height: 28px;">
|
||||
<span>{{ $t('planMonitor.defaultRunLevel') }}</span>
|
||||
<!-- {{ $t('planMonitor.defaultRunLevel') }} -->
|
||||
<span>运行等级</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="defaultSpeedLevel" size="mini" :placeholder="this.$t('global.choose')">
|
||||
|
@ -59,7 +59,8 @@ export default {
|
||||
rules: {
|
||||
serviceNumber:[
|
||||
{required: true, validator: this.validateServiceNumber, trigger: 'blur'},
|
||||
{required: true, validator: this.validateServiceNumber, trigger: 'change'}
|
||||
// {required: true, validator: this.validateServiceNumber, trigger: 'change'}
|
||||
{required: true, validator: this.validateServiceNo, trigger: 'change'}
|
||||
],
|
||||
beginTime: [
|
||||
{ required: true, message: '请填写开始时间', trigger: 'blur' }
|
||||
@ -138,14 +139,17 @@ export default {
|
||||
if (typeof value == 'string' && value.trim().length == 0) {
|
||||
return callback(new Error('请填写服务号'));
|
||||
} else {
|
||||
const newValue = parseInt(value);
|
||||
let newValue = parseInt(value);
|
||||
if (newValue) {
|
||||
if (newValue.toString() != value) {
|
||||
this.formModel.serviceNumber = newValue;
|
||||
if (newValue > 0 & newValue < 9) {
|
||||
newValue = '00' + newValue;
|
||||
} else if (newValue > 10 & newValue < 99) {
|
||||
newValue = '0' + newValue;
|
||||
}
|
||||
this.formModel.serviceNumber = newValue;
|
||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||
if (serviceNumberList.includes(value)) {
|
||||
return callback(new Error('该服务号已存在,请重新填写'));
|
||||
return callback(new Error('该服务号已存在'));
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
@ -155,6 +159,18 @@ export default {
|
||||
|
||||
}
|
||||
},
|
||||
validateServiceNo(rule, value, callback) {
|
||||
if (typeof value == 'string' && value.trim().length == 0) {
|
||||
return callback(new Error('请填写服务号'));
|
||||
} else {
|
||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||
if (serviceNumberList.includes(value)) {
|
||||
return callback(new Error('该服务号已存在'));
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
}
|
||||
},
|
||||
validateRunningRouting(rule, value, callback) {
|
||||
if (value.trim().length == 0) {
|
||||
return callback(new Error('请选择环路'));
|
||||
@ -204,7 +220,7 @@ export default {
|
||||
this.$store.dispatch('runPlan/refresh');
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
this.doClose();
|
||||
// this.doClose();
|
||||
this.$messageBox(error.message);
|
||||
});
|
||||
});
|
||||
|
@ -49,7 +49,7 @@
|
||||
<span style="margin-left: 10px">{{ formatName(scope.row.startStationCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startSectionCode" :label="$t('planMonitor.modifying.startSection')">
|
||||
<el-table-column prop="startSectionCode" :label="$t('planMonitor.modifying.startSection')" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ formatName(scope.row.startSectionCode) }}</span>
|
||||
</template>
|
||||
@ -59,7 +59,7 @@
|
||||
<span style="margin-left: 10px">{{ formatName(scope.row.endStationCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endSectionCode" :label="$t('planMonitor.modifying.endSection')">
|
||||
<el-table-column prop="endSectionCode" :label="$t('planMonitor.modifying.endSection')" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ formatName(scope.row.endSectionCode) }}</span>
|
||||
</template>
|
||||
@ -69,9 +69,10 @@
|
||||
<span style="margin-left: 10px">{{ scope.row.right?'上行':'下行' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="distance" :label="$t('planMonitor.modifying.distance')" width="65">
|
||||
<el-table-column prop="distance" :label="$t('planMonitor.modifying.distance')" width="85">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.distance }}</span>
|
||||
<!-- <el-input v-model="scope.row.distance" class="input_text_box" /> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<div>
|
||||
@ -104,6 +105,7 @@
|
||||
</el-table>
|
||||
</el-row>
|
||||
<div class="button-group" style="text-align: center; margin-top: 10px;">
|
||||
<el-button @click="handleStationDistance">更新距离</el-button>
|
||||
<el-button @click="doClose">关闭</el-button>
|
||||
<el-button @click="handleStationTime">更新</el-button>
|
||||
</div>
|
||||
@ -111,7 +113,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { formatName } from '@/utils/runPlan';
|
||||
import { setStationRunning, getMapStationRunUser } from '@/api/runplan';
|
||||
import { setStationRunning, getMapStationRunUser, updateRunlevelDistance } from '@/api/runplan';
|
||||
|
||||
export default {
|
||||
name: 'ModifyingStationIntervalTime',
|
||||
@ -150,17 +152,17 @@ export default {
|
||||
this.$ConstSelect.DirectionCodeList.forEach(elem => {
|
||||
this.DirectionCodeMap[elem.value] = elem.label;
|
||||
});
|
||||
|
||||
this.stationIntervalData = [];
|
||||
if (this.$route.query.lineCode) {
|
||||
getMapStationRunUser(this.$route.query.mapId).then(resp =>{
|
||||
const list = resp.data.list;
|
||||
this.stationIntervalData = [];
|
||||
this.stationIntervalData = list;
|
||||
this.form.level1 = '';
|
||||
this.form.level2 = '';
|
||||
this.form.level3 = '';
|
||||
this.form.level4 = '';
|
||||
this.form.level5 = '';
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -184,8 +186,29 @@ export default {
|
||||
handleStationTime() {
|
||||
setStationRunning(this.$route.query.mapId, this.stationIntervalData).then(resp => {
|
||||
this.$message.success(this.$t('planMonitor.modifying.modifySuccess'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('planMonitor.modifying.modifyFailed'));
|
||||
}).catch((error) => {
|
||||
this.$messageBox(this.$t('planMonitor.modifying.modifyFailed') + ': ' + error.message);
|
||||
});
|
||||
},
|
||||
handleStationDistance() {
|
||||
updateRunlevelDistance(this.$route.query.mapId).then(resp => {
|
||||
if (resp.data) {
|
||||
this.$message.success('更新成功');
|
||||
const list = resp.data;
|
||||
const stationIntervalData = [];
|
||||
this.stationIntervalData.forEach(station=>{
|
||||
if (list[station.id]) {
|
||||
const tempStation = Object.assign({}, station);
|
||||
tempStation.distance = list[station.id];
|
||||
stationIntervalData.push(tempStation);
|
||||
}
|
||||
});
|
||||
this.stationIntervalData = stationIntervalData;
|
||||
} else {
|
||||
this.$messageBox('更新失败:数据为空');
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$messageBox('更新失败: ' + error.message);
|
||||
});
|
||||
},
|
||||
doShow(params) {
|
||||
|
@ -10,12 +10,17 @@
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<!-- <el-row>
|
||||
<el-col :span="6" :offset="2" style="height: 30px; line-height: 30px;">{{ $t('planMonitor.serviceNumber2')+$t('global.colon') }}</el-col>
|
||||
<el-col :span="10" :offset="1">
|
||||
<el-input v-model="serviceNumber" size="mini" maxlength="3" minlength="2" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
<el-form ref="form" :rules="rules" :model="formModel" label-width="100px" size="medium" @submit.native.prevent>
|
||||
<el-form-item prop="serviceNumber" :label="$t('planMonitor.serviceNumber2')+$t('global.colon')" :required="true">
|
||||
<el-input v-model="formModel.serviceNumber" type="text" size="mini" maxlength="3" minlength="2" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
||||
@ -40,7 +45,15 @@ export default {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
serviceNumber: ''
|
||||
formModel:{
|
||||
serviceNumber: ''
|
||||
},
|
||||
rules:{
|
||||
serviceNumber:[
|
||||
{required: true, validator: this.validateServiceNumber, trigger: 'blur'},
|
||||
{required: true, validator: this.validateServiceNo, trigger: 'change'}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -58,37 +71,75 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
validateServiceNo(rule, value, callback) {
|
||||
if (typeof value == 'string' && value.trim().length == 0) {
|
||||
return callback(new Error('请填写服务号'));
|
||||
} else {
|
||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||
if (serviceNumberList.includes(value)) {
|
||||
// new Error('该服务号已存在');
|
||||
return callback();
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
}
|
||||
},
|
||||
validateServiceNumber(rule, value, callback) {
|
||||
if (typeof value == 'string' && value.trim().length == 0) {
|
||||
return callback(new Error('请填写服务号'));
|
||||
} else {
|
||||
let newValue = parseInt(value);
|
||||
if (newValue) {
|
||||
if (newValue > 0 & newValue < 9) {
|
||||
newValue = '00' + newValue;
|
||||
} else if (newValue > 10 & newValue < 99) {
|
||||
newValue = '0' + newValue;
|
||||
}
|
||||
this.formModel.serviceNumber = newValue;
|
||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||
if (serviceNumberList.includes(value)) {
|
||||
// new Error('该服务号已存在')
|
||||
return callback();
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
} else {
|
||||
this.formModel.serviceNumber = '';
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
handleCommit() {
|
||||
if (this.$route.query.planId || this.loadRunPlanId) {
|
||||
if (this.serviceNumber.length >= 2 && this.serviceNumber.length <= 3) {
|
||||
checkServiceNumberExist({ planId: this.$route.query.planId || this.loadRunPlanId, serviceNumber: this.serviceNumber }).then(resp => {
|
||||
if (resp.data) {
|
||||
this.$emit('dispatchDialog', {
|
||||
name: 'offLine',
|
||||
params: {
|
||||
type: 'warning',
|
||||
operate: 'AddPlanningTrain',
|
||||
width: 460,
|
||||
message: this.$t('tip.serviceNumberExistHint')
|
||||
}
|
||||
});
|
||||
checkServiceNumberExist({ planId: this.$route.query.planId || this.loadRunPlanId, serviceNumber: this.formModel.serviceNumber }).then(resp => {
|
||||
if (resp.data) {
|
||||
this.$emit('dispatchDialog', {
|
||||
name: 'offLine',
|
||||
params: {
|
||||
type: 'warning',
|
||||
operate: 'AddPlanningTrain',
|
||||
width: 460,
|
||||
message: this.$t('tip.serviceNumberExistHint')
|
||||
}
|
||||
});
|
||||
|
||||
this.doClose();
|
||||
} else {
|
||||
this.handleConfirm(true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('长度在二到三位');
|
||||
}
|
||||
this.doClose();
|
||||
} else {
|
||||
this.handleConfirm(true);
|
||||
}
|
||||
});
|
||||
// if (this.serviceNumber.length >= 2 && this.serviceNumber.length <= 3) {
|
||||
// } else {
|
||||
// this.$messageBox('长度在二到三位');
|
||||
// }
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.chooseToOpenTheRunGraph'));
|
||||
}
|
||||
},
|
||||
handleConfirm(isNew = false) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('runPlan/addserviceNumber', this.serviceNumber);
|
||||
this.$emit('dispatchDialog', { name: 'editPlanningTrain', params: { serviceNumber: this.serviceNumber, isNew:isNew } });
|
||||
this.$store.dispatch('runPlan/addserviceNumber', this.formModel.serviceNumber);
|
||||
this.$emit('dispatchDialog', { name: 'editPlanningTrain', params: { serviceNumber: this.formModel.serviceNumber, isNew:isNew } });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -54,7 +54,7 @@
|
||||
</el-select> -->
|
||||
<!-- </el-col> -->
|
||||
<el-col :span="3" style="margin-left:10px;height: 28px;line-height: 28px;">
|
||||
<span>{{ $t('planMonitor.defaultRunLevel') }}</span>
|
||||
<span>运行等级</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="defaultSpeedLevel" size="mini" :placeholder="this.$t('global.choose')">
|
||||
|
@ -22,9 +22,7 @@ export default {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formModel: {
|
||||
address: '',
|
||||
name: '',
|
||||
phone: '',
|
||||
id: '',
|
||||
projectCode: ''
|
||||
},
|
||||
@ -37,8 +35,6 @@ export default {
|
||||
labelWidth: '100px',
|
||||
items: [
|
||||
{ prop: 'name', label: '名称', type: 'text' },
|
||||
{ prop: 'phone', label: '电话', type: 'text' },
|
||||
{ prop: 'address', label: '地址', type: 'text' },
|
||||
{ prop: 'projectCode', label: '关联项目', type: 'select', options: this.projectListNew}
|
||||
]
|
||||
};
|
||||
@ -50,12 +46,6 @@ export default {
|
||||
{ required: true, message: '请输入单位名称', trigger: 'blur' },
|
||||
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: '请输入公司电话', trigger: 'blur' }
|
||||
],
|
||||
address:[
|
||||
{ required: true, message: '请输入公司地址', trigger: 'blur'}
|
||||
],
|
||||
projectCode: [
|
||||
{ required: true, message: '请选择关联项目', trigger: 'change'}
|
||||
]
|
||||
@ -75,8 +65,6 @@ export default {
|
||||
this.formModel = {
|
||||
id: data.id,
|
||||
name: data.name,
|
||||
phone: data.phone,
|
||||
address: data.address,
|
||||
projectCode: data.projectCode
|
||||
};
|
||||
}
|
||||
@ -85,9 +73,7 @@ export default {
|
||||
this.dialogVisible = false;
|
||||
this.update = false;
|
||||
this.formModel = {
|
||||
address: '',
|
||||
name: '',
|
||||
phone: '',
|
||||
id: '',
|
||||
projectCode: ''
|
||||
};
|
||||
|
@ -40,14 +40,14 @@ export default {
|
||||
title: '单位名称',
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '单位电话',
|
||||
prop: 'phone'
|
||||
},
|
||||
{
|
||||
title: '单位地址',
|
||||
prop: 'address'
|
||||
},
|
||||
// {
|
||||
// title: '单位电话',
|
||||
// prop: 'phone'
|
||||
// },
|
||||
// {
|
||||
// title: '单位地址',
|
||||
// prop: 'address'
|
||||
// },
|
||||
{
|
||||
title: '关联项目',
|
||||
prop: 'projectCode',
|
||||
@ -55,13 +55,13 @@ export default {
|
||||
columnValue: (row) => { return this.projectMap[row.projectCode]; },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '单位管理人员',
|
||||
prop: 'managerNames',
|
||||
type: 'tagMore',
|
||||
columnValue: (row) => { return row.managerNames; },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
// {
|
||||
// title: '单位管理人员',
|
||||
// prop: 'managerNames',
|
||||
// type: 'tagMore',
|
||||
// columnValue: (row) => { return row.managerNames; },
|
||||
// tagType: (row) => { return 'success'; }
|
||||
// },
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag title="绑定单位" :visible.sync="dialogVisible" width="30%" :before-close="doClose" center :close-on-click-modal="false">
|
||||
<el-dialog v-dialogDrag title="绑定单位管理员" :visible.sync="dialogVisible" width="30%" :before-close="doClose" center :close-on-click-modal="false">
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
|
||||
@ -72,7 +72,7 @@ export default {
|
||||
this.doClose();
|
||||
this.$emit('create');
|
||||
}).catch((error) => {
|
||||
this.$message.error('绑定单位失败: ' + error.message);
|
||||
this.$message.error('绑定单位管理员失败: ' + error.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ export default {
|
||||
formModel: {
|
||||
id: '',
|
||||
name: '',
|
||||
companyId: '',
|
||||
roles: []
|
||||
}
|
||||
};
|
||||
@ -38,8 +37,7 @@ export default {
|
||||
labelWidth: '100px',
|
||||
items: [
|
||||
{ prop: 'name', label: this.$t('system.name'), type: 'text', disabled: true },
|
||||
{ prop: 'roles', label: this.$t('system.permission'), type: 'select', required: true, options: this.$ConstSelect.roleList, multiple: true },
|
||||
{ prop: 'companyId', label: '单位', type: 'select', options: this.companyList, clearable: true }
|
||||
{ prop: 'roles', label: this.$t('system.permission'), type: 'select', required: true, options: this.$ConstSelect.roleList, multiple: true }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -66,7 +64,6 @@ export default {
|
||||
this.formModel = {
|
||||
id: data.id,
|
||||
name: data.name,
|
||||
companyId: data.companyId,
|
||||
roles: data.roles
|
||||
};
|
||||
}
|
||||
@ -91,7 +88,6 @@ export default {
|
||||
this.formModel = {
|
||||
id: '',
|
||||
name: '',
|
||||
companyId: '',
|
||||
roles: []
|
||||
};
|
||||
this.$refs.dataform.resetForm();
|
||||
|
@ -92,7 +92,7 @@ export default {
|
||||
handleClick: this.handleUserEdit
|
||||
},
|
||||
{
|
||||
name: '绑定单位',
|
||||
name: '绑定单位管理员',
|
||||
handleClick: this.handleBind
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user