Browse Source

优化

master
blank 10 months ago
parent
commit
df7bf2e0fa
  1. 19
      src/views/index.vue

19
src/views/index.vue

@ -653,19 +653,22 @@ export default { @@ -653,19 +653,22 @@ export default {
},
//
toggle(e) {
async toggle(e) {
let showMem = this.showLevel.filter(item => item.flag)
if(!e.flag && showMem > 4) return
e.flag = !e.flag
showMem = this.showLevel.filter(item => item.flag)
let id = showMem.length? showMem.map(item => item.id).join(): this.showLevel[0].id
fetch(this.api + 'waterLevelTrend?ids=' + id)
.then(e => e.json())
.then(e => {
this.level = e.data
this.setLine()
})
.catch(e => { console.error(e) })
// fetch(this.api + 'waterLevelTrend?ids=' + id)
// .then(e => e.json())
// .then(e => {
// this.level = e.data
// this.setLine()
// })
// .catch(e => { console.error(e) })
let res = await this.$axiosGet('/api/daping/station/waterLevelTrend?ids='+id);
this.level = res.data
this.setLine()
}
}
};

Loading…
Cancel
Save