From 8e535aee358e788efd2cfade2a0c5ad9952e0542 Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Mon, 29 Jan 2024 00:59:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BB=86=E8=8A=82=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/perfManage/goldTarget.ts | 13 +- src/views/perfManage/goldTarget/index1.vue | 334 --------------------- 2 files changed, 9 insertions(+), 338 deletions(-) delete mode 100644 src/views/perfManage/goldTarget/index1.vue diff --git a/src/api/perfManage/goldTarget.ts b/src/api/perfManage/goldTarget.ts index d930be63..d254c851 100644 --- a/src/api/perfManage/goldTarget.ts +++ b/src/api/perfManage/goldTarget.ts @@ -113,7 +113,7 @@ export async function getGoldTitleByNE(neType: string) { method: 'get', params: { neType }, }); - // 解析数据 + // 解析数据// return result; } @@ -123,13 +123,19 @@ export async function getGoldTitleByNE(neType: string) { * @returns object */ export async function listUPFData(timeArr: any) { + + const initTime: Date = new Date(); + const twentyFourHoursAgo: Date = new Date( + initTime.getTime() - 10*60 * 1000 + ); + return await Promise.allSettled([ // 获取参数规则 request({ url: `/api/rest/databaseManagement/v1/select/omc_db/gold_kpi`, method: 'get', params: { - SQL: `SELECT gold_kpi.*,kpi_title.en_title FROM gold_kpi LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id where 1=1 and gold_kpi.kpi_id ='UPF.06' and timestamp BETWEEN '${timeArr[0]}' AND '${timeArr[1]}' `, + SQL: `SELECT gold_kpi.*,kpi_title.en_title FROM gold_kpi LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id where 1=1 and gold_kpi.kpi_id ='UPF.06' and timestamp BETWEEN '${parseDateToStr(twentyFourHoursAgo)}' AND '${parseDateToStr(initTime)}' `, // SQL: `SELECT gold_kpi.kpi_id, sum(gold_kpi.value) as index, kpi_title.en_title // FROM gold_kpi // LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id @@ -145,7 +151,7 @@ export async function listUPFData(timeArr: any) { url: `/api/rest/databaseManagement/v1/select/omc_db/gold_kpi`, method: 'get', params: { - SQL: `SELECT gold_kpi.*,kpi_title.en_title FROM gold_kpi LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id where 1=1 and gold_kpi.kpi_id ='UPF.03' and timestamp BETWEEN '${timeArr[0]}' AND '${timeArr[1]}' `, + SQL: `SELECT gold_kpi.*,kpi_title.en_title FROM gold_kpi LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id where 1=1 and gold_kpi.kpi_id ='UPF.03' and timestamp BETWEEN '${parseDateToStr(twentyFourHoursAgo)}' AND '${parseDateToStr(initTime)}' `, }, timeout: 60_000, }), @@ -205,7 +211,6 @@ export async function listUPFIndex() { const twentyFourHoursAgo: Date = new Date( initTime.getTime() - 24 * 60 * 60 * 1000 ); - parseDateToStr; // 发起请求 const result = await request({ url: `/api/rest/databaseManagement/v1/select/omc_db/gold_kpi`, diff --git a/src/views/perfManage/goldTarget/index1.vue b/src/views/perfManage/goldTarget/index1.vue deleted file mode 100644 index b717f13e..00000000 --- a/src/views/perfManage/goldTarget/index1.vue +++ /dev/null @@ -1,334 +0,0 @@ - - - - -