diff --git a/src/views/newMap/displayNew/demon/runPlanViewWindow.vue b/src/views/newMap/displayNew/demon/runPlanViewWindow.vue index 9bd9deb6f..5e3812ef0 100644 --- a/src/views/newMap/displayNew/demon/runPlanViewWindow.vue +++ b/src/views/newMap/displayNew/demon/runPlanViewWindow.vue @@ -257,7 +257,11 @@ export default { const stations = this.$store.state.runPlan.stations; const planData = this.$store.state.runPlan.planData; this.kmRangeMap = this.PlanParser.convertStationsToMap(stations); - this.pushModels(this.staticSeries, [this.PlanParser.initializeAxisY(stations)]); + if (this.$route.query.lineCode === '07') { + this.pushModels(this.staticSeries, [this.PlanParser.initializeAxisX(stations)]); + } else { + this.pushModels(this.staticSeries, [this.PlanParser.initializeAxisY(stations)]); + } this.staticSeries = this.pushModels(this.staticSeries, this.PlanParser.convertDataToModels(planData, stations, this.kmRangeMap, { color: '#000', width: 0.5 })); this.staticSeries.forEach(item => { this.seriesMap[item.name] = item; @@ -362,6 +366,89 @@ export default { ] }; + const hebXAxis = { + type: 'value', + splitLine: { + show: false + }, + axisTick: { + show: false + }, + axisLine: { + onZero: false, + lineStyle: { + width: 2, + color: '#d14a61' + } + }, + axisLabel: { + interval: 'auto', + formatter: this.yAxisLableFormat + }, + axisPointer: { + xAxisIndex: 'all', + label: { + formatter: this.yAxisPointFormat, + backgroundColor: 'rgb(0,100,0,0.5)', + color: 'white' + } + }, + min: 0, + max: 0 + }; + const hebYAxis = [ + { + type: 'category', + boundaryGap: false, + data: [], + axisLine: { + onZero: false, + lineStyle: { + width: 2, + color: '#d14a61' + } + }, + axisLabel: { + formatter: this.xAxisLableFormat, + textStyle: { + color: '#333' + } + }, + axisPointer: { + snap: true, + label: { + formatter: this.xAxisPointFormat, + backgroundColor: 'rgb(255,0,0,0.5)', + color: 'white' + } + } + } + ]; + const hebDataZoom = [ + { + type: 'inside', + yAxisIndex: 0 + }, + { + fiterMode: 'filter', + handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z', + handleSize: '80%', + yAxisIndex: 0, + handleStyle: { + color: '#fff', + shadowBlur: 3, + shadowColor: 'rgba(0, 0, 0, 0.6)', + shadowOffsetX: 2, + shadowOffsetY: 2 + }, + left: '20px' + } + ]; + if (this.$route.query.lineCode === '07') { + option.xAxis = hebXAxis; + option.yAxis = hebYAxis; + option.dataZoom = hebDataZoom; + } await this.xAxisInit(option); await this.yAxisInit(option); await this.loadInitChart(option); @@ -420,7 +507,11 @@ export default { const startValue = 3600 * 6; const offsetTime = 3600 * 1; - option.xAxis[0].data = list; + if (this.$route.query.lineCode === '07') { + option.yAxis[0].data = list; + } else { + option.xAxis[0].data = list; + } if (!option.dataZoom[0].startValue) { option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime; } @@ -430,19 +521,31 @@ export default { } }, yAxisInit(option) { - if (Object.keys(this.PlanParser).length) { - option.yAxis[0].min = this.PlanParser.computedAxisYMinValue(this.stations); - option.yAxis[0].max = this.PlanParser.computedAxisYMaxValue(this.stations); + if (Object.keys(this.PlanParser).length && this.$route.query.lineCode !== '07') { + option.yAxis.min = this.PlanParser.computedAxisYMinValue(this.stations); + option.yAxis.max = this.PlanParser.computedAxisYMaxValue(this.stations); + } else if (Object.keys(this.PlanParser).length && this.$route.query.lineCode === '07') { + option.xAxis.min = this.PlanParser.computedAxisXMinValue(this.stations); + option.xAxis.max = this.PlanParser.computedAxisXMaxValue(this.stations); } }, axisTooltip(param) { const station = (this.$store.getters['map/getDeviceByCode'](param.data[2])) || { name: '', kmRange: '' }; - return [ - `Point Data