Browse Source

刷新访问不到数据,echarts去掉y轴缩放,添加加载等待

luyanan 6 years ago
parent
commit
ef76124707

+ 2 - 9
src/api/bridgeInfo.js

@ -59,20 +59,13 @@ export function setUnreadToRead(params) {
59 59
// 未读报警
60 60
61 61
// 监测信息
62
export function getMonitorByDay(params) {
62
export function getMonitorByDay(params, flag) {
63 63
  return request({
64
    url: '/ajax/collect/wave/server/dayTime',
64
    url: flag ? '/ajax/collect/wave/server/time' : '/ajax/collect/wave/server/dayTime',
65 65
    method: 'get',
66 66
    params
67 67
  })
68 68
}
69
// export function getSysTime(params) {
70
//   return request({
71
//     url: '/ajax/sys/serviceTime',
72
//     method: 'get',
73
//     params
74
//   })
75
// }
76 69
export function getMonitorByTime(params) {
77 70
  return request({
78 71
    url: '/ajax/collect/wave/server/time',

+ 1 - 1
src/components/DefaultPage/index.vue

@ -33,7 +33,7 @@ export default {
33 33
    width: 100%;
34 34
    height: 42%;
35 35
    z-index: 11;
36
    padding:40px;
36
    padding: 50px;
37 37
    box-sizing: border-box;
38 38
    display: flex;
39 39
    justify-content:center;

+ 2 - 2
src/permission.js

@ -23,6 +23,7 @@ router.beforeEach((to, from, next) => {
23 23
      next({ path: '/' })
24 24
      NProgress.done()
25 25
    } else {
26
      queryInfo.queryAllInfo()
26 27
      if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
27 28
        // console.log(5555)
28 29
        store.dispatch('GetUserInfo').then(res => { // 拉取user_info
@ -42,10 +43,9 @@ router.beforeEach((to, from, next) => {
42 43
        if (hasPermission(store.getters.roles, to.meta.roles)) {
43 44
          next()
44 45
        } else {
45
          console.log(777)
46
          // console.log(777)
46 47
        }
47 48
      }
48
      queryInfo.queryAllInfo()
49 49
    }
50 50
  } else {
51 51
    if (whiteList.indexOf(to.path) !== -1) {

+ 3 - 0
src/styles/index.scss

@ -88,4 +88,7 @@ a:hover {
88 88
    background-image: url('/static/touchwave.png');
89 89
    background-size: 300px 28px;
90 90
  }
91
}
92
.load-box{
93
  min-height:160px;
91 94
}

+ 17 - 1
src/utils/queryInfo.js

@ -10,7 +10,17 @@ var bridgeObj = {},
10 10
  serverList = [],
11 11
  deviceList = [],
12 12
  transducerList = [],
13
  listOk = false,
14
  cbArr = [],
15
  qaiCb = function(func) {
16
    if (listOk) {
17
      func()
18
    } else {
19
      cbArr.push(func)
20
    }
21
  },
13 22
  queryAllInfo = function() {
23
    // setTimeout(function() {
14 24
    if (!bridgeObj.server && store.getters.roles.indexOf('1') === -1) {
15 25
      request({
16 26
        url: '/ajax/all/byUser',
@ -24,9 +34,14 @@ var bridgeObj = {},
24 34
          serverList = res.data.server
25 35
          deviceList = res.data.device
26 36
          transducerList = res.data.transducer
37
          listOk = true
38
          cbArr.forEach(function(item) {
39
            item()
40
          })
27 41
        }
28 42
      })
29 43
    }
44
    // }, 1)
30 45
  },
31 46
  queryServers = function(bid, flag) {
32 47
    const obj = serverList
@ -75,7 +90,8 @@ var bridgeObj = {},
75 90
    queryAllInfo: queryAllInfo,
76 91
    queryServers: queryServers,
77 92
    queryDevices: queryDevices,
78
    queryTrans: queryTrans
93
    queryTrans: queryTrans,
94
    qaiCb: qaiCb
79 95
  }
80 96
81 97
export default ret

+ 11 - 6
src/views/bridgesConsole/bridgeDanger/dangerDetail.vue

@ -5,11 +5,13 @@
5 5
        <span>{{alarmTime}}</span>
6 6
        <span>{{alarmTit}}</span>
7 7
      </div>
8
      <el-row class="line-chart-box">
9
        <el-col :xs="24" :sm="24" :lg="24" v-for="(item, index) in alarmShowList" :key="item.index">
10
          <lineChart :chartData="item" :lineColor="index" :historyM="historyM"></lineChart>
11
        </el-col>
12
      </el-row>
8
      <div class="load-box" v-loading="loadprogress">
9
        <el-row class="line-chart-box">
10
          <el-col :xs="24" :sm="24" :lg="24" v-for="(item, index) in alarmShowList" :key="item.index">
11
            <lineChart :chartData="item" :lineColor="index" :historyM="historyM"></lineChart>
12
          </el-col>
13
        </el-row>
14
      </div>
13 15
      <div class="pagination-container">
14 16
        <el-pagination
15 17
          background
@ -38,7 +40,8 @@ export default {
38 40
      alarmRead: false,
39 41
      alarmList: [],
40 42
      pageSize: 6,
41
      pageNo: 1
43
      pageNo: 1,
44
      loadprogress: false
42 45
    }
43 46
  },
44 47
  components: {
@ -68,8 +71,10 @@ export default {
68 71
      const param = {
69 72
        aid: this.alarmId
70 73
      }
74
      this.loadprogress = true
71 75
      getDangerDetail(param).then(res => {
72 76
        if (res.success && res.data) {
77
          that.loadprogress = false
73 78
          var rList = []
74 79
          var startTime = ''
75 80
          for (let i = 0; i < res.data.length; i++) {

+ 30 - 19
src/views/bridgesConsole/bridgeDanger/dangerList.vue

@ -4,16 +4,18 @@
4 4
      <div slot="header" class="block-title">
5 5
        <span>报警信息</span>
6 6
      </div>
7
      <ul class="item-ul" v-if="dangerList.length">
8
        <li :class="!item.readed ? 'readed-li' : ''" v-for="item in dangerList" :key="item.index" @click="alarmShow(item.aid, item.readed, item.alarmTime, item.device)">
9
          <span>{{item.alarmTime}}</span>
10
          <span>{{item.device}},请点击查看。</span>
11
          <span class="svg-container" v-if="!item.readed">
12
            <svg-icon icon-class="unread"></svg-icon>
13
          </span>
14
        </li>
15
      </ul>
16
      <DefaultPage v-if="!dangerList.length"></DefaultPage>
7
      <div class="load-box" v-loading="loadprogress">
8
        <ul class="item-ul" v-if="dangerList.length">
9
          <li :class="!item.readed ? 'readed-li' : ''" v-for="item in dangerList" :key="item.index" @click="alarmShow(item.aid, item.readed, item.alarmTime, item.device)">
10
            <span>{{item.alarmTime}}</span>
11
            <span>{{item.device}},请点击查看。</span>
12
            <span class="svg-container" v-if="!item.readed">
13
              <svg-icon icon-class="unread"></svg-icon>
14
            </span>
15
          </li>
16
        </ul>
17
        <DefaultPage v-if="!dangerList.length && !loadprogress"></DefaultPage>
18
      </div>
17 19
      <div class="pagination-container">
18 20
        <el-pagination
19 21
          background
@ -45,6 +47,7 @@ export default {
45 47
    return {
46 48
      bridgeId: '',
47 49
      bridgeName: '',
50
      loadprogress: true,
48 51
      dangerList: [],
49 52
      pageSize: 20,
50 53
      pageNo: 1,
@ -52,32 +55,40 @@ export default {
52 55
    }
53 56
  },
54 57
  created() {
55
    this.bridgeId = Cookies.get('bridgeId')
56
    this.bridgeName = Cookies.get('bridgeName')
57
    this.serverSeqArr = queryInfo.queryServers(this.bridgeId, true)
58
    if (this.serverSeqArr) {
59
      this.getDangerList()
60
    }
58
    var that = this
59
    that.bridgeId = Cookies.get('bridgeId')
60
    that.bridgeName = Cookies.get('bridgeName')
61
    queryInfo.qaiCb(function() {
62
      if (that.bridgeId) {
63
        that.serverSeqArr = queryInfo.queryServers(that.bridgeId, true)
64
        if (that.serverSeqArr.length) {
65
          that.getDangerList()
66
        }
67
      }
68
    })
61 69
  },
62 70
  methods: {
63 71
    getDangerList() {
72
      var that = this
64 73
      var arr = this.serverSeqArr
65 74
      const param = {
66 75
        seq: arr,
67 76
        pageSize: this.pageSize,
68 77
        pageNo: this.pageNo
69 78
      }
79
      that.loadprogress = true
70 80
      getDangerList(param).then(res => {
71 81
        if (res.success && res.data.data) {
82
          that.loadprogress = false
72 83
          const dataS = res.data.data
73
          this.total = res.data.total
84
          that.total = res.data.total
74 85
          for (let i = 0; i < dataS.length; i++) {
75 86
            if (dataS[i].alarmTime) {
76 87
              dataS[i].alarmTime = parseTime(dataS[i].alarmTime, true)
77 88
            }
78
            dataS[i].device = `${this.bridgeName}大桥${dataS[i].device}采集盒检测到异常情况`
89
            dataS[i].device = `${that.bridgeName}大桥${dataS[i].device}采集盒检测到异常情况`
79 90
          }
80
          this.dangerList = dataS
91
          that.dangerList = dataS
81 92
        }
82 93
      })
83 94
    },

+ 4 - 1
src/views/bridgesConsole/bridgeDetail/components/BInfoDialog02.vue

@ -81,7 +81,10 @@ export default {
81 81
      this.pageNo = val
82 82
    },
83 83
    queryServerList() {
84
      this.serverList = queryInfo.queryServers(this.$parent.bridgeId)
84
      var that = this
85
      queryInfo.qaiCb(function() {
86
        that.serverList = queryInfo.queryServers(that.$parent.bridgeId)
87
      })
85 88
    }
86 89
  }
87 90
}

+ 4 - 1
src/views/bridgesConsole/bridgeDetail/components/BInfoDialog03.vue

@ -79,7 +79,10 @@ export default {
79 79
      this.pageNo = val
80 80
    },
81 81
    queryDeviceList() {
82
      this.deviceList = queryInfo.queryDevices(this.$parent.bridgeId)
82
      var that = this
83
      queryInfo.qaiCb(function() {
84
        that.deviceList = queryInfo.queryDevices(that.$parent.bridgeId)
85
      })
83 86
    }
84 87
  }
85 88
}

+ 4 - 1
src/views/bridgesConsole/bridgeDetail/components/BInfoDialog04.vue

@ -84,7 +84,10 @@ export default {
84 84
      this.pageNo = val
85 85
    },
86 86
    queryTransList() {
87
      this.transducerList = queryInfo.queryTrans(this.$parent.bridgeId)
87
      var that = this
88
      queryInfo.qaiCb(function() {
89
        that.transducerList = queryInfo.queryTrans(that.$parent.bridgeId)
90
      })
88 91
    }
89 92
  }
90 93
}

+ 48 - 34
src/views/bridgesConsole/bridgeDetail/index.vue

@ -15,28 +15,32 @@
15 15
            <span>报警信息</span>
16 16
            <el-button type="text" @click="queryDangerInfo">查看全部</el-button>
17 17
          </div>
18
          <ul class="item-ul" v-if="dangerList.length">
19
            <li :class="!item.readed ? 'readed-li' : ''" v-for="item in dangerList" :key="item.index" @click="alarmShow(item.aid, item.readed, item.alarmTime, item.device)">
20
              <span>{{item.alarmTime}}</span>
21
              <span>{{item.device}},请点击查看。</span>
22
              <span class="svg-container" v-if="!item.readed">
23
                <svg-icon icon-class="unread"></svg-icon>
24
              </span>
25
            </li>
26
          </ul>
27
          <DefaultPage v-if="!dangerList.length"></DefaultPage>
18
          <div class="load-box" v-loading="loadprogress1">
19
            <ul class="item-ul" v-if="dangerList.length">
20
              <li :class="!item.readed ? 'readed-li' : ''" v-for="item in dangerList" :key="item.index" @click="alarmShow(item.aid, item.readed, item.alarmTime, item.device)">
21
                <span>{{item.alarmTime}}</span>
22
                <span>{{item.device}},请点击查看。</span>
23
                <span class="svg-container" v-if="!item.readed">
24
                  <svg-icon icon-class="unread"></svg-icon>
25
                </span>
26
              </li>
27
            </ul>
28
            <DefaultPage v-if="!dangerList.length && !loadprogress1"></DefaultPage>
29
          </div>
28 30
        </el-card>
29 31
        <el-card class="box-card block-group">
30 32
          <div slot="header" class="block-title">
31 33
            <span>实时监测</span>
32 34
            <el-button v-if="serverSeqArr.length" type="text" @click="updateDataList">刷新</el-button>
33 35
          </div>
34
          <el-row class="line-chart-box" v-if="monitorList.length">
35
            <el-col :xs="24" :sm="24" :lg="24" v-for="item in monitorShowList" :key="item.index">
36
              <lineChart :chartData="item" :maxXcount="maxShowLength"></lineChart>
37
            </el-col>
38
          </el-row>
39
          <DefaultPage v-if="!monitorList.length"></DefaultPage>
36
          <div class="load-box" v-loading="loadprogress2">
37
            <el-row class="line-chart-box" v-if="monitorList.length">
38
              <el-col :xs="24" :sm="24" :lg="24" v-for="item in monitorShowList" :key="item.index">
39
                <lineChart :chartData="item" :maxXcount="maxShowLength"></lineChart>
40
              </el-col>
41
            </el-row>
42
            <DefaultPage v-if="!monitorList.length && !loadprogress2"></DefaultPage>
43
          </div>
40 44
          <div class="pagination-container">
41 45
            <el-pagination
42 46
              background
@ -112,6 +116,8 @@ export default {
112 116
  },
113 117
  data() {
114 118
    return {
119
      loadprogress1: true,
120
      loadprogress2: true,
115 121
      bridgeId: '',
116 122
      bridgeName: '',
117 123
      dialogW: '860px',
@ -123,21 +129,21 @@ export default {
123 129
      serverList: [],
124 130
      deviceList: [],
125 131
      transducerList: [],
126
      monitorList: [],
127 132
      currentNo: 1,
128 133
      currentSize: 4,
129 134
      currentTime: '',
130 135
      sysTime: '',
131 136
      localTimeiv: '',
132 137
      eastEightDistrict: 8 * 60 * 60 * 1000,
133
      jishiTime: null,
134 138
      maxShowLength: 300,
135
      monitorCache: []
139
      monitorList: [],
140
      monitorCache: [],
141
      jishiTime: null
136 142
    }
137 143
  },
138 144
  watch: {
139
    '$route'(to, from) {
140
      if (!(to.path === '/bridgeHome/bridgeDetail')) {
145
    $route(to, from) {
146
      if (to.path !== '/bridgeHome/bridgeDetail') {
141 147
        clearTimeout(this.jishiTime)
142 148
        this.jishiTime = null
143 149
      }
@ -149,27 +155,32 @@ export default {
149 155
    }
150 156
  },
151 157
  created() {
158
    var that = this
152 159
    if (urlParse('id')) {
153
      this.bridgeId = urlParse('id')
154
      this.bridgeName = urlParse('name')
160
      that.bridgeId = urlParse('id')
161
      that.bridgeName = urlParse('name')
155 162
    } else {
156
      this.bridgeId = Cookies.get('bridgeId')
157
      this.bridgeName = Cookies.get('bridgeName')
163
      that.bridgeId = Cookies.get('bridgeId')
164
      that.bridgeName = Cookies.get('bridgeName')
158 165
    }
159
    this.getDictoryData()
160
    if (this.bridgeId) {
161
      this.serverSeqArr = queryInfo.queryServers(this.bridgeId, true)
162
      if (this.serverSeqArr.length) {
163
        this.updateDataList()
166
    that.getDictoryData()
167
    queryInfo.qaiCb(function() {
168
      if (that.bridgeId) {
169
        that.serverSeqArr = queryInfo.queryServers(that.bridgeId, true)
170
        if (that.serverSeqArr.length) {
171
          that.updateDataList()
172
          that.getDangerList()
173
        }
164 174
      }
165
    }
175
    })
166 176
  },
167 177
  methods: {
168 178
    updateDataList() {
179
      clearTimeout(this.jishiTime)
180
      this.jishiTime = null
169 181
      this.monitorList = []
170 182
      this.monitorCache = []
171 183
      this.getSysTime()
172
      this.getDangerList()
173 184
    },
174 185
    getDangerList() {
175 186
      var arr = this.serverSeqArr
@ -178,8 +189,10 @@ export default {
178 189
        pageSize: 5,
179 190
        pageNo: 1
180 191
      }
192
      this.loadprogress1 = true
181 193
      getDangerList(param).then(res => {
182 194
        if (res.success && res.data.data) {
195
          this.loadprogress1 = false
183 196
          const dataS = res.data.data
184 197
          for (let i = 0; i < dataS.length; i++) {
185 198
            if (dataS[i].alarmTime) {
@ -202,6 +215,8 @@ export default {
202 215
          that.localTimeiv = localTime - that.sysTime
203 216
          that.first_Q = true
204 217
          that.getTimingMonitor()
218
        } else {
219
          that.loadprogress2 = false
205 220
        }
206 221
      })
207 222
    },
@ -217,13 +232,12 @@ export default {
217 232
      var startTime = this.formatTime(this.sysTime)
218 233
      var endTime = this.formatTime(this.sysTime)
219 234
      that.sysTime += 1000
220
      // var startTime = this.formatTime(this.first_Q ? (this.sysTime - preTime) : this.sysTime)
221
      // var endTime = this.formatTime(this.sysTime)
222 235
      getMonitorByTime({ seq: arr, begin: startTime, end: endTime }).then(res => {
223 236
        var mCache = that.monitorCache
224 237
        var mList = []
225 238
        if (res.success && res.data) {
226 239
          if (that.first_Q) {
240
            that.loadprogress2 = false
227 241
            if (res.data.length) {
228 242
              that.first_Q = false
229 243
              var ftime = res.data[0].ctime

+ 37 - 15
src/views/bridgesConsole/bridgeMonitor/index.vue

@ -17,6 +17,7 @@
17 17
              :key="item.value"
18 18
              :label="item.label"
19 19
              :value="item.value"
20
              :disabled="item.disb"
20 21
              @change="changeTimeRange">
21 22
            </el-option>
22 23
          </el-select>
@ -65,10 +66,10 @@ export default {
65 66
      bridgeId: '',
66 67
      pickerOptions0: {
67 68
        disabledDate(time) {
68
          return time.getTime() > Date.now() - 8.64e7
69
          return time.getTime() > Date.now()
69 70
        }
70 71
      },
71
      valueDate: this.formatTime(Date.now() - 8.64e7).substring(0, 8),
72
      valueDate: this.formatTime(Date.now()).substring(0, 8),
72 73
      TimeVal: '000000',
73 74
      optionsTime: [],
74 75
      serverSeqArr: [],
@ -90,22 +91,38 @@ export default {
90 91
    }
91 92
  },
92 93
  created() {
93
    this.bridgeId = Cookies.get('bridgeId')
94
    this.optionsCreat()
95
    this.serverSeqArr = queryInfo.queryServers(this.bridgeId, true)
96
    if (this.serverSeqArr.length) {
97
      this.getMonitorByDay()
98
    }
94
    var that = this
95
    that.bridgeId = Cookies.get('bridgeId')
96
    that.optionsCreat()
97
    queryInfo.qaiCb(function() {
98
      if (that.bridgeId) {
99
        that.serverSeqArr = queryInfo.queryServers(that.bridgeId, true)
100
        if (that.serverSeqArr.length) {
101
          that.getMonitorByDay()
102
        }
103
      }
104
    })
99 105
  },
100 106
  methods: {
101 107
    optionsCreat() {
108
      var that = this
109
      that.optionsTime = []
110
      const nowHour = new Date().getHours()
102 111
      for (let i = 0; i < 24; i++) {
103 112
        var num = (i < 10 ? ('0' + i) : i)
113
        var numpre = ((i - 1) < 10 ? ('0' + (i - 1)) : (i - 1))
104 114
        var oPt = {
105 115
          value: `${num}0000`,
106
          label: `${num}:00:00 - ${num}:59:59`
116
          label: `${num}:00:00 - ${num}:59:59`,
117
          disb: false
107 118
        }
108
        this.optionsTime.push(oPt)
119
        if (nowHour === i) {
120
          that.TimeVal = `${numpre}0000`
121
        }
122
        if (nowHour <= i && that.valueDate === that.formatTime(Date.now()).substring(0, 8)) {
123
          oPt.disb = true
124
        }
125
        that.optionsTime.push(oPt)
109 126
      }
110 127
    },
111 128
    formatTime(time) {
@ -118,11 +135,11 @@ export default {
118 135
      var that = this
119 136
      var clearInt = setInterval(function() {
120 137
        that.proBar = that.proBar + parseInt((Math.random() * 10), 10)
121
        if (that.proBar >= 84) {
122
          that.proBar = 84
138
        if (that.proBar >= 96) {
139
          that.proBar = 96
123 140
          clearInterval(clearInt)
124 141
        }
125
      }, 1000 * Math.random())
142
      }, 1500 * Math.random())
126 143
    },
127 144
    getMonitorByDay() {
128 145
      this.progressShow = true
@ -134,8 +151,12 @@ export default {
134 151
      var sDate = that.valueDate + that.TimeVal
135 152
      var sDateForm = (new Date(parseTime(sDate, true, true))).getTime()
136 153
      var eDate = that.formatTime(sDateForm + 8 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000).substring(0, 14)
137
      var arr = this.serverSeqArr
138
      getMonitorByDay({ seq: arr, begin: sDate, end: eDate }).then(res => {
154
      var arr = that.serverSeqArr
155
      var flag = false
156
      if (that.valueDate === that.formatTime(Date.now()).substring(0, 8)) {
157
        flag = true
158
      }
159
      getMonitorByDay({ seq: arr, begin: sDate, end: eDate }, flag).then(res => {
139 160
        NProgress.inc()
140 161
        if (res.success && res.data) {
141 162
          this.progressShow = false
@ -169,6 +190,7 @@ export default {
169 190
    },
170 191
    changeDate(val) {
171 192
      this.valueDate = val
193
      this.optionsCreat()
172 194
    },
173 195
    changeTimeRange(val) {
174 196
      this.TimeVal = val

+ 0 - 13
src/views/bridgesConsole/lineChart/LineChart.vue

@ -153,19 +153,6 @@ export default {
153 153
              xAxisIndex: [0],
154 154
              start: 0,
155 155
              end: 100
156
            },
157
            {
158
              type: 'slider',
159
              show: true,
160
              yAxisIndex: [0],
161
              start: 0,
162
              end: 100
163
            },
164
            {
165
              type: 'inside',
166
              yAxisIndex: [0],
167
              start: 0,
168
              end: 100
169 156
            }
170 157
          ]
171 158
        })

+ 33 - 28
src/views/dashboard/other/index.vue

@ -1,34 +1,36 @@
1 1
<template>
2 2
  <div class="dashboard-editor-container">
3
    <div v-if="!showComp">
4
      <el-row class="panel-group" :gutter="40">
5
        <el-col :xs="24" :sm="12" :lg="6" class="card-panel-col" v-for="item in dataList" :key="item.index" @click.native="goToDashboardC(item.id, item.shortName)">
6
          <div class='card-panel'>
7
            <div class="card-panel-icon-wrapper">
8
              <div class="card-image" :style="{ backgroundImage: 'url(/data/bridge'+ item.img +')'}"></div>
3
    <div class="load-box" v-loading="loadprogress">
4
      <div v-if="!showComp">
5
        <el-row class="panel-group" :gutter="40">
6
          <el-col :xs="24" :sm="12" :lg="6" class="card-panel-col" v-for="item in dataList" :key="item.index" @click.native="goToDashboardC(item.id, item.shortName)">
7
            <div class='card-panel'>
8
              <div class="card-panel-icon-wrapper">
9
                <div class="card-image" :style="{ backgroundImage: 'url(/data/bridge'+ item.img +')'}"></div>
10
              </div>
11
              <div class="card-panel-description">
12
                <div class="card-panel-text">桥梁名称 <span>{{item.shortName}}</span></div>
13
                <div class="card-panel-text" :class="item.alarmNum>0?'card-panel-text-red':''">未读报警 {{item.alarmNum ? item.alarmNum : alarmNum}}条</div>
14
              </div>
9 15
            </div>
10
            <div class="card-panel-description">
11
              <div class="card-panel-text">桥梁名称 <span>{{item.shortName}}</span></div>
12
              <div class="card-panel-text" :class="item.alarmNum>0?'card-panel-text-red':''">未读报警 {{item.alarmNum ? item.alarmNum : alarmNum}}条</div>
13
            </div>
14
          </div>
15
        </el-col>
16
      </el-row>
17
      <div class="pagination-container">
18
        <el-pagination
19
          background
20
          @current-change="handleCurrentChange"
21
          :page-size="9"
22
          layout="prev, pager, next, jumper"
23
          :total="total">
24
        </el-pagination>
16
          </el-col>
17
        </el-row>
18
        <div class="pagination-container" v-if="!loadprogress">
19
          <el-pagination
20
            background
21
            @current-change="handleCurrentChange"
22
            :page-size="9"
23
            layout="prev, pager, next, jumper"
24
            :total="total">
25
          </el-pagination>
26
        </div>
25 27
      </div>
26
    </div>
27
    <div class="defaut-container" v-if="showComp">
28
      <div>
29
        <img class="plat-pic" src="/static/touchwave.png" width="460">
30
        <p class="plat-tit">欢迎 <span>{{name}}</span> 使用声脉桥梁云监控平台</p>
31
        <p class="plat-tip">您目前没有任何桥梁数据,请联系管理员</p>
28
      <div class="defaut-container" v-if="showComp">
29
        <div>
30
          <img class="plat-pic" src="/static/touchwave.png" width="460">
31
          <p class="plat-tit">欢迎 <span>{{name}}</span> 使用声脉桥梁云监控平台</p>
32
          <p class="plat-tip">您目前没有任何桥梁数据,请联系管理员</p>
33
        </div>
32 34
      </div>
33 35
    </div>
34 36
  </div>
@ -52,7 +54,8 @@ export default {
52 54
      pageSize: 10,
53 55
      pageNo: 1,
54 56
      dataList: [],
55
      showComp: false
57
      showComp: false,
58
      loadprogress: false
56 59
    }
57 60
  },
58 61
  computed: {
@ -70,9 +73,11 @@ export default {
70 73
        pageSize: this.pageSize,
71 74
        pageNo: this.pageNo
72 75
      }
76
      this.loadprogress = true
73 77
      getBridgeList(param).then(res => {
74 78
        if (res.success) {
75 79
          var $data = res.data.data
80
          this.loadprogress = false
76 81
          if ($data.length > 0) {
77 82
            this.total = res.data.total
78 83
            for (let i = 0; i < $data.length; i++) {

+ 1 - 1
src/views/layout/components/TopNavbar.vue

@ -126,7 +126,7 @@ export default {
126 126
  right: 0;
127 127
  height: 50px;
128 128
  line-height: 50px;
129
  z-index:1002;
129
  z-index:2002;
130 130
  border-radius: 0px !important;
131 131
  background-color: #2d3a4b;
132 132
  border-bottom: 1px solid #e6e6e6;