Browse Source

alarm-warn

luyanan 6 years ago
parent
commit
0b3880d6df

+ 1 - 2
src/views/bridgesConsole/bridgeDanger/dangerDetail.vue

@ -76,9 +76,8 @@ export default {
76 76
        if (res.success && res.data) {
77 77
          that.loadprogress = false
78 78
          var rList = []
79
          var startTime = ''
80 79
          for (let i = 0; i < res.data.length; i++) {
81
            startTime = parseTime(res.data[0].stime, true, true)
80
            var startTime = parseTime(res.data[i].stime, true, true)
82 81
            var str = res.data[i].seq
83 82
            var rData = {
84 83
              tit: '',

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

@ -141,19 +141,15 @@ export default {
141 141
      jishiTime: null
142 142
    }
143 143
  },
144
  watch: {
145
    $route(to, from) {
146
      if (to.path !== '/bridgeHome/bridgeDetail') {
147
        clearTimeout(this.jishiTime)
148
        this.jishiTime = null
149
      }
150
    }
151
  },
152 144
  computed: {
153 145
    monitorShowList() {
154 146
      return this.monitorList.slice((this.currentNo - 1) * this.currentSize, this.currentNo * this.currentSize)
155 147
    }
156 148
  },
149
  beforeCreate() {
150
    clearTimeout(this.jishiTime)
151
    this.jishiTime = null
152
  },
157 153
  created() {
158 154
    var that = this
159 155
    if (urlParse('id')) {
@ -341,6 +337,11 @@ export default {
341 337
  },
342 338
  beforeDestroy() {
343 339
    clearTimeout(this.jishiTime)
340
    this.jishiTime = null
341
  },
342
  destroyed() {
343
    clearTimeout(this.jishiTime)
344
    this.jishiTime = null
344 345
  }
345 346
}
346 347
</script>