This commit is contained in:
joylink_cuiweidong 2020-12-09 17:13:57 +08:00
commit 5bc8ec230c
8 changed files with 72 additions and 52 deletions

View File

@ -336,6 +336,26 @@ class SkinCode extends defaultStyle {
} }
}; };
this[deviceType.StationTurnBack] = { // 站后折返
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lamp: {
fill: '#f1f1f1', // 填充色
radiusR: 7 // 控制灯大小
},
text: {
titleTextShow: false,
fontWeight: 580,
fontSize: 10,
distance: 10
},
rect: {
fill: 'rgba(0,0,0,0)',
stroke: '#fff',
lineWidth: 0,
padding: 6
}
};
this[deviceType.Station] = { this[deviceType.Station] = {
// 成都三号线车站元素 车站名称 // 成都三号线车站元素 车站名称
elemnetType:['stationText'], elemnetType:['stationText'],

View File

@ -53,7 +53,7 @@ export default class OutFrame extends Group {
if (showMode == '04') { if (showMode == '04') {
this.box && this.box.hide(); this.box && this.box.hide();
return; return;
} }
if (!showConditions || showConditions === '01' || showMode === showConditions) { if (!showConditions || showConditions === '01' || showMode === showConditions) {
this.box && this.box.show(); this.box && this.box.show();
this.setState(this.model); this.setState(this.model);

View File

@ -123,19 +123,19 @@ export default class EFoldbackMode extends Group {
}); });
this.add(this.lateralLineRect); this.add(this.lateralLineRect);
this.add(this.lateralLine); this.add(this.lateralLine);
} }
highlightType1(color) { highlightType1(color) {
this.lateralLinePriorityRect && this.lateralLinePriorityRect.setStyle('stroke', color); this.lateralLinePriorityRect && this.lateralLinePriorityRect.setStyle('stroke', color);
this.lateralLinePriority1 && this.lateralLinePriority1.setStyle('stroke', color); this.lateralLinePriority1 && this.lateralLinePriority1.setStyle('stroke', color);
this.lateralLinePriority2 && this.lateralLinePriority2.setStyle('stroke', color); this.lateralLinePriority2 && this.lateralLinePriority2.setStyle('stroke', color);
} }
highlightType2(color) { highlightType2(color) {
this.linearFoldbackRect && this.linearFoldbackRect.setStyle('stroke', color); this.linearFoldbackRect && this.linearFoldbackRect.setStyle('stroke', color);
this.linearFoldback && this.linearFoldback.setStyle('stroke', color); this.linearFoldback && this.linearFoldback.setStyle('stroke', color);
} }
highlightType3(color) { highlightType3(color) {
this.lateralLineRect && this.lateralLineRect.setStyle('stroke', color); this.lateralLineRect && this.lateralLineRect.setStyle('stroke', color);
this.lateralLine && this.lateralLine.setStyle('stroke', color); this.lateralLine && this.lateralLine.setStyle('stroke', color);
} }
} }

View File

