2019-11-29 12:51:58 +08:00
|
|
|
<template>
|
|
|
|
<div style="height: 100%;">
|
|
|
|
<route-draft
|
|
|
|
ref="routeEdit"
|
|
|
|
:selected="selected"
|
|
|
|
:map-info="mapInfo"
|
|
|
|
:route-data="routeData"
|
|
|
|
/>
|
2020-03-25 13:45:58 +08:00
|
|
|
<route-detail ref="routeDetail" :map-info="mapInfo" @routingSelected="routingSelected" />
|
2019-11-29 12:51:58 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
import RouteDraft from './route';
|
|
|
|
import RouteDetail from './detail';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'PathOperate',
|
|
|
|
components: {
|
|
|
|
RouteDraft,
|
|
|
|
RouteDetail
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
mapInfo: {
|
|
|
|
type: Object,
|
|
|
|
default() {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
selected: {
|
|
|
|
type: Object,
|
|
|
|
default() {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
enabledTab: 'Route',
|
|
|
|
routeData: null
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
clickEvent(e, model) {
|
|
|
|
this.onSelect(model);
|
|
|
|
},
|
|
|
|
onSelect(model) {
|
|
|
|
if (model) {
|
|
|
|
this.selected = model;
|
|
|
|
} else {
|
|
|
|
this.selected = null;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
setDelayUnlockStatus(data, status) {
|
|
|
|
if (data && data.delayShowList) {
|
|
|
|
data.delayShowList.forEach(elem => {
|
|
|
|
elem.status = status;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
2020-03-25 13:45:58 +08:00
|
|
|
routingSelected: function (data) {
|
2019-11-29 12:51:58 +08:00
|
|
|
this.routeData = data;
|
|
|
|
if (this.$refs && this.$refs.routeEdit) {
|
2020-04-27 14:25:40 +08:00
|
|
|
this.$refs.routeEdit.editData();
|
2019-11-29 12:51:58 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
previewRouteEvent: function () {
|
|
|
|
if (this.$refs && this.$refs.routeDetail) {
|
|
|
|
this.$refs.routeDetail.doShow();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
createRouteEvent: function () {
|
|
|
|
if (this.$refs && this.$refs.routeEdit) {
|
|
|
|
this.$refs.routeEdit.clear();
|
|
|
|
}
|
|
|
|
},
|
2020-04-20 18:29:50 +08:00
|
|
|
initLoad() {
|
|
|
|
this.$refs.routeEdit.batchSectionListFocus(true);
|
|
|
|
},
|
2019-11-29 12:51:58 +08:00
|
|
|
setSelected(selected) {
|
|
|
|
this.$refs.routeEdit.setSelected(selected);
|
|
|
|
},
|
|
|
|
setCenter(code) {
|
|
|
|
this.$emit('setCenter', code);
|
2020-04-20 18:29:50 +08:00
|
|
|
},
|
|
|
|
batchSectionListFocus(flag) {
|
|
|
|
this.$refs.routeEdit.batchSectionListFocus(flag);
|
2019-11-29 12:51:58 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|