ctc显示调整 05/31
This commit is contained in:
parent
93c5bc4fb6
commit
270c32052c
@ -453,6 +453,54 @@ class SkinCode extends defaultStyle {
|
||||
text: '非常站控',
|
||||
lightColor: '#ff0',
|
||||
defaultColor: '#ccc',
|
||||
},
|
||||
selfDisciplineThree: {
|
||||
offset: { x: 0, y: 0 },
|
||||
text: '分散自律',
|
||||
lightColor: '#0f0',
|
||||
defaultColor: '#ccc'
|
||||
},
|
||||
graphRoad: {
|
||||
show: true,
|
||||
offset: { x: 0, y: 0 },
|
||||
text: '按图排路',
|
||||
lightColor: '#0f0',
|
||||
defaultColor: '#ccc'
|
||||
},
|
||||
planControl: {
|
||||
show: true,
|
||||
offset: { x: 0, y: 0 },
|
||||
text: '计划控制',
|
||||
lightColor: '#0f0',
|
||||
defaultColor: '#ccc'
|
||||
},
|
||||
centerCommunication: {
|
||||
show: true,
|
||||
offset: { x: 0, y: 30 },
|
||||
text: '中心通信',
|
||||
lightColor: '#0f0',
|
||||
defaultColor: '#ccc'
|
||||
},
|
||||
selfDisciplineCommunication: {
|
||||
show: true,
|
||||
offset: { x: 0, y: 30 },
|
||||
text: '自律机通信',
|
||||
lightColor: '#0f0',
|
||||
defaultColor: '#ccc'
|
||||
},
|
||||
allowedTurnBack: {
|
||||
show: true,
|
||||
offset: { x: 0, y: 30 },
|
||||
text: '允许转回',
|
||||
lightColor: '#0f0',
|
||||
defaultColor: '#ccc'
|
||||
},
|
||||
trainControl: {
|
||||
show: true,
|
||||
offset: { x: 0, y: 30 },
|
||||
text: '列控',
|
||||
lightColor: '#0f0',
|
||||
defaultColor: '#ccc'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -22,6 +22,28 @@ export default class SignalButton extends Group {
|
||||
create() {
|
||||
const model = this.model;
|
||||
const fillColor = this.getTypeColor();
|
||||
const queryList = window.location.search.substring(1).split('&');
|
||||
const queryCtc = queryList.find(item => {
|
||||
return item.includes('ctc');
|
||||
});
|
||||
const ctcArcList = ['OCCLUSION', 'RECOVERY', 'CHANGE_DIRECTION', 'ACCIDENT', 'DEPART_ASSIST', 'PICK_ASSIST', 'ASSIST'];
|
||||
if (queryCtc && ctcArcList.includes(model.type)){
|
||||
this.arcShape = new Arc({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
cx: this.model.position.x + 7,
|
||||
cy: this.model.position.y + 7,
|
||||
r: 7
|
||||
},
|
||||
style: {
|
||||
stroke: '#69666E',
|
||||
lineWidth: 1,
|
||||
fill: fillColor
|
||||
}
|
||||
});
|
||||
this.add(this.arcShape);
|
||||
} else {
|
||||
this.rectButton = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -39,6 +61,7 @@ export default class SignalButton extends Group {
|
||||
}
|
||||
});
|
||||
this.add(this.rectButton);
|
||||
}
|
||||
this.leftLine = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
@ -200,9 +223,11 @@ export default class SignalButton extends Group {
|
||||
recover() {
|
||||
this.stopAnimation();
|
||||
this.rectButton && this.rectButton.setStyle({ fill:this.getTypeColor() });
|
||||
this.arcShape && this.arcShape.setStyle({ fill:this.getTypeColor() });
|
||||
this.rightLine && this.rightLine.hide();
|
||||
this.leftLine && this.leftLine.hide();
|
||||
this.rectButton && this.rectButton.show();
|
||||
this.arcShape && this.arcShape.show();
|
||||
this.buttonText && this.buttonText.show();
|
||||
this.leftBoard && this.leftBoard.hide();
|
||||
this.rightBoard && this.rightBoard.hide();
|
||||
@ -242,6 +267,7 @@ export default class SignalButton extends Group {
|
||||
this.rectButton && this.rectButton.hide();
|
||||
this.leftLine && this.leftLine.hide();
|
||||
this.rightLine && this.rightLine.hide();
|
||||
this.arcShape && this.arcShape.hide();
|
||||
} else {
|
||||
if (model.hasSelected) {
|
||||
this.startAnimate();
|
||||
|
128
src/jmapNew/shape/graph/Station/EThreeLamp.js
Normal file
128
src/jmapNew/shape/graph/Station/EThreeLamp.js
Normal file
@ -0,0 +1,128 @@
|
||||
import Arc from 'zrender/src/graphic/shape/Arc';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
|
||||
/** 三个控制灯*/
|
||||
export default class EThreeLamp extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.zlevel = model.zlevel;
|
||||
this._subType = model._subType;
|
||||
this.z = 20;
|
||||
this.onmouseover = model.mouseover;
|
||||
this.onmouseout = model.mouseout;
|
||||
this.create(model);
|
||||
}
|
||||
|
||||
create(model) {
|
||||
var _subType = 'ControlSignal';
|
||||
var _val = '0';
|
||||
if (model.pop) {
|
||||
_subType = 'ControlButton';
|
||||
_val = '1';
|
||||
}
|
||||
var _nameType = this._subType;
|
||||
this.control1 = new Arc({
|
||||
pop: model.pop,
|
||||
_subType: _subType,
|
||||
_nameType: _nameType,
|
||||
_val: _val,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
cx: model.point.x - model.style.Station.StationControl.lamp.radiusR * 3,
|
||||
cy: model.point.y,
|
||||
r: model.style.Station.StationControl.lamp.radiusR
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Station.StationControl.lamp.lineWidth || 0,
|
||||
fill: model.style.Station.StationControl.lamp.grayColor,
|
||||
stroke: model.style.Station.StationControl.lamp.strokeColor
|
||||
}
|
||||
});
|
||||
this.control2 = new Arc({
|
||||
pop: model.pop,
|
||||
_subType: _subType,
|
||||
_nameType: _nameType,
|
||||
_val: _val,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
cx: model.point.x,
|
||||
cy: model.point.y,
|
||||
r: model.style.Station.StationControl.lamp.radiusR
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Station.StationControl.lamp.lineWidth || 0,
|
||||
fill: model.style.Station.StationControl.lamp.grayColor,
|
||||
stroke: model.style.Station.StationControl.lamp.strokeColor
|
||||
}
|
||||
});
|
||||
this.control3 = new Arc({
|
||||
pop: model.pop,
|
||||
_subType: _subType,
|
||||
_nameType: _nameType,
|
||||
_val: _val,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
cx: model.point.x + model.style.Station.StationControl.lamp.radiusR * 3,
|
||||
cy: model.point.y,
|
||||
r: model.style.Station.StationControl.lamp.radiusR
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Station.StationControl.lamp.lineWidth || 0,
|
||||
fill: model.style.Station.StationControl.lamp.grayColor,
|
||||
stroke: model.style.Station.StationControl.lamp.strokeColor
|
||||
}
|
||||
});
|
||||
|
||||
this.text = new Text({
|
||||
pop: model.pop,
|
||||
_subType: _subType,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: model.point.x,
|
||||
y: model.point.y + model.style.Station.StationControl.lamp.radiusR + model.style.Station.StationControl.text.distance,
|
||||
fontWeight: model.style.Station.StationControl.text.fontWeight,
|
||||
fontSize: model.style.Station.StationControl.text.fontSize,
|
||||
fontFamily: model.style.fontFamily,
|
||||
text: model.context,
|
||||
textFill: model.style.Station.StationControl.text.fontColor,
|
||||
textAlign: model.style.Station.StationControl.text.textAlign,
|
||||
textVerticalAlign: model.style.Station.StationControl.text.textVerticalAlign
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.control1);
|
||||
this.add(this.control2);
|
||||
this.add(this.control3);
|
||||
this.add(this.text);
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
// if (color) {
|
||||
// this.control.setStyle('fill', color);
|
||||
// }
|
||||
}
|
||||
|
||||
setTextColor(color) {
|
||||
if (color && !this.model.style.Station.StationControl.lamp.textColorNoChange) {
|
||||
this.text.setStyle('textFill', color);
|
||||
}
|
||||
}
|
||||
getArcBoundingRect() {
|
||||
const rect = this.control.getBoundingRect().clone();
|
||||
const scale = this.control.scale[0];
|
||||
const offsetX = this.control.position[0];
|
||||
const offsetY = this.control.position[1];
|
||||
rect.x = rect.x * scale + offsetX - 2;
|
||||
rect.y = rect.y * scale + offsetY - 2;
|
||||
rect.width = rect.width * scale + 4;
|
||||
rect.height = rect.height * scale + 4;
|
||||
return rect;
|
||||
}
|
||||
}
|
@ -7,6 +7,7 @@ import EControl from '../element/EControl';
|
||||
import EMouse from './EMouse';
|
||||
import EMouseDraw from './EMouseDraw';
|
||||
import ESingleControl from './ESingleControl';
|
||||
import EThreeLamp from './EThreeLamp';
|
||||
import EArrow from './EArrow';
|
||||
import { arrow } from '../utils/ShapePoints';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
@ -148,7 +149,13 @@ export default class Station extends Group {
|
||||
createControlMode() {
|
||||
const model = this.model;
|
||||
if (!this.style.Station.StationControl.disPlayNone) {
|
||||
if (this.style.Station.StationControl.special) {
|
||||
const queryList = window.location.search.substring(1).split('&');
|
||||
const queryCtc = queryList.find(item => {
|
||||
return item.includes('ctc');
|
||||
});
|
||||
if (queryCtc) {
|
||||
this.createCtcControlMode()
|
||||
} else if (this.style.Station.StationControl.special) {
|
||||
if (model.visible && model.createControlMode) { // model.createControlMode 控制模式
|
||||
this.createControlModeAU();
|
||||
this.createControlModeCC();
|
||||
@ -168,7 +175,123 @@ export default class Station extends Group {
|
||||
}
|
||||
this.setState(model);
|
||||
}
|
||||
|
||||
createCtcControlMode() {//大铁
|
||||
//非常站控
|
||||
const model = this.model;
|
||||
// 分散自律
|
||||
this.selfDisciplineThree = new EThreeLamp({
|
||||
_subType: 'veryControl',
|
||||
style: this.style,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.selfDisciplineThree.offset.x,
|
||||
y: model.controlModePoint.y + this.style.Station.StationControl.selfDisciplineThree.offset.y
|
||||
},
|
||||
context: this.style.Station.StationControl.selfDisciplineThree.text,
|
||||
pop: false
|
||||
});
|
||||
this.add(this.selfDisciplineThree);
|
||||
console.log(this.selfDisciplineThree, '*****************');
|
||||
// 非常站控
|
||||
this.veryControl = new ESingleControl({
|
||||
_subType: 'veryControl',
|
||||
style: this.style,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 2 / 3 + this.style.Station.StationControl.veryControl.offset.x,
|
||||
y: model.controlModePoint.y + this.style.Station.StationControl.veryControl.offset.y
|
||||
},
|
||||
context: this.style.Station.StationControl.veryControl.text,
|
||||
pop: false
|
||||
});
|
||||
this.add(this.veryControl);
|
||||
//按图排路
|
||||
this.graphRoad = new ESingleControl({
|
||||
_subType: 'graphRoad',
|
||||
style: this.style,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 2 / 3 + this.style.Station.StationControl.graphRoad.offset.x,
|
||||
y: model.controlModePoint.y + this.style.Station.StationControl.graphRoad.offset.y
|
||||
},
|
||||
context: this.style.Station.StationControl.graphRoad.text,
|
||||
pop: false
|
||||
});
|
||||
this.add(this.graphRoad);
|
||||
//计划控制
|
||||
this.planControl = new ESingleControl({
|
||||
_subType: 'planControl',
|
||||
style: this.style,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.planControl.offset.x,
|
||||
y: model.controlModePoint.y + this.style.Station.StationControl.planControl.offset.y
|
||||
},
|
||||
context: this.style.Station.StationControl.planControl.text,
|
||||
pop: false
|
||||
});
|
||||
this.add(this.planControl);
|
||||
//中心通信
|
||||
this.centerCommunication = new ESingleControl({
|
||||
_subType: 'centerCommunication',
|
||||
style: this.style,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.centerCommunication.offset.x,
|
||||
y: model.controlModePoint.y + this.style.Station.StationControl.centerCommunication.offset.y
|
||||
},
|
||||
context: this.style.Station.StationControl.centerCommunication.text,
|
||||
pop: false
|
||||
});
|
||||
this.add(this.centerCommunication);
|
||||
//自律机通信
|
||||
this.selfDisciplineCommunication = new ESingleControl({
|
||||
_subType: 'selfDisciplineCommunication',
|
||||
style: this.style,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 2 / 3 + this.style.Station.StationControl.selfDisciplineCommunication.offset.x,
|
||||
y: model.controlModePoint.y + this.style.Station.StationControl.selfDisciplineCommunication.offset.y
|
||||
},
|
||||
context: this.style.Station.StationControl.selfDisciplineCommunication.text,
|
||||
pop: false
|
||||
});
|
||||
this.add(this.selfDisciplineCommunication);
|
||||
//允许转回
|
||||
this.allowedTurnBack = new ESingleControl({
|
||||
_subType: 'allowedTurnBack',
|
||||
style: this.style,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 2 / 3 + this.style.Station.StationControl.allowedTurnBack.offset.x,
|
||||
y: model.controlModePoint.y + this.style.Station.StationControl.allowedTurnBack.offset.y
|
||||
},
|
||||
context: this.style.Station.StationControl.allowedTurnBack.text,
|
||||
pop: false
|
||||
});
|
||||
this.add(this.allowedTurnBack);
|
||||
// 列控
|
||||
this.trainControl = new ESingleControl({
|
||||
_subType: 'trainControl',
|
||||
style: this.style,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.trainControl.offset.x,
|
||||
y: model.controlModePoint.y + this.style.Station.StationControl.trainControl.offset.y
|
||||
},
|
||||
context: this.style.Station.StationControl.trainControl.text,
|
||||
pop: false
|
||||
});
|
||||
this.add(this.trainControl);
|
||||
}
|
||||
createControlModeAU() { // 西安二
|
||||
const model = this.model;
|
||||
this.stationControlAU = new Text({
|
||||
|
@ -159,7 +159,7 @@ export default {
|
||||
{label: '交流输出电压', value: 'acOutputVoltage'},
|
||||
{label: '直流电压信号', value: 'dcVoltageSignal'}
|
||||
];
|
||||
} else if (this.$router.query.lineCode === '01') {
|
||||
} else if (this.$route.query.lineCode === '01') {
|
||||
return [
|
||||
{label: 'ibp操作允许上行', value: 'ibpOperationAllowsUp'},
|
||||
{label: 'ibp操作允许下行', value: 'ibpOperationAllowsDown'},
|
||||
|
@ -36,7 +36,7 @@
|
||||
<el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
|
||||
</template>
|
||||
</template>
|
||||
<el-button v-if="project !='bjd'" type="primary" size="small" @click="back">{{ projectDevice?'退出':$t('display.demon.back') }}</el-button>
|
||||
<el-button v-if="project !='bjd'" type="primary" size="small" @click="back">{{ projectDevice || isCtc?'退出':$t('display.demon.back') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
|
||||
@ -155,6 +155,9 @@ export default {
|
||||
isDisable() {
|
||||
return this.$store.state.training.started;
|
||||
},
|
||||
isCtc() {
|
||||
return !!this.$route.query.ctc
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
},
|
||||
@ -399,7 +402,7 @@ export default {
|
||||
// || this.project === 'bjd'
|
||||
|
||||
} else {
|
||||
if (this.project === 'bjd') {
|
||||
if (this.project === 'bjd' || this.isCtc) {
|
||||
window.close();
|
||||
} else {
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', '');
|
||||
|
@ -12,8 +12,8 @@
|
||||
</el-select>
|
||||
<template v-if="!dataError">
|
||||
<el-button-group v-if="project !== 'bjd'">
|
||||
<el-button v-if="$route.query.lineCode === '16'" size="small" @click="showLineBoard">占线板</el-button>
|
||||
<el-button v-if="$route.query.lineCode === '16'" size="small" @click="goCtc">CTC</el-button>
|
||||
<el-button v-if="isCtc" size="small" @click="showLineBoard">占线板</el-button>
|
||||
<el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goCtc">CTC</el-button>
|
||||
<el-button v-if="isLocalStation && $route.query.lineCode!='08' && $route.query.lineCode!='16'" size="small" @click="goIbp">IBP盘</el-button>
|
||||
<el-button v-if="isScheduling && isDepot" size="small" type="primary" @click="runPlanEditShow">运行图编辑</el-button>
|
||||
<!-- 加载剧本 -->
|
||||
|
Loading…
Reference in New Issue
Block a user