@ -21,7 +21,7 @@ export default class StationTurnBack extends Group {
} }
create() { create() {
const model = this.model; const model = this.model;
const style = this.style; const style = this.style;
if (model.show && !style.StationTurnBack.spliceShow) { if (model.show && !style.StationTurnBack.spliceShow) {
this.control = new Circle({ this.control = new Circle({
@ -95,9 +95,9 @@ export default class StationTurnBack extends Group {
this.add(this.controlRect); this.add(this.controlRect);
this.add(this.text); this.add(this.text);
this.add(this.strategyText); this.add(this.strategyText);
} }
if (style.StationTurnBack.spliceShow) { if (style.StationTurnBack.spliceShow) {
this.control = new EFoldbackMode({ this.control = new EFoldbackMode({
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
x: model.position.x, x: model.position.x,
@ -106,21 +106,21 @@ export default class StationTurnBack extends Group {
style: style style: style
}); });
this.add(this.control); this.add(this.control);
} }
} }
recover() { recover() {
const path = window.location.href; const path = window.location.href;
if (!path.includes('/map/draw')) { if (!path.includes('/map/draw')) {
this.strategyText && this.strategyText.hide(); this.strategyText && this.strategyText.hide();
} }
if (this.style.ReturnModeGroup) { if (this.style.ReturnModeGroup) {
this.control && this.control.highlightType1(this.style.ReturnModeGroup.highlightColor); this.control && this.control.highlightType1(this.style.ReturnModeGroup.highlightColor);
// this.control && this.control.highlightType1(this.style.ReturnModeGroup.strokeColor); // this.control && this.control.highlightType1(this.style.ReturnModeGroup.strokeColor);
this.control && this.control.highlightType2(this.style.ReturnModeGroup.strokeColor); this.control && this.control.highlightType2(this.style.ReturnModeGroup.strokeColor);
this.control && this.control.highlightType3(this.style.ReturnModeGroup.strokeColor); this.control && this.control.highlightType3(this.style.ReturnModeGroup.strokeColor);
} }
} }
handleStatus(name) { handleStatus(name) {
@ -129,19 +129,19 @@ export default class StationTurnBack extends Group {
style: { style: {
text: name text: name
} }
}); });
if (this.style.ReturnModeGroup) { if (this.style.ReturnModeGroup) {
this.control && this.control.highlightType1(this.style.ReturnModeGroup.strokeColor); this.control && this.control.highlightType1(this.style.ReturnModeGroup.strokeColor);
this.control && this.control.highlightType2(this.style.ReturnModeGroup.strokeColor); this.control && this.control.highlightType2(this.style.ReturnModeGroup.strokeColor);
this.control && this.control.highlightType3(this.style.ReturnModeGroup.strokeColor); this.control && this.control.highlightType3(this.style.ReturnModeGroup.strokeColor);
if (name == '优先折返') { if (name == '优先折返') {
this.control && this.control.highlightType1(this.style.ReturnModeGroup.highlightColor); this.control && this.control.highlightType1(this.style.ReturnModeGroup.highlightColor);
} else if (name == '直线折返') { } else if (name == '直线折返') {
this.control && this.control.highlightType2(this.style.ReturnModeGroup.highlightColor); this.control && this.control.highlightType2(this.style.ReturnModeGroup.highlightColor);
} else if (name == '侧线折返') { } else if (name == '侧线折返') {
this.control && this.control.highlightType3(this.style.ReturnModeGroup.highlightColor); this.control && this.control.highlightType3(this.style.ReturnModeGroup.highlightColor);
} }
} }
} }
// 设置状态 // 设置状态

View File

@ -140,8 +140,8 @@ export default {
showConditionsList: [ showConditionsList: [
{ enlabel:'Local&Center', label: '现地&行调', value: '01'}, { enlabel:'Local&Center', label: '现地&行调', value: '01'},
{ enlabel:'Local', label: '现地', value: '02' }, { enlabel:'Local', label: '现地', value: '03' },
{ enlabel:'Center', label: '行调', value: '03'} { enlabel:'Center', label: '行调', value: '02'}
], ],
QuestionTypeList: [ QuestionTypeList: [

View File

@ -26,11 +26,11 @@ export default {
return { return {
offsetY: 15, offsetY: 15,
offsetX: 150, offsetX: 150,
swch: '03', swch: '02',
rightWidth: 0, rightWidth: 0,
swchList: [ swchList: [
{ value: '03', name: '现地' },
{ value: '02', name: '行调' }, { value: '02', name: '行调' },
{ value: '03', name: '现地' },
{ value: '04', name: '大屏' } { value: '04', name: '大屏' }
] ]
}; };
@ -85,6 +85,7 @@ export default {
} }
}, },
switchMode(val) { switchMode(val) {
// 03 02
if (val === '03' && this.localStationShow) { if (val === '03' && this.localStationShow) {
if (this.$route.path.indexOf('mapPreviewNew') !== -1) { if (this.$route.path.indexOf('mapPreviewNew') !== -1) {
this.offsetX = 150 + this.rightWidth; this.offsetX = 150 + this.rightWidth;

View File

@ -458,8 +458,8 @@ export default {
if (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, '====='); console.log(data, '=====');
this.$emit('updateMapModel', data); this.$emit('updateMapModel', data);
this.field = ''; this.field = '';
} }
}); });
}, },

View File

@ -198,9 +198,10 @@ export default {
{ prop: 'controlModePoint', label: this.$t('map.stationControlPosition'), type: 'coordinate', width: '120px', isHidden:!this.editModel.createControlMode, children: [ { prop: 'controlModePoint', label: this.$t('map.stationControlPosition'), type: 'coordinate', width: '120px', isHidden:!this.editModel.createControlMode, children: [
{ prop: 'controlModePoint.x', firstLevel: 'controlModePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px'}, { prop: 'controlModePoint.x', firstLevel: 'controlModePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px'},
{ prop: 'controlModePoint.y', firstLevel: 'controlModePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px'} { prop: 'controlModePoint.y', firstLevel: 'controlModePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px'}
] } ] },
// { prop: 'createTurnBack', label: ':', type: 'checkbox' }, { prop: 'createTurnBack', label: '按图折返', type: 'checkbox' }
// { prop: 'turnBackPoint', label: ':', type: 'coordinate', width: '120px', isHidden: !this.isPointsShow, children: [ // { prop: 'createTurnBack', label: ':', type: 'checkbox' }
// { prop: 'turnBackPoint', label: ':', type: 'coordinate', width: '120px', isHidden: !this.editModel.createTurnBack, children: [
// { prop: 'turnBackPoint.x', firstLevel: 'turnBackPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, // { prop: 'turnBackPoint.x', firstLevel: 'turnBackPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
// { prop: 'turnBackPoint.y', firstLevel: 'turnBackPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } // { prop: 'turnBackPoint.y', firstLevel: 'turnBackPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
// ] } // ] }
@ -248,9 +249,6 @@ export default {
return this.sectionList.filter(elem => { return elem.type === '01' && !elem.switchSection; }); return this.sectionList.filter(elem => { return elem.type === '01' && !elem.switchSection; });
}, },
isPointsShow() {
return this.editModel.createTurnBack;
},
isZcCode() { isZcCode() {
return this.editModel.centralized; return this.editModel.centralized;
}, },
@ -284,6 +282,7 @@ export default {
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);
// //
console.log(selected, selected.createTurnBack);
const beCentralizedStation = {}; const beCentralizedStation = {};
this.relStationList = JSON.parse(JSON.stringify(this.stationList)); this.relStationList = JSON.parse(JSON.stringify(this.stationList));
this.stationList.forEach(data=>{ this.stationList.forEach(data=>{