大铁 进路删除 代码调整

This commit is contained in:
joylink_cuiweidong 2021-04-21 15:17:27 +08:00
parent 6fe2bf0aca
commit 97a07bb70e
4 changed files with 113 additions and 20 deletions

View File

@ -577,3 +577,20 @@ export function getBigRouteList(mapId) {
method: 'get' 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体

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

View File

@ -13,7 +13,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { getBigRouteList } from '@/api/jmap/mapdraft'; import { getBigRouteList, deleteBigRoute } from '@/api/jmap/mapdraft';
export default { export default {
name:'BigRouteDetail', name:'BigRouteDetail',
props: { props: {
@ -103,7 +103,7 @@ export default {
{ {
title: '途经道岔位置', title: '途经道岔位置',
prop: 'pathSwitchPosition', prop: 'pathSwitchPosition',
width: 300, width: 100,
type: 'tag', type: 'tag',
columnValue: (row) => { return this.getPathSwitchPosition(row.pathSwitchPosition, row.multiRoute); }, columnValue: (row) => { return this.getPathSwitchPosition(row.pathSwitchPosition, row.multiRoute); },
tagType: (row) => { return ''; } tagType: (row) => { return ''; }
@ -123,6 +123,30 @@ export default {
type: 'tagMore', type: 'tagMore',
columnValue: (row) => { return this.getBtnCodeList(row.btnCodeList); }, columnValue: (row) => { return this.getBtnCodeList(row.btnCodeList); },
tagType: (row) => { return ''; } 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 // multiRoute
] ]
@ -135,6 +159,24 @@ export default {
methods:{ methods:{
doShow() { doShow() {
this.show = true; 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) { if (this.mapInfo && this.mapInfo.id) {
this.queryList.data = []; this.queryList.data = [];
getBigRouteList(this.mapInfo.id).then(response => { getBigRouteList(this.mapInfo.id).then(response => {
@ -148,22 +190,6 @@ export default {
this.queryList.data = []; 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) { getSignalName(code, multiRoute) {
if (multiRoute) { if (multiRoute) {
@ -225,6 +251,16 @@ export default {
}); });
} }
return nameList; 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);
});
} }
} }
}; };

View File

@ -45,6 +45,7 @@
<config-map ref="configMap" @handleSelectPhysicalView="handleSelectPhysicalView" /> <config-map ref="configMap" @handleSelectPhysicalView="handleSelectPhysicalView" />
<ci-config ref="ciConfig" /> <ci-config ref="ciConfig" />
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<check-config ref="checkConfig" @checkOver="checkOver" />
</div> </div>
</transition> </transition>
</template> </template>
@ -57,6 +58,7 @@ import MapOperate from './mapoperate/index';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import CiConfig from './ciConfig'; import CiConfig from './ciConfig';
import CheckConfig from './checkConfig';
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import ConfigMap from './configMap'; import ConfigMap from './configMap';
@ -71,7 +73,8 @@ export default {
DataRelation, DataRelation,
ConfigMap, ConfigMap,
CiConfig, CiConfig,
PopMenu PopMenu,
CheckConfig
}, },
data() { data() {
return { return {
@ -501,7 +504,7 @@ export default {
} }
} }
}, },
async verifyMapEvent() { async checkOver() {
if (this.$refs.jlmapVisual) { if (this.$refs.jlmapVisual) {
const map = this.$store.state.map.map; const map = this.$store.state.map.map;
if (map && this.$route.params.mapId) { 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) { tableToExcel(data) {
const filterVal = ['index']; const filterVal = ['index'];
const arr = []; const arr = [];