From c79329cee7b044172218a5f215fb630f1d4e8c27 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Sun, 26 Sep 2021 16:02:03 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=85=8D=E7=BD=AE=20sele?= =?UTF-8?q?ct=20label=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newMapdraft/mapoperate/displayConfig/centerConfig.vue | 2 +- .../newMap/newMapdraft/mapoperate/displayConfig/depotConfig.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/newMap/newMapdraft/mapoperate/displayConfig/centerConfig.vue b/src/views/newMap/newMapdraft/mapoperate/displayConfig/centerConfig.vue index ca60e03a9..46bee5fb7 100644 --- a/src/views/newMap/newMapdraft/mapoperate/displayConfig/centerConfig.vue +++ b/src/views/newMap/newMapdraft/mapoperate/displayConfig/centerConfig.vue @@ -36,7 +36,7 @@ diff --git a/src/views/newMap/newMapdraft/mapoperate/displayConfig/depotConfig.vue b/src/views/newMap/newMapdraft/mapoperate/displayConfig/depotConfig.vue index 60adde042..6863e36f3 100644 --- a/src/views/newMap/newMapdraft/mapoperate/displayConfig/depotConfig.vue +++ b/src/views/newMap/newMapdraft/mapoperate/displayConfig/depotConfig.vue @@ -72,7 +72,7 @@ From 0928d8cfa9ecfed4f221964dfef2e323406d25a6 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Sun, 26 Sep 2021 17:37:57 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=B8=AD=E6=B7=BB=E5=8A=A0=E4=BF=A1=E5=8F=B7=E6=9C=BA=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/graph/Section/index.js | 6 +- src/jmapNew/shape/graph/Signal/index.js | 5 ++ src/store/modules/map.js | 22 ++++--- src/utils/baseUrl.js | 4 +- .../mapoperate/displayConfig/centerConfig.vue | 59 +++++++++++++++---- .../mapoperate/displayConfig/depotConfig.vue | 38 ++++++++++-- .../mapoperate/displayConfig/localConfig.vue | 38 ++++++++++-- 7 files changed, 136 insertions(+), 36 deletions(-) diff --git a/src/jmapNew/shape/graph/Section/index.js b/src/jmapNew/shape/graph/Section/index.js index 16c7f5c56..43e7fcfef 100644 --- a/src/jmapNew/shape/graph/Section/index.js +++ b/src/jmapNew/shape/graph/Section/index.js @@ -57,8 +57,10 @@ export default class Section extends Group { this._code = model.code; this._type = model._type; this.zlevel = model.zlevel; - model.points = store.getters['map/amendPoints'](this._code, model.points); - // console.log(store.getters['map/amendPoints'](this._code, model.points), '5555555'); + const amendData = store.getters['map/amendPoints'](this._code); + if (amendData) { + model.points = amendData.points; + } this.z = 5 + parseInt(model.layer || 0); this.model = model; this.style = style; diff --git a/src/jmapNew/shape/graph/Signal/index.js b/src/jmapNew/shape/graph/Signal/index.js index ab49dc8dc..e944e1039 100644 --- a/src/jmapNew/shape/graph/Signal/index.js +++ b/src/jmapNew/shape/graph/Signal/index.js @@ -189,6 +189,11 @@ class Signal extends Group { super(); this._code = model.code; this._type = model._type; + const amendData = store.getters['map/amendPoints'](this._code); + if (amendData) { + model.position = amendData.position; + model.rotate = amendData.rotate; + } this.model = model; this.mapDevice = mapDevice; this.style = style; diff --git a/src/store/modules/map.js b/src/store/modules/map.js index e56d97487..9c14fc6dc 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -666,23 +666,21 @@ const map = { return device; }, - amendPoints: state => (code, points) => { + amendPoints: state => (code) => { + let amendData = null; if (state.map && state.map.displayList && state.map.displayList.length && store.state.training.prdType) { - let returnPoints = points; state.map.displayList.forEach(item => { - const section = findElement(item.amendPointsList || [], code); - if (store.state.training.prdType === '01' && item.type === 'LOCAL' && section) { - returnPoints = section.points; - } else if (['02', '04', '05'].includes(store.state.training.prdType) && item.type === 'CENTER' && section) { - returnPoints = section.points; - } else if (store.state.training.prdType === '09' && item.type === 'DEPOT_IL' && section) { - returnPoints = section.points; + const tepData = findElement(item.amendPointsList || [], code); + if (store.state.training.prdType === '01' && item.type === 'LOCAL' && tepData) { + amendData = tepData; + } else if (['02', '04', '05'].includes(store.state.training.prdType) && item.type === 'CENTER' && tepData) { + amendData = tepData; + } else if (store.state.training.prdType === '09' && item.type === 'DEPOT_IL' && tepData) { + amendData = tepData; } }); - return returnPoints; - } else { - return points; } + return amendData; }, checkDeviceShow: state => deviceCode => { if (state.map && state.map.displayList && state.map.displayList.length && store.state.training.prdType) { diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 148e2349a..1c941e55a 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -4,8 +4,8 @@ export function getBaseUrl() { // BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.8.152:9000'; // 袁琪 - // BASE_API = 'http://192.168.8.177:9000'; // 旭强 - BASE_API = 'http://192.168.8.109:9000'; // 张赛 + BASE_API = 'http://192.168.8.172:9200'; // 旭强 + // BASE_API = 'http://192.168.8.109:9000'; // 张赛 // BASE_API = 'http://192.168.8.140:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 diff --git a/src/views/newMap/newMapdraft/mapoperate/displayConfig/centerConfig.vue b/src/views/newMap/newMapdraft/mapoperate/displayConfig/centerConfig.vue index 46bee5fb7..4a6883c49 100644 --- a/src/views/newMap/newMapdraft/mapoperate/displayConfig/centerConfig.vue +++ b/src/views/newMap/newMapdraft/mapoperate/displayConfig/centerConfig.vue @@ -19,7 +19,7 @@
- 修正区段列表 + 修正设备列表
+ + + 坐标点: + + + + , + + + + + + 旋转角度: + + + + +
@@ -155,6 +173,18 @@ export default { } } }, + checkDeviceType(data, prop) { + if (data.code) { + const device = this.$store.getters['map/getDeviceByCode'](data.code); + console.log(device, prop); + if (device._type === 'Section' && prop === 'points') { + return true; + } else if (device._type === 'Signal' && (prop === 'position' || prop === 'rotate')) { + return true; + } + } + return false; + }, getDeviceName(code) { const device = this.$store.getters['map/getDeviceByCode'](code); return device.name || device.code; @@ -192,7 +222,7 @@ export default { }); }, addAmendPoints() { - this.amendPointsList.push({ code: '', points: [{ x: 0, y: 0 }, { x:0, y:0 }] }); + this.amendPointsList.push({ code: '', points: [{ x: 0, y: 0 }, { x:0, y:0 }], position: {x: 0, y: 0}, rotate:0 }); }, delAmendPoints(index) { this.amendPointsList.splice(index, 1); @@ -226,28 +256,33 @@ export default { type: 'CENTER', elementList: [] }; - const station = this.stationList.find(item => item.depot); + const stationCodes = []; + this.stationList.forEach(item => { + if (item.depot) { + stationCodes.push(item.code); + } + }); [...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList, ...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.indicatorLightList, ...this.lineList, ...this.outerFrameList, ...this.responderList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList].forEach(item => { - if (item.stationCode !== station.code) { + if (!stationCodes.includes(item.stationCode)) { this.addModel.elementList.push(item.code); } }); [...this.directionRodList].forEach(item => { - if (item.deviceStationCode !== station.code) { + if (!stationCodes.includes(item.deviceStationCode)) { this.addModel.elementList.push(item.code); } }); this.stationList.forEach(item => { - if (item.code !== station.code) { + if (!stationCodes.includes(item.code)) { this.addModel.elementList.push(item.code); } }); this.psdList.forEach(item => { const stand = this.$store.getters['map/getDeviceByCode'](item.standCode); - if (stand.stationCode !== station.code) { + if (!stationCodes.includes(stand.stationCode)) { this.addModel.elementList.push(item.code); } }); diff --git a/src/views/newMap/newMapdraft/mapoperate/displayConfig/depotConfig.vue b/src/views/newMap/newMapdraft/mapoperate/displayConfig/depotConfig.vue index 6863e36f3..969bb1a3e 100644 --- a/src/views/newMap/newMapdraft/mapoperate/displayConfig/depotConfig.vue +++ b/src/views/newMap/newMapdraft/mapoperate/displayConfig/depotConfig.vue @@ -70,7 +70,7 @@ - - + + 坐标点: @@ -94,6 +94,24 @@ + + + 坐标点: + + + + , + + + + + + 旋转角度: + + + + +
@@ -211,6 +229,18 @@ export default { const device = this.$store.getters['map/getDeviceByCode'](code); return device.name || device.code; }, + checkDeviceType(data, prop) { + if (data.code) { + const device = this.$store.getters['map/getDeviceByCode'](data.code); + console.log(device, prop); + if (device._type === 'Section' && prop === 'points') { + return true; + } else if (device._type === 'Signal' && (prop === 'position' || prop === 'rotate')) { + return true; + } + } + return false; + }, deleteModel(list, index) { list.splice(index, 1); this.list.pop(); @@ -300,7 +330,7 @@ export default { this.cardMode = 'generate'; }, addAmendPoints() { - this.amendPointsList.push({ code: '', points: [{ x: 0, y: 0 }, { x:0, y:0 }] }); + this.amendPointsList.push({ code: '', points: [{ x: 0, y: 0 }, { x:0, y:0 }], position: {x: 0, y: 0}, rotate:0 }); }, delAmendPoints(index) { this.amendPointsList.splice(index, 1); diff --git a/src/views/newMap/newMapdraft/mapoperate/displayConfig/localConfig.vue b/src/views/newMap/newMapdraft/mapoperate/displayConfig/localConfig.vue index f940fc65e..a7484c643 100644 --- a/src/views/newMap/newMapdraft/mapoperate/displayConfig/localConfig.vue +++ b/src/views/newMap/newMapdraft/mapoperate/displayConfig/localConfig.vue @@ -81,7 +81,7 @@ - - + + 坐标点: @@ -105,6 +105,24 @@ + + + 坐标点: + + + + , + + + + + + 旋转角度: + + + + + @@ -232,6 +250,18 @@ export default { const device = this.$store.getters['map/getDeviceByCode'](code); return device.name || device.code; }, + checkDeviceType(data, prop) { + if (data.code) { + const device = this.$store.getters['map/getDeviceByCode'](data.code); + console.log(device, prop); + if (device._type === 'Section' && prop === 'points') { + return true; + } else if (device._type === 'Signal' && (prop === 'position' || prop === 'rotate')) { + return true; + } + } + return false; + }, deleteModel(list, index) { list.splice(index, 1); this.list.pop(); @@ -373,7 +403,7 @@ export default { }); }, addAmendPoints() { - this.amendPointsList.push({ code: '', points: [{ x: 0, y: 0 }, { x:0, y:0 }] }); + this.amendPointsList.push({ code: '', points: [{ x: 0, y: 0 }, { x:0, y:0 }], position: {x: 0, y: 0}, rotate:0 }); }, delAmendPoints(index) { this.amendPointsList.splice(index, 1); From 48ea31da9105b547f2ce07b0c9a285f53a496d9e Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Sun, 26 Sep 2021 17:55:08 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=BF=85=E9=80=89=E5=92=8C=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E9=80=89=E4=B8=AD&=E5=88=A0=E9=99=A4=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/baseUrl.js | 4 ++-- .../newMapdraft/mapoperate/displayConfig/centerConfig.vue | 1 - .../newMapdraft/mapoperate/displayConfig/depotConfig.vue | 1 - .../newMapdraft/mapoperate/displayConfig/localConfig.vue | 1 - src/views/publish/publishMap/exportMap.vue | 8 ++++---- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 1c941e55a..208ce6f86 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,9 +2,9 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; + BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.8.152:9000'; // 袁琪 - BASE_API = 'http://192.168.8.172:9200'; // 旭强 + // BASE_API = 'http://192.168.8.172:9200'; // 旭强 // BASE_API = 'http://192.168.8.109:9000'; // 张赛 // BASE_API = 'http://192.168.8.140:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; diff --git a/src/views/newMap/newMapdraft/mapoperate/displayConfig/centerConfig.vue b/src/views/newMap/newMapdraft/mapoperate/displayConfig/centerConfig.vue index 4a6883c49..3d3c82211 100644 --- a/src/views/newMap/newMapdraft/mapoperate/displayConfig/centerConfig.vue +++ b/src/views/newMap/newMapdraft/mapoperate/displayConfig/centerConfig.vue @@ -176,7 +176,6 @@ export default { checkDeviceType(data, prop) { if (data.code) { const device = this.$store.getters['map/getDeviceByCode'](data.code); - console.log(device, prop); if (device._type === 'Section' && prop === 'points') { return true; } else if (device._type === 'Signal' && (prop === 'position' || prop === 'rotate')) { diff --git a/src/views/newMap/newMapdraft/mapoperate/displayConfig/depotConfig.vue b/src/views/newMap/newMapdraft/mapoperate/displayConfig/depotConfig.vue index 969bb1a3e..acd563a46 100644 --- a/src/views/newMap/newMapdraft/mapoperate/displayConfig/depotConfig.vue +++ b/src/views/newMap/newMapdraft/mapoperate/displayConfig/depotConfig.vue @@ -232,7 +232,6 @@ export default { checkDeviceType(data, prop) { if (data.code) { const device = this.$store.getters['map/getDeviceByCode'](data.code); - console.log(device, prop); if (device._type === 'Section' && prop === 'points') { return true; } else if (device._type === 'Signal' && (prop === 'position' || prop === 'rotate')) { diff --git a/src/views/newMap/newMapdraft/mapoperate/displayConfig/localConfig.vue b/src/views/newMap/newMapdraft/mapoperate/displayConfig/localConfig.vue index a7484c643..2f8e377ac 100644 --- a/src/views/newMap/newMapdraft/mapoperate/displayConfig/localConfig.vue +++ b/src/views/newMap/newMapdraft/mapoperate/displayConfig/localConfig.vue @@ -253,7 +253,6 @@ export default { checkDeviceType(data, prop) { if (data.code) { const device = this.$store.getters['map/getDeviceByCode'](data.code); - console.log(device, prop); if (device._type === 'Section' && prop === 'points') { return true; } else if (device._type === 'Signal' && (prop === 'position' || prop === 'rotate')) { diff --git a/src/views/publish/publishMap/exportMap.vue b/src/views/publish/publishMap/exportMap.vue index 8ae12dcb7..801479c10 100644 --- a/src/views/publish/publishMap/exportMap.vue +++ b/src/views/publish/publishMap/exportMap.vue @@ -1,7 +1,7 @@