Merge remote-tracking branch 'remotes/origin/test'
This commit is contained in:
commit
a776dac447
@ -409,7 +409,8 @@ class SkinCode extends defaultStyle {
|
||||
grayColor: '#7F7F7F', // 控制模式灰色
|
||||
greenColor: '#00FF00', // 控制模式绿色
|
||||
redColor: '#FF0000', // 控制模式红色
|
||||
yellowColor: '#FFFF00' // 控制模式黄色
|
||||
yellowColor: '#FFFF00', // 控制模式黄色
|
||||
purpleColor:'#840084' // 控制模式紫色
|
||||
},
|
||||
emergencyControl: { // 紧急站控
|
||||
show: true,
|
||||
|
@ -314,7 +314,7 @@ class Jlmap {
|
||||
});
|
||||
}
|
||||
// 模式选择 -> 更新
|
||||
updateShowMode(list=[], showMode=false) {
|
||||
updateShowMode(list = [], showMode = false) {
|
||||
this.showConfig.showMode = showMode;
|
||||
list.forEach(elem => {
|
||||
const code = elem.code;
|
||||
@ -328,7 +328,7 @@ class Jlmap {
|
||||
getShowConfig() {
|
||||
return this.showConfig;
|
||||
}
|
||||
updateShowStation(list=[], stationCode=false) {
|
||||
updateShowStation(list = [], stationCode = false) {
|
||||
this.stationCode = stationCode;
|
||||
list.forEach(elem => {
|
||||
const code = elem.code;
|
||||
@ -348,7 +348,11 @@ class Jlmap {
|
||||
}
|
||||
});
|
||||
this.$painter.$transformHandle.revisibleAll();
|
||||
this.$painter.$transformHandle.setStationFlag(stationCode);
|
||||
if (stationCode) {
|
||||
this.$painter.$transformHandle.setFoldLines(store.state.map.foldLineMap[stationCode]);
|
||||
} else {
|
||||
this.$painter.$transformHandle.setFoldLines([]);
|
||||
}
|
||||
}
|
||||
showStationHandlePsd(oDevice, stationCode) {
|
||||
const standDevice = this.mapDevice[oDevice.standCode];
|
||||
@ -393,7 +397,7 @@ class Jlmap {
|
||||
this.$painter.updateShowMode(oDevice);
|
||||
});
|
||||
}
|
||||
update(list=[]) {
|
||||
update(list = []) {
|
||||
this.setUpdateMapDevice(list); // 增加一个 前数据 处理 为了在区段中 获取全部的 道岔信息
|
||||
const codeList = [];
|
||||
const controlTransferList = [];
|
||||
@ -469,7 +473,7 @@ class Jlmap {
|
||||
this.$painter.update(psdDevice);
|
||||
}
|
||||
} else if (elem.deviceType == 'SWITCH') {
|
||||
const oDevice = this.mapDevice[code]
|
||||
const oDevice = this.mapDevice[code];
|
||||
if (oDevice) {
|
||||
const sectionA = this.mapDevice[oDevice.sectionACode];
|
||||
const sectionB = this.mapDevice[oDevice.sectionBCode];
|
||||
@ -481,7 +485,7 @@ class Jlmap {
|
||||
|
||||
this.$painter.update(oDevice);
|
||||
} else if (elem.deviceType == 'SECTION') {
|
||||
const oDevice = this.mapDevice[code]
|
||||
const oDevice = this.mapDevice[code];
|
||||
if (oDevice) {
|
||||
const sDevice = this.mapDevice[oDevice.relSwitchCode];
|
||||
if (sDevice) {
|
||||
|
@ -62,4 +62,8 @@ export default class Arrow extends Group {
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
const rect = this.arrow.getBoundingRect();
|
||||
return { x:rect.x, y:rect.y };
|
||||
}
|
||||
}
|
||||
|
@ -207,4 +207,7 @@ export default class AutoTurnBack extends Group {
|
||||
screenShow() {
|
||||
this.hideMode();
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
@ -156,4 +156,7 @@ export default class AutomacticRoute extends Group {
|
||||
this.text && this.text.hide();
|
||||
this.subtitleText && this.subtitleText.hide();
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
@ -151,4 +151,7 @@ export default class AxleReset extends Group {
|
||||
this.text && this.text.hide();
|
||||
this.subtitleText && this.subtitleText.hide();
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
@ -1,95 +0,0 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Polyline from 'zrender/src/graphic/shape/Polyline';
|
||||
|
||||
export default class Cross extends Group {
|
||||
// _type: 'Cross',
|
||||
// code: getUID('Cross', this.crossList),
|
||||
// position:each.position,
|
||||
// relatedSwitch:each.relatedSwitch
|
||||
constructor(model, style) {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 0;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.isShowShape = true;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
// position;
|
||||
// relatedSwitch;
|
||||
// model.position.x,
|
||||
// model.position.y,
|
||||
// const relatedSwitchList = model.relatedSwitch;
|
||||
const offset = this.style.Section.line.width / (2 * 0.7071);
|
||||
const points = [
|
||||
[model.position.x, model.position.y + offset],
|
||||
[model.position.x + offset, model.position.y + offset],
|
||||
[model.position.x, model.position.y + 2 * offset],
|
||||
[model.position.x - offset, model.position.y + offset],
|
||||
[model.position.x, model.position.y + offset]
|
||||
];
|
||||
this.centerSquare = new Polyline({
|
||||
zlevel: this.zlevel,
|
||||
z:this.z + 1,
|
||||
shape: {
|
||||
points:points
|
||||
},
|
||||
style: {
|
||||
stroke: this.style.Cross.centerSquare.defaultColor,
|
||||
fill:this.style.Cross.centerSquare.defaultColor
|
||||
}
|
||||
});
|
||||
this.add(this.centerSquare);
|
||||
// let relatedSwitchList[0].sectionCCode
|
||||
// if (model && model.points.length > 1) {
|
||||
// const points = [];
|
||||
// const modelPoints = model.points;
|
||||
// const length = modelPoints.length;
|
||||
// for (let i = 0; i < length; i++) {
|
||||
// points.push([modelPoints[i].x, modelPoints[i].y]);
|
||||
// }
|
||||
// this.segment = new Polyline({
|
||||
// zlevel: this.zlevel,
|
||||
// z:this.z,
|
||||
// shape: {
|
||||
// points:points
|
||||
// },
|
||||
// style: {
|
||||
// lineWidth: model.width,
|
||||
// stroke: model.lineColor || this.style.lineColor
|
||||
// }
|
||||
// });
|
||||
// this.add(this.segment);
|
||||
// }
|
||||
}
|
||||
|
||||
setLineType(type) {
|
||||
switch (type) {
|
||||
case '01': break;
|
||||
case '02':
|
||||
this.segment && this.segment.setStyle('lineDash', this.style.lineDash || [4]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
this.setLineType(model.type);
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.segment && this.segment.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.segment && this.segment.hide();
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
@ -114,4 +114,8 @@ export default class DirectionRod extends Group {
|
||||
this.rod && this.rod.hide();
|
||||
this.tipText && this.tipText.hide();
|
||||
}
|
||||
getAnchorPoint() {
|
||||
const rect = this.rod.getBoundingRect();
|
||||
return {x: rect.x, y: rect.y};
|
||||
}
|
||||
}
|
||||
|
@ -76,4 +76,7 @@ export default class FloodGate extends Group {
|
||||
hideMode() {
|
||||
this.floodGate && this.floodGate.hide();
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
@ -156,4 +156,7 @@ export default class GuideLock extends Group {
|
||||
this.text && this.text.hide();
|
||||
this.subtitleText && this.subtitleText.hide();
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
@ -88,4 +88,7 @@ export default class LcControl extends Group {
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
@ -93,4 +93,7 @@ export default class LimitControl extends Group {
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
@ -20,8 +20,42 @@ export default class Line2 extends Group {
|
||||
const model = this.model;
|
||||
if (model && model.points.length > 1) {
|
||||
const points = [];
|
||||
const vicePoints = [];
|
||||
const modelPoints = model.points;
|
||||
const length = modelPoints.length;
|
||||
const path = window.location.href;
|
||||
if (model.type === '03' && !path.includes('/map/draw')) {
|
||||
for (let i = 0; i < length; i++) {
|
||||
points.push([modelPoints[i].x + 10, modelPoints[i].y]);
|
||||
}
|
||||
this.segment = new Polyline({
|
||||
zlevel: this.zlevel,
|
||||
z:this.z,
|
||||
shape: {
|
||||
points:points
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.width,
|
||||
stroke: model.lineColor || this.style.lineColor
|
||||
}
|
||||
});
|
||||
this.add(this.segment);
|
||||
for (let i = 0; i < length; i++) {
|
||||
vicePoints.push([modelPoints[i].x - model.offsetX, modelPoints[i].y + model.offsetY]);
|
||||
}
|
||||
this.viceSegment = new Polyline({
|
||||
zlevel: this.zlevel,
|
||||
z:this.z,
|
||||
shape: {
|
||||
points:vicePoints
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.width,
|
||||
stroke: model.lineColor || this.style.lineColor
|
||||
}
|
||||
});
|
||||
this.add(this.viceSegment);
|
||||
} else {
|
||||
for (let i = 0; i < length; i++) {
|
||||
points.push([modelPoints[i].x, modelPoints[i].y]);
|
||||
}
|
||||
@ -39,6 +73,7 @@ export default class Line2 extends Group {
|
||||
this.add(this.segment);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setLineType(type) {
|
||||
switch (type) {
|
||||
@ -46,6 +81,10 @@ export default class Line2 extends Group {
|
||||
case '02':
|
||||
this.segment && this.segment.setStyle('lineDash', this.style.lineDash || [4]);
|
||||
break;
|
||||
case '03':
|
||||
this.segment && this.segment.setStyle('lineDash', this.style.lineDash || [4]);
|
||||
this.viceSegment && this.viceSegment.setStyle('lineDash', this.style.lineDash || [4]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,18 +98,30 @@ export default class Line2 extends Group {
|
||||
const showConditions = this.model.showConditions;
|
||||
if (!showConditions || showConditions === '01' || showMode === showConditions) {
|
||||
this.segment && this.segment.show();
|
||||
this.viceSegment && this.viceSegment.show();
|
||||
} else {
|
||||
this.segment && this.segment.hide();
|
||||
this.viceSegment && this.viceSegment.hide();
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.segment && this.segment.show();
|
||||
this.viceSegment && this.viceSegment.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.segment && this.segment.hide();
|
||||
this.viceSegment && this.viceSegment.hide();
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
if (this.segment) {
|
||||
const rect = this.segment.getBoundingRect();
|
||||
return {x:rect.x, y:rect.y};
|
||||
} else {
|
||||
return {x:0, y:0};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -69,4 +69,10 @@ export default class OutFrame extends Group {
|
||||
screenShow() {
|
||||
this.box && this.box.hide();
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return {
|
||||
x: this.model.position.x - this.model.width / 2,
|
||||
y: this.model.position.y - this.model.height / 2
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -78,4 +78,8 @@ export default class OverAp extends Group {
|
||||
screenShow() {
|
||||
|
||||
}
|
||||
getAnchorPoint() {
|
||||
const rect = this.getBoundingRect();
|
||||
return {x: rect.x, y: rect.y};
|
||||
}
|
||||
}
|
||||
|
@ -153,4 +153,8 @@ export default class Line2 extends Group {
|
||||
child.hide();
|
||||
});
|
||||
}
|
||||
getAnchorPoint() {
|
||||
const rect = this.getBoundingRect();
|
||||
return {x: rect.x, y: rect.y};
|
||||
}
|
||||
}
|
||||
|
@ -82,4 +82,7 @@ export default class Line2 extends Group {
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
@ -79,4 +79,7 @@ export default class Resource extends Group {
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ export default class Responder extends Group {
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.isShowShape = true;
|
||||
this.anchorPoint = {x: 0, y: 0};
|
||||
this.z = model.z || 19;
|
||||
if (model.previewOrMapDraw) {
|
||||
this.create();
|
||||
@ -41,7 +42,7 @@ export default class Responder extends Group {
|
||||
create() {
|
||||
const model = this.model;
|
||||
const responderStyle = this.style.Responder || defaultStyle;
|
||||
const radian = -Math.PI / 180 * Number(model.rotate-90);
|
||||
const radian = -Math.PI / 180 * Number(model.rotate - 90);
|
||||
const distanceX = -responderStyle.distance * Math.cos(radian);
|
||||
const distanceY = -responderStyle.distance * Math.sin(radian);
|
||||
const blockWidth = responderStyle.block.width || 5;
|
||||
@ -49,7 +50,8 @@ export default class Responder extends Group {
|
||||
const blockStyle = responderStyle.block.mapStyle[model.type] || { fill: '#fff'};
|
||||
const blockX = model.position.x - blockWidth / 2 - distanceX;
|
||||
const blockY = model.position.y - blockHeight / 2 - distanceY;
|
||||
const textRadian = -Math.PI / 180 * Number(180-model.textRotate);
|
||||
this.anchorPoint = {x:blockX, y:blockY};
|
||||
const textRadian = -Math.PI / 180 * Number(180 - model.textRotate);
|
||||
const textDistanceX = model.textOffset.y * Math.sin(textRadian) + model.textOffset.x * Math.cos(textRadian);
|
||||
const textDistanceY = model.textOffset.y * Math.cos(textRadian) - model.textOffset.x * Math.sin(textRadian);
|
||||
const textX = blockX + textDistanceX + blockWidth;
|
||||
@ -119,14 +121,14 @@ export default class Responder extends Group {
|
||||
});
|
||||
|
||||
if (model.rotate) {
|
||||
const rotation = -Math.PI / 180 * Number(model.rotate+180);
|
||||
const rotation = -Math.PI / 180 * Number(model.rotate + 180);
|
||||
[this.block, this.delta1, this.delta2].forEach(el => {
|
||||
this.transformRotation(el, origin, rotation);
|
||||
});
|
||||
}
|
||||
|
||||
if (model.textRotate) {
|
||||
const rotation = -Math.PI / 180 * Number(model.textRotate+180);
|
||||
const rotation = -Math.PI / 180 * Number(model.textRotate + 180);
|
||||
this.transformRotation(this.text, origin, rotation);
|
||||
}
|
||||
|
||||
@ -174,4 +176,7 @@ export default class Responder extends Group {
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.anchorPoint;
|
||||
}
|
||||
}
|
||||
|
@ -229,6 +229,8 @@ export default class SaidLamp extends Group {
|
||||
.when(2000, { fill: this.style.backgroundColor })
|
||||
.start();
|
||||
}
|
||||
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ export default class Section extends Group {
|
||||
/** 非通信车占用状态 03*/
|
||||
unCommunicationOccupied() {
|
||||
if (this.style.Section.preAxleIgnoreFault && this.model.preReset) {
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.line) {
|
||||
@ -175,7 +175,7 @@ export default class Section extends Group {
|
||||
/** ARB故障 */
|
||||
invalid() {
|
||||
if (this.style.Section.preAxleIgnoreFault && this.model.preReset) {
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
|
||||
this.line && this.line.setStyle({
|
||||
@ -519,4 +519,11 @@ export default class Section extends Group {
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
const rect = this.getBoundingRect();
|
||||
return {
|
||||
x:rect.x,
|
||||
y:rect.y
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -954,6 +954,12 @@ class Signal extends Group {
|
||||
setLowButtonRecover() {
|
||||
this.lowButton && this.lowButton.setLowButtonRecover();
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return {
|
||||
x:this.model.position.x + this.model.positionPoint.x,
|
||||
y:this.model.position.y + this.model.positionPoint.y
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default Signal;
|
||||
|
@ -152,4 +152,7 @@ export default class SplitStation extends Group {
|
||||
child.hide();
|
||||
});
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
@ -402,6 +402,17 @@ export default class Station extends Group {
|
||||
this.stationText.setColor('#fff');
|
||||
}
|
||||
|
||||
handleInterlock() { // 联锁控 成都三号线
|
||||
this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.emergencyControl && this.emergencyControl.setTextColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.centerControl && this.centerControl.setTextColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.interconnectedControl && this.interconnectedControl.setColor(this.style.Station.StationControl.lamp.purpleColor);
|
||||
this.interconnectedControl && this.interconnectedControl.setTextColor(this.style.Station.StationControl.lamp.purpleColor);
|
||||
}
|
||||
|
||||
handleNone() { // 空
|
||||
if (this.style.Station.stationText.noneModeColor) {
|
||||
this.stationText.setColor(this.style.Station.stationText.noneModeColor);
|
||||
@ -418,6 +429,8 @@ export default class Station extends Group {
|
||||
this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.text.fontColor);
|
||||
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.centerControl && this.centerControl.setTextColor(this.style.Station.StationControl.text.fontColor);
|
||||
this.interconnectedControl && this.interconnectedControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.interconnectedControl && this.interconnectedControl.setTextColor(this.style.Station.StationControl.text.fontColor);
|
||||
|
||||
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
@ -461,7 +474,7 @@ export default class Station extends Group {
|
||||
|
||||
getShapeTipPoint(opts) {
|
||||
let rect;
|
||||
switch(opts.subDeviceType) {
|
||||
switch (opts.subDeviceType) {
|
||||
case 'button':
|
||||
rect = this.centerControlButton.getArcBoundingRect();
|
||||
break;
|
||||
@ -472,10 +485,10 @@ export default class Station extends Group {
|
||||
rect = this.substationControl.getArcBoundingRect();
|
||||
break;
|
||||
case 'emergency':
|
||||
rect = this.emergencyControl.getArcBoundingRect()
|
||||
rect = this.emergencyControl.getArcBoundingRect();
|
||||
break;
|
||||
case 'interconnected':
|
||||
rect = this.interconnectedControl.getArcBoundingRect()
|
||||
rect = this.interconnectedControl.getArcBoundingRect();
|
||||
break;
|
||||
default:
|
||||
rect = this.stationText.getBoundingRect();
|
||||
@ -542,4 +555,7 @@ export default class Station extends Group {
|
||||
this.eachChild(elem => { elem.hide(); });
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
@ -103,5 +103,8 @@ export default class StationCounter extends Group {
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,4 +121,7 @@ export default class StationDelayUnlock extends Group {
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ class StationStand extends Group {
|
||||
}
|
||||
case 'StationPlatform': {
|
||||
rect = this.stationPlatform.getBoundingRect();
|
||||
break
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
rect = this.getBoundingRect();
|
||||
@ -238,5 +238,8 @@ class StationStand extends Group {
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
export default StationStand;
|
||||
|
@ -185,4 +185,7 @@ export default class StationTurnBack extends Group {
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
@ -745,4 +745,7 @@ export default class Switch extends Group {
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.intersection;
|
||||
}
|
||||
}
|
||||
|
@ -89,4 +89,7 @@ export default class Text2 extends Group {
|
||||
this.text && this.text.show();
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
@ -454,4 +454,7 @@ export default class Train extends Group {
|
||||
// // this.text && this.text.hide();
|
||||
// this.setState(this.model);
|
||||
// }
|
||||
getAnchorPoint() {
|
||||
return this.point;
|
||||
}
|
||||
}
|
||||
|
@ -98,6 +98,9 @@ class TrainWindow extends Group {
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.point || this.model.position;
|
||||
}
|
||||
}
|
||||
|
||||
export default TrainWindow;
|
||||
|
@ -112,4 +112,7 @@ export default class ZcControl extends Group {
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.position;
|
||||
}
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ export default {
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.buttonDown(this.Command.cancel.clearMbm.operation);
|
||||
this.resetMbmButton();
|
||||
},
|
||||
methods: {
|
||||
passWordCommit(data) {
|
||||
@ -325,6 +325,11 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
resetMbmButton() {
|
||||
this.commandTypeList = [];
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
Handler.clear(); // 清空操作组
|
||||
},
|
||||
// 排列进路 OR 信号重开操作
|
||||
arrangementRouteOperation(deviceList) {
|
||||
const operate = {
|
||||
@ -384,7 +389,6 @@ export default {
|
||||
},
|
||||
//
|
||||
handelFunctionButton(model, subType) {
|
||||
// debugger;
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
@ -428,17 +432,26 @@ export default {
|
||||
operate.param = {stationCodes: [model.code]};
|
||||
operate.code = model.code;
|
||||
break;
|
||||
case 'interconnected':
|
||||
// operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
|
||||
delete operate.over;
|
||||
operate.subType = 'interconnected';
|
||||
operate.param = {stationCodes: [model.code]};
|
||||
operate.code = model.code;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
// 判断是否需要 弹窗密码框
|
||||
// const operate = Object.assign({}, operate);
|
||||
if (subType == 'center' || subType == 'emergency') {
|
||||
if (subType == 'center ' || subType == 'emergency' || subType == 'interconnected' ) {
|
||||
operate['operateNext'] = operate.operation = this.Command.close.password.operation;
|
||||
if (subType == 'center') {
|
||||
operate['nextCmdType'] = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
|
||||
} else {
|
||||
} else if (subType == 'emergency') {
|
||||
operate['nextCmdType'] = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
|
||||
} else {
|
||||
operate['nextCmdType'] = CMD.ControlConvertMenu.CMD_CM_INTERLOCK_CONTROL;
|
||||
}
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
@ -651,7 +664,9 @@ export default {
|
||||
} else {
|
||||
operate.cmdType = CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK;
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {
|
||||
this.resetMbmButton();
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
|
@ -82,7 +82,7 @@ export default {
|
||||
operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '请求中控({2})',
|
||||
trainingRemark: '请求请求中控功能',
|
||||
trainingRemark: '请求中控功能',
|
||||
trainingType: 'ControlConvertMenu',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
@ -91,6 +91,21 @@ export default {
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.ControlConvertMenu.CMD_CM_INTERLOCK_CONTROL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '请求联锁控({2})',
|
||||
trainingRemark: '请求联锁控功能',
|
||||
trainingType: 'ControlConvertMenu',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【联锁控】', codeType:'STATION', subType:'interconnected' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// 信号机列表
|
||||
{
|
||||
maxDuration: 15,
|
||||
@ -878,23 +893,42 @@ export default {
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{autoCycleBT:true}
|
||||
},
|
||||
/** 引导总锁 */
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '引导总锁({26})',
|
||||
trainingRemark: '设置引导总锁',
|
||||
trainingType: 'Station',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '609', tip: '鼠标左键点击【引导总锁】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '609', tip: '鼠标左键点击【{26}】', codeType:'BUTTON' }
|
||||
],
|
||||
config:{guideTotalLockBT:true}
|
||||
},
|
||||
/** 取消引导总锁 */
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Station.CMD_STATION_CANCEL_MASTER_GUIDE_LOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消引导总锁({26})',
|
||||
trainingRemark: '取消引导总锁',
|
||||
trainingType: 'Station',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '609', tip: '鼠标左键点击【引导总锁】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '609', tip: '鼠标左键点击【{26}】', codeType:'BUTTON' }
|
||||
],
|
||||
config:{guideTotalLockBT:true}
|
||||
}
|
||||
/** 暂时不生成实训 */
|
||||
// {
|
||||
// maxDuration: 15,
|
||||
// minDuration: 8,
|
||||
// operateType: CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK.value,
|
||||
// skinCode: '04',
|
||||
// trainingName: '引导总锁({3})',
|
||||
// trainingRemark: '进路办理引导总锁',
|
||||
// trainingType: 'Station',
|
||||
// productTypes: ['01'],
|
||||
// stepVOList: [
|
||||
// { deviceType: '04', orderNum: 1, operateCode: '1190', tip: '鼠标左键点击【引导总锁】' },
|
||||
// { deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
// { deviceType: '04', orderNum: 3, operateCode: '1190', tip: '鼠标左键点击【{5}】', codeType:'GUIDELOCK' }
|
||||
// ]
|
||||
// }
|
||||
|
||||
// totalGuideLock
|
||||
//
|
||||
]
|
||||
};
|
||||
|
@ -104,7 +104,8 @@ export default {
|
||||
message: '',
|
||||
timeCountCommand: -1,
|
||||
timeCountConfirm: -1,
|
||||
stationName: ''
|
||||
stationName: '',
|
||||
selected: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -232,6 +233,7 @@ export default {
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
if (!this.dialogShow) {
|
||||
this.selected = selected;
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
|
||||
this.stationName = selected.name;
|
||||
|
@ -25,13 +25,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
export default {
|
||||
name: 'ConfirmTip',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
message: '',
|
||||
confirmId: ''
|
||||
operation: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -40,6 +43,13 @@ export default {
|
||||
},
|
||||
title() {
|
||||
return '确认对话框';
|
||||
},
|
||||
confirmId() {
|
||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||
return OperationEvent.Signal.arrangementRoute.secondaryConfirm.operation;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -47,12 +57,23 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.message = operate.message || '<div>命令:进路设置</div><div>始端信号机:xxx</div><div>进路:测试进路 </div>';
|
||||
this.message = operate.message || '';
|
||||
this.dialogShow = true;
|
||||
this.confirmId = operate.confirmId;
|
||||
this.operation = operate.operation;
|
||||
},
|
||||
confirm() {
|
||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||
const step = {
|
||||
operation: OperationEvent.Signal.arrangementRoute.secondaryConfirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
};
|
||||
commitOperate(step, {}, 2).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$emit('close');
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
|
@ -217,10 +217,13 @@ export default {
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then(({valid})=>{
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 1).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](this.row.startSignalCode);
|
||||
operate.message = `<div>命令:进路设置</div><div>始端信号机:${signal.name}</div><div>进路:${this.row.name} </div>`;
|
||||
this.$refs.confirmTip.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
|
@ -430,7 +430,7 @@ export default {
|
||||
minDuration: 8,
|
||||
operateType: 'Switch_Confirm_Axis_Valid',
|
||||
skinCode: '06',
|
||||
trainingName: '确认计轴有效({8}{9})',
|
||||
trainingName: '确认计轴有效({7})',
|
||||
trainingRemark: '确认计轴有效功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
|
@ -1,11 +1,10 @@
|
||||
import store from '@/store/index';
|
||||
import {createTransform, createBoundingRect} from './utils/parser';
|
||||
|
||||
class TransformHandle {
|
||||
constructor(painter) {
|
||||
this.$painter = painter;
|
||||
|
||||
this.stationFlag = false;
|
||||
this.foldLines = [];
|
||||
|
||||
this.parentLevel = painter.getParentLevel();
|
||||
|
||||
@ -27,49 +26,84 @@ class TransformHandle {
|
||||
}
|
||||
view.dirty();
|
||||
}
|
||||
setStationFlag(stationCode) {
|
||||
this.stationFlag = !!stationCode;
|
||||
setFoldLines(lines) {
|
||||
this.foldLines = lines;
|
||||
}
|
||||
// 视图进行缩放/平移
|
||||
transformView(view) {
|
||||
if (view) {
|
||||
view.transform = this.transform;
|
||||
if (this.stationFlag) {
|
||||
this.handleStationShow(view);
|
||||
if (this.foldLines && this.foldLines.length) {
|
||||
this.handleFoldShow(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);
|
||||
handleFoldShow(view) {
|
||||
if (view.model && view.model.instance && !(view.model._type === 'Line' && view.model.type === '03')) {
|
||||
const anchorPoint = view.model.instance.getAnchorPoint();
|
||||
if (!anchorPoint) { return; }
|
||||
this.foldLines.forEach(item => {
|
||||
const conditionsList = [];
|
||||
let index = 0; let minIndex = 0; let maxIndex = 0; let minValue; let maxValue;
|
||||
for (let i = 0; i < item.points.length - 1; i++) {
|
||||
if (item.points[i].y === item.points[i + 1].y) {
|
||||
continue;
|
||||
} else if (item.points[i].x === item.points[i + 1].x) {
|
||||
const condition = {
|
||||
minValue: Math.min(item.points[i].y, item.points[i + 1].y),
|
||||
maxValue: Math.max(item.points[i].y, item.points[i + 1].y),
|
||||
getStandardX: () => { return item.points[i].x; }
|
||||
};
|
||||
conditionsList.push(condition);
|
||||
if ((minValue && minValue > condition.minValue) || !minValue) {
|
||||
minValue = condition.minValue;
|
||||
minIndex = conditionsList.length;
|
||||
}
|
||||
if ((maxValue && maxValue < condition.maxValue) || !maxValue) {
|
||||
maxValue = condition.maxValue;
|
||||
maxIndex = conditionsList.length;
|
||||
}
|
||||
if ((anchorPoint.y >= condition.minValue && anchorPoint.y <= condition.maxValue)) {
|
||||
index = conditionsList.length;
|
||||
}
|
||||
} else {
|
||||
const condition = {
|
||||
minValue: Math.min(item.points[i].y, item.points[i + 1].y),
|
||||
maxValue: Math.max(item.points[i].y, item.points[i + 1].y),
|
||||
getStandardX: (val) => {
|
||||
const m = (item.points[i].x - item.points[i + 1].x) / (item.points[i].y - item.points[i + 1].y);
|
||||
const n = item.points[i].x - (item.points[i].y * m);
|
||||
return val * m + n;
|
||||
}
|
||||
};
|
||||
conditionsList.push(condition);
|
||||
if ((anchorPoint.y >= condition.minValue && anchorPoint.y <= condition.maxValue)) {
|
||||
index = conditionsList.length;
|
||||
}
|
||||
}
|
||||
handleStationViewTransform(view, station) {
|
||||
if (station && 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
|
||||
}
|
||||
if (index) {
|
||||
const standardX = conditionsList[index - 1].getStandardX(anchorPoint.y);
|
||||
anchorPoint.x >= standardX && this.handleFoldViewTransform(view, item);
|
||||
} else if ( anchorPoint.y > maxValue) {
|
||||
const standardX = conditionsList[maxIndex - 1].getStandardX(anchorPoint.y);
|
||||
anchorPoint.x >= standardX && this.handleFoldViewTransform(view, item);
|
||||
} else if (anchorPoint.y < minValue) {
|
||||
const standardX = conditionsList[minIndex - 1].getStandardX(anchorPoint.y);
|
||||
anchorPoint.x >= standardX && this.handleFoldViewTransform(view, item);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
handleFoldViewTransform(view, line) {
|
||||
view.transform = createTransform({
|
||||
scaleRate: this.$painter.$jmap.$options.scaleRate,
|
||||
offsetX: this.$painter.$jmap.$options.offsetX + line.offsetX * this.$painter.$jmap.$options.scaleRate,
|
||||
offsetY: this.$painter.$jmap.$options.offsetY - line.offsetY * this.$painter.$jmap.$options.scaleRate
|
||||
});
|
||||
}
|
||||
// 处理所有视图缩放/平移
|
||||
transformAll() {
|
||||
|
@ -95,7 +95,8 @@ export default {
|
||||
controlMode: [
|
||||
{ label: '中控', value: 'OperateCenterControl' },
|
||||
{ label: '站控', value: 'LocalStationControl' },
|
||||
{ label: '紧急站控', value: 'EmergencyStationControl' }
|
||||
{ label: '紧急站控', value: 'EmergencyStationControl' },
|
||||
{ label: '联锁控', value: 'InterlockStationControl' }
|
||||
],
|
||||
|
||||
simulationRole: [
|
||||
|
@ -52,6 +52,9 @@ export default {
|
||||
CMD_CM_FORCE_STATION_CONTROL: {value:'CM_Force_Station_Control', label: '强制站控'},
|
||||
/** 紧急站控 */
|
||||
CMD_CM_EMERGENCY_STATION_CONTROL: {value:'CM_Emergency_Station_Control', label: '紧急站控'},
|
||||
/** 联锁控 */
|
||||
CMD_CM_INTERLOCK_CONTROL:{value:'CM_Interlock_Control', label: '请求联锁控'},
|
||||
|
||||
/** 回复站控请求(同意/拒绝) */
|
||||
CMD_CM_REPLY_STATION_CONTROL: {value:'CM_Reply_Station_Control', label: '回复站控请求'},
|
||||
/** 回复中控请求(同意/拒绝) */
|
||||
|
@ -7,7 +7,8 @@ export const State2SimulationMap = {
|
||||
export const State2ControlMap = {
|
||||
'Center': 'OperateCenterControl', // 中控
|
||||
'Local': 'LocalStationControl', // 站控
|
||||
'Emergency': 'EmergencyStationControl'
|
||||
'Emergency': 'EmergencyStationControl', // 紧急站控
|
||||
'Interlock':'InterlockStationControl' // 联锁控
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1084,6 +1084,10 @@ export const OperationEvent = {
|
||||
menuButton:{
|
||||
operation: '3013',
|
||||
domId: '_Tips-Signal-ArrangementRoute-Menu{BOTTOM}'
|
||||
},
|
||||
secondaryConfirm: {
|
||||
operation: '3014',
|
||||
domId: '_Tips-Signal-ArrangementRoute-SecondaryConfirm'
|
||||
}
|
||||
},
|
||||
// 取消进路
|
||||
|
@ -3,7 +3,6 @@ import { parser, updateMapData } from '@/jmapNew/utils/parser';
|
||||
import Vue from 'vue';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import store from '@/store/index';
|
||||
import {updateForList} from '../../jmapNew/utils/parser';
|
||||
|
||||
/**
|
||||
* 查询受影响的Devices并删除
|
||||
@ -242,7 +241,8 @@ const map = {
|
||||
// selectDeviceFlag: false, // 设备管理激活判断
|
||||
keyboardEnterCount: 0, // 键盘enter键触发
|
||||
controlTransfer:[], // 控制权转移消息
|
||||
mapDataParseCount: 0
|
||||
mapDataParseCount: 0,
|
||||
foldLineMap: {} // 现地折行线map数据
|
||||
},
|
||||
|
||||
getters: {
|
||||
@ -669,6 +669,15 @@ const map = {
|
||||
if (Vue.prototype.$jlmap && ( typeof (Vue.prototype.$jlmap.getShowConfig) === 'function')) {
|
||||
showConfig = Vue.prototype.$jlmap.getShowConfig();
|
||||
}
|
||||
const foldLineMap = {};
|
||||
(map.lineList || []).forEach(item => {
|
||||
if (item.type === '03' && foldLineMap[item.stationCode]) {
|
||||
foldLineMap[item.stationCode].push(item);
|
||||
} else if (item.type === '03') {
|
||||
foldLineMap[item.stationCode] = [item];
|
||||
}
|
||||
});
|
||||
state.foldLineMap = foldLineMap;
|
||||
state.mapDevice = parser(map, map.skinVO.code, showConfig);
|
||||
Vue.prototype.$jlmap && Vue.prototype.$jlmap.setMapDevice(state.mapDevice);
|
||||
} else {
|
||||
|
@ -2,9 +2,9 @@ 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.129:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.8.119:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
|
@ -6,21 +6,48 @@
|
||||
</div>
|
||||
<div class="bigLPFStrategyR">
|
||||
<div class="LPFstrategyTop">
|
||||
<div class="LPFstrategyTitle">客流策略</div>
|
||||
<!-- <div class="LPFstrategyClose" @click="closeLPFstrategy"><span class="el-icon-close" /></div> -->
|
||||
<div class="LPFstrategyTitle">
|
||||
<span class="LPFstrategyTitleL">客流策略</span>
|
||||
<span v-if="LPFstrategyList.length>0" class="LPFstrategyTitleR">【 推算时长:{{ recoimemmandTime }}分钟 】</span>
|
||||
</div>
|
||||
<div class="LPFstrategyListOut">
|
||||
</div>
|
||||
<div id="LPFstrategyListOut">
|
||||
<div v-if="LPFstrategyList.length<=0" class="noLPFstrategy">暂无策略</div>
|
||||
<div v-for="(eachLPFstrategy,index) in LPFstrategyList" v-else :key="index" class="eachLPFstrategy">
|
||||
<!-- <el-tabs v-model="activeName" class="border-card">
|
||||
<el-tab-pane class="view-control" label="策略列表" name="first"> -->
|
||||
<!-- <div class=""></div> -->
|
||||
<!-- <el-tabs v-else v-model="activeName" type="card" class="LPFstrategyListIn">
|
||||
<el-tab-pane label="策略列表" name="first"> -->
|
||||
<!-- <div v-else class="eachLPFstrategy">
|
||||
<div class="eachLPFstrategyData1">大客流站台列表</div>
|
||||
<div v-for="(eachLPFstand,index) in LPFstandList" :key="index">
|
||||
<div class="eachLPFstrategyData">站台{{ index+1 }}:{{ eachLPFstand.name }}</div>
|
||||
<div class="eachLPFstrategyData">等待人数:{{ eachLPFstand.wait }}</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div v-for="(eachLPFstrategy,index) in LPFstrategyList" :key="index" class="eachLPFstrategy">
|
||||
<div class="eachLPFstrategyData1">策略{{ index+1 }}:{{ eachLPFstrategy.description }}</div>
|
||||
<div class="eachLPFstrategyData">指标数据:</div>
|
||||
<div class="eachLPFstrategyData">
|
||||
<span>时刻表偏移指标: {{ eachLPFstrategy.target1 }}</span>
|
||||
<span class="eachLPFstrategySpan">乘客等待指标: {{ eachLPFstrategy.target2 }}</span>
|
||||
<span> 影响的列车数量: {{ eachLPFstrategy.effectTrainNum }}</span>
|
||||
<span class="eachLPFstrategySpan">时刻表总偏移量: {{ eachLPFstrategy.scheduleOffset }}秒 </span>
|
||||
</div>
|
||||
<div class="eachLPFstrategyData">综合指标: {{ eachLPFstrategy.coTarget }}</div>
|
||||
<!-- <div class="eachLPFstrategyData">影响的列车: {{ eachLPFstrategy.effectTrainSet.toString() }}</div> -->
|
||||
<div class="eachLPFstrategyData">
|
||||
<span> 可多载离的乘客数量(累计的): {{ eachLPFstrategy.extraNum }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </el-tab-pane> -->
|
||||
<!-- <el-tab-pane label="大客流站台列表" name="second"> -->
|
||||
|
||||
<!-- </el-tab-pane> -->
|
||||
<!-- </el-tabs> -->
|
||||
<!-- </el-tab-pane>
|
||||
<el-tab-pane class="view-control" label="大客流站台列表" name="second">
|
||||
{{ 111 }}
|
||||
</el-tab-pane>
|
||||
</el-tabs> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="quitLPFstrategy"><el-button type="primary" class="quitLPFButton" @click="quitLPFstrategy">退出</el-button></div>
|
||||
</div>
|
||||
@ -38,11 +65,14 @@ export default {
|
||||
return {
|
||||
group:'',
|
||||
myChart: null,
|
||||
activeName:'first',
|
||||
LPFstrategyList:[],
|
||||
recoimemmandTime:0,
|
||||
bigLPFStrategyId:'bigLPFStrategyId',
|
||||
upStandList:[],
|
||||
downStandList:[],
|
||||
stationNameList:[]
|
||||
stationNameList:[],
|
||||
LPFstandList:[]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -51,48 +81,65 @@ export default {
|
||||
'stationStandList',
|
||||
'mapConfig'
|
||||
])
|
||||
// maxWidth() {
|
||||
// return this.$store.state.app.width > 1920 ? 1920 * 0.66 : this.$store.state.app.width * 0.66;
|
||||
// },
|
||||
// maxHeight() {
|
||||
// return this.$store.state.app.height > 1080 ? 1080 - 40 : this.$store.state.app.height - 40;
|
||||
// }
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.LPFstrategy':function(val) {
|
||||
if (val && val.recommendList && val.recommendList.length > 0) {
|
||||
this.LPFstrategyList = [];
|
||||
this.recoimemmandTime = val.duration;
|
||||
val.recommendList.forEach(strategy=>{
|
||||
const eachStrategy = {};
|
||||
switch (strategy.type) {
|
||||
case 'JUMP': {
|
||||
const stand = this.$store.getters['map/getDeviceByCode'](strategy.standCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
||||
eachStrategy.description = '为列车[' + strategy.groupNumber +
|
||||
'-' + strategy.serviceNumber + '|' + strategy.tripNumber +
|
||||
'],设置站台' + station.name + '-' + (stand.right ? '右行' : '左行') +
|
||||
stand.name + ' (' + stand.code + ') 跳停';
|
||||
eachStrategy.target1 = strategy.target1;
|
||||
eachStrategy.target2 = strategy.target2;
|
||||
eachStrategy.coTarget = strategy.coTarget;
|
||||
// {"type":"JUMP","description":"为列车[132056],设置罗汉山-上行站台跳停",
|
||||
// "effectTrainSet":["004"],"effectTrainNum":1,"scheduleOffset":-50,
|
||||
// "extraNum":0,"groupNumber":"004","serviceNumber":"13","tripNumber":"2056","standCode":"PF61848"}]}
|
||||
// const stand = this.$store.getters['map/getDeviceByCode'](strategy.standCode);
|
||||
// const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
||||
// eachStrategy.description = '为列车[' + strategy.groupNumber +
|
||||
// '-' + strategy.serviceNumber + '|' + strategy.tripNumber +
|
||||
// '],设置站台' + station.name + '-' + (stand.right ? '右行' : '左行') +
|
||||
// stand.name + ' (' + stand.code + ') 跳停';
|
||||
// 为列车[005-02|2057],设置站台秀山-右行-PF42(PF44165)跳停",
|
||||
// eachStrategy.description = strategy.description;
|
||||
eachStrategy.description = strategy.description;
|
||||
break;
|
||||
}
|
||||
// "type":"PARK_TIME",
|
||||
// "description":"福州火车站-上行站台设置停站时间[85]",
|
||||
// "effectTrainSet":["012","004","005","009"],"effectTrainNum":4,
|
||||
// "scheduleOffset":160,"extraNum":2540,"time":85,"standCode":"PF83991"
|
||||
case 'PARK_TIME': {
|
||||
const stand = this.$store.getters['map/getDeviceByCode'](strategy.standCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
||||
// eachStrategy.description = strategy.description;
|
||||
eachStrategy.target1 = strategy.target1;
|
||||
eachStrategy.target2 = strategy.target2;
|
||||
eachStrategy.coTarget = strategy.coTarget;
|
||||
eachStrategy.description = '为站台[' + station.name + '-' + (stand.right ? '右行' : '左行') +
|
||||
stand.name + '(' + stand.code + ') 设置停站时间,' + strategy.time + '秒';
|
||||
// const stand = this.$store.getters['map/getDeviceByCode'](strategy.standCode);
|
||||
// const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
||||
eachStrategy.description = strategy.description;
|
||||
// eachStrategy.description = '为站台[' + station.name + '-' + (stand.right ? '右行' : '左行') +
|
||||
// stand.name + '(' + stand.code + ')] 设置停站时间,' + strategy.time + '秒';
|
||||
break;
|
||||
}
|
||||
case 'J_P': {
|
||||
// const stand = this.$store.getters['map/getDeviceByCode'](strategy.standCode);
|
||||
// const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
||||
// eachStrategy.description = '为列车[' + strategy.groupNumber +
|
||||
// '-' + strategy.serviceNumber + '|' + strategy.tripNumber +
|
||||
// '],设置站台' + station.name + '-' + (stand.right ? '右行' : '左行') +
|
||||
// stand.name + ' (' + stand.code + ') 跳停,并且为站台[' + station.name + '-' + (stand.right ? '右行' : '左行') +
|
||||
// stand.name + '(' + stand.code + ')] 设置停站时间,' + strategy.time + '秒';
|
||||
eachStrategy.description = strategy.description;
|
||||
}
|
||||
}
|
||||
eachStrategy.effectTrainNum = strategy.effectTrainNum;
|
||||
eachStrategy.scheduleOffset = strategy.scheduleOffset;
|
||||
eachStrategy.extraNum = strategy.extraNum;
|
||||
eachStrategy.effectTrainSet = strategy.effectTrainSet;
|
||||
this.LPFstrategyList.push(eachStrategy);
|
||||
});
|
||||
this.LPFstandList = [];
|
||||
val.lpfList.forEach(standInfo=>{
|
||||
const stand = this.$store.getters['map/getDeviceByCode'](standInfo.standCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
||||
this.LPFstandList.push({name:station.name + '-' + (stand.right ? '右行' : '左行') +
|
||||
stand.name + '(' + stand.code + ')', wait:standInfo.wait});
|
||||
});
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationOver':function(val) {
|
||||
@ -276,7 +323,7 @@ export default {
|
||||
this.myChart = echarts.init(document.getElementById(this.bigLPFStrategyId));
|
||||
if (this.myChart) {
|
||||
this.myChart.setOption(option);
|
||||
this.reSize({ width: this.$store.state.app.width * 0.66, height: this.$store.state.app.height - 40 });
|
||||
this.reSize({ width: this.$store.state.app.width * 0.74, height: this.$store.state.app.height - 40 });
|
||||
}
|
||||
resolve(true);
|
||||
} catch (error) {
|
||||
@ -285,7 +332,7 @@ export default {
|
||||
});
|
||||
},
|
||||
setWindowSize() {
|
||||
this.reSize({ width: this.$store.state.app.width * 0.66, height: this.$store.state.app.height - 40 });
|
||||
this.reSize({ width: this.$store.state.app.width * 0.74, height: this.$store.state.app.height - 40 });
|
||||
},
|
||||
reSize(opt) {
|
||||
if (this.myChart) {
|
||||
@ -319,8 +366,9 @@ export default {
|
||||
background: #fff;
|
||||
font-size: 14px;
|
||||
margin-left: 2%;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.LPFstrategyTop,.bigLPFStrategyLTitle{
|
||||
.LPFstrategyTop{
|
||||
background:#fff;
|
||||
height: 40px;
|
||||
border-bottom: 1px #d4d4d4 solid;
|
||||
@ -330,14 +378,22 @@ export default {
|
||||
left:0;
|
||||
}
|
||||
.bigLPFStrategyLTitle{
|
||||
padding: 10px;
|
||||
padding: 15px 20px 0px 20px;
|
||||
font-size: 15px;
|
||||
background: #fff;
|
||||
height: 40px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.LPFstrategyTitle{
|
||||
float: left;
|
||||
width:100%;
|
||||
padding-top: 10px;
|
||||
padding-left: 10px;
|
||||
padding-left: 15px;
|
||||
font-size: 15px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
.LPFstrategyClose{
|
||||
float: right;
|
||||
@ -345,11 +401,11 @@ export default {
|
||||
padding: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.LPFstrategyListOut{
|
||||
#LPFstrategyListOut{
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background: #f1f1f1;
|
||||
padding-bottom: 10px;
|
||||
padding-bottom:20px;
|
||||
border-bottom: 1px #d4d4d4 solid;
|
||||
&::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
@ -376,18 +432,20 @@ export default {
|
||||
margin-left:50px;
|
||||
}
|
||||
.bigLPFStrategyL{
|
||||
width: 66%;
|
||||
width: 74%;
|
||||
float: left;
|
||||
height: 100%;
|
||||
padding: 40px 0px 0px 0px;
|
||||
position: relative;
|
||||
}
|
||||
.bigLPFStrategyR{
|
||||
width: 34%;
|
||||
width: 26%;
|
||||
float: right;
|
||||
border-left: 1px #eee solid;
|
||||
height: 100%;
|
||||
padding: 40px 0px;
|
||||
position: relative;
|
||||
box-shadow: -5px 0px 5px #dedede;
|
||||
}
|
||||
.bigLPFStrategy{
|
||||
width:100%;
|
||||
@ -408,9 +466,45 @@ export default {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
.bigLPFStrategyLChart{}
|
||||
#bigLPFStrategyId{
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
.LPFstrategyTitleL{}
|
||||
.LPFstrategyTitleR{
|
||||
// float:right
|
||||
}
|
||||
.LPFstrategyListIn{height:100%;overflow:hidden;padding-top: 41px;position:relative;}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
#LPFstrategyListOut .LPFstrategyListIn .el-tabs__header.is-top{
|
||||
margin-bottom: 10px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
border-bottom: 1px #ccc solid;
|
||||
}
|
||||
#LPFstrategyListOut .LPFstrategyListIn .el-tabs__content{
|
||||
height: 100%;
|
||||
padding-bottom: 10px;
|
||||
overflow: auto;
|
||||
&::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
&::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
background: #c3c3c3;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
border-radius: 0;
|
||||
background: #f0f0f0;
|
||||
|
||||
}
|
||||
}
|
||||
#LPFstrategyListOut .el-tabs--card>.el-tabs__header .el-tabs__item.is-active{
|
||||
border-bottom-color:#dedede;
|
||||
}
|
||||
</style>
|
||||
|
@ -59,7 +59,9 @@ export default {
|
||||
lineColor: '',
|
||||
showConditions: '01',
|
||||
points: [],
|
||||
stationCode: ''
|
||||
stationCode: '',
|
||||
offsetX: 0,
|
||||
offsetY: 0
|
||||
},
|
||||
addModel: {
|
||||
type: '',
|
||||
@ -69,7 +71,9 @@ export default {
|
||||
points: [
|
||||
{ x: 0, y: 0 },
|
||||
{ x: 100, y: 100 }
|
||||
]
|
||||
],
|
||||
offsetX: 0,
|
||||
offsetY: 0
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
@ -113,7 +117,9 @@ export default {
|
||||
{ prop: 'width', label: this.$t('map.lineWidth'), type: 'number', min: 1, placeholder: 'px' },
|
||||
{ prop: 'showConditions', label: this.$t('map.showConditions'), type: 'radio', optionLabel: 'label', optionValue:'value', radioList: this.showConditionsList},
|
||||
{ prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, addPoint: this.addPoint, delPoint: this.delPoint },
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList }
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList },
|
||||
{ prop: 'offsetX', label: '右侧设备X偏移:', type: 'number', min: 0, isHidden: !this.isFoldLine },
|
||||
{ prop: 'offsetY', label: '左侧设备Y偏移:', type: 'number', min: 0, isHidden: !this.isFoldLine }
|
||||
]
|
||||
},
|
||||
map: {
|
||||
@ -145,6 +151,9 @@ export default {
|
||||
},
|
||||
isPointsShow() {
|
||||
return this.editModel.points.length > 0;
|
||||
},
|
||||
isFoldLine() {
|
||||
return this.editModel.type == '03';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -217,12 +217,7 @@ 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: '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' }
|
||||
] }
|
||||
{ prop: 'jp', label: '车站简称:', type: 'input' }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user