调整宁波一号线道岔,区段封锁 单锁状态,调整zc模块与站台的关系
This commit is contained in:
parent
3a5d7af0ff
commit
3a5804c578
@ -97,7 +97,7 @@ class SkinCode extends defaultStyle {
|
||||
faultLockColor: 'white', // 区段故障锁定颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#FFFFFF', // 保护区段锁闭
|
||||
blockColor: 'pink', // 区段封锁颜色
|
||||
blockColor: '#d659d6', // 区段封锁颜色(淡紫色)
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
timeReleaseColor: '#3F3F3F', // 区段延时释放颜色
|
||||
@ -134,7 +134,8 @@ class SkinCode extends defaultStyle {
|
||||
color: 'white' // 区段边界符颜色
|
||||
},
|
||||
block: {
|
||||
special: false // 区段特殊显示
|
||||
special: false, // 区段特殊显示
|
||||
blockGlint: true, // 区段封锁闪烁显示
|
||||
}
|
||||
};
|
||||
|
||||
@ -359,7 +360,9 @@ class SkinCode extends defaultStyle {
|
||||
locationColor: '#FF0000', // 道岔单锁'定位'颜色 (红色)
|
||||
inversionColor: '#FF0000', // 道岔单锁'反位'颜色 (红色)
|
||||
rectShow: false, // 道岔单锁 矩形框是否显示
|
||||
rectWidth: 18, // 矩形框 宽高
|
||||
arcShow: true, // 道岔单锁 圆形显示
|
||||
arcBorderColor: 'green', // 圆形单锁框边框颜色
|
||||
rectWidth: 22, // 矩形框 宽高
|
||||
rectBorderColor: '#fff' // 矩形边框颜色
|
||||
},
|
||||
block: { // 道岔封锁配置
|
||||
|
@ -95,16 +95,16 @@ class Status {
|
||||
};
|
||||
}
|
||||
handleZcControl(device) {
|
||||
this.statusObj = {
|
||||
};
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleTrainWindow(device) {
|
||||
this.statusObj = {
|
||||
};
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleLine(device) {
|
||||
this.statusObj = {
|
||||
};
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleLimitControl(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
getStatus() {
|
||||
return this.statusObj;
|
||||
|
@ -654,6 +654,12 @@ export default class Section extends Group {
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
});
|
||||
}
|
||||
if (this.style.Section.block.blockGlint) {
|
||||
this.section && this.section.animateStyle(true, [
|
||||
{ time: 1000, styles: { stroke: this.style.backgroundColor } },
|
||||
{ time: 2000, styles: { stroke: this.style.Section.line.blockColor } }
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/** 故障锁定状态 05*/
|
||||
@ -794,7 +800,7 @@ export default class Section extends Group {
|
||||
/** 空闲锁闭或者叫进路锁闭 */
|
||||
model.routeLock && this.routeLock();
|
||||
/** 轨道封锁 */
|
||||
// model.blockade = 1;
|
||||
model.blockade = 1;
|
||||
model.blockade && this.block();
|
||||
/** 非CBTC车占用 */
|
||||
model.nctOccupied && this.unCommunicationOccupied();
|
||||
|
20
src/jmapNew/shape/Switch/ELockArc.js
Normal file
20
src/jmapNew/shape/Switch/ELockArc.js
Normal file
@ -0,0 +1,20 @@
|
||||
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
|
||||
/** 名称元素*/
|
||||
export default function ELockRect(model) {
|
||||
const TextName = new Circle({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 2,
|
||||
shape: {
|
||||
cx: model.x,
|
||||
cy: model.y,
|
||||
r: 5
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
stroke: model.stroke,
|
||||
fill: model.fill
|
||||
}
|
||||
});
|
||||
return TextName;
|
||||
}
|
@ -24,16 +24,17 @@ class ESwName extends Group {
|
||||
fontSize: style.Switch.text.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textAlign: model.triangle.drictx === 1 ? 'left' : 'right',
|
||||
// textAlign: model.triangle.drictx === 1 ? 'left' : 'right',
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: 'middle',
|
||||
textFill: style.Switch.text.fontColor
|
||||
}
|
||||
});
|
||||
|
||||
const rect = this.nameText.getBoundingRect();
|
||||
let textWidth = rect.width * 0.8;
|
||||
let textWidth = rect.width;
|
||||
if (style.Switch.monolock.nameBorderShow) {
|
||||
textWidth = rect.width * 0.8 + 8;
|
||||
textWidth = rect.width;
|
||||
}
|
||||
if (model.triangle.drictx !== 1) {
|
||||
rect.x += rect.width;
|
||||
|
@ -9,12 +9,13 @@ import ESwCore from './ESwCore.js';
|
||||
import ESwLocal from './ESwLocal.js';
|
||||
import ESwLnversion from './ESwLnversion';
|
||||
import ELockRect from './ELockRect';
|
||||
import ELockArc from './ELockArc';
|
||||
import EMouse from './EMouse';
|
||||
import EHighlight from '../element/EHighlight';
|
||||
import ERhomboid from './ERhomboid';
|
||||
import ETriangle from './ETriangle';
|
||||
import store from '@/store';
|
||||
import Vue from 'vue';
|
||||
// import Vue from 'vue';
|
||||
|
||||
export default class Switch extends Group {
|
||||
constructor(model, style) {
|
||||
@ -200,8 +201,20 @@ export default class Switch extends Group {
|
||||
stroke: this.style.Switch.monolock.rectBorderColor,
|
||||
fill: this.style.transparentColor
|
||||
});
|
||||
|
||||
this.lockArc = new ELockArc({ // 锁定矩形
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 6,
|
||||
x: this.model.intersection.x,
|
||||
y: this.model.intersection.y,
|
||||
lineWidth: 1.2,
|
||||
stroke: this.style.Switch.monolock.arcBorderColor,
|
||||
fill: this.style.transparentColor
|
||||
});
|
||||
this.add(this.lockArc);
|
||||
this.add(this.lockRect);
|
||||
this.lockRect.hide();
|
||||
this.lockArc.hide();
|
||||
}
|
||||
|
||||
/** 名称动画*/
|
||||
@ -251,6 +264,7 @@ export default class Switch extends Group {
|
||||
/** 恢复状态*/
|
||||
recover() {
|
||||
this.lockRect.hide(); // 矩形包围框
|
||||
this.lockArc.hide(); // 圆形单锁框
|
||||
this.setSwitchCoreColor(this.style.backgroundColor);
|
||||
this.name.getNameText().stopAnimation(false);
|
||||
this.swCore.stopAnimation(false);
|
||||
@ -330,6 +344,9 @@ export default class Switch extends Group {
|
||||
if (this.style.Switch.monolock.nameBorderShow) { // 单锁显示名称包围框
|
||||
this.setHasTextBorder(1);
|
||||
}
|
||||
if (this.style.Switch.monolock.arcShow) { // 圆形单锁是否显示
|
||||
this.lockArc.show();
|
||||
}
|
||||
if (this.model.normalPosition) {
|
||||
this.setTextColor(this.style.Switch.monolock.locationColor); // 定位 设置道岔名称颜色
|
||||
} else if (this.model.reversePosition) {
|
||||
@ -419,10 +436,8 @@ export default class Switch extends Group {
|
||||
this.setLossAction(true);
|
||||
}
|
||||
/** 道岔单锁 */
|
||||
// model.singleLock = 1;
|
||||
model.singleLock && this.setMonolock();
|
||||
/** 道岔封锁 */
|
||||
// model.blockade = 1;
|
||||
model.blockade && this.block();
|
||||
/** 区段切除*/
|
||||
model.cutOff && this.setSwitchCutOff();
|
||||
|
@ -397,7 +397,6 @@ export default {
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
console.log(selected, '===========');
|
||||
// 判断是否激活选择站台
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (this.field === 'leftSection') {
|
||||
|
@ -163,6 +163,9 @@ export default {
|
||||
watch: {
|
||||
selected(val, oldVal) {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
stationList() {
|
||||
this.getConcertrateStation();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -195,17 +198,19 @@ export default {
|
||||
});
|
||||
});
|
||||
this.concertrateStation = this.stationList.filter(station=>{
|
||||
if (this.activeName == 'first') {
|
||||
return station.centralized && !( beConcentrateStation[station.code] && (beConcentrateStation[station.code] != this.editModel.code));
|
||||
} else {
|
||||
return station.centralized && !( beConcentrateStation[station.code]);
|
||||
}
|
||||
// if (this.activeName == 'first') {
|
||||
// return station.centralized && !( beConcentrateStation[station.code] && (beConcentrateStation[station.code] != this.editModel.code));
|
||||
return station.centralized;
|
||||
// } else {
|
||||
// return station.centralized && !( beConcentrateStation[station.code]);
|
||||
// }
|
||||
});
|
||||
},
|
||||
create() {
|
||||
this.$refs.make.validate((valid) => {
|
||||
if (valid) {
|
||||
const uid = getUID('ZcControl', this.zcList);
|
||||
let models = [];
|
||||
const model = {
|
||||
_type: 'ZcControl',
|
||||
code: uid,
|
||||
@ -216,10 +221,12 @@ export default {
|
||||
},
|
||||
concentrateStationList:this.addModel.concentrateStationList
|
||||
};
|
||||
models.push(model);
|
||||
model.concentrateStationList.forEach(stationCode=>{
|
||||
this.setStationStand(stationCode, model.code);
|
||||
const arr = this.setStationStand(stationCode, model.code);
|
||||
models = [...models, ...arr];
|
||||
});
|
||||
this.$emit('updateMapModel', model);
|
||||
this.$emit('updateMapModel', models);
|
||||
this.getConcertrateStation();
|
||||
this.$refs.make.resetForm();
|
||||
}
|
||||
@ -230,20 +237,12 @@ export default {
|
||||
this.$refs['dataform'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'ZcControl'}, this.editModel);
|
||||
this.$emit('updateMapModel', data);
|
||||
|
||||
this.concertrateStation.forEach(station=>{
|
||||
this.setStationStand(station.code, '');
|
||||
data.concentrateStationList.forEach(stationCode=>{
|
||||
switch (stationCode) {
|
||||
case station.code: {
|
||||
this.setStationStand(stationCode, this.editModel.code);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
let models = [data];
|
||||
data.concentrateStationList.forEach(stationCode=>{
|
||||
const arr = this.setStationStand(stationCode, data.code);
|
||||
models = [...models, ...arr];
|
||||
});
|
||||
|
||||
this.$emit('updateMapModel', models);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -274,14 +273,19 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
// 设置车站所属ZC区域
|
||||
setStationStand(stationCode, code) {
|
||||
const arr = [];
|
||||
this.stationList.forEach(elem=>{
|
||||
if (elem.code == stationCode) {
|
||||
const station = Object.assign({}, elem);
|
||||
const station = deepAssign({}, elem);
|
||||
// const station = Object.assign({}, elem);
|
||||
station.zcCode = code;
|
||||
this.$emit('updateMapModel', station);
|
||||
arr.push(station);
|
||||
// this.$emit('updateMapModel', station);
|
||||
}
|
||||
});
|
||||
return arr; // 返回设置的车站list
|
||||
}
|
||||
// changeConcertrateStation(data) {
|
||||
// if (data.length > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user