From d1ccf7e1835b3c583da16d90a286e749d5e27c84 Mon Sep 17 00:00:00 2001 From: zmc <zmc_li@foxmail.com> Date: 星期四, 07 十二月 2023 14:15:20 +0800 Subject: [PATCH] 修改无数据时段的算法 --- src/api/exceptionApi.js | 29 +++++++++++++++++++++++------ 1 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/api/exceptionApi.js b/src/api/exceptionApi.js index 104fbb3..37dcea9 100644 --- a/src/api/exceptionApi.js +++ b/src/api/exceptionApi.js @@ -16,8 +16,13 @@ endTime: endTime, type:type } - }) + }).then(res=>{ return res.data.data.sort((a,b)=>{ + const dateA = new Date(a.lst) + const dateB = new Date(b.lst) + return dateA - dateB + })}) }, + // 鏍规嵁鏈堜唤鍜岀被鍨嬫煡鎵惧垎鏋愭暟鎹� analysisdataByType(month,type) { return $http.get('/dust/analysisdataByType', { @@ -27,6 +32,7 @@ } }) }, + // 鏍规嵁鏃舵鍜岀被鍨嬫煡鎵惧垎鏋愭暟鎹� analysisdataByTimeAndType(beginTime,endTime,type) { return $http.get('/dust/analysisdataByTimeAndType', { @@ -59,10 +65,11 @@ }, - - - - +/** + * 鑾峰彇鎵�鏈夌殑鐐逛綅鍚嶇О鍜屽搴旂殑璁惧缂栧彿 + * @param锛� + * @returns锛� + */ getSitesNum() { return $http.get('/dust/sitename') }, @@ -78,5 +85,15 @@ params.exceptionType = temp } return $http.get('/dust/exceptionsSiteName', { params: params }) - } + }, + + /** + * 鏌ヨ涓嶅悓鐨勫紓甯哥被鍨� + * @param锛� + * @returns锛� + */ + queryExceptionType(){ + return $http.get('/dust/exceptiontype') + }, + } -- Gitblit v1.9.3