进路修改

This commit is contained in:
dong 2022-08-02 14:38:39 +08:00
parent 0998fdffbe
commit 9d68eac471
4 changed files with 10 additions and 69 deletions

View File

@ -14,17 +14,12 @@
</div>
<!-- <pre-view-field ref="previewField" :map-info="mapInfo" />
<protect-detail ref="protectDetail" :map-info="mapInfo" /> -->
<editRoute ref="editRouteDate" :map-info="mapInfo" :route-data="editData" />
</el-dialog>
</template>
<script>
import { getBigRouteList, deleteBigRoute, generateRoute } from '@/api/jmap/mapdraft';
import editRoute from './editRoute.vue';
export default {
name:'BigRouteDetail',
components: {
editRoute
},
props: {
mapInfo: {
type: Object,
@ -269,8 +264,8 @@ export default {
return nameList;
},
editRouteFn(index, row) {
this.editData = JSON.parse(JSON.stringify(row));
this.$refs.editRouteDate.doShow();
this.$emit('setEditRouteDate', JSON.parse(JSON.stringify(row)));
this.doClose();
},
deleteRoute(index, row) {
deleteBigRoute(this.mapInfo.id, row.code).then(res=>{

View File

@ -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>

View File

@ -7,7 +7,7 @@
:route-data="routeData"
@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>
</template>
<script>
@ -47,6 +47,12 @@ export default {
// } 'routeList',
},
methods: {
setEditRouteDate(data) {
this.routeData = data;
this.$nextTick(() => {
this.$refs.routeEdit.setEditData();
});
},
clickEvent(e, model) {
this.onSelect(model);
},

View File

@ -426,6 +426,7 @@ export default {
routeAspectList:[]
};
}
this.isModify = false;
},
pushRouteAspect() {
if (this.routeCode && this.signalAspect) {