From 524df9c5e936ad63626159971c6b6956eed18a7d Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 19 Dec 2019 10:08:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E8=B7=AF-=E5=BB=B6=E7=BB=AD=E4=BF=9D?= =?UTF-8?q?=E6=8A=A4=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Station/index.js | 2 +- .../newMap/newMapdraft/dataRelation/index.vue | 21 +- .../dataRelation/routeoperate/detail.vue | 91 +++-- .../dataRelation/routeoperate/preview.vue | 8 +- .../dataRelation/routeoperate/protect.vue | 383 ++++++++++++++++++ .../dataRelation/routeoperate/route.vue | 96 ++--- 6 files changed, 500 insertions(+), 101 deletions(-) create mode 100644 src/views/newMap/newMapdraft/dataRelation/routeoperate/protect.vue diff --git a/src/jmapNew/shape/Station/index.js b/src/jmapNew/shape/Station/index.js index 5d4316ec1..3e86126a8 100644 --- a/src/jmapNew/shape/Station/index.js +++ b/src/jmapNew/shape/Station/index.js @@ -113,7 +113,7 @@ export default class Station extends Group { text: { position: [0, 0], x: model.turnBackPoint.x + style.Station.turnBack.lampSpace * index, - y: model.turnBackPoint.y + style.Station.lamp.radiusR + style.Station.text.distance, + y: model.turnBackPoint.y + style.Station.lamp.radiusR + style.Station.StationControl.text.distance, fontWeight: style.Station.text.fontWeight, fontSize: style.Station.text.fontSize, fontFamily: style.fontFamily, diff --git a/src/views/newMap/newMapdraft/dataRelation/index.vue b/src/views/newMap/newMapdraft/dataRelation/index.vue index 4373e0da3..1528f1c41 100644 --- a/src/views/newMap/newMapdraft/dataRelation/index.vue +++ b/src/views/newMap/newMapdraft/dataRelation/index.vue @@ -13,14 +13,6 @@ {{ $t('map.viewLayer') }} - - - import { mapGetters } from 'vuex'; -import { listMap, getRouteNewList, delRouteNew, getRouteNewById, putRouteNew, getContinueProtectList } from '@/api/jmap/mapdraft'; /** listRouteMapRoute*/ +import { listMap, getRouteNewList, delRouteNew, getRouteNewById, putRouteNew, getContinueProtectList, delContinueProtect } from '@/api/jmap/mapdraft'; /** listRouteMapRoute*/ import PreViewField from './preview'; export default { @@ -108,20 +108,20 @@ export default { title: this.$t('map.endingSignalName'), prop: 'endSignalCode' }, - { - title: '延续保护', - prop: 'overlapCode' - }, // { - // type: 'button', - // title: this.$t('map.continueProtectSwitchData'), - // buttons: [ - // { - // name: this.$t('map.preview'), - // handleClick: this.overlapSwitchDetail - // } - // ] + // title: '延续保护', + // prop: 'overlapCode' // }, + { + type: 'button', + title: '延续保护', + buttons: [ + { + name: this.$t('map.preview'), + handleClick: this.overlapSwitchDetail + } + ] + }, { type: 'button', title: this.$t('map.accessSideTurnoutData'), @@ -329,24 +329,40 @@ export default { }, async overlapSwitchDetail(index, row) { // 延续保护道岔 if (this.$refs && this.$refs.previewField && row) { - const switchDict = {}; - const switchTypeDict = {}; - this.switchList.map(elem => { switchDict[elem.code] = elem.name; }); - this.SwitchLocateTypeList.map(elem => { switchTypeDict[elem.code] = elem.name; }); - const fieldList = { - id: row.id, - mapId: this.$route.params.mapId, - title: '延续保护道岔数据', - name: row.name, - model: { - items: [ - { prop: 'switchCode', label: '道岔ID', type: 'text' }, - { prop: 'switchCode', label: '道岔名称', type: 'select', options: switchDict }, - { prop: 'switchLocateType', label: '道岔类型', type: 'select', options: switchTypeDict } - ] - } - }; - this.$refs.previewField.doShow(fieldList, row.routeOverlapSwitchList); + // const param = { + // code: row.overlapCode, + // pageNum: 10, + // pageSize:1 + // }; + // getContinueProtectList(this.$route.params.mapId, param).then(resp => { + // if (resp.data.list[0]) { + // const data = resp.data.list[0]; + // const overlabList = []; + // data.relSectionSwitchList.forEach( (item) =>{ + // if (item.routeOverlapSwitchList.length) { + // + // } + // }); + // } + // }); + // const switchDict = {}; + // const switchTypeDict = {}; + // this.switchList.map(elem => { switchDict[elem.code] = elem.name; }); + // this.SwitchLocateTypeList.map(elem => { switchTypeDict[elem.code] = elem.name; }); + // const fieldList = { + // id: row.id, + // mapId: this.$route.params.mapId, + // title: '延续保护道岔数据', + // name: row.name, + // model: { + // items: [ + // { prop: 'switchCode', label: '道岔ID', type: 'text' }, + // { prop: 'switchCode', label: '道岔名称', type: 'select', options: switchDict }, + // { prop: 'switchLocateType', label: '道岔类型', type: 'select', options: switchTypeDict } + // ] + // } + // }; + // this.$refs.previewField.doShow(fieldList, row.routeOverlapSwitchList); } }, async flankProtectionSwitchDetail(index, row) { // 进路侧防道岔 @@ -445,7 +461,18 @@ export default { type: 'warning' }).then(() => { delRouteNew(row.id).then(response => { - this.$message.success('删除成功'); + const param = { + code: row.overlapCode, + pageNum: 10, + pageSize:1 + }; + getContinueProtectList(this.$route.params.mapId, param).then(resp => { + if (resp.data.list[0]) { + delContinueProtect(resp.data.list[0].id).then( res => { + this.$message.success('删除成功'); + }); + } + }); this.reloadTable(); }).catch(() => { this.$messageBox('删除失败'); diff --git a/src/views/newMap/newMapdraft/dataRelation/routeoperate/preview.vue b/src/views/newMap/newMapdraft/dataRelation/routeoperate/preview.vue index 09b2554ee..49b659785 100644 --- a/src/views/newMap/newMapdraft/dataRelation/routeoperate/preview.vue +++ b/src/views/newMap/newMapdraft/dataRelation/routeoperate/preview.vue @@ -8,7 +8,7 @@ center append-to-body > - +