2019-11-29 12:51:58 +08:00
|
|
|
<template>
|
|
|
|
<transition name="el-zoom-in-center">
|
|
|
|
<div class="map-control">
|
|
|
|
<div class="border-card">
|
|
|
|
<div class="clearfix">
|
|
|
|
<span>
|
|
|
|
{{ $t('map.mapName') }}
|
|
|
|
<b>{{ mapInfo.name }}</b>
|
|
|
|
</span>
|
|
|
|
<el-button v-if="isSave" type="text" style="float: right; padding: 3px 0" :disabled="mapSaveing" @click="saveMapEvent">{{ $t('map.save') }}</el-button>
|
|
|
|
<el-button v-if="isSave" type="text" style="float: right; padding: 3px 0; margin-right: 5px;" :disabled="mapSaveing" @click="verifyMapEvent">{{ $t('map.dataVerification') }}</el-button>
|
|
|
|
<el-button type="text" style="float: right; padding: 3px 0; margin-right: 5px;" @click="dataRelation">{{ $t('map.advanced') }}</el-button>
|
|
|
|
<el-button type="text" style="float: right; padding: 3px 0; margin-right: 5px;" @click="showMap">{{ $t('map.viewLayer') }}</el-button>
|
|
|
|
</div>
|
|
|
|
<el-tabs v-model="enabledTab" class="mapEdit" type="card">
|
|
|
|
<el-tab-pane :label="$t('map.section')" class="tab_pane_box" name="Section">
|
|
|
|
<section-draft
|
|
|
|
ref="Section"
|
|
|
|
:selected="selected"
|
|
|
|
@updateMapModel="updateMapModel"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
@fieldSelect="fieldSelect"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane :label="$t('map.switch')" class="tab_pane_box" name="Switch">
|
|
|
|
<switch-draft
|
|
|
|
ref="Switch"
|
|
|
|
:selected="selected"
|
|
|
|
@updateMapModel="updateMapModel"
|
|
|
|
@setCenter="setCenter"
|
2019-12-03 14:42:00 +08:00
|
|
|
@fieldSelectSwitchSection="fieldSelectSwitchSection"
|
2019-11-29 12:51:58 +08:00
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane :label="$t('map.station')" class="tab_pane_box" name="Station">
|
|
|
|
<station-draft
|
|
|
|
ref="Station"
|
|
|
|
:selected="selected"
|
|
|
|
@updateMapModel="updateMapModel"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
@stationSectionCode="stationEnabledTab"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane :label="$t('map.signal')" class="tab_pane_box" name="Signal">
|
|
|
|
<signal-draft
|
|
|
|
ref="Signal"
|
|
|
|
:selected="selected"
|
|
|
|
@updateMapModel="updateMapModel"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
@signalSectionCode="selectEnabledTab"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane :label="$t('map.platform')" class="tab_pane_box" name="StationStand">
|
|
|
|
<station-stand-draft
|
|
|
|
ref="StationStand"
|
|
|
|
:selected="selected"
|
|
|
|
@updateMapModel="updateMapModel"
|
|
|
|
@setCenter="setCenter"
|
2019-12-04 13:38:32 +08:00
|
|
|
@standStationCode="standStationTab"
|
2019-11-29 12:51:58 +08:00
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
2019-12-06 18:03:13 +08:00
|
|
|
<el-tab-pane label="屏蔽门" class="tab_pane_box" name="Psd">
|
|
|
|
<psd-draft
|
|
|
|
ref="PsdDraft"
|
|
|
|
:selected="selected"
|
|
|
|
@updateMapModel="updateMapModel"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
@standStationCode="psdTab"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane label="站台紧急停车" class="tab_pane_box" name="Esp">
|
|
|
|
<esp-draft
|
|
|
|
ref="EspDraft"
|
|
|
|
:selected="selected"
|
|
|
|
@updateMapModel="updateMapModel"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
@standStationCode="esqTab"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
2019-12-05 10:25:07 +08:00
|
|
|
<el-tab-pane :label="$t('map.trainWindow')" class="tab_pane_box" name="TrainWindow">
|
|
|
|
<train-window-draft
|
|
|
|
ref="TrainWindow"
|
2019-11-29 12:51:58 +08:00
|
|
|
:selected="selected"
|
|
|
|
@updateMapModel="updateMapModel"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
2019-12-05 10:25:07 +08:00
|
|
|
<el-tab-pane :label="$t('map.zcZoneControl')" class="tab_pane_box" name="ZcControl">
|
|
|
|
<zc-control-draft
|
|
|
|
ref="ZcControl"
|
2019-11-29 12:51:58 +08:00
|
|
|
:selected="selected"
|
|
|
|
@updateMapModel="updateMapModel"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
2019-12-05 10:25:07 +08:00
|
|
|
<el-tab-pane :label="$t('map.train')" class="tab_pane_box" name="Train">
|
|
|
|
<train-draft
|
|
|
|
ref="Train"
|
2019-11-29 12:51:58 +08:00
|
|
|
:selected="selected"
|
|
|
|
@updateMapModel="updateMapModel"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
2019-12-05 10:25:07 +08:00
|
|
|
<el-tab-pane :label="$t('map.line')" class="tab_pane_box" name="Line">
|
|
|
|
<line-draft
|
|
|
|
ref="Line"
|
2019-11-29 12:51:58 +08:00
|
|
|
:selected="selected"
|
|
|
|
@updateMapModel="updateMapModel"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
2019-12-05 10:25:07 +08:00
|
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane :label="$t('map.text')" class="tab_pane_box" name="Text">
|
|
|
|
<text-draft
|
|
|
|
ref="Text"
|
2019-11-29 12:51:58 +08:00
|
|
|
:selected="selected"
|
|
|
|
@updateMapModel="updateMapModel"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
2019-12-05 10:25:07 +08:00
|
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane :label="$t('map.temporaryLimit')" class="tab_pane_box" name="LimitControl">
|
|
|
|
<limit-control-draft
|
|
|
|
ref="LimitControl"
|
2019-11-29 12:51:58 +08:00
|
|
|
:selected="selected"
|
|
|
|
@updateMapModel="updateMapModel"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
2019-12-05 10:25:07 +08:00
|
|
|
<el-tab-pane :label="$t('map.lcControl')" class="tab_pane_box" name="LcControl">
|
|
|
|
<lc-control-draft
|
|
|
|
ref="LcControl"
|
2019-11-29 12:51:58 +08:00
|
|
|
:selected="selected"
|
|
|
|
@updateMapModel="updateMapModel"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
2019-12-23 10:53:25 +08:00
|
|
|
<el-tab-pane :label="$t('map.image')" class="tab_pane_box" name="Resource">
|
2019-11-29 12:51:58 +08:00
|
|
|
<Image-control-draft
|
2019-12-23 10:53:25 +08:00
|
|
|
ref="Resource"
|
2019-11-29 12:51:58 +08:00
|
|
|
:selected="selected"
|
|
|
|
@updateMapModel="updateMapModel"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane label="包围框" class="tab_pane_box" name="CheckBox">
|
|
|
|
<checkbox-draft
|
|
|
|
ref="CheckBox"
|
|
|
|
:selected="selected"
|
|
|
|
@updateMapModel="updateMapModel"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
|
|
|
</el-tabs>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</transition>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-12-27 15:23:42 +08:00
|
|
|
import SectionDraft from './section/index';
|
2020-01-13 11:25:51 +08:00
|
|
|
import SwitchDraft from './switch/index';
|
2019-12-05 14:31:39 +08:00
|
|
|
import SignalDraft from './signal/index';
|
2019-11-29 12:51:58 +08:00
|
|
|
import StationDraft from './station';
|
|
|
|
import StationStandDraft from './stationstand';
|
2019-12-06 18:03:13 +08:00
|
|
|
import PsdDraft from './psdDraft';
|
|
|
|
import EspDraft from './espDraft';
|
2019-11-29 12:51:58 +08:00
|
|
|
import TrainDraft from './train/index';
|
|
|
|
import LineDraft from './line';
|
|
|
|
import TextDraft from './text';
|
|
|
|
import TrainWindowDraft from './trainwindow';
|
2019-12-04 14:08:55 +08:00
|
|
|
import ZcControlDraft from './zcControl';
|
|
|
|
import LimitControlDraft from './limitControl';
|
|
|
|
import LcControlDraft from './lcControl';
|
2019-11-29 12:51:58 +08:00
|
|
|
import ImageControlDraft from './ImageControl';
|
|
|
|
import CheckboxDraft from './checkboxDraft';
|
|
|
|
|
|
|
|
import { ViewMode } from '@/scripts/ConstDic';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'MapOperate',
|
|
|
|
components: {
|
2019-12-03 18:44:46 +08:00
|
|
|
// CounterDraft,
|
2019-11-29 12:51:58 +08:00
|
|
|
SectionDraft,
|
|
|
|
SwitchDraft,
|
|
|
|
SignalDraft,
|
|
|
|
StationDraft,
|
|
|
|
StationStandDraft,
|
2019-12-06 18:03:13 +08:00
|
|
|
PsdDraft,
|
|
|
|
EspDraft,
|
2019-12-03 18:44:46 +08:00
|
|
|
// DelayUnlockDraft,
|
2019-11-29 12:51:58 +08:00
|
|
|
TrainWindowDraft,
|
|
|
|
TrainDraft,
|
|
|
|
LineDraft,
|
|
|
|
TextDraft,
|
2019-12-04 14:08:55 +08:00
|
|
|
ZcControlDraft,
|
|
|
|
LimitControlDraft,
|
|
|
|
LcControlDraft,
|
2019-11-29 12:51:58 +08:00
|
|
|
ImageControlDraft,
|
|
|
|
CheckboxDraft
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
selected: {
|
|
|
|
type: Object,
|
|
|
|
default: function () {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mapInfo: {
|
|
|
|
type: Object,
|
|
|
|
default: function() { return {name: this.$t('map.pleaseSelectMap')}; }
|
|
|
|
},
|
|
|
|
mapSaveing: [Boolean]
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
feild: '',
|
|
|
|
singlaType: '',
|
|
|
|
stationType: '',
|
2019-12-03 14:42:00 +08:00
|
|
|
switchType: '',
|
2019-12-04 13:38:32 +08:00
|
|
|
stationStandType:'',
|
2019-12-06 18:03:13 +08:00
|
|
|
psdType: '',
|
2019-11-29 12:51:58 +08:00
|
|
|
ViewMode: ViewMode,
|
|
|
|
LogicalViewTypeList: [
|
|
|
|
{ code: 'Link', name: this.$t('map.link') }
|
|
|
|
],
|
|
|
|
PhysicalViewTypeList: [
|
|
|
|
{ code: 'Section', name: this.$t('map.section') },
|
|
|
|
{ code: 'Signal', name: this.$t('map.signal') },
|
|
|
|
{ code: 'Switch', name: this.$t('map.switch') }
|
|
|
|
],
|
|
|
|
logicalLevelsSelect: [],
|
|
|
|
physicalLevelsSelect: [],
|
2019-11-29 13:27:17 +08:00
|
|
|
enabledTab: 'Section',
|
2019-11-29 12:51:58 +08:00
|
|
|
autoSaveTask: null,
|
|
|
|
show: {
|
|
|
|
mapEditShow: false,
|
|
|
|
mapPaintShow: true
|
2019-12-04 14:02:39 +08:00
|
|
|
},
|
2019-12-27 15:23:42 +08:00
|
|
|
oldDevice: null
|
2019-11-29 12:51:58 +08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
isSave() {
|
|
|
|
return this.mapInfo && this.mapInfo.id;
|
|
|
|
}
|
|
|
|
},
|
2019-12-06 14:36:18 +08:00
|
|
|
watch: {
|
|
|
|
'$store.state.map.deleteCount': function (val) {
|
2020-01-13 13:48:45 +08:00
|
|
|
if (this.selected) {
|
|
|
|
this.$refs[this.enabledTab].deleteObj();
|
|
|
|
}
|
2019-12-06 15:12:22 +08:00
|
|
|
},
|
|
|
|
'$store.state.map.updateCount': function (val) {
|
|
|
|
this.$refs[this.enabledTab].edit();
|
2019-12-06 14:36:18 +08:00
|
|
|
}
|
|
|
|
},
|
2019-11-29 12:51:58 +08:00
|
|
|
mounted() {
|
|
|
|
this.initPage();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
dataRelation() {
|
|
|
|
this.$emit('selectView', 'path');
|
|
|
|
},
|
|
|
|
showMap() {
|
|
|
|
this.$emit('showMap');
|
|
|
|
},
|
|
|
|
initPage() {
|
|
|
|
this.$Dictionary.logicalViewType().then(list => {
|
|
|
|
this.LogicalViewTypeList = list;
|
|
|
|
this.LogicalViewTypeList.forEach(elem => {
|
|
|
|
this.logicalLevelsSelect.push(elem.code);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.$Dictionary.physicalViewType().then(list => {
|
|
|
|
this.PhysicalViewTypeList = list;
|
|
|
|
this.PhysicalViewTypeList.forEach(elem => {
|
|
|
|
this.physicalLevelsSelect.push(elem.code);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
2019-12-04 14:02:39 +08:00
|
|
|
handleSelectControlPage(device) {
|
2019-11-29 12:51:58 +08:00
|
|
|
const type = device._type;
|
|
|
|
if (this.stationType) {
|
|
|
|
this.enabledTab = 'Station';
|
2019-12-03 14:42:00 +08:00
|
|
|
} else if (this.switchType) {
|
|
|
|
this.enabledTab = 'Switch';
|
2019-11-29 12:51:58 +08:00
|
|
|
} else if (this.singlaType) {
|
|
|
|
this.enabledTab = 'Signal';
|
2019-12-04 13:38:32 +08:00
|
|
|
} else if (this.stationStandType) {
|
|
|
|
this.enabledTab = 'StationStand';
|
2019-12-06 18:03:13 +08:00
|
|
|
} else if (this.psdType) {
|
|
|
|
this.enabledTab = 'Psd';
|
|
|
|
} else if (this.esqType) {
|
|
|
|
this.enabledTab = 'Esp';
|
2019-12-04 14:08:55 +08:00
|
|
|
} else if (this.feild) {
|
2019-11-29 12:51:58 +08:00
|
|
|
this.enabledTab = 'Section';
|
|
|
|
} else {
|
|
|
|
this.enabledTab = type;
|
|
|
|
}
|
|
|
|
},
|
2019-12-06 18:03:13 +08:00
|
|
|
esqTab(type) {
|
|
|
|
this.esqType = type;
|
|
|
|
},
|
|
|
|
psdTab(type) {
|
|
|
|
this.psdType = type;
|
|
|
|
},
|
2019-12-04 13:38:32 +08:00
|
|
|
standStationTab(type) {
|
|
|
|
this.stationStandType = type;
|
|
|
|
},
|
2019-11-29 12:51:58 +08:00
|
|
|
stationEnabledTab(type) {
|
|
|
|
this.stationType = type;
|
|
|
|
},
|
|
|
|
selectEnabledTab(type) {
|
|
|
|
this.singlaType = type;
|
|
|
|
},
|
|
|
|
fieldSelect(type) {
|
|
|
|
this.feild = type;
|
|
|
|
},
|
2019-12-03 14:42:00 +08:00
|
|
|
fieldSelectSwitchSection(type) {
|
|
|
|
this.switchType = type;
|
|
|
|
},
|
2019-11-29 12:51:58 +08:00
|
|
|
handleSelectLogicalView(handle) {
|
|
|
|
this.$emit('handleSelectLogicalView', handle);
|
|
|
|
},
|
|
|
|
handleSelectPhysicalView(handle) {
|
|
|
|
this.$emit('handleSelectPhysicalView', handle);
|
|
|
|
},
|
|
|
|
saveMapEvent() {
|
|
|
|
this.$emit('saveMapEvent');
|
|
|
|
},
|
|
|
|
verifyMapEvent() {
|
|
|
|
this.$emit('verifyMapEvent');
|
|
|
|
},
|
|
|
|
updateMapModel(obj) {
|
|
|
|
this.$emit('updateMapModel', obj);
|
|
|
|
},
|
|
|
|
setCenter(code) {
|
|
|
|
this.$emit('setCenter', code);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
|
@import "src/styles/mixin.scss";
|
|
|
|
|
|
|
|
.map-context {
|
|
|
|
display: block;
|
|
|
|
float: left;
|
|
|
|
margin-left: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.map-control {
|
|
|
|
float: right;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
.border-card{
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.physical-view {
|
|
|
|
line-height: 25px;
|
|
|
|
height: 118px;
|
|
|
|
padding-left: 12px;
|
|
|
|
|
|
|
|
.el-checkbox {
|
|
|
|
width: 70px;
|
|
|
|
margin: 0;
|
|
|
|
margin-right: 30px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.clearfix{
|
|
|
|
height: 47px;
|
|
|
|
padding: 15px
|
|
|
|
}
|
|
|
|
.mapEdit{
|
|
|
|
height: calc(100% - 47px);
|
|
|
|
.tab_pane_box{
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/deep/ .button_box{
|
|
|
|
width: 100%;
|
|
|
|
background: #ffffff;
|
|
|
|
overflow: hidden;
|
|
|
|
border-top: 1px #f3f1f1 solid;
|
|
|
|
box-shadow: 4px 7px 10px #565656;
|
|
|
|
border-radius: 0;
|
|
|
|
border-bottom: 1px transparent solid;
|
|
|
|
}
|
|
|
|
|
|
|
|
/deep/ .map-draft-group {
|
|
|
|
float: right;
|
|
|
|
margin: 6px 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
/deep/ .view-control {
|
|
|
|
overflow-y: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
/deep/ {
|
|
|
|
.mapEdit .el-tabs__nav-wrap.is-scrollable {
|
|
|
|
padding: 0 20px;
|
|
|
|
}
|
|
|
|
.mapEdit .el-tabs__header .el-tabs__item.is-active {
|
|
|
|
border-bottom-color: #f5f7fa;
|
|
|
|
background: #f5f7fa;
|
|
|
|
}
|
|
|
|
.mapEdit .el-tabs__active-bar{
|
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
.mapEdit .el-tabs__content {
|
|
|
|
height: calc(100% - 56px);
|
|
|
|
}
|
|
|
|
|
|
|
|
.card .el-tabs__nav .el-tabs__item.is-active {
|
|
|
|
border-bottom: 2px solid #E4E7ED;
|
|
|
|
background: #409eff;
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mapEdit .el-tabs__nav-prev {
|
|
|
|
width: 20px;
|
|
|
|
height: 41px;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
box-shadow: 1px 1px 4px #ccc;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mapEdit .el-tabs__nav-next {
|
|
|
|
width: 20px;
|
|
|
|
height: 41px;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
box-shadow: 1px 1px 4px #ccc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 页面页签样式
|
|
|
|
/deep/ {
|
|
|
|
.card .el-transfer-panel__filter{
|
|
|
|
margin: 5px 15px;
|
|
|
|
}
|
|
|
|
.card .el-transfer-panel__list.is-filterable{
|
|
|
|
height: 290px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.card .el-transfer-panel__body{
|
|
|
|
height: 328px;
|
|
|
|
}
|
|
|
|
.card .el-transfer__buttons{
|
|
|
|
padding: 0 16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.card .el-transfer{
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|