From 10c164a4bc94aad3a8179f0c4abcb6ce3866522e Mon Sep 17 00:00:00 2001
From: kaixiliu
Date: Mon, 9 Oct 2023 16:07:48 +0800
Subject: uui add report export function
Issue-ID: USECASEUI-819
Change-Id: I34009ad477485a337e934cc49ebc7c44fd976a4d
Signed-off-by: kaixiliu
---
.../intent-management.component.less | 9 +++++
.../intent-report-detail.component.html | 9 +++++
.../intent-report-detail.component.ts | 38 +++++++++++++++++++++-
3 files changed, 55 insertions(+), 1 deletion(-)
(limited to 'usecaseui-portal/src/app/views')
diff --git a/usecaseui-portal/src/app/views/intent-management/intent-management.component.less b/usecaseui-portal/src/app/views/intent-management/intent-management.component.less
index 43f61660..8e882a27 100644
--- a/usecaseui-portal/src/app/views/intent-management/intent-management.component.less
+++ b/usecaseui-portal/src/app/views/intent-management/intent-management.component.less
@@ -115,4 +115,13 @@
}
.condition-operator-div{
margin-left: 50px;
+}
+.container{
+ display: flex;
+ align-items: center;
+ width: 700px;
+}
+.container angular2-date-picker{
+ margin-right: 10px;
+ margin-left: 10px;
}
\ No newline at end of file
diff --git a/usecaseui-portal/src/app/views/intent-management/intent-report-detail/intent-report-detail.component.html b/usecaseui-portal/src/app/views/intent-management/intent-report-detail/intent-report-detail.component.html
index 0f263c76..ae516255 100644
--- a/usecaseui-portal/src/app/views/intent-management/intent-report-detail/intent-report-detail.component.html
+++ b/usecaseui-portal/src/app/views/intent-management/intent-report-detail/intent-report-detail.component.html
@@ -5,6 +5,15 @@
Intent Name: {{intentInfo['intentName']}}
ID: {{intentInfo['intentId']}}
+
+
{{"i18nTextDefine_startTime" | translate}} :
+
+
+
{{"i18nTextDefine_endTime" | translate}} :
+
+
+
+
ReportTime: {{intentInfo['reportTime']}}
{
+ const link = document.createElement('a');
+ link.href = window.URL.createObjectURL(data);
+ link.setAttribute('download', 'Report.csv');
+ link.click();
+ }, (error) => {
+ console.error('export failed:', error);
+ Swal.fire({
+ icon: 'error',
+ title: 'export failed',
+ });
+ });
+ }
}
--
cgit 1.2.3-korg