diff --git a/package.json b/package.json
index 397285d..77be49e 100644
--- a/package.json
+++ b/package.json
@@ -33,7 +33,7 @@
"dayjs": "^1.11.13",
"driver.js": "^0.9.8",
"echarts": "^5.5.1",
- "element-plus": "2.9.3",
+ "element-plus": "^2.13.6",
"form-designer-plus": "^0.1.5",
"grid-layout-plus": "^1.1.1",
"html2pdf.js": "^0.10.2",
diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts
index f4d859a..c120a22 100644
--- a/src/i18n/lang/en.ts
+++ b/src/i18n/lang/en.ts
@@ -10,6 +10,7 @@ export default {
title5: 'Full Screen On',
title6: 'Full Screen Off',
title7: 'Approve',
+ title8: 'Upload List',
titleApp: 'Client',
dropdownLarge: 'Large',
dropdownDefault: 'Default',
diff --git a/src/i18n/lang/zh-cn.ts b/src/i18n/lang/zh-cn.ts
index 7137c54..1b63eb7 100644
--- a/src/i18n/lang/zh-cn.ts
+++ b/src/i18n/lang/zh-cn.ts
@@ -11,6 +11,7 @@ export default {
title5: '开全屏',
title6: '关全屏',
title7: '审批',
+ title8: '上传列表',
titleApp: '客户端',
dropdownLarge: '大型',
dropdownDefault: '默认',
diff --git a/src/layout/navBars/breadcrumb/user.vue b/src/layout/navBars/breadcrumb/user.vue
index ecc7994..75c5d7d 100644
--- a/src/layout/navBars/breadcrumb/user.vue
+++ b/src/layout/navBars/breadcrumb/user.vue
@@ -34,6 +34,13 @@
-->
+
+
+
+
+
+
+
@@ -131,6 +139,7 @@ import clientCid from '/@/assets/client-cid.svg';
import WujieVue from 'wujie-vue3';
import { queryMineTask } from '/@/api/flow/task';
import { enableConfigByTenant } from '/@/spdm/utils/index'; // SPDM CODE
+import UploadList from '/@/spdm/components/common/uploadList/index.vue'; // SPDM CODE
import { CODE_ENV } from '/@/spdm/config';
const { bus } = WujieVue;
@@ -316,6 +325,21 @@ const onLockClick = () => {
Local.set('themeConfig', themeConfig.value);
};
+const uploadNum = ref('');
+bus.$on('OPEN_UPLOAD_LIST', () => {
+ openUploadList();
+});
+
+bus.$on('UPLOAD_LIST_DATA_CHANGE', (data: any) => {
+ uploadNum.value = data.filter((item: any) => item.data.status !== '2').length || '';
+});
+
+// 打开上传列表
+const uploadListShow = ref(false);
+const openUploadList = () => {
+ uploadListShow.value = true;
+};
+
// 初始化组件大小/i18n
const initI18nOrSize = (value: string, attr: string) => {
state[attr] = Local.get('themeConfig')[value];
diff --git a/src/spdm/components/common/uploadList/index.vue b/src/spdm/components/common/uploadList/index.vue
new file mode 100644
index 0000000..28d0588
--- /dev/null
+++ b/src/spdm/components/common/uploadList/index.vue
@@ -0,0 +1,169 @@
+
+
+
+ 清空列表
+
+
+
+
+
+
+
+ {{ item.file.name }}
+
+
+ {{ UPLOAD_FILE_STATUS[item.data.status] }}
+
+
+
+
+
+
+
{{ item.data.speed || '--' }}/s
+
+ {{
+ formatFileSize((item.data.current / item.data.total) * item.file.size || 0) ||
+ '--'
+ }}/{{ formatFileSize(item.file.size) }}
+
+
+
+
+
+
+
+
+
+
+
暂无上传任务
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/spdm/utils/file.ts b/src/spdm/utils/file.ts
new file mode 100644
index 0000000..161314c
--- /dev/null
+++ b/src/spdm/utils/file.ts
@@ -0,0 +1,22 @@
+export const formatFileSize = (sizeInBytes: number): string => {
+ if (sizeInBytes === undefined || sizeInBytes === null) {
+ return '';
+ }
+ if (sizeInBytes < 0) {
+ return '0 B';
+ }
+
+ if (sizeInBytes < 1024) {
+ return sizeInBytes + ' B';
+ }
+ const units = ['B', 'KB', 'MB', 'GB', 'TB'];
+ let size = sizeInBytes;
+ let unitIndex = 0;
+
+ while (size >= 1024 && unitIndex < units.length - 1) {
+ size /= 1024;
+ unitIndex++;
+ }
+
+ return `${size.toFixed(2)} ${units[unitIndex]}`;
+};
\ No newline at end of file