进路修改
This commit is contained in:
parent
0998fdffbe
commit
9d68eac471
@ -14,17 +14,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- <pre-view-field ref="previewField" :map-info="mapInfo" />
|
<!-- <pre-view-field ref="previewField" :map-info="mapInfo" />
|
||||||
<protect-detail ref="protectDetail" :map-info="mapInfo" /> -->
|
<protect-detail ref="protectDetail" :map-info="mapInfo" /> -->
|
||||||
<editRoute ref="editRouteDate" :map-info="mapInfo" :route-data="editData" />
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getBigRouteList, deleteBigRoute, generateRoute } from '@/api/jmap/mapdraft';
|
import { getBigRouteList, deleteBigRoute, generateRoute } from '@/api/jmap/mapdraft';
|
||||||
import editRoute from './editRoute.vue';
|
|
||||||
export default {
|
export default {
|
||||||
name:'BigRouteDetail',
|
name:'BigRouteDetail',
|
||||||
components: {
|
|
||||||
editRoute
|
|
||||||
},
|
|
||||||
props: {
|
props: {
|
||||||
mapInfo: {
|
mapInfo: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -269,8 +264,8 @@ export default {
|
|||||||
return nameList;
|
return nameList;
|
||||||
},
|
},
|
||||||
editRouteFn(index, row) {
|
editRouteFn(index, row) {
|
||||||
this.editData = JSON.parse(JSON.stringify(row));
|
this.$emit('setEditRouteDate', JSON.parse(JSON.stringify(row)));
|
||||||
this.$refs.editRouteDate.doShow();
|
this.doClose();
|
||||||
},
|
},
|
||||||
deleteRoute(index, row) {
|
deleteRoute(index, row) {
|
||||||
deleteBigRoute(this.mapInfo.id, row.code).then(res=>{
|
deleteBigRoute(this.mapInfo.id, row.code).then(res=>{
|
||||||
|
@ -1,61 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-dialogDrag :title="$t('map.routeEdit')" :visible.sync="show" width="520px" :before-do-close="doClose" append-to-body>
|
|
||||||
<div class="edit-route">
|
|
||||||
<big-route-draft
|
|
||||||
ref="routeDraftEdit"
|
|
||||||
:map-info="mapInfo"
|
|
||||||
:route-data="routeData"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import BigRouteDraft from './route';
|
|
||||||
export default {
|
|
||||||
name:'EditRoute',
|
|
||||||
components: {
|
|
||||||
BigRouteDraft
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
mapInfo: {
|
|
||||||
type: Object,
|
|
||||||
default() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
routeData: {
|
|
||||||
type: Object,
|
|
||||||
default() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
show:false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
|
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
doShow() {
|
|
||||||
this.show = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.routeDraftEdit.setEditData();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
if (this.$refs && this.$refs.routeDraftEdit) {
|
|
||||||
this.$refs.routeDraftEdit.isModify = false;
|
|
||||||
}
|
|
||||||
this.show = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.edit-route{
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -7,7 +7,7 @@
|
|||||||
:route-data="routeData"
|
:route-data="routeData"
|
||||||
@setCenter="setCenter"
|
@setCenter="setCenter"
|
||||||
/>
|
/>
|
||||||
<big-route-detail ref="routeDetail" :map-info="mapInfo" @routeSelected="routeSelected" @refresh="refresh" />
|
<big-route-detail ref="routeDetail" :map-info="mapInfo" @routeSelected="routeSelected" @refresh="refresh" @setEditRouteDate="setEditRouteDate" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -47,6 +47,12 @@ export default {
|
|||||||
// } 'routeList',
|
// } 'routeList',
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
setEditRouteDate(data) {
|
||||||
|
this.routeData = data;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.routeEdit.setEditData();
|
||||||
|
});
|
||||||
|
},
|
||||||
clickEvent(e, model) {
|
clickEvent(e, model) {
|
||||||
this.onSelect(model);
|
this.onSelect(model);
|
||||||
},
|
},
|
||||||
|
@ -426,6 +426,7 @@ export default {
|
|||||||
routeAspectList:[]
|
routeAspectList:[]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
this.isModify = false;
|
||||||
},
|
},
|
||||||
pushRouteAspect() {
|
pushRouteAspect() {
|
||||||
if (this.routeCode && this.signalAspect) {
|
if (this.routeCode && this.signalAspect) {
|
||||||
|
Loading…
Reference in New Issue
Block a user