From d99738c85e126af25968467e0d50d07f797adb81 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 12 Oct 2020 17:23:49 +0800 Subject: [PATCH 01/17] =?UTF-8?q?=E6=96=B9=E5=90=91=E6=9D=86=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/map.js | 2 +- src/jmapNew/shape/DirectionRod/index.js | 2 ++ src/jmapNew/theme/haerbin_01/menus/menuButton.vue | 12 ++++++++++++ src/utils/baseUrl.js | 4 ++-- src/views/newMap/displayNew/demon/faultChoose.vue | 12 ++++++------ 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index e413b49b8..390baf1e7 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -502,7 +502,7 @@ class Jlmap { this.$painter.update(psdDevice); } } else if (elem.deviceType === 'DIRECTION_ROD') { - store.state.map.directionRodList.forEach(item => { + (store.state.map.directionRodList || []).forEach(item => { if (elem.uniqueCode && elem.uniqueCode === `${item.startStationCode}-${item.endStationCode}-${item.right}`) { this.$painter.update(elem); } else if (!elem.uniqueCode) { diff --git a/src/jmapNew/shape/DirectionRod/index.js b/src/jmapNew/shape/DirectionRod/index.js index 11ea752fa..adc7d9f29 100644 --- a/src/jmapNew/shape/DirectionRod/index.js +++ b/src/jmapNew/shape/DirectionRod/index.js @@ -13,6 +13,7 @@ export default class DirectionRod extends Group { this.model = model; this.style = style; this.isShowShape = true; + this.recoverValue = false; if (isShowThePrdType(model.prdType, style.DirectionRod.displayCondition) || model.previewOrMapDraw) { this.create(); this.createMouseEvent(); @@ -75,6 +76,7 @@ export default class DirectionRod extends Group { setState(model) { // if (!this.isShowShape) return; // this.recover(); + this.recoverValue = model.reverse; if (model.reverse && this.model.right) { this.rod.attr('rotation', 0); } else if (!model.reverse && this.model.right) { diff --git a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue index ba32cf70c..6c3549cea 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue @@ -377,8 +377,20 @@ export default { this.deviceHighLight(this.oldDevice, false); this.deviceHighLight(this.selectedObj, true); this.oldDevice = this.selectedObj; + console.log(this.selectedObj, '***********'); this.centralizedStationList = new Array(15).fill({}); this.directionRodParamList.forEach((directionRod, index) => { + if (this.selectedObj.right && this.selectedObj.recoverValue && directionRod.name === '切换左向') { + directionRod['disabled'] = true; + } else if (!this.selectedObj.right && this.selectedObj.recoverValue && directionRod.name === '切换右向') { + directionRod['disabled'] = true; + } else if (this.selectedObj.right && !this.selectedObj.recoverValue && directionRod.name === '切换右向') { + directionRod['disabled'] = true; + } else if (!this.selectedObj.right && !this.selectedObj.recoverValue && directionRod.name === '切换左向') { + directionRod['disabled'] = true; + } else { + directionRod['disabled'] = false; + } this.centralizedStationList[index] = directionRod; }); this.tempData = []; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 524befeac..a1032fe84 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,8 +2,8 @@ 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 = 'http://192.168.3.5:9000'; // 袁琪 + // 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.175:9000'; // 张赛 // BASE_API = 'http://192.168.3.82:9000'; // 杜康 diff --git a/src/views/newMap/displayNew/demon/faultChoose.vue b/src/views/newMap/displayNew/demon/faultChoose.vue index f5784ad9e..3a23450c9 100644 --- a/src/views/newMap/displayNew/demon/faultChoose.vue +++ b/src/views/newMap/displayNew/demon/faultChoose.vue @@ -16,11 +16,11 @@ {{ covertFaultType(scope.row) }} - - - + + + + + - + - - - + + +