|
@@ -158,8 +158,11 @@ const formatTime = timestamp => {
|
|
|
}
|
|
|
const result = ref([])
|
|
|
const getChart = async (range) =>{
|
|
|
-
|
|
|
- result.value = await IotStatApi.getDeviceInfoChart(params.code, topic.value, range[0], range[1])
|
|
|
+ loading.value = true
|
|
|
+ await IotStatApi.getDeviceInfoChart(params.code, topic.value, range[0], range[1]).then(res=>{
|
|
|
+ result.value = res
|
|
|
+ loading.value = false
|
|
|
+ })
|
|
|
}
|
|
|
// 初始化图表
|
|
|
const renderChart = async () => {
|