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