大铁 进路删除 代码调整
This commit is contained in:
parent
6fe2bf0aca
commit
97a07bb70e
@ -577,3 +577,20 @@ export function getBigRouteList(mapId) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
// 大铁地图进路删除接口
|
||||
export function deleteBigRoute(mapId, code) {
|
||||
return request({
|
||||
url: `/api/draftMap/${mapId}/route/${code}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 草稿地图修改检查配置接口
|
||||
export function checkConfig(mapId, data) {
|
||||
return request({
|
||||
url: `/api/mapBuild/${mapId}/checkConfig `,
|
||||
method: 'PUT',
|
||||
data
|
||||
});
|
||||
}
|
||||
// { check: true/false } (body体)
|
||||
|
33
src/views/newMap/newMapdraft/checkConfig.vue
Normal file
33
src/views/newMap/newMapdraft/checkConfig.vue
Normal file
@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
title="检查配置接口"
|
||||
:visible.sync="dialogVisible"
|
||||
:before-close="doClose"
|
||||
center
|
||||
:close-on-click-modal="false"
|
||||
:z-index="2000"
|
||||
append-to-body
|
||||
>
|
||||
{{}}
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name:'CheckConfig',
|
||||
data() {
|
||||
return {
|
||||
dialogVisible:false,
|
||||
check:false
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
doShow() {
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
doClose() {
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -13,7 +13,7 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { getBigRouteList } from '@/api/jmap/mapdraft';
|
||||
import { getBigRouteList, deleteBigRoute } from '@/api/jmap/mapdraft';
|
||||
export default {
|
||||
name:'BigRouteDetail',
|
||||
props: {
|
||||
@ -103,7 +103,7 @@ export default {
|
||||
{
|
||||
title: '途经道岔位置',
|
||||
prop: 'pathSwitchPosition',
|
||||
width: 300,
|
||||
width: 100,
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.getPathSwitchPosition(row.pathSwitchPosition, row.multiRoute); },
|
||||
tagType: (row) => { return ''; }
|
||||
@ -123,6 +123,30 @@ export default {
|
||||
type: 'tagMore',
|
||||
columnValue: (row) => { return this.getBtnCodeList(row.btnCodeList); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '200',
|
||||
buttons: [
|
||||
{
|
||||
name: '删除',
|
||||
handleClick: this.deleteRoute,
|
||||
type: 'danger'
|
||||
}
|
||||
// {
|
||||
// name: this.$t('global.cancel'),
|
||||
// handleClick: this.taskCancel,
|
||||
// type: '',
|
||||
// showControl: (row) => { return row.status == '04'; }
|
||||
// },
|
||||
// {
|
||||
// name: this.$t('lesson.toPerform'),
|
||||
// handleClick: this.taskStart,
|
||||
// type: '',
|
||||
// showControl: (row) => { return row.status == '03' || row.status == '05'; }
|
||||
// }
|
||||
]
|
||||
}
|
||||
// multiRoute
|
||||
]
|
||||
@ -135,6 +159,24 @@ export default {
|
||||
methods:{
|
||||
doShow() {
|
||||
this.show = true;
|
||||
this.reloadData();
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
// queryFunction(params) {
|
||||
// if (this.mapInfo && this.mapInfo.id) {
|
||||
// debugger;
|
||||
// // this.queryList.query(this.queryData).then(response => {
|
||||
// return getBigRouteList(this.mapInfo.id);
|
||||
// }
|
||||
// },
|
||||
// reloadTable() {
|
||||
// if (this.queryList && this.queryList.reload) {
|
||||
// this.queryList.reload();
|
||||
// }
|
||||
// },
|
||||
reloadData() {
|
||||
if (this.mapInfo && this.mapInfo.id) {
|
||||
this.queryList.data = [];
|
||||
getBigRouteList(this.mapInfo.id).then(response => {
|
||||
@ -148,22 +190,6 @@ export default {
|
||||
this.queryList.data = [];
|
||||
});
|
||||
}
|
||||
this.reloadTable();
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
// queryFunction(params) {
|
||||
// if (this.mapInfo && this.mapInfo.id) {
|
||||
// debugger;
|
||||
// // this.queryList.query(this.queryData).then(response => {
|
||||
// return getBigRouteList(this.mapInfo.id);
|
||||
// }
|
||||
// },
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
getSignalName(code, multiRoute) {
|
||||
if (multiRoute) {
|
||||
@ -225,6 +251,16 @@ export default {
|
||||
});
|
||||
}
|
||||
return nameList;
|
||||
},
|
||||
deleteRoute(index, row) {
|
||||
deleteBigRoute(this.mapInfo.id, row.code).then(res=>{
|
||||
this.$message.success('删除进路成功');
|
||||
this.reloadData();
|
||||
delete this.filterRouteMap[row.code];
|
||||
}).catch(error=>{
|
||||
this.$messageBox('删除进路失败:' + error.meessage);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -45,6 +45,7 @@
|
||||
<config-map ref="configMap" @handleSelectPhysicalView="handleSelectPhysicalView" />
|
||||
<ci-config ref="ciConfig" />
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<check-config ref="checkConfig" @checkOver="checkOver" />
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
@ -57,6 +58,7 @@ import MapOperate from './mapoperate/index';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CiConfig from './ciConfig';
|
||||
import CheckConfig from './checkConfig';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
|
||||
import ConfigMap from './configMap';
|
||||
@ -71,7 +73,8 @@ export default {
|
||||
DataRelation,
|
||||
ConfigMap,
|
||||
CiConfig,
|
||||
PopMenu
|
||||
PopMenu,
|
||||
CheckConfig
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -501,7 +504,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
async verifyMapEvent() {
|
||||
async checkOver() {
|
||||
if (this.$refs.jlmapVisual) {
|
||||
const map = this.$store.state.map.map;
|
||||
if (map && this.$route.params.mapId) {
|
||||
@ -521,6 +524,10 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
async verifyMapEvent() {
|
||||
this.$refs.checkConfig.doShow();
|
||||
// import { checkConfig } from '@/api/jmap/mapdraft';
|
||||
},
|
||||
tableToExcel(data) {
|
||||
const filterVal = ['index'];
|
||||
const arr = [];
|
||||
|
Loading…
Reference in New Issue
Block a user