|
|
@ -25,12 +25,12 @@ |
|
|
|
<div>施工路段</div> |
|
|
|
</div> |
|
|
|
<div class="monitor-item keep-ratio"> |
|
|
|
<span class="fault">4</span> |
|
|
|
<span class="fault">{{ weatherForecast }}</span> |
|
|
|
<span class="unit">处</span> |
|
|
|
<div>气象预警</div> |
|
|
|
</div> |
|
|
|
<div class="monitor-item keep-ratio"> |
|
|
|
<span class="abnormal">5</span> |
|
|
|
<span class="abnormal">{{ abnormalDeviceNum }}</span> |
|
|
|
<div>异常设备</div> |
|
|
|
</div> |
|
|
|
<div class="monitor-item keep-ratio"> |
|
|
@ -59,6 +59,8 @@ export default { |
|
|
|
trafficIncidents: [0, 0], |
|
|
|
constructionSection: 0, |
|
|
|
perceiveEvent: 0, |
|
|
|
abnormalDeviceNum: 0, |
|
|
|
weatherForecast: 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
@ -74,8 +76,18 @@ export default { |
|
|
|
method: "post", |
|
|
|
data: {} |
|
|
|
}), |
|
|
|
request({ |
|
|
|
url: `/business/device/abnormalDevice`, |
|
|
|
method: "get", |
|
|
|
data: {} |
|
|
|
}), |
|
|
|
request({ |
|
|
|
url: `/weatherForecast/queryTheNumberOfMeteorologicalWarning`, |
|
|
|
method: "post", |
|
|
|
data: {} |
|
|
|
}), |
|
|
|
]) |
|
|
|
.then(([trafficIncidents, perceiveEvent]) => { |
|
|
|
.then(([trafficIncidents, perceiveEvent, abnormalDeviceNum, weatherForecast]) => { |
|
|
|
if (trafficIncidents.status === 'fulfilled' && trafficIncidents.value.code == 200) { |
|
|
|
const data = trafficIncidents.value.data; |
|
|
|
|
|
|
@ -92,7 +104,14 @@ export default { |
|
|
|
|
|
|
|
this.perceiveEvent = data.number || 0; |
|
|
|
} |
|
|
|
|
|
|
|
if (abnormalDeviceNum.status === 'fulfilled' && abnormalDeviceNum.value.code == 200) { |
|
|
|
const data = abnormalDeviceNum.value.data; |
|
|
|
this.abnormalDeviceNum = data || 0; |
|
|
|
} |
|
|
|
if (weatherForecast.status === 'fulfilled' && weatherForecast.value.code == 200) { |
|
|
|
const data = weatherForecast.value.data; |
|
|
|
this.weatherForecast = data || 0; |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|