宁波三Bug调整
This commit is contained in:
parent
937689b177
commit
0226042942
@ -190,7 +190,7 @@ class SkinCode extends defaultStyle {
|
||||
guidName: 'half', // 默认引导类型
|
||||
borderVariable: false, // 信号灯边框可变
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 2, // 信号灯边框线宽度
|
||||
borderWidth: 1, // 信号灯边框线宽度
|
||||
borderColor: '#000000', // 信号灯边框线颜色
|
||||
physicColor:'#ffffff', // 物理点灯信号灯边框线颜色
|
||||
radiusR: 5, // 信号灯半径
|
||||
@ -200,7 +200,9 @@ class SkinCode extends defaultStyle {
|
||||
yellowColor: 'yellow', // 信号灯黄色
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#0070C0', // 信号灯蓝色
|
||||
faultType: 'cross' // 信号机故障类型 (cross叉形狀)
|
||||
faultType: 'cross', // 信号机故障类型 (cross叉形狀)
|
||||
guideSector: true, // 引导扇形
|
||||
guideSectorColor: '#FFFF00' // 引导扇形颜色
|
||||
},
|
||||
route: {
|
||||
direction: false, // 自动通过方向
|
||||
@ -879,7 +881,7 @@ class SkinCode extends defaultStyle {
|
||||
allowCLoseStrokeColor: '#FFFF00' // 允许关门描边颜色
|
||||
};
|
||||
this[deviceType.DirectionRod] = {};
|
||||
this[deviceType.IndicatorLight] = {};
|
||||
this[deviceType.IndicatorLight] = {};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Line from 'zrender/src/graphic/shape/Line';
|
||||
import Arc from 'zrender/src/graphic/shape/Arc';
|
||||
import Sector from 'zrender/src/graphic/shape/Sector';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
// import Path from 'zrender/src/graphic/Path';
|
||||
import {ESigFault} from './ESigFault';
|
||||
@ -32,7 +33,27 @@ class ESigLamp extends Group {
|
||||
stroke: style.Signal.lamp.borderColor
|
||||
}
|
||||
});
|
||||
|
||||
if (style.Signal.lamp.guideSector) {
|
||||
this.lampSector = new Sector({
|
||||
_subType: 'SignalLamp',
|
||||
_val: '3',
|
||||
name: model.index,
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 1,
|
||||
shape: {
|
||||
cx: model.x,
|
||||
cy: model.y,
|
||||
r: style.Signal.lamp.radiusR,
|
||||
startAngle: Math.PI * 3 / 2,
|
||||
endAngle: Math.PI / 2
|
||||
},
|
||||
style: {
|
||||
fill: style.Signal.lamp.guideSectorColor
|
||||
}
|
||||
});
|
||||
this.add(this.lampSector);
|
||||
this.lampSector.hide();
|
||||
}
|
||||
if (style.Signal.lamp.faultType && style.Signal.lamp.faultType == 'flash') {
|
||||
this.lampFault = new ESigFault({
|
||||
zlevel: model.zlevel,
|
||||
@ -144,7 +165,13 @@ class ESigLamp extends Group {
|
||||
faultHide() {
|
||||
this.lampFault && this.lampFault.hide();
|
||||
}
|
||||
|
||||
setGuideSectorShowHide(flag) {
|
||||
if (flag) {
|
||||
this.lampSector && this.lampSector.show();
|
||||
} else {
|
||||
this.lampSector && this.lampSector.hide();
|
||||
}
|
||||
}
|
||||
setColor(color) {
|
||||
if (this.model.style.Signal.lamp.borderVariable) {
|
||||
this.lamp.setStyle({ fill: color, stroke: color });
|
||||
|
@ -654,14 +654,17 @@ class Signal extends Group {
|
||||
this.lamps[0].setStyle({ fill: this.style.Signal.lamp.yellowColor, stroke: this.style.Signal.lamp.redColor, lineWidth: 2.5 });
|
||||
} else if (this.style.Signal.lamp.guidName === 'post') {
|
||||
this.sigPost.setHorColor(this.style.Signal.post.guideHorColor);
|
||||
} else if (this.style.Signal.lamp.guidName === 'half') {
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
this.lamps[0] && this.lamps[0].setGuideSectorShowHide(true);
|
||||
}
|
||||
|
||||
if (this.style.Signal.lamp.guidName !== 'singleRY') {
|
||||
if (this.lamps.length == 1) {
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
} else {
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -841,7 +844,7 @@ class Signal extends Group {
|
||||
}
|
||||
// 恢复状态
|
||||
recover() {
|
||||
this.lamps && this.lamps.forEach(item=> { item.show(); });
|
||||
this.lamps && this.lamps.forEach(item=> { item.show(); item.setGuideSectorShowHide(false); });
|
||||
this.sigName.setStyle({ textBorderWidth: 0 });
|
||||
this.sigName.setColor(this.style.Signal.text.defaultColor);
|
||||
this.remainTImeName && this.remainTImeName.hide();
|
||||
@ -910,7 +913,6 @@ class Signal extends Group {
|
||||
model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(model.logicLight); // 信号正向开放
|
||||
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(model.logicLight); // 信号侧向开放
|
||||
model.redOpen && model.yellowOpen && !model.greenOpen && this.guid(); // 引导信号显示
|
||||
|
||||
/** 信号机封锁 */ // 缺一个功能封锁
|
||||
model.blockade && this.block();
|
||||
model.reblockade && this.reblock();
|
||||
|
@ -29,7 +29,6 @@ export default class SignalButton extends Group {
|
||||
this.rectButton = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
silent: true,
|
||||
shape: {
|
||||
x: model.position.x,
|
||||
y: model.position.y,
|
||||
@ -42,6 +41,7 @@ export default class SignalButton extends Group {
|
||||
fill: fillColor
|
||||
}
|
||||
});
|
||||
this.add(this.rectButton);
|
||||
this.leftLine = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
@ -74,23 +74,24 @@ export default class SignalButton extends Group {
|
||||
});
|
||||
this.add(this.rightLine);
|
||||
this.rightLine.hide();
|
||||
this.buttonText = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
x: model.position.x + 7,
|
||||
y: model.position.y - 20,
|
||||
fontWeight: '400',
|
||||
fontSize: 12,
|
||||
fontFamily: '',
|
||||
text: model.name,
|
||||
textFill: '#C0C0C0',
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
}
|
||||
});
|
||||
this.add(this.rectButton);
|
||||
this.add(this.buttonText);
|
||||
if (model.name) {
|
||||
this.buttonText = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
x: model.position.x + model.nameOffset.x,
|
||||
y: model.position.y + model.nameOffset.y,
|
||||
fontWeight: '400',
|
||||
fontSize: 10,
|
||||
fontFamily: '',
|
||||
text: model.name,
|
||||
textFill: '#C0C0C0',
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
}
|
||||
});
|
||||
this.add(this.buttonText);
|
||||
}
|
||||
}
|
||||
startAnimate() {
|
||||
let color = '#008000';
|
||||
|
@ -272,7 +272,7 @@ export default {
|
||||
},
|
||||
getSectionStatus(code) {
|
||||
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return elem.blockade ? '关闭双向:所有列车' : '打开';
|
||||
return elem.closed ? '关闭双向:所有列车' : '打开';
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
@ -63,7 +63,8 @@ export default {
|
||||
{ code: 'PROTECTION', name: '防护信号机'},
|
||||
{ code: 'BLOCKING', name: '阻挡信号机'},
|
||||
{ code: 'PASSING', name: '通过信号机'},
|
||||
{ code: 'TRANSMISSION', name: '传输信号机' }
|
||||
{ code: 'TRANSMISSION', name: '传输信号机' },
|
||||
{ code: 'SHUNTING', name: '调车信号机' }
|
||||
],
|
||||
field:'',
|
||||
editModel: getModel('Signal'),
|
||||
|
@ -60,6 +60,10 @@ export default {
|
||||
x: 0,
|
||||
y: 0
|
||||
},
|
||||
nameOffset: {
|
||||
x: 0,
|
||||
y: -10
|
||||
},
|
||||
stationCode: ''
|
||||
},
|
||||
addModel: {
|
||||
@ -68,6 +72,10 @@ export default {
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
},
|
||||
nameOffset: {
|
||||
x: 0,
|
||||
y: -10
|
||||
}
|
||||
},
|
||||
typeList: [
|
||||
@ -84,9 +92,9 @@ export default {
|
||||
code: [
|
||||
{ required: true, message: this.$t('rules.selectText'), trigger: 'blur' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '请输入按钮名称', trigger: 'blur' }
|
||||
],
|
||||
// name: [
|
||||
// { required: true, message: '请输入按钮名称', trigger: 'blur' }
|
||||
// ],
|
||||
type: [
|
||||
{ required: true, message: '请选择按钮类型', trigger: 'change' }
|
||||
],
|
||||
@ -130,6 +138,10 @@ export default {
|
||||
item: [
|
||||
{ prop: 'code', label: '按钮编码:', type: 'select', optionLabel: 'code', optionValue: 'code', options: this.signalButtonList, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: '按钮名称:', type: 'input' },
|
||||
{ prop: 'nameOffset', label: '名称偏移:', type: 'coordinate', width: '120px', children: [
|
||||
{ prop: 'nameOffset.x', firstLevel: 'nameOffset', secondLevel: 'x', label: 'x', type: 'number', labelWidth: '25px', disabled: false },
|
||||
{ prop: 'nameOffset.y', firstLevel: 'nameOffset', secondLevel: 'y', label: 'y', type: 'number', labelWidth: '25px', disabled: false }
|
||||
] },
|
||||
{ prop: 'type', label: '按钮类型:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.typeList},
|
||||
{ prop: 'signalCode', label: '关联信号机:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.signalList, hover: this.hover, buttonType: 'linkSignal', buttonShowType: this.isLinkSignalShow, isHidden: !this.isLinkSignal },
|
||||
{ prop: 'sectionCode', label: '关联区段:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.sectionList, hover: this.hover, buttonType: 'linkSection', buttonShowType: this.isLinkSectionShow, isHidden: !this.isLinkSection },
|
||||
@ -187,7 +199,7 @@ export default {
|
||||
return list.includes(this.editModel.type);
|
||||
},
|
||||
isLinkSwitch() {
|
||||
return this.editModel.type === 'flexible';
|
||||
return this.editModel.type === 'FLEXIBLE';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -213,6 +225,9 @@ export default {
|
||||
this.handleInit();
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
this.editModel.signalCode = '';
|
||||
this.editModel.switchCode = '';
|
||||
this.editModel.sectionCode = '';
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
} else if (this.field === 'linkSignal' && selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
@ -225,6 +240,8 @@ export default {
|
||||
this.activeName = 'first';
|
||||
this.editModel.switchCode = selected.code;
|
||||
}
|
||||
this.field = '';
|
||||
this.$emit('deviceSelect', '');
|
||||
},
|
||||
clearDeviceSelect() {
|
||||
this.$emit('deviceSelect', '');
|
||||
@ -232,12 +249,16 @@ export default {
|
||||
create() {
|
||||
const model = {
|
||||
_type: 'SignalButton',
|
||||
code: getUID('SignalButton', this.signalButtonList),
|
||||
code: getUID('BTN', this.signalButtonList),
|
||||
type: this.addModel.type,
|
||||
name: this.addModel.name,
|
||||
position: {
|
||||
x: this.addModel.position.x,
|
||||
y: this.addModel.position.y
|
||||
},
|
||||
nameOffset: {
|
||||
x: this.addModel.nameOffset.x,
|
||||
y: this.addModel.nameOffset.y
|
||||
}
|
||||
};
|
||||
this.$refs.createForm.resetForm();
|
||||
|
@ -108,9 +108,9 @@ export default {
|
||||
const switchModel = getModel('Switch');
|
||||
let intersection;
|
||||
if (this.handleResetPoint(section.points)) {
|
||||
intersection = section.points.length == 2 ? section.points[0] : section.points[section.points.length - 2];
|
||||
intersection = section.points.length == 2 ? section.points[0] : section.points[section.points.length - 1];
|
||||
} else {
|
||||
intersection = section.points.length == 2 ? section.points[section.points.length - 1] : section.points[1];
|
||||
intersection = section.points.length == 2 ? section.points[section.points.length - 1] : section.points[0];
|
||||
}
|
||||
let skew;
|
||||
if (this.handleResetPoint(sectionC.points)) {
|
||||
|
Loading…
Reference in New Issue
Block a user