增加西安二号线折返策略配置,增加联锁配置
This commit is contained in:
parent
f8d3ffa91d
commit
b262288524
@ -436,6 +436,27 @@ class SkinCode extends defaultStyle {
|
||||
grayColor: '#7F7F7F'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.StationTurnBack] = { // 站后折返
|
||||
displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
spliceShow: true, // 西安二号线特殊显示
|
||||
lamp: {
|
||||
fill: '#FFFF00', // 填充色
|
||||
radiusR: 6 // 控制灯大小
|
||||
},
|
||||
text: {
|
||||
titleTextShow: false,
|
||||
fontWeight: 580,
|
||||
fontSize: 12,
|
||||
distance: 10
|
||||
},
|
||||
rect: {
|
||||
fill: 'rgba(0,0,0,0)',
|
||||
stroke: '#fff',
|
||||
lineWidth: 2,
|
||||
padding: 6
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Switch] = {
|
||||
@ -625,13 +646,14 @@ class SkinCode extends defaultStyle {
|
||||
}
|
||||
};
|
||||
this[deviceType.ReturnModeGroup] = {
|
||||
displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
insideDistance: 2, // 折返模块边框内部距离
|
||||
outsideDistance: 10, // 折返模块边框之间距离
|
||||
rectWidth: 20, // 折返模块宽度
|
||||
lineWidth: 3, // 折返模块线宽
|
||||
fillColor: 'rgba(0,0,0,0)', // 填充色
|
||||
strokeColor: '#9F9C9C' // 线颜色
|
||||
strokeColor: '#9F9C9C', // 线颜色
|
||||
highlightColor: '#fff' // 高亮颜色
|
||||
};
|
||||
this[deviceType.ModeStatusGroup] = { // 车站状态模式
|
||||
displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
|
141
src/jmapNew/shape/StationTurnBack/EFoldbackMode.js
Normal file
141
src/jmapNew/shape/StationTurnBack/EFoldbackMode.js
Normal file
@ -0,0 +1,141 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import Line from 'zrender/src/graphic/shape/Line';
|
||||
|
||||
export default class EFoldbackMode extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.zlevel = model.zlevel;
|
||||
this._subType = model._subType;
|
||||
this.z = model.z;
|
||||
this.onmouseover = model.mouseover;
|
||||
this.onmouseout = model.mouseout;
|
||||
this.create(model);
|
||||
}
|
||||
create(model) {
|
||||
const style = model.style;
|
||||
this.lateralLinePriorityRect = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
width: model.width,
|
||||
height:model.width
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.ReturnModeGroup.lineWidth,
|
||||
stroke: style.ReturnModeGroup.strokeColor,
|
||||
fill: style.ReturnModeGroup.fillColor
|
||||
}
|
||||
});
|
||||
this.lateralLinePriority1 = new Line({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x1: model.x + model.style.ReturnModeGroup.insideDistance,
|
||||
y1: model.y + model.style.ReturnModeGroup.insideDistance,
|
||||
x2: model.x + model.width - style.ReturnModeGroup.insideDistance,
|
||||
y2: model.y + model.width - style.ReturnModeGroup.insideDistance
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.ReturnModeGroup.lineWidth,
|
||||
stroke: model.style.ReturnModeGroup.strokeColor
|
||||
}
|
||||
});
|
||||
this.lateralLinePriority2 = new Line({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x1: model.x + model.width - style.ReturnModeGroup.insideDistance,
|
||||
y1: model.y + style.ReturnModeGroup.insideDistance,
|
||||
x2: model.x + style.ReturnModeGroup.insideDistance,
|
||||
y2: model.y + model.width - style.ReturnModeGroup.insideDistance
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.ReturnModeGroup.lineWidth,
|
||||
stroke: style.ReturnModeGroup.strokeColor
|
||||
}
|
||||
});
|
||||
this.add(this.lateralLinePriorityRect);
|
||||
this.add(this.lateralLinePriority1);
|
||||
this.add(this.lateralLinePriority2);
|
||||
this.linearFoldbackRect = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x: model.x + model.width + style.ReturnModeGroup.outsideDistance,
|
||||
y: model.y,
|
||||
width: model.width,
|
||||
height:model.width
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.ReturnModeGroup.lineWidth,
|
||||
stroke: style.ReturnModeGroup.strokeColor,
|
||||
fill: style.ReturnModeGroup.fillColor
|
||||
}
|
||||
});
|
||||
this.linearFoldback = new Line({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x1: model.x + model.width + style.ReturnModeGroup.outsideDistance + style.ReturnModeGroup.insideDistance,
|
||||
y1: model.y + model.width / 2,
|
||||
x2: model.x + model.width * 2 + style.ReturnModeGroup.outsideDistance - style.ReturnModeGroup.insideDistance,
|
||||
y2: model.y + model.width / 2
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.ReturnModeGroup.lineWidth,
|
||||
stroke: style.ReturnModeGroup.strokeColor
|
||||
}
|
||||
});
|
||||
this.add(this.linearFoldbackRect);
|
||||
this.add(this.linearFoldback);
|
||||
this.lateralLineRect = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x: model.x + model.width * 2 + style.ReturnModeGroup.outsideDistance * 2,
|
||||
y: model.y,
|
||||
width: model.width,
|
||||
height:model.width
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.ReturnModeGroup.lineWidth,
|
||||
stroke: style.ReturnModeGroup.strokeColor,
|
||||
fill: style.ReturnModeGroup.fillColor
|
||||
}
|
||||
});
|
||||
this.lateralLine = new Line({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x1: model.x + model.width * 2 + style.ReturnModeGroup.outsideDistance * 2 + style.ReturnModeGroup.insideDistance,
|
||||
y1: model.y + model.width - style.ReturnModeGroup.insideDistance,
|
||||
x2: model.x + model.width * 3 + style.ReturnModeGroup.outsideDistance * 2 - style.ReturnModeGroup.insideDistance,
|
||||
y2: model.y + style.ReturnModeGroup.insideDistance
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.ReturnModeGroup.lineWidth,
|
||||
stroke: style.ReturnModeGroup.strokeColor
|
||||
}
|
||||
});
|
||||
this.add(this.lateralLineRect);
|
||||
this.add(this.lateralLine);
|
||||
}
|
||||
|
||||
highlightType1(color) {
|
||||
this.lateralLinePriorityRect && this.lateralLinePriorityRect.setStyle('stroke', color);
|
||||
this.lateralLinePriority1 && this.lateralLinePriority1.setStyle('stroke', color);
|
||||
this.lateralLinePriority2 && this.lateralLinePriority2.setStyle('stroke', color);
|
||||
}
|
||||
highlightType2(color) {
|
||||
this.linearFoldbackRect && this.linearFoldbackRect.setStyle('stroke', color);
|
||||
this.linearFoldback && this.linearFoldback.setStyle('stroke', color);
|
||||
}
|
||||
highlightType3(color) {
|
||||
this.lateralLineRect && this.lateralLineRect.setStyle('stroke', color);
|
||||
this.lateralLine && this.lateralLine.setStyle('stroke', color);
|
||||
}
|
||||
}
|
@ -2,6 +2,7 @@ import Group from 'zrender/src/container/Group';
|
||||
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import EFoldbackMode from './EFoldbackMode';
|
||||
import Vue from 'vue';
|
||||
|
||||
export default class StationTurnBack extends Group {
|
||||
@ -20,9 +21,9 @@ export default class StationTurnBack extends Group {
|
||||
}
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
const style = this.style;
|
||||
|
||||
if (model.show) {
|
||||
if (model.show && !style.StationTurnBack.spliceShow) {
|
||||
this.control = new Circle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -94,19 +95,35 @@ export default class StationTurnBack extends Group {
|
||||
this.add(this.controlRect);
|
||||
this.add(this.text);
|
||||
this.add(this.strategyText);
|
||||
}
|
||||
}
|
||||
if (style.StationTurnBack.spliceShow) {
|
||||
this.control = new EFoldbackMode({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
x: model.position.x,
|
||||
y: model.position.y,
|
||||
width: style.ReturnModeGroup.rectWidth,
|
||||
style: style
|
||||
});
|
||||
this.add(this.control);
|
||||
}
|
||||
}
|
||||
|
||||
recover() {
|
||||
const path = window.location.href;
|
||||
if (!path.includes('/map/draw')) {
|
||||
this.strategyText.hide();
|
||||
}
|
||||
this.strategyText && this.strategyText.hide();
|
||||
}
|
||||
this.control && this.control.highlightType1(this.style.ReturnModeGroup.highlightColor);
|
||||
|
||||
// this.control && this.control.highlightType1(this.style.ReturnModeGroup.strokeColor);
|
||||
this.control && this.control.highlightType2(this.style.ReturnModeGroup.strokeColor);
|
||||
this.control && this.control.highlightType3(this.style.ReturnModeGroup.strokeColor);
|
||||
}
|
||||
|
||||
handleStatus(name) {
|
||||
this.strategyText.show();
|
||||
this.strategyText.attr({
|
||||
this.strategyText && this.strategyText.show();
|
||||
this.strategyText && this.strategyText.attr({
|
||||
style: {
|
||||
text: name
|
||||
}
|
||||
@ -125,7 +142,6 @@ export default class StationTurnBack extends Group {
|
||||
}
|
||||
});
|
||||
}
|
||||
// console.log(model, '站后折返model');
|
||||
}
|
||||
|
||||
setShowMode() {
|
||||
@ -142,8 +158,6 @@ export default class StationTurnBack extends Group {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
// this.isShowShape = true;
|
||||
// this.setState(this.model);
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
|
@ -85,7 +85,8 @@ export default {
|
||||
overlapOnlyOneSwitch: false,
|
||||
generateCycle: false,
|
||||
routeButton: false,
|
||||
likeHa1: false,
|
||||
likeHa1: false,
|
||||
getNearlySignal: false,
|
||||
overlapSettingByTrigger: false,
|
||||
overlapReleaseTime: 45,
|
||||
routeReleaseTime: 60
|
||||
@ -94,7 +95,7 @@ export default {
|
||||
focus: false,
|
||||
booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'signalApproachOnlyOne', 'signalApproachOnlyNpSwitch',
|
||||
'routeNameUseEndOppositeSignalName', 'generateTbRoute', 'tbRouteNameUseEndOppositeSignalName', 'routeSignalAlwaysGreen',
|
||||
'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle', 'routeButton', 'likeHa1', 'overlapSettingByTrigger', 'generateFls'],
|
||||
'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle', 'routeButton', 'likeHa1', 'getNearlySignal', 'overlapSettingByTrigger', 'generateFls'],
|
||||
selectList: [],
|
||||
numberList: ['overlapReleaseTime', 'routeReleaseTime'],
|
||||
optionsMap: {
|
||||
@ -119,7 +120,8 @@ export default {
|
||||
routeReleaseTime: '默认进路解锁时间',
|
||||
generateCycle: '是否生成自动折返',
|
||||
routeButton: '是否生成进路结束按钮',
|
||||
likeHa1: '是否类似哈尔滨一号线,联锁分为ATP信号、地面信号、引导信号',
|
||||
likeHa1: '是否类似哈尔滨一号线,联锁分为ATP信号、地面信号、引导信号',
|
||||
getNearlySignal: '生成进路信号按钮,进路信号按钮是否取最近的一个信号机',
|
||||
overlapSettingByTrigger: '延续保护的建立方式:是-通过触发建立,否-随进路建立',
|
||||
generateFls: '是否生成侧防:是-生成侧防,不要联动道岔,否-不生成侧防,用联动道岔'
|
||||
}
|
||||
|
@ -3,13 +3,18 @@
|
||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
||||
<div class="view-control-content">
|
||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules">
|
||||
<div v-if="editModel.type == 'StationTurnBack'" class="card-box">
|
||||
<div class="card_title">站后折返数据</div>
|
||||
<fieldset v-if="editModel.type == 'StationTurnBack'" class="card-box">
|
||||
<legend class="card_title">站后折返数据</legend>
|
||||
<div>
|
||||
<el-table :data="editModel.optionList" border style="width: 100%">
|
||||
<el-table-column prop="id" label="编号" width="100px" />
|
||||
<el-table-column prop="label" label="描述" width="250px" />
|
||||
<el-table-column fixed="right" label="操作">
|
||||
<el-table-column prop="id" label="编号" width="50px" />
|
||||
<el-table-column prop="label" label="描述" />
|
||||
<el-table-column label="配置默认" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox @click.native.prevent="checkOverlab(editModel.optionList, scope.$index)" v-model="scope.row.checked"></el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click.native.prevent="deleteOverlab(editModel.optionList, scope.$index)">移出</el-button>
|
||||
<el-button type="text" size="small" @click.native.prevent="editOverlab(editModel.optionList, scope.$index)">编辑</el-button>
|
||||
@ -45,7 +50,7 @@
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</config-list>
|
||||
</div>
|
||||
<div class="button_box">
|
||||
@ -122,7 +127,8 @@ export default {
|
||||
type: '',
|
||||
name: '',
|
||||
show: true, // 站后折返显示
|
||||
subtitleName: '',
|
||||
subtitleName: '',
|
||||
initId: '',
|
||||
optionList: [], // 战后折返列表
|
||||
automaticRouteCode: '', // 关联自动进路code
|
||||
cycleCode: '', // 自动折返关联code
|
||||
@ -310,7 +316,8 @@ export default {
|
||||
code: '',
|
||||
type: '',
|
||||
name: '',
|
||||
show: true, // 站后折返显示
|
||||
show: true, // 站后折返显示
|
||||
initId: '',
|
||||
subtitleName: '',
|
||||
optionList: [], // 战后折返列表
|
||||
automaticRouteCode: '', // 关联自动进路code
|
||||
@ -380,7 +387,13 @@ export default {
|
||||
this.handleTypes(selected._type);
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
this.$refs.make && this.$refs.make.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.activeName = 'first';
|
||||
selected.optionList.forEach(item => {
|
||||
item.checked = false;
|
||||
if (item.id == selected.initId) {
|
||||
item.checked = true;
|
||||
}
|
||||
});
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.editModel.type = selected._type;
|
||||
this.$nextTick(() => {
|
||||
@ -441,7 +454,8 @@ export default {
|
||||
edit() {
|
||||
this.$refs['dataform'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: this.editModel.type}, this.editModel);
|
||||
const data = Object.assign({_type: this.editModel.type}, this.editModel);
|
||||
console.log(data, '=====');
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
@ -469,7 +483,18 @@ export default {
|
||||
} else {
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
},
|
||||
checkOverlab(list, index) {
|
||||
list.forEach((item, i) => {
|
||||
if (i != index) {
|
||||
item.checked = false;
|
||||
}
|
||||
})
|
||||
list[index].checked = !list[index].checked;
|
||||
if (list[index].checked) {
|
||||
this.editModel.initId = list[index].id;
|
||||
}
|
||||
},
|
||||
deleteOverlab(list, index) {
|
||||
list.splice(index, 1);
|
||||
this.cardMode = 'generate';
|
||||
@ -485,7 +510,8 @@ export default {
|
||||
const data = {
|
||||
id: this.addBackModel.id,
|
||||
type: this.addBackModel.type,
|
||||
label: this.addBackModel.label,
|
||||
label: this.addBackModel.label,
|
||||
checked: false,
|
||||
sectionList: this.addBackModel.type == 'NONE' ? [] : this.addBackModel.sectionList
|
||||
};
|
||||
this.editModel.optionList.splice(this.addBackModel.parentIndex, 1, data);
|
||||
@ -502,7 +528,8 @@ export default {
|
||||
this.editModel.optionList.push({
|
||||
id: id,
|
||||
type: this.addBackModel.type,
|
||||
label: this.addBackModel.label,
|
||||
label: this.addBackModel.label,
|
||||
checked: false,
|
||||
sectionList: this.addBackModel.type == 'NONE' ? [] : this.addBackModel.sectionList
|
||||
});
|
||||
this.$refs.hostileForm.resetFields();
|
||||
@ -559,6 +586,7 @@ export default {
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
margin-bottom: 15px;
|
||||
margin-top: 15px;
|
||||
|
||||
&:last-child{
|
||||
margin-bottom: 0;
|
||||
|
Loading…
Reference in New Issue
Block a user