From a7f745d98b0dad32bd0713502d27dc9e4a151b53 Mon Sep 17 00:00:00 2001
From: rd <1344903914@qq.com>
Date: Thu, 17 Jul 2025 17:23:40 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0Notificatio=E6=96=B9?=
=?UTF-8?q?=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/export-task/index.vue | 14 ++------------
.../components/import-task/index.vue | 15 ++-------------
.../components/download-center-modal/index.vue | 4 +++-
src/utils/arcoD.tsx | 17 +++++++++++++++++
src/utils/tools.ts | 1 +
.../media-account/account-dashboard/index.vue | 1 +
6 files changed, 26 insertions(+), 26 deletions(-)
create mode 100644 src/utils/arcoD.tsx
diff --git a/src/components/_base/navbar/components/download-center-modal/components/export-task/index.vue b/src/components/_base/navbar/components/download-center-modal/components/export-task/index.vue
index 78aaa83..4d3fa15 100644
--- a/src/components/_base/navbar/components/download-center-modal/components/export-task/index.vue
+++ b/src/components/_base/navbar/components/download-center-modal/components/export-task/index.vue
@@ -12,6 +12,7 @@ import { downloadByUrl } from '@/utils/tools';
import DeleteTaskModal from './delete-task-modal.vue';
import icon1 from '@/assets/img/media-account/icon-delete.png';
import icon5 from '@/assets/img/media-account/icon-warn-1.png';
+import { showExportNotification } from '@/utils/arcoD';
export default {
setup(props, { emit, expose }) {
@@ -106,18 +107,7 @@ export default {
};
const handleDownload = (record) => {
- Notification.warning({
- showIcon: false,
- closable: true,
- content: (
-
-
-
{`正在下载“${record.name}”,请稍后...`}
-
- ),
- duration: 3000,
- class: `px-16px py-9px w-400px rounded-2px bg-#F0EDFF`,
- });
+ showExportNotification(record.name)
record.file && downloadByUrl(record.file);
};
const handleBatchDownload = () => {
diff --git a/src/components/_base/navbar/components/download-center-modal/components/import-task/index.vue b/src/components/_base/navbar/components/download-center-modal/components/import-task/index.vue
index 75c9019..76740bf 100644
--- a/src/components/_base/navbar/components/download-center-modal/components/import-task/index.vue
+++ b/src/components/_base/navbar/components/download-center-modal/components/import-task/index.vue
@@ -12,6 +12,7 @@ import { downloadByUrl } from '@/utils/tools';
import DeleteTaskModal from './delete-task-modal.vue';
import icon1 from '@/assets/img/media-account/icon-delete.png';
import icon5 from '@/assets/img/media-account/icon-warn-1.png';
+import { showExportNotification } from '@/utils/arcoD';
export default {
setup(props, { emit, expose }) {
@@ -106,19 +107,7 @@ export default {
};
const handleDownload = (record) => {
- Notification.warning({
- showIcon: false,
- closable: true,
- content: (
-
-
-
{`正在下载“${record.name}”,请稍后...`}
-
- ),
- duration: 3000,
- class: `px-16px py-9px w-400px rounded-2px bg-#F0EDFF`,
- });
- record.file && downloadByUrl(record.file);
+ showExportNotification(record.name)
};
const handleBatchDownload = () => {
// 批量下载逻辑
diff --git a/src/components/_base/navbar/components/download-center-modal/index.vue b/src/components/_base/navbar/components/download-center-modal/index.vue
index df5081f..590b43f 100644
--- a/src/components/_base/navbar/components/download-center-modal/index.vue
+++ b/src/components/_base/navbar/components/download-center-modal/index.vue
@@ -8,7 +8,7 @@
:footer="false"
@close="onClose"
>
-
+
@@ -42,6 +42,8 @@ const getData = () => {
const open = () => {
getData();
+ console.log(activeTab.value);
+
timer = setInterval(() => {
getData();
}, 10000);
diff --git a/src/utils/arcoD.tsx b/src/utils/arcoD.tsx
new file mode 100644
index 0000000..2259dc2
--- /dev/null
+++ b/src/utils/arcoD.tsx
@@ -0,0 +1,17 @@
+import { Notification } from '@arco-design/web-vue';
+import { IconLoading } from '@arco-design/web-vue/es/icon';
+
+export function showExportNotification(name: string) {
+ Notification.warning({
+ showIcon: false,
+ closable: true,
+ content: () => (
+
+
+
{`正在下载“${name}”,请稍后...`}
+
+ ),
+ duration: 3000,
+ class: 'px-16px py-9px w-400px rounded-2px bg-#F0EDFF',
+ });
+}
\ No newline at end of file
diff --git a/src/utils/tools.ts b/src/utils/tools.ts
index e2093fc..f3b6b3b 100644
--- a/src/utils/tools.ts
+++ b/src/utils/tools.ts
@@ -106,3 +106,4 @@ export function downloadByUrl(url: string, filename?: string) {
a.click();
document.body.removeChild(a);
}
+
diff --git a/src/views/property-marketing/media-account/account-dashboard/index.vue b/src/views/property-marketing/media-account/account-dashboard/index.vue
index f6596ab..e95cd0b 100644
--- a/src/views/property-marketing/media-account/account-dashboard/index.vue
+++ b/src/views/property-marketing/media-account/account-dashboard/index.vue
@@ -66,6 +66,7 @@ import { getAccountBoardOverview, getAccountBoardList, postAccountBoardExport }
import { formatNumberShow } from '@/utils/tools';
import { INITIAL_QUERY, CARD_FIELDS } from './constants';
import { downloadByUrl } from '@/utils/tools';
+import { showExportNotification } from '@/utils/arcoD';
import icon1 from '@/assets/img/icon-question.png';