地图绘图代码调整
This commit is contained in:
parent
d18b440c24
commit
99b622ef24
@ -469,7 +469,11 @@ export default {
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
this.$emit('selectFiled', this.field);
|
||||
if (this.field) {
|
||||
this.$emit('deviceSelect', 'ControlDraft');
|
||||
} else {
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
deleteOverlab(list, index) {
|
||||
list.splice(index, 1);
|
||||
|
@ -267,7 +267,11 @@ export default {
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
this.$emit('saidLampHover', this.field);
|
||||
if (this.field) {
|
||||
this.$emit('deviceSelect', 'ControlLamp');
|
||||
} else {
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
handleIndicatorLightList(indicatorLightList) {
|
||||
this.atsControlList = [];
|
||||
|
@ -128,7 +128,11 @@ export default {
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
this.$emit('espCode', this.field);
|
||||
if (this.field) {
|
||||
this.$emit('deviceSelect', 'Esp');
|
||||
} else {
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() === 'Esp'.toUpperCase()) {
|
||||
@ -140,7 +144,8 @@ export default {
|
||||
this.addModel.standCode = selected.code;
|
||||
this.activeName = 'second';
|
||||
this.field = '';
|
||||
this.$emit('espCode', '');
|
||||
// this.$emit('espCode', '');
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
hasPSD(data) {
|
||||
|
@ -28,15 +28,7 @@
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@fieldSelect="fieldSelect"
|
||||
@fieldSelectSwitchSection="fieldSelectSwitchSection"
|
||||
@stationSectionCode="stationEnabledTab"
|
||||
@signalSectionCode="selectEnabledTab"
|
||||
@standStationCode="standStationTab"
|
||||
@selectFiled="selectFiled"
|
||||
@psdCode="psdTab"
|
||||
@espCode="esqTab"
|
||||
@saidLampHover="saidLampTab"
|
||||
@deviceSelect="deviceSelect"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@ -74,9 +66,7 @@ import ControlLamp from './controlLamp';
|
||||
import SplitStation from './splitStation';
|
||||
import Arrow from './arrow';
|
||||
import SplitScreen from './splitScreen';
|
||||
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { ViewMode } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'MapOperate',
|
||||
@ -144,21 +134,12 @@ export default {
|
||||
{label:'站间分隔', name:'SplitStation', menus:SplitStation},
|
||||
{label:'箭头', name:'Arrow', menus:Arrow}
|
||||
],
|
||||
feild: '',
|
||||
singlaType: '',
|
||||
stationType: '',
|
||||
switchType: '',
|
||||
stationStandType:'',
|
||||
psdType: '',
|
||||
controlType: '',
|
||||
ViewMode: ViewMode,
|
||||
selectDevice:'',
|
||||
enabledTab: 'Section',
|
||||
autoSaveTask: null,
|
||||
show: {
|
||||
mapEditShow: false,
|
||||
mapPaintShow: true
|
||||
},
|
||||
oldDevice: null,
|
||||
projectType: true
|
||||
};
|
||||
},
|
||||
@ -203,55 +184,21 @@ export default {
|
||||
handleSelectControlPage(device) {
|
||||
const controlLampTypeList = ['AtsControl', 'CenterCommunication', 'ChainControl', 'IntersiteControl', 'LeuControl', 'LocalControl', 'Maintain', 'SwitchFault', 'PowerSupply', 'NoOneReturn', 'MaintenanceLamps', 'ZcCommunication', 'FaultStatusGroup', 'ModeStatusGroup', 'LampFilament', 'ReturnModeGroup', 'ControlSwitch', 'Axle'];
|
||||
const type = device._type;
|
||||
if (this.stationType) {
|
||||
this.enabledTab = 'Station';
|
||||
} else if (this.switchType) {
|
||||
this.enabledTab = 'Switch';
|
||||
} else if (this.singlaType) {
|
||||
this.enabledTab = 'Signal';
|
||||
} else if (this.stationStandType) {
|
||||
this.enabledTab = 'StationStand';
|
||||
} else if (this.psdType) {
|
||||
this.enabledTab = 'Psd';
|
||||
} else if (this.esqType) {
|
||||
this.enabledTab = 'Esp';
|
||||
} else if (this.feild) {
|
||||
this.enabledTab = 'Section';
|
||||
} else if (type == 'AutomaticRoute' || type == 'AutoTurnBack' || type == 'AxleReset' || type == 'LimitControl' || type == 'GuideLock' || type == 'StationTurnBack' || this.controlType) {
|
||||
if (this.selectDevice) {
|
||||
this.enabledTab = this.selectDevice;
|
||||
} else if (type == 'AutomaticRoute' || type == 'AutoTurnBack' || type == 'AxleReset' || type == 'LimitControl' || type == 'GuideLock' || type == 'StationTurnBack') {
|
||||
this.enabledTab = 'ControlDraft';
|
||||
} else if (controlLampTypeList.includes(type) || this.saidLampType) {
|
||||
} else if (controlLampTypeList.includes(type)) {
|
||||
this.enabledTab = 'ControlLamp';
|
||||
} else {
|
||||
this.enabledTab = type;
|
||||
}
|
||||
},
|
||||
selectFiled(type) {
|
||||
this.controlType = type;
|
||||
},
|
||||
esqTab(type) {
|
||||
this.esqType = type;
|
||||
},
|
||||
psdTab(type) {
|
||||
this.psdType = type;
|
||||
},
|
||||
saidLampTab(type) {
|
||||
this.saidLampType = type;
|
||||
},
|
||||
standStationTab(type) {
|
||||
this.stationStandType = type;
|
||||
},
|
||||
stationEnabledTab(type) {
|
||||
this.stationType = type;
|
||||
},
|
||||
selectEnabledTab(type) {
|
||||
this.singlaType = type;
|
||||
},
|
||||
fieldSelect(type) {
|
||||
this.feild = type;
|
||||
},
|
||||
fieldSelectSwitchSection(type) {
|
||||
this.switchType = type;
|
||||
|
||||
deviceSelect(type) {
|
||||
this.selectDevice = type;
|
||||
},
|
||||
|
||||
handleSelectLogicalView(handle) {
|
||||
this.$emit('handleSelectLogicalView', handle);
|
||||
},
|
||||
|
@ -211,7 +211,11 @@ export default {
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
this.$emit('psdCode', this.field);
|
||||
if (this.field) {
|
||||
this.$emit('deviceSelect', 'Psd');
|
||||
} else {
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() === 'Psd'.toUpperCase()) {
|
||||
@ -223,7 +227,7 @@ export default {
|
||||
this.addModel.standCode = selected.code;
|
||||
this.activeName = 'second';
|
||||
this.field = '';
|
||||
this.$emit('psdCode', '');
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
create() {
|
||||
|
@ -436,27 +436,27 @@ export default {
|
||||
this.$refs.splitOrMerge.addModel.code = selected.code;
|
||||
this.activeName = 'three';
|
||||
this.field = '';
|
||||
this.$emit('fieldSelect', '');
|
||||
this.$emit('deviceSelect', '');
|
||||
} else if (this.field.toUpperCase() === 'leftSectionCode'.toUpperCase()) {
|
||||
this.$refs.splitOrMerge.mergeModel.lsectioncode = selected.code;
|
||||
this.activeName = 'three';
|
||||
this.field = '';
|
||||
this.$emit('fieldSelect', '');
|
||||
this.$emit('deviceSelect', '');
|
||||
} else if (this.field.toUpperCase() === 'rightSectionCode'.toUpperCase()) {
|
||||
this.$refs.splitOrMerge.mergeModel.rsectioncode = selected.code;
|
||||
this.activeName = 'three';
|
||||
this.field = '';
|
||||
this.$emit('fieldSelect', '');
|
||||
this.$emit('deviceSelect', '');
|
||||
} else if (this.field.toUpperCase() === 'getSectionStart'.toUpperCase()) {
|
||||
this.$refs.create.createModel.leftSectionCode = selected.code;
|
||||
this.activeName = 'second';
|
||||
this.field = '';
|
||||
this.$emit('fieldSelect', '');
|
||||
this.$emit('deviceSelect', '');
|
||||
} else if (this.field.toUpperCase() === 'getSectionEnd'.toUpperCase()) {
|
||||
this.$refs.create.createModel.rightSectionCode = selected.code;
|
||||
this.activeName = 'second';
|
||||
this.field = '';
|
||||
this.$emit('fieldSelect', '');
|
||||
this.$emit('deviceSelect', '');
|
||||
} else if (this.field.toUpperCase() === 'sectionTypeCode'.toUpperCase()) {
|
||||
this.$refs.batchSettings.formModel.modelList.push(selected.code);
|
||||
this.activeName = 'five';
|
||||
@ -468,7 +468,11 @@ export default {
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field == this.field ? '' : field;
|
||||
this.$emit('fieldSelect', this.field);
|
||||
if (this.field) {
|
||||
this.$emit('deviceSelect', 'Section');
|
||||
} else {
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
addPoint(index) {
|
||||
const data = { x: 0, y: 0 };
|
||||
|
@ -365,12 +365,16 @@ export default {
|
||||
}
|
||||
this.activeName = 'second';
|
||||
this.field = '';
|
||||
this.$emit('signalSectionCode', '');
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
signalSectionCode(field) {
|
||||
this.field = field;
|
||||
this.$emit('signalSectionCode', field);
|
||||
if (this.field) {
|
||||
this.$emit('deviceSelect', 'Signal');
|
||||
} else {
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
updateMapModel(model) {
|
||||
this.$emit('updateMapModel', model);
|
||||
|
@ -288,7 +288,11 @@ export default {
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field == this.field ? '' : field;
|
||||
this.$emit('standStationCode', this.field);
|
||||
if (this.field) {
|
||||
this.$emit('deviceSelect', 'StationStand');
|
||||
} else {
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
changeStation(station) {
|
||||
this.editModel.deviceStationCode = this.getDeviceStationCode(station);
|
||||
|
@ -55,7 +55,11 @@ export default {
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field == this.field ? '' : field;
|
||||
this.$emit('fieldSelectSwitchSection', this.field);
|
||||
if (this.field) {
|
||||
this.$emit('deviceSelect', 'Switch');
|
||||
} else {
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase() && this.field.toUpperCase() === 'relevanceSwitchList'.toUpperCase()) {
|
||||
|
Loading…
Reference in New Issue
Block a user