luyanan 6 years ago
parent
commit
f9f08a5bac
2 changed files with 8 additions and 18 deletions
  1. 0 7
      src/api/bridgeInfo.js
  2. 8 11
      src/views/bridgesConsole/bridgeDetail/index.vue

+ 0 - 7
src/api/bridgeInfo.js

@ -73,11 +73,4 @@ export function getTimingMonitor(params) {
73 73
    params
74 74
  })
75 75
}
76
export function getTimingMonitorByTime(params) {
77
  return request({
78
    url: '/ajax/collect/wave/server/time',
79
    method: 'get',
80
    params
81
  })
82
}
83 76
// 监测信息

+ 8 - 11
src/views/bridgesConsole/bridgeDetail/index.vue

@ -83,7 +83,7 @@ import Cookies from 'js-cookie'
83 83
import queryInfo from '@/utils/queryInfo'
84 84
import queryDict from '@/utils/queryDict'
85 85
import { urlParse, parseTime, turnTime } from '@/utils'
86
import { getDangerList, getTimingMonitor, getTimingMonitorByTime } from '@/api/bridgeInfo'
86
import { getDangerList, getTimingMonitor } from '@/api/bridgeInfo'
87 87
88 88
import lineChart2 from '../lineChart/LineChart2'
89 89
import BInfoDialog01 from './components/BInfoDialog01'
@ -177,22 +177,19 @@ export default {
177 177
    },
178 178
    getTimingMonitor(arr) {
179 179
      var that = this
180
      const param = {
181
        seq: arr
182
      }
183
      getTimingMonitor({seq: arr}).then(res => {
180
      getTimingMonitor({ seq: arr }).then(res => {
184 181
        if (res.success && res.data) {
185 182
          that.addData()
186 183
          var monitorList = []
187 184
          var monitorCache = that.monitorCache
188 185
          if (monitorCache.length) {
189
            for(let j = 0; j < monitorCache.length; ++j){
186
            for (let j = 0; j < monitorCache.length; ++j) {
190 187
              let channel_found = false
191 188
              var xData = monitorCache[j].cd.xData
192 189
              var max = monitorCache[j].cd.seData.max
193 190
              var min = monitorCache[j].cd.seData.min
194
              for (let i = 0; i < res.data.length; i++){
195
                if(monitorCache[j].cid === res.data[i].cid){
191
              for (let i = 0; i < res.data.length; i++) {
192
                if (monitorCache[j].cid === res.data[i].cid) {
196 193
                  channel_found = true
197 194
                  xData.push(that.currentTime)
198 195
                  max.push(res.data[i].hvalue)
@ -202,8 +199,8 @@ export default {
202 199
              }
203 200
              if (!channel_found) {
204 201
                xData.push(that.currentTime)
205
                max.push(max[max.length-1])
206
                min.push(min[min.length-1])
202
                max.push(max[max.length - 1])
203
                min.push(min[min.length - 1])
207 204
              }
208 205
              if (xData.length > that.maxShowLength) {
209 206
                xData.shift()
@ -213,7 +210,7 @@ export default {
213 210
              monitorList.push(monitorCache[j].cd)
214 211
            }
215 212
          } else {
216
            for (let i = 0; i < res.data.length; i++){
213
            for (let i = 0; i < res.data.length; i++) {
217 214
              var mi = {
218 215
                cid: res.data[i].cid,
219 216
                cd: {