2019-11-29 12:51:58 +08:00
|
|
|
<template>
|
|
|
|
<transition name="el-zoom-in-center">
|
|
|
|
<div class="map-control">
|
|
|
|
<div class="joylink-card">
|
|
|
|
<div class="clearfix">
|
|
|
|
<span>
|
|
|
|
{{ $t('map.mapName') }}
|
|
|
|
<b>{{ mapInfo.name }}</b>
|
|
|
|
</span>
|
|
|
|
<el-button type="text" class="mapEdit_box" @click="previewRouteEvent">{{ $t('map.preview') }}</el-button>
|
|
|
|
<el-button type="text" class="mapEdit_box" @click="createRouteEvent">{{ $t('map.newConstruction') }}</el-button>
|
|
|
|
<el-button type="text" class="mapEdit_box" @click="drawMap">{{ $t('map.drawMap') }}</el-button>
|
|
|
|
<el-button type="text" class="mapEdit_box" @click="showMap">{{ $t('map.viewLayer') }}</el-button>
|
|
|
|
</div>
|
2019-12-19 16:21:00 +08:00
|
|
|
<el-tabs v-model="enabledTab" type="card" class="map_card" :before-leave="tabBeforeLeave" @tab-click="changePane">
|
2020-04-30 13:40:32 +08:00
|
|
|
<el-tab-pane :label="$t('map.routeID')" class="tab_pane_box" name="route" :lazy="lazy">
|
2019-12-18 13:21:07 +08:00
|
|
|
<route-operate
|
|
|
|
ref="routeOperate"
|
2019-11-29 12:51:58 +08:00
|
|
|
:map-info="mapInfo"
|
|
|
|
:selected="selected"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
2020-04-30 13:40:32 +08:00
|
|
|
<el-tab-pane label="侧防" class="tab_pane_box" name="flankProtect" :lazy="lazy">
|
2020-04-13 17:03:48 +08:00
|
|
|
<flank-protect-operate
|
|
|
|
ref="flankProtectOperate"
|
|
|
|
:map-info="mapInfo"
|
|
|
|
:selected="selected"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
2020-04-30 13:40:32 +08:00
|
|
|
<el-tab-pane label="自动折返" class="tab_pane_box" name="turned" :lazy="lazy">
|
2019-12-10 17:55:43 +08:00
|
|
|
<turned-operate
|
2019-12-27 09:40:52 +08:00
|
|
|
ref="turnedOperate"
|
2019-12-10 17:55:43 +08:00
|
|
|
:map-info="mapInfo"
|
|
|
|
:selected="selected"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
2019-12-10 16:50:38 +08:00
|
|
|
</el-tab-pane>
|
2020-04-30 13:40:32 +08:00
|
|
|
<el-tab-pane :label="$t('map.automaticSignal')" class="tab_pane_box" name="automatic" :lazy="lazy">
|
2019-11-29 12:51:58 +08:00
|
|
|
<automatic-operate
|
|
|
|
ref="automaticOperate"
|
|
|
|
:map-info="mapInfo"
|
|
|
|
:selected="selected"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
2020-04-30 13:40:32 +08:00
|
|
|
<el-tab-pane :label="$t('map.signalApprochSection')" class="tab_pane_box" name="signal" :lazy="lazy">
|
2019-11-29 12:51:58 +08:00
|
|
|
<signal-operate
|
|
|
|
ref="signalOperate"
|
|
|
|
:map-info="mapInfo"
|
|
|
|
:selected="selected"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
2020-04-30 13:40:32 +08:00
|
|
|
<el-tab-pane :label="$t('map.routing')" class="tab_pane_box" name="routing" :lazy="lazy">
|
2019-11-29 12:51:58 +08:00
|
|
|
<routing-operate
|
|
|
|
ref="routingOperate"
|
|
|
|
:map-info="mapInfo"
|
|
|
|
:selected="selected"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
2020-04-30 13:40:32 +08:00
|
|
|
<el-tab-pane label="停站时间" class="tab_pane_box" name="dwellTime" :lazy="lazy">
|
2020-04-20 09:57:00 +08:00
|
|
|
<dwell-time-operate
|
|
|
|
ref="dwellTimeOperate"
|
|
|
|
:map-info="mapInfo"
|
|
|
|
:selected="selected"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
2020-04-30 13:40:32 +08:00
|
|
|
<el-tab-pane label="设置运行等级" class="tab_pane_box" name="runLevel" :lazy="lazy">
|
2020-04-26 18:33:26 +08:00
|
|
|
<run-level-operate
|
|
|
|
ref="runLevelOperate"
|
|
|
|
:map-info="mapInfo"
|
|
|
|
:selected="selected"
|
|
|
|
@setCenter="setCenter"
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
2019-11-29 12:51:58 +08:00
|
|
|
</el-tabs>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</transition>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import RouteOperate from './routeoperate/index';
|
|
|
|
import RoutingOperate from './routingoperate/index';
|
|
|
|
import AutomaticOperate from './automaticoperate/index';
|
2020-03-25 13:45:58 +08:00
|
|
|
// import PathOperate from './pathoperate/index';
|
|
|
|
import RunLevelOperate from './runLeveloperate/index';
|
2019-11-29 12:51:58 +08:00
|
|
|
import SignalOperate from './signaloperate/index';
|
2019-12-10 16:50:38 +08:00
|
|
|
import TurnedOperate from './turnedoperate/index';
|
2020-04-13 17:03:48 +08:00
|
|
|
import FlankProtectOperate from './flankProtectOperate/index';
|
2020-04-20 09:57:00 +08:00
|
|
|
import DwellTimeOperate from './dwellTimeOperate/index';
|
2019-11-29 12:51:58 +08:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'DataRelation',
|
|
|
|
components: {
|
|
|
|
RouteOperate,
|
|
|
|
RoutingOperate,
|
|
|
|
AutomaticOperate,
|
2020-03-25 13:45:58 +08:00
|
|
|
RunLevelOperate,
|
2020-04-13 17:03:48 +08:00
|
|
|
FlankProtectOperate,
|
2020-03-25 13:45:58 +08:00
|
|
|
// PathOperate,
|
2019-12-10 10:18:25 +08:00
|
|
|
SignalOperate,
|
2020-04-20 09:57:00 +08:00
|
|
|
TurnedOperate,
|
|
|
|
DwellTimeOperate
|
2019-11-29 12:51:58 +08:00
|
|
|
},
|
|
|
|
props: {
|
|
|
|
selected: {
|
|
|
|
type: Object,
|
|
|
|
default: function () {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mapInfo: {
|
|
|
|
type: Object,
|
|
|
|
default: function() { return {name: this.$t('map.pleaseSelectMap')}; }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2019-12-19 10:08:12 +08:00
|
|
|
enabledTab: 'route',
|
2019-12-27 09:40:52 +08:00
|
|
|
oldDevice: null,
|
2020-04-30 14:50:27 +08:00
|
|
|
lazy: true,
|
2019-12-27 09:40:52 +08:00
|
|
|
enabledTabMenu: {
|
|
|
|
route: 'routeOperate',
|
|
|
|
routing: 'routingOperate',
|
|
|
|
automatic: 'automaticOperate',
|
|
|
|
signal: 'signalOperate',
|
2020-03-25 13:45:58 +08:00
|
|
|
runLevel: 'runLevelOperate',
|
2020-04-13 17:03:48 +08:00
|
|
|
turned: 'turnedOperate',
|
2020-04-20 09:57:00 +08:00
|
|
|
flankProtect: 'flankProtectOperate',
|
|
|
|
dwellTime: 'dwellTimeOperate'
|
2019-12-27 09:40:52 +08:00
|
|
|
}
|
2019-11-29 12:51:58 +08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted() {
|
2020-04-30 14:50:27 +08:00
|
|
|
this.initLoad();
|
2019-11-29 12:51:58 +08:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
showMap() {
|
|
|
|
this.$emit('showMap');
|
|
|
|
},
|
2019-12-19 18:04:28 +08:00
|
|
|
initLoad() {
|
2020-04-20 18:29:50 +08:00
|
|
|
if (this.enabledTab === 'route' || this.enabledTab == 'runLevel') {
|
2019-12-27 09:40:52 +08:00
|
|
|
this.$refs[this.enabledTabMenu[this.enabledTab]].initLoad();
|
2019-12-19 18:04:28 +08:00
|
|
|
}
|
|
|
|
},
|
2020-03-25 13:45:58 +08:00
|
|
|
createRouteEvent() { // 创建 清空表单内容
|
2019-12-27 09:40:52 +08:00
|
|
|
this.$refs[this.enabledTabMenu[this.enabledTab]].createRouteEvent();
|
2019-11-29 12:51:58 +08:00
|
|
|
},
|
2020-03-25 13:45:58 +08:00
|
|
|
previewRouteEvent() { // 预览调用
|
2019-12-27 09:40:52 +08:00
|
|
|
this.$refs[this.enabledTabMenu[this.enabledTab]].previewRouteEvent();
|
2019-11-29 12:51:58 +08:00
|
|
|
},
|
|
|
|
changePane(data) {
|
|
|
|
this.enabledTab = data.name;
|
|
|
|
},
|
|
|
|
setSelected(selected) {
|
2019-12-27 09:40:52 +08:00
|
|
|
this.$refs[this.enabledTabMenu[this.enabledTab]].setSelected(selected);
|
2019-11-29 12:51:58 +08:00
|
|
|
},
|
|
|
|
setCenter(code) {
|
|
|
|
this.$emit('setCenter', code);
|
|
|
|
},
|
|
|
|
drawMap() {
|
2020-04-30 14:50:27 +08:00
|
|
|
this.$refs.routeOperate && this.$refs.routeOperate.batchSectionListFocus(false);
|
|
|
|
this.$refs.signalOperate && this.$refs.signalOperate.batchSectionListFocus(false);
|
|
|
|
this.$refs.runLevelOperate && this.$refs.runLevelOperate.batchSectionListFocus(false);
|
2019-11-29 12:51:58 +08:00
|
|
|
this.$emit('selectView', 'draft');
|
2019-12-13 14:46:38 +08:00
|
|
|
},
|
2019-12-19 16:21:00 +08:00
|
|
|
tabBeforeLeave(activeName, oldActiveName) {
|
2020-04-26 14:44:46 +08:00
|
|
|
if (oldActiveName === 'route' || oldActiveName === 'signal' || oldActiveName == 'runLevel') {
|
2019-12-27 09:40:52 +08:00
|
|
|
this.$refs[this.enabledTabMenu[oldActiveName]].batchSectionListFocus(false);
|
2019-12-19 16:21:00 +08:00
|
|
|
}
|
2020-04-30 14:50:27 +08:00
|
|
|
if (activeName === 'route' || activeName === 'signal' || activeName == 'runLevel') {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$refs[this.enabledTabMenu[activeName]].batchSectionListFocus(true);
|
|
|
|
});
|
|
|
|
}
|
2019-11-29 12:51:58 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</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%;
|
|
|
|
.clearfix{
|
|
|
|
height: 47px;
|
|
|
|
padding: 15px;
|
|
|
|
}
|
|
|
|
.joylink-card{
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.mapEdit_box{
|
|
|
|
float: right;
|
|
|
|
padding: 3px 0;
|
|
|
|
margin-right: 5px;
|
|
|
|
}
|
|
|
|
.map_card {
|
|
|
|
height: calc(100% - 47px);
|
|
|
|
.tab_pane_box{
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.physical-view {
|
|
|
|
line-height: 25px;
|
|
|
|
height: 118px;
|
|
|
|
padding-left: 12px;
|
|
|
|
|
|
|
|
.el-checkbox {
|
|
|
|
width: 70px;
|
|
|
|
margin: 0;
|
|
|
|
margin-right: 30px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/deep/ {
|
|
|
|
.map_card .el-tabs__header .el-tabs__item.is-active {
|
|
|
|
border-bottom-color: #f5f7fa;
|
|
|
|
background: #f5f7fa;
|
|
|
|
}
|
|
|
|
.map_card .el-tabs__content{
|
|
|
|
height: calc(100% - 56px);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/deep/ .map-draft-group {
|
|
|
|
float: right;
|
|
|
|
margin: 10px 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
/deep/ {
|
|
|
|
.view-control {
|
|
|
|
overflow-y: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|