From 64d415dbb322adbfd96e8f2eb24ae7ff79f649d9 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Wed, 1 Jul 2020 18:08:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9C=B0=E5=9B=BE=E7=BB=98?= =?UTF-8?q?=E5=9B=BE=E6=95=B0=E6=8D=AE=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/chengdu_03/menus/menuButton.vue | 2 +- src/utils/baseUrl.js | 4 +- .../newMap/newMapdraft/mapoperate/models.js | 112 +++++++++++++++++- .../mapoperate/section/batchSettings.vue | 6 +- .../newMapdraft/mapoperate/section/create.vue | 46 +------ .../newMapdraft/mapoperate/section/index.vue | 3 +- .../mapoperate/section/splitOrMerge.vue | 87 +++----------- .../newMapdraft/mapoperate/signal/create.vue | 23 +--- .../newMapdraft/mapoperate/signal/index.vue | 33 +----- .../newMap/newMapdraft/mapoperate/station.vue | 81 ++----------- .../newMapdraft/mapoperate/stationstand.vue | 109 ++++------------- .../newMapdraft/mapoperate/switch/create.vue | 52 ++------ .../mapoperate/switch/createAxle.vue | 27 +---- .../newMapdraft/mapoperate/switch/index.vue | 6 - .../mapoperate/switch/switchModle.vue | 16 +-- .../newMapdraft/mapoperate/train/index.vue | 11 -- 16 files changed, 197 insertions(+), 421 deletions(-) diff --git a/src/jmapNew/theme/chengdu_03/menus/menuButton.vue b/src/jmapNew/theme/chengdu_03/menus/menuButton.vue index 9b2dc3c53..fac60d2ee 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuButton.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuButton.vue @@ -345,7 +345,7 @@ export default { } else if (deviceList.length === 2) { let flag = false; this.routeListFilter.forEach(item => { - if (item.endSignalCode === deviceList[1].code) { + if (item.endButtonSignalCode === deviceList[1].code) { // 结束信号机按钮对比 operate.over = true; operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE; operate.code = deviceList[1].code; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 836771751..778caeb7b 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,11 +2,11 @@ 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.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 - BASE_API = 'http://192.168.3.82:9000'; // 杜康 + // BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 diff --git a/src/views/newMap/newMapdraft/mapoperate/models.js b/src/views/newMap/newMapdraft/mapoperate/models.js index 601e05041..813b3b0b8 100644 --- a/src/views/newMap/newMapdraft/mapoperate/models.js +++ b/src/views/newMap/newMapdraft/mapoperate/models.js @@ -5,9 +5,10 @@ class Model { this[`${type}Model`](); } SectionModel() { + this._type = 'Section'; this.code = ''; this.name = ''; - this.type = ''; + this.type = '01'; this.relStandCode = ''; // 关联站台编码 this.leftStopPointOffset = 0; // 左向停车点偏移量 this.rightStopPointOffset = 0; // 右向停车点偏移量 @@ -33,9 +34,8 @@ class Model { this.relSwitchCode = ''; this.stationCode = ''; this.logicSectionNameSort = true; - this.sepTypeLeft = ''; - this.sepTypeRight = ''; - this.offsetRight = 0; + this.sepTypeLeft = '00'; + this.sepTypeRight = '00'; this.parentCode = ''; this.points = []; this.lengthFact = 0; @@ -54,6 +54,110 @@ class Model { this.rightAxleOffset = { x: 0, y: 0 }; this.leftAxleOffset = { x: 0, y: 0 }; } + SignalModel() { + this._type = 'Signal'; + this.code = ''; + this.name = ''; + this.type = 'PROTECTION'; + this.uniqueName = ''; + this.nameShow = false; + this.lampPostType = '01'; // 灯柱类型 + this.lampPositionType = '01'; + this.leftOrRight = 'L'; + this.right = false; + this.virtual = false; // 是否虚拟信号机 + this.positionType = '01'; + this.namePosition = { x: 0, y: 0 }; + this.stationCode = ''; + this.sectionOffset = 0; + this.rotate = 0; + this.nameRotated = false; + this.sectionCode = ''; + this.guideShow = false; + this.buttonShow = false; + this.position = { x: 0, y: 0 }; + this.positionPoint = { x: 0, y: 0 }; + this.buttonPosition = { x: 0, y: 0 }; + this.guidePosition = { x: 0, y: 0 }; + this.interlockStationCode = ''; + this.callOn = true; + this.turnBack = false; + this.ctc = true; // 是否灭灯显示 + this.noOverlap = false; // 是否无延续保护 + } + SwitchModel() { + this._type = 'Switch'; + this.code = ''; + this.name = ''; + this.turnTime = 0; + this.nameShow = false; + this.namePosition = { x: 0, y: 0 }; + this.stationCode = ''; + this.timeoutShow = false; + this.sectionACode = ''; + this.sectionBCode = ''; + this.sectionCCode = ''; + this.tp = { x: 0, y: 0 }; + } + StationModel() { + this._type = 'Station'; + this.centralized = false; + this.ciStation = false; // 是否联锁站 + this.depot = false; // 是否停车场或者车辆段 + this.reentry = false; // 是否折返车站 + this.smallRouting = false; // 是否小交路 + this.number = ''; // 编号 + this.code = ''; + this.zcCode = ''; + this.visible = true; + this.runPlanName = ''; + this.name = ''; + this.nameFont = '22'; + this.nameFontColor = '#FFFFFF'; + this.subheadDisplay = false; + this.subhead = ''; // 副标题 + this.subheadFont = ''; + this.subheadFontColor = '#FFFFFF'; + this.subheadPosition = { x: 0, y: 0 }; + this.kmPostShow = true; + this.kmRange = 0; + this.kmPost = '1000km~2000km'; + this.kmPostFont = '8'; + this.kmPostFontColor = '#FFFFFF'; + this.isShowControlMode = ''; + this.chargeStationCodeList = []; + this.relStationCodeList = []; // 联锁站关联车站列表 + this.position = { x: 0, y: 0 }; + this.kilometerPosition = { x: 0, y: 0 }; // 公里标偏移坐标 + this.createControlMode = false; + this.createTurnBack = false; + this.turnBackPoint = {x: 0, y: 0}; // 按图折返坐标 + this.controlModePoint = { x: 0, y: 0 }; // 控制模式坐标 + } + StationStandModel() { + this._type = 'StationStand'; + this.code = ''; + this.name = ''; + this.deviceStationCode = ''; // 设备集中站 + this.width = 0; + this.height = 0; + this.stationCode = ''; // 所属车站 + this.position = { x: 0, y: 0 }; + this.visible = true; // 是否显示 + this.inside = false; // 内外站台显示 + this.right = true; + this.standTrackCode = ''; // 关联站台轨 + this.small = false; + this.defaultReentryStrategy = ''; // 默认折返策略 + this.stopJumpLamp = false; // 跳停功能按钮 + this.stopJumpLampPoint = {x: 0, y: 0}; // 跳停功能按钮坐标 + this.cancelStopJumpLamp = false; // 取消跳停功能按钮 + this.cancelStopJumpLampPoint = {x: 0, y: 0}; // 取消跳停功能按钮坐标 + this.upDetainLamp = false; // 上行扣车功能按钮 + this.upDetainLampPoint = {x: 0, y: 0}; // 上行扣车功能按钮坐标 + this.downDetainLamp = false; // 下行扣车功能按钮 + this.downDetainLampPoint = {x: 0, y: 0}; // 下行扣车功能按钮坐标 + } } export default function getModel(type) { diff --git a/src/views/newMap/newMapdraft/mapoperate/section/batchSettings.vue b/src/views/newMap/newMapdraft/mapoperate/section/batchSettings.vue index 9c787f0c3..c12e342a6 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/batchSettings.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/batchSettings.vue @@ -287,9 +287,9 @@ export default { let startOffset = 0; const sectionMap = {}; if (section.logicSectionCodeList && section.logicSectionCodeList.length) { - const sectionModel = deepAssign({}, section); - sectionModel.lengthFact = Number(sectionModel.logicSectionCodeList.reduce((pre, code) => pre + Number(this.$store.getters['map/getDeviceByCode'](code).lengthFact), 0).toFixed(3)); - models.push(sectionModel); + const sectionModel = deepAssign({}, section); + sectionModel.lengthFact = Number(sectionModel.logicSectionCodeList.reduce((pre, code) => pre + Number(this.$store.getters['map/getDeviceByCode'](code).lengthFact), 0).toFixed(3)); + models.push(sectionModel); section.logicSectionCodeList.forEach(sectionCode => { const logicSection = this.$store.getters['map/getDeviceByCode'](sectionCode); sectionMap[logicSection.points[0].x + 's' + logicSection.points[0].y] = logicSection; diff --git a/src/views/newMap/newMapdraft/mapoperate/section/create.vue b/src/views/newMap/newMapdraft/mapoperate/section/create.vue index c14963a6e..bc559453f 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/create.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/create.vue @@ -99,6 +99,8 @@