|
|
@ -111,10 +111,10 @@ export default { |
|
|
|
level: {}, |
|
|
|
level: {}, |
|
|
|
status: [], |
|
|
|
status: [], |
|
|
|
dist: { |
|
|
|
dist: { |
|
|
|
stnms: ['鄞州公园', '横溪镇-上'], |
|
|
|
stnms: [], |
|
|
|
values: [ |
|
|
|
values: [ |
|
|
|
{ isLive: '在线', value: [1, 2]}, |
|
|
|
{ isLive: '在线', value: [1, 2]}, |
|
|
|
{ isLive: '离线', value: [1, 1]} |
|
|
|
{ isLive: '离线', value: []} |
|
|
|
] |
|
|
|
] |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -163,7 +163,6 @@ export default { |
|
|
|
.then(e => e.json()) |
|
|
|
.then(e => e.json()) |
|
|
|
.then(e => { |
|
|
|
.then(e => { |
|
|
|
this.station = e |
|
|
|
this.station = e |
|
|
|
console.log(this.station) |
|
|
|
|
|
|
|
e.forEach(station => { |
|
|
|
e.forEach(station => { |
|
|
|
if(this.showLevel.some(item => item.id == station.id)) return |
|
|
|
if(this.showLevel.some(item => item.id == station.id)) return |
|
|
|
this.showLevel.push({ |
|
|
|
this.showLevel.push({ |
|
|
@ -180,7 +179,6 @@ export default { |
|
|
|
.then(e => e.json()) |
|
|
|
.then(e => e.json()) |
|
|
|
.then(e => { |
|
|
|
.then(e => { |
|
|
|
this.level = e.data |
|
|
|
this.level = e.data |
|
|
|
this.dist.stnms = e.data.stnms |
|
|
|
|
|
|
|
this.setLine() |
|
|
|
this.setLine() |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(e => { console.error(e) }) |
|
|
|
.catch(e => { console.error(e) }) |
|
|
@ -196,19 +194,20 @@ export default { |
|
|
|
.then(e => { |
|
|
|
.then(e => { |
|
|
|
this.status = e.data |
|
|
|
this.status = e.data |
|
|
|
this.setPie() |
|
|
|
this.setPie() |
|
|
|
this.setDist() |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(e => { console.error(e) }) |
|
|
|
.catch(e => { console.error(e) }) |
|
|
|
|
|
|
|
// 水位计分布 |
|
|
|
fetch(this.api + 'count') |
|
|
|
fetch(this.api + 'count') |
|
|
|
.then(e => e.json()) |
|
|
|
.then(e => e.json()) |
|
|
|
.then(e => { |
|
|
|
.then(e => { |
|
|
|
console.log(e) |
|
|
|
this.dist.stnms = e.data.stnms |
|
|
|
|
|
|
|
this.dist.values[0].value = e.data.zx |
|
|
|
|
|
|
|
this.dist.values[1].value = e.data.lx |
|
|
|
|
|
|
|
this.setDist() |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(e => { console.log(e) }) |
|
|
|
.catch(e => { console.error(e) }) |
|
|
|
return this.getList |
|
|
|
return this.getList |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 实时时间 |
|
|
|
// 实时时间 |
|
|
|
setTime() { |
|
|
|
setTime() { |
|
|
|
var t = null; |
|
|
|
var t = null; |
|
|
|