From df2f5705c4ec5d30fe61db0d8aeeb30e94ce1f63 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 26 Aug 2020 18:42:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=89=A7=E6=9C=AC=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/covertOperation.js | 85 +++++++++++++++++-- 1 file changed, 80 insertions(+), 5 deletions(-) diff --git a/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js b/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js index e036f9cc8..939350f66 100644 --- a/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js +++ b/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js @@ -56,7 +56,50 @@ export const operateEnum = { }, Stand:{ code:'standCode', - type:'站台' + type:'站台', + Stand_Set_Park_Time:{ + isList:true, + params:[ + { + code:'parkingTime', + name:'控制方式', + result:[ + {data:-1, name:'自动', judge:'='}, + {data:-1, name:'人工', judge:'>', showUnit:'秒'} + ] + }, + { + code:'parkingAlwaysValid', + name:'有效次数', + result:[ + {data:true, name:'一直有效', judge:'='}, + {data:false, name:'一次有效', judge:'='} + ] + } + ] + }, + Stand_Set_Run_Time:{ + isList:true, + params:[ + { + code:'runLevelTime', + name:'区间运行时间', + result:[ + {data:0, name:'自动', judge:'='}, + {data:0, name:'非自动', judge:'>', showUnit:'秒'} + ] + }, + { + code:'runLevelTimeForever', + name:'有效次数', + result:[ + {data:true, name:'一直有效', judge:'='}, + {data:false, name:'一次有效', judge:'='} + ] + } + ] + } + }, Station:{ code:'stationCode', @@ -77,10 +120,10 @@ export function covertOperate(operationType, operationParamMap) { const operateName = Object.values(CMD[device]).find(res=>{ return res.value == operationType; }); const deviceInfo = covertOperation(device, operationParamMap, operationType); let tip = '请找到' + deviceInfo.deviceName + ','; - if (deviceInfo.paramName) { - tip += '参数为:' + deviceInfo.paramName + ','; - } tip += ' 执行【' + operateName.label + '】操作'; + if (deviceInfo.paramName) { + tip += ',参数为:' + deviceInfo.paramName; + } return tip; } } @@ -111,7 +154,39 @@ function covertOperation(deviceType, operationParamMap, operationType) { paramName += getRouteNameById(operationParamMap[paramInfo.code]) + '】'; } } else { - + if (paramInfo.isList) { + const params = paramInfo.params; + if (params && params.length > 0) { + paramName += '【'; + params.forEach(param=>{ + paramName += ' ' + param.name; + const data = operationParamMap[param.code]; + param.result.forEach(result=>{ + switch (result.judge) { + case '=': { + if (data == result.data) { + paramName += '为' + result.name; + if (result.showUnit) { + paramName += ',值为' + data + result.showUnit; + } + } + break; + } case '>': { + if (data > result.data) { + paramName += '为' + result.name; + if (result.showUnit) { + paramName += ',值为' + data + result.showUnit; + } + } + break; + } + } + }); + paramName += ','; + }); + paramName += '】'; + } + } } } return {deviceName:deviceName, paramName:paramName}; From 699053f46fdf25a849ba2b6a0c6d59c51b82a65d Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Thu, 27 Aug 2020 09:56:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=A5=BF=E5=AE=89?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E5=9B=BE=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/xian_02/planConvert.js | 20 +++++++++---------- .../newMap/displayNew/demon/runPlanView.vue | 10 ---------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/src/jmapNew/theme/xian_02/planConvert.js b/src/jmapNew/theme/xian_02/planConvert.js index 0fbdf4439..f5e283ed8 100644 --- a/src/jmapNew/theme/xian_02/planConvert.js +++ b/src/jmapNew/theme/xian_02/planConvert.js @@ -277,20 +277,18 @@ export default { } /** 计算折返点*/ - var num = this.computedReentryNumber(elem.tripNumber); - var nextPoint = [parseInt(time), this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false, num), elem.stationCode, elem.directionCode]; - /** 添加车组号数据到对应的服务图数据中*/ - serie.data.push(nextPoint); + // var num = this.computedReentryNumber(elem.tripNumber); + var nextPoint = [parseInt(time), this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, elem.directionCode]; + if (serie.data.length > 0) { var lastPoint = serie.data[serie.data.length - 1]; - // if (elem.reentry) { - // console.log(1111, '折返'); - // } if (lastPoint[3] !== nextPoint[3]) { - serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[3], num), lastPoint[2], lastPoint[3]]); - serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], nextPoint[3], num), nextPoint[2], nextPoint[3]]); + serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[3]), lastPoint[2], lastPoint[3]]); + serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[3]), lastPoint[2], nextPoint[3]]); } } + /** 添加车组号数据到对应的服务图数据中*/ + serie.data.push(nextPoint); /** 保证原始数据排序*/ serie.data.sort((a, b) => { @@ -354,9 +352,9 @@ export default { /** 根据方向计算y折返偏移量*/ getYvalueByDirectionCode(defaultVlue, directionCode, num) { if (directionCode == '1') { - defaultVlue -= this.EdgeHeight / 2 * num; + defaultVlue -= this.EdgeHeight / 2; } else if (directionCode == '2') { - defaultVlue += this.EdgeHeight / 2 * num; + defaultVlue += this.EdgeHeight / 2; } return defaultVlue; diff --git a/src/views/newMap/displayNew/demon/runPlanView.vue b/src/views/newMap/displayNew/demon/runPlanView.vue index d682c15bc..025acefbe 100644 --- a/src/views/newMap/displayNew/demon/runPlanView.vue +++ b/src/views/newMap/displayNew/demon/runPlanView.vue @@ -220,22 +220,12 @@ export default { const initialPlanData = this.$store.state.runPlan.initialPlanData; data.forEach(item => { if (item && initialPlanData[item.serviceNumber]) { - // if (initialPlanData[item.serviceNumber]) { - // console.log(this.runSeries, data, '====='); - // debugger; - // } Object.keys(initialPlanData[item.serviceNumber].trainMap).forEach(ele => { if (initialPlanData[item.serviceNumber].trainMap[ele + ''].tripNumber == item.tripNumber) { item.directionCode = initialPlanData[item.serviceNumber].trainMap[ele + ''].directionCode; - // item.reentry = initialPlanData[item.serviceNumber].trainMap[ele + ''].reentry; - // if (item.reentry) { - // debugger; - // } - // item.stationCode = initialPlanData[item.serviceNumber].trainMap[ele + ''].stationCode; } }); item.secondTime = item.second; - // item.backup = initialPlanData[item.serviceNumber].backup; } }); this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);