diff --git a/public/static/软件存在及可信校验模版.xlsx b/public/static/软件存在及可信校验模版.xlsx new file mode 100644 index 0000000..4d1e802 Binary files /dev/null and b/public/static/软件存在及可信校验模版.xlsx differ diff --git a/src/api/jyh/index.ts b/src/api/jyh/index.ts index 30be22b..062c71f 100644 --- a/src/api/jyh/index.ts +++ b/src/api/jyh/index.ts @@ -1,5 +1,6 @@ import { reqCatchV2, type catchRt } from '@/utils/catch'; import request from '@/utils/request'; +import * as types from '@/api/repo/types'; // 详情-获取版本信息 export function releaseInfo(params: { softwareId: string }): Promise { @@ -134,3 +135,17 @@ export function getVulnerabilityList() { } }); } + +// 迁移批量导入 +export function repoImport(data: types.commonRepoReqType){ + return reqCatchV2(() => + request({ + url: `/api/v1/home/software/valid`, + method: 'post', + data, + headers: { + 'Content-Type': 'multipart/form-data', // 设置请求头 + }, + }) + ); +} diff --git a/src/components/FileUploadButton/index.vue b/src/components/FileUploadButton/index.vue index 2ccb806..13ec99b 100644 --- a/src/components/FileUploadButton/index.vue +++ b/src/components/FileUploadButton/index.vue @@ -56,7 +56,7 @@ const handleFileUpload = async (event) => { const file = event.target.files[0]; // 获取选择的文件 if (file) { // 检查文件类型 - if (file.type === 'text/xml' || file.name.endsWith('.xml')) { + if (file.type === 'text/xml' || file.name.endsWith('.xml') || file.name.endsWith('.xlsx')) { loading.value = true; // 显示加载状态 try { await props.onFileUpload(file); // 调用父组件传递的上传方法 diff --git a/src/components/Header/Notice.vue b/src/components/Header/Notice.vue index d40009e..459986f 100644 --- a/src/components/Header/Notice.vue +++ b/src/components/Header/Notice.vue @@ -24,7 +24,7 @@ const getCounts = () => { }; onMounted(() => { - getCounts(); + // getCounts(); addEventListener('updateNotice', debounce((count: number) => { counts.value = count; }, 500)); diff --git a/src/views/Jyh/Search/Components/BatchVerify.vue b/src/views/Jyh/Search/Components/BatchVerify.vue index d0f9674..3ccac5f 100644 --- a/src/views/Jyh/Search/Components/BatchVerify.vue +++ b/src/views/Jyh/Search/Components/BatchVerify.vue @@ -3,7 +3,7 @@
可使用: - 3 + {{useNum}} 有风险: - 3 + {{riskNum}} 未治理: - 3 + {{noNum}}
- 下载excel模板 + 下载excel模板 导出 @@ -55,18 +55,18 @@ >