From 236942a2296917edfac4ec5df86d369c1c55e071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=98=E6=B0=91=E5=BA=B7?= Date: Sat, 15 Mar 2025 20:32:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E6=BA=90=E8=BD=AF=E4=BB=B6=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=9F=A5=E8=AF=A2=E5=8F=8A=E6=89=B9=E9=87=8F=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/jyh.scss | 20 + src/components/FileUploadButton/index.vue | 78 +++ src/components/SettingTable/index.vue | 555 ++++++++++++++++++ src/components/TableSetting/index.vue | 127 ++-- .../Jyh/Search/Components/BatchVerify.vue | 244 +++++--- src/views/Jyh/Search/Components/OssQuery.vue | 408 ++++++++++--- src/views/Jyh/Version/Detail/VersionInfo.vue | 12 +- 7 files changed, 1234 insertions(+), 210 deletions(-) create mode 100644 src/components/FileUploadButton/index.vue create mode 100644 src/components/SettingTable/index.vue diff --git a/src/assets/css/jyh.scss b/src/assets/css/jyh.scss index 6ded50c..1b9cc57 100644 --- a/src/assets/css/jyh.scss +++ b/src/assets/css/jyh.scss @@ -281,3 +281,23 @@ //padding: 14px 24px; height: auto!important; } + +.jyh-dropdown { + //padding: 20px; + .title { + + } +} + +.green { + cursor: pointer; + color: rgb(80, 212, 171) +} +.yellow { + cursor: pointer; + color: rgb(250, 194, 10) +} +.red { + cursor: pointer; + color: rgb(246, 111, 106) +} diff --git a/src/components/FileUploadButton/index.vue b/src/components/FileUploadButton/index.vue new file mode 100644 index 0000000..2ccb806 --- /dev/null +++ b/src/components/FileUploadButton/index.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/src/components/SettingTable/index.vue b/src/components/SettingTable/index.vue new file mode 100644 index 0000000..8ea7dd3 --- /dev/null +++ b/src/components/SettingTable/index.vue @@ -0,0 +1,555 @@ + + + + + diff --git a/src/components/TableSetting/index.vue b/src/components/TableSetting/index.vue index 237c8cb..b1e2c19 100644 --- a/src/components/TableSetting/index.vue +++ b/src/components/TableSetting/index.vue @@ -1,43 +1,102 @@ diff --git a/src/views/Jyh/Search/Components/BatchVerify.vue b/src/views/Jyh/Search/Components/BatchVerify.vue index fa6e41f..7d64fe8 100644 --- a/src/views/Jyh/Search/Components/BatchVerify.vue +++ b/src/views/Jyh/Search/Components/BatchVerify.vue @@ -1,7 +1,11 @@ - 导出 +
+ + 可使用: + 3 + + 未治理: + 3 + + 有风险: + 3 +
+
+ 导出 + + +
+ + - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -127,26 +137,65 @@ import { GModal } from '@/components/Setting/index'; import { reqCatch } from '@/utils/catch'; import { getOrgInfo } from '@/views/Org/hooks/orgInfo'; import { Message } from 'vue-devui'; +import { useAccountStore } from '@/stores/user'; +import { storeToRefs } from 'pinia'; +import TableSetting from '@/components/TableSetting/index.vue'; +import FileUploadButton from '@/components/FileUploadButton/index.vue'; + +// 处理文件上传 +const handleFileUpload = async (file) => { + console.log('选择的文件:', file.name); + + // 模拟文件上传逻辑 + return new Promise((resolve) => { + setTimeout(() => { + console.log('文件上传成功:', file.name); + resolve(); + }, 2000); // 模拟 2 秒上传时间 + }); +}; +const userInfo = useAccountStore(); +const { isLogin } = storeToRefs(userInfo); + const { namespace } = getOrgInfo(); const tableData = ref([ - {result:1, versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {result:1, versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {result:0, versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {result:0, versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {result:0, versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {result:1, versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {result:1, versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {result:1, versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {result:1, versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {result:1, versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, + {result:1,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, + {result:1,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, + {result:0,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, + {result:0,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, + {result:0,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, + {result:1,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, + {result:2,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, + {result:2,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, + {result:1,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, + {result:1,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, +]); +const columns = ref([ + { key: 'result', label: '校验结果', visible: true, filterable: true, sortable: false }, + { key: 'versionName', label: '选取版本火车名称', visible: true, filterable: true, sortable: false }, + { key: 'name', label: '软件名称', visible: true, filterable: true, sortable: false }, + { key: 'code', label: '软件编码', visible: true, filterable: true, sortable: false }, + { key: 'version', label: '软件版本', visible: true, filterable: true, sortable: false }, + { key: 'versionCode', label: '版本编码', visible: true, filterable: true, sortable: true }, + { key: 'smStatus', label: '生命周期状态', visible: true, filterable: true, sortable: true }, + { key: 'type', label: '主/依赖软件类型', visible: true, filterable: false, sortable: false }, + { key: 'license', label: 'License名称', visible: true, filterable: true, sortable: false }, + { key: 'url', label: '官网漏洞披露地址', visible: true, filterable: false, sortable: false }, + { key: 'risk', label: '集成风险', visible: false, filterable: false, sortable: false }, // 隐藏字段 + { key: 'useType', label: '适用类型', visible: false, filterable: false, sortable: false }, // 隐藏字段 + { key: 'status', label: '状态', visible: false, filterable: false, sortable: false }, // 隐藏字段 + { key: 'key', label: '键值', visible: false, filterable: false, sortable: false }, // 隐藏字段 + { key: 'created', label: '创建时间', visible: false, filterable: false, sortable: false }, // 隐藏字段 + { key: 'updated', label: '更新时间', visible: false, filterable: false, sortable: false }, // 隐藏字段 ]); const formData = ref({ title: '',type: '', useType: '',formData:'',select: '',time1:null,name:'',versionCode:'',pulishTime:'' }); const typeOptions = reactive(['主软件', '依赖软件']); const riskOptions = reactive(['低', '中', '高']); const useTypeOptions = reactive(['软件', '文档', '文档+软件']); const isUseOptions = reactive(['是', '否']); - +// 定义 tableKey,用于强制刷新表格 +const tableKey = ref(0); const pager = ref({ total: 10, pageIndex: 1, @@ -168,6 +217,16 @@ const openDelete = (row: any) => { const router = useRouter(); +// 定义 showColumnList 状态 +const showColumnList = ref(false); + +// 更新 showColumnList 的方法 +const updateShowColumnList = (newValue) => { + showColumnList.value = newValue; + tableKey.value++; // 更新 tableKey,强制刷新表格 +}; + + const handleBatchImport = async() => { // 多个项目导入 // importRepo.value = queryTable.value.filter((val) => val.checked); loadingStatus.batchMigrating = true; @@ -314,10 +373,13 @@ const signCla = (row: any) => { border-radius: 8px 0px 8px 8px; //background: #F2F5FC; - .output-btn { + .left-btn { position: absolute; right: 28px; bottom: 4px; + } + + .output-btn { color: #191919; font-family: HarmonyOS Sans SC; font-weight: regular; @@ -333,4 +395,10 @@ const signCla = (row: any) => { padding: 7px 20px 12px; background: #ffffff; } + +.tjsj { + display: flex; + align-items: center; + margin-left: 8px; +} diff --git a/src/views/Jyh/Search/Components/OssQuery.vue b/src/views/Jyh/Search/Components/OssQuery.vue index 90813cf..6ca72a4 100644 --- a/src/views/Jyh/Search/Components/OssQuery.vue +++ b/src/views/Jyh/Search/Components/OssQuery.vue @@ -8,82 +8,67 @@ 清空
- 导出 - - + 导出 + +
- + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -118,30 +103,255 @@ import TableSetting from '@/components/TableSetting/index.vue'; import { reqCatch } from '@/utils/catch'; import { getOrgInfo } from '@/views/Org/hooks/orgInfo'; import { Message } from 'vue-devui'; +import { storeToRefs } from 'pinia'; +import { useAccountStore } from '@/stores/user'; const { namespace } = getOrgInfo(); +const userInfo = useAccountStore(); +const { isLogin } = storeToRefs(userInfo); +// 定义 tableKey,用于强制刷新表格 +const tableKey = ref(0); const tableData = ref([ - {versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, - {versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'}, + { + softwareName: 'eslint-plugin-import', + softwareVersion: '2.29.0', + releaseDate: '2025-03-10', + licenseCount: 3, + dependencyCount: 15, + productComponentUsage: ['供应链系统A', '供应链系统B'], + codeSize: '150KB', + vulnerabilityCount: 5, + industryCategory: '软件开发工具', + developer: 'ESLint团队', + contributorCountries: ['美国', '中国', '德国'], + contributorOrganizations: ['Google', 'Microsoft', 'Alibaba'], + programmingLanguage: 'JavaScript', + communityHash: 'a1b2c3d4', + softwareScore: 8.5, + sourceCodeDownload: 'https://github.com/eslint/eslint-plugin-import', + copyright: 'MIT License', + externalVulnerabilitySource: 'CVE-2025-1234', + versionDescription: '修复了若干安全漏洞', + compatibilityRisk: '低', + communityEOL: '2028-12-31', + }, + { + softwareName: 'react', + softwareVersion: '18.2.0', + releaseDate: '2025-02-15', + licenseCount: 1, + dependencyCount: 10, + productComponentUsage: ['供应链系统C'], + codeSize: '500KB', + vulnerabilityCount: 2, + industryCategory: '前端框架', + developer: 'Facebook', + contributorCountries: ['美国', '加拿大', '英国'], + contributorOrganizations: ['Facebook', 'Netflix', 'Airbnb'], + programmingLanguage: 'JavaScript', + communityHash: 'e5f6g7h8', + softwareScore: 9.0, + sourceCodeDownload: 'https://github.com/facebook/react', + copyright: 'MIT License', + externalVulnerabilitySource: 'CVE-2025-5678', + versionDescription: '新增了并发渲染功能', + compatibilityRisk: '中', + communityEOL: '2030-12-31', + }, + { + softwareName: 'vue', + softwareVersion: '3.2.0', + releaseDate: '2025-01-20', + licenseCount: 1, + dependencyCount: 8, + productComponentUsage: ['供应链系统D'], + codeSize: '300KB', + vulnerabilityCount: 1, + industryCategory: '前端框架', + developer: 'Evan You', + contributorCountries: ['中国', '美国', '日本'], + contributorOrganizations: ['Alibaba', 'Tencent', 'Baidu'], + programmingLanguage: 'JavaScript', + communityHash: 'i9j0k1l2', + softwareScore: 9.2, + sourceCodeDownload: 'https://github.com/vuejs/vue', + copyright: 'MIT License', + externalVulnerabilitySource: 'CVE-2025-9101', + versionDescription: '优化了性能', + compatibilityRisk: '低', + communityEOL: '2029-12-31', + }, + { + softwareName: 'webpack', + softwareVersion: '5.75.0', + releaseDate: '2025-04-05', + licenseCount: 2, + dependencyCount: 20, + productComponentUsage: ['供应链系统E'], + codeSize: '1MB', + vulnerabilityCount: 3, + industryCategory: '构建工具', + developer: 'Webpack团队', + contributorCountries: ['美国', '德国', '俄罗斯'], + contributorOrganizations: ['Google', 'Microsoft', 'Yandex'], + programmingLanguage: 'JavaScript', + communityHash: 'm3n4o5p6', + softwareScore: 8.8, + sourceCodeDownload: 'https://github.com/webpack/webpack', + copyright: 'MIT License', + externalVulnerabilitySource: 'CVE-2025-1122', + versionDescription: '修复了构建性能问题', + compatibilityRisk: '高', + communityEOL: '2027-12-31', + }, + { + softwareName: 'babel', + softwareVersion: '7.20.0', + releaseDate: '2025-03-25', + licenseCount: 1, + dependencyCount: 12, + productComponentUsage: ['供应链系统F'], + codeSize: '400KB', + vulnerabilityCount: 4, + industryCategory: '编译器', + developer: 'Babel团队', + contributorCountries: ['美国', '英国', '印度'], + contributorOrganizations: ['Facebook', 'Netflix', 'Uber'], + programmingLanguage: 'JavaScript', + communityHash: 'q7r8s9t0', + softwareScore: 8.7, + sourceCodeDownload: 'https://github.com/babel/babel', + copyright: 'MIT License', + externalVulnerabilitySource: 'CVE-2025-3344', + versionDescription: '新增了对新语法的支持', + compatibilityRisk: '中', + communityEOL: '2026-12-31', + }, + { + softwareName: 'typescript', + softwareVersion: '5.0.0', + releaseDate: '2025-05-01', + licenseCount: 1, + dependencyCount: 5, + productComponentUsage: ['供应链系统G'], + codeSize: '2MB', + vulnerabilityCount: 0, + industryCategory: '编程语言', + developer: 'Microsoft', + contributorCountries: ['美国', '中国', '加拿大'], + contributorOrganizations: ['Microsoft', 'Google', 'Alibaba'], + programmingLanguage: 'TypeScript', + communityHash: 'u1v2w3x4', + softwareScore: 9.5, + sourceCodeDownload: 'https://github.com/microsoft/TypeScript', + copyright: 'Apache License 2.0', + externalVulnerabilitySource: '无', + versionDescription: '新增了装饰器功能', + compatibilityRisk: '低', + communityEOL: '2035-12-31', + }, + { + softwareName: 'jest', + softwareVersion: '29.0.0', + releaseDate: '2025-06-10', + licenseCount: 1, + dependencyCount: 18, + productComponentUsage: ['供应链系统H'], + codeSize: '600KB', + vulnerabilityCount: 2, + industryCategory: '测试工具', + developer: 'Facebook', + contributorCountries: ['美国', '德国', '法国'], + contributorOrganizations: ['Facebook', 'Netflix', 'Spotify'], + programmingLanguage: 'JavaScript', + communityHash: 'y5z6a7b8', + softwareScore: 9.1, + sourceCodeDownload: 'https://github.com/facebook/jest', + copyright: 'MIT License', + externalVulnerabilitySource: 'CVE-2025-5566', + versionDescription: '优化了测试性能', + compatibilityRisk: '中', + communityEOL: '2032-12-31', + }, + { + softwareName: 'docker', + softwareVersion: '24.0.0', + releaseDate: '2025-07-15', + licenseCount: 1, + dependencyCount: 25, + productComponentUsage: ['供应链系统I'], + codeSize: '10MB', + vulnerabilityCount: 6, + industryCategory: '容器化工具', + developer: 'Docker Inc.', + contributorCountries: ['美国', '英国', '澳大利亚'], + contributorOrganizations: ['Docker Inc.', 'Google', 'Amazon'], + programmingLanguage: 'Go', + communityHash: 'c9d0e1f2', + softwareScore: 9.3, + sourceCodeDownload: 'https://github.com/docker/docker', + copyright: 'Apache License 2.0', + externalVulnerabilitySource: 'CVE-2025-7788', + versionDescription: '新增了对ARM架构的支持', + compatibilityRisk: '高', + communityEOL: '2030-12-31', + }, + { + softwareName: 'kubernetes', + softwareVersion: '1.28.0', + releaseDate: '2025-08-20', + licenseCount: 1, + dependencyCount: 30, + productComponentUsage: ['供应链系统J'], + codeSize: '15MB', + vulnerabilityCount: 8, + industryCategory: '容器编排工具', + developer: 'CNCF', + contributorCountries: ['美国', '中国', '德国'], + contributorOrganizations: ['Google', 'Red Hat', 'IBM'], + programmingLanguage: 'Go', + communityHash: 'g3h4i5j6', + softwareScore: 9.4, + sourceCodeDownload: 'https://github.com/kubernetes/kubernetes', + copyright: 'Apache License 2.0', + externalVulnerabilitySource: 'CVE-2025-9900', + versionDescription: '优化了集群管理功能', + compatibilityRisk: '高', + communityEOL: '2033-12-31', + }, + { + softwareName: 'postgresql', + softwareVersion: '15.0.0', + releaseDate: '2025-09-25', + licenseCount: 1, + dependencyCount: 7, + productComponentUsage: ['供应链系统K'], + codeSize: '8MB', + vulnerabilityCount: 3, + industryCategory: '数据库', + developer: 'PostgreSQL团队', + contributorCountries: ['美国', '加拿大', '日本'], + contributorOrganizations: ['PostgreSQL Inc.', 'Amazon', 'Microsoft'], + programmingLanguage: 'C', + communityHash: 'k7l8m9n0', + softwareScore: 9.6, + sourceCodeDownload: 'https://github.com/postgres/postgres', + copyright: 'PostgreSQL License', + externalVulnerabilitySource: 'CVE-2025-1122', + versionDescription: '新增了JSONB索引功能', + compatibilityRisk: '低', + communityEOL: '2035-12-31', + }, ]); const formData = ref({ title: '',type: '', useType: '',formData:'',select: '',time1:null,name:'',versionCode:'',pulishTime:'' }); const typeOptions = reactive(['主软件', '依赖软件']); const riskOptions = reactive(['低', '中', '高']); const useTypeOptions = reactive(['软件', '文档', '文档+软件']); const isUseOptions = reactive(['是', '否']); - const newFormData = ref({ - licenseName: '', + license: '', searchWord: '', - softwareVersion: '', + version: '', dependentSoftware: '', programmingLanguage: '', dateRange: ['', ''] @@ -163,6 +373,40 @@ const openDelete = (row: any) => { deletevModels.value = true; }; +// 定义 columns 数据 +const columns = ref([ + { key: 'softwareName', label: '软件名称', visible: true, filterable: true, sortable: false }, + { key: 'softwareVersion', label: '软件版本', visible: true, filterable: true, sortable: false }, + { key: 'releaseDate', label: '版本发布时间', visible: true, filterable: true, sortable: true }, + { key: 'licenseCount', label: 'License数量', visible: true, filterable: false, sortable: false }, + { key: 'dependencyCount', label: '依赖软件数', visible: true, filterable: false, sortable: false }, + { key: 'productComponentUsage', label: '产品成分使用量', visible: false, filterable: false, sortable: false }, + { key: 'codeSize', label: '代码量', visible: true, filterable: false, sortable: false }, + { key: 'vulnerabilityCount', label: '漏洞数量', visible: true, filterable: false, sortable: false }, + { key: 'industryCategory', label: '行业分类', visible: true, filterable: true, sortable: false }, + { key: 'developer', label: '开发商', visible: false, filterable: true, sortable: false }, + { key: 'contributorCountries', label: '贡献者国家/地区分布', visible: true, filterable: false, sortable: false }, + { key: 'contributorOrganizations', label: '贡献者组织/公司分布', visible: true, filterable: false, sortable: false }, + { key: 'programmingLanguage', label: '编程语言', visible: false, filterable: true, sortable: false }, + { key: 'communityHash', label: '社区hash值', visible: false, filterable: false, sortable: false }, + { key: 'softwareScore', label: '软件评分', visible: false, filterable: false, sortable: true }, + { key: 'sourceCodeDownload', label: '源码包下载地址', visible: true, filterable: false, sortable: false }, + { key: 'copyright', label: 'CopyRight', visible: false, filterable: false, sortable: false }, + { key: 'externalVulnerabilitySource', label: '外部漏洞源的软件名称', visible: false, filterable: true, sortable: false }, + { key: 'versionDescription', label: '版本描述', visible: false, filterable: false, sortable: false }, + { key: 'compatibilityRisk', label: '兼容性风险描述', visible: false, filterable: false, sortable: false }, + { key: 'communityEOL', label: '社区EOL时间', visible: false, filterable: true, sortable: true }, +]); + +// 定义 showColumnList 状态 +const showColumnList = ref(false); + +// 更新 showColumnList 的方法 +const updateShowColumnList = (newValue) => { + showColumnList.value = newValue; + tableKey.value++; // 更新 tableKey,强制刷新表格 +}; + const router = useRouter(); const route = useRoute(); // 跳转 diff --git a/src/views/Jyh/Version/Detail/VersionInfo.vue b/src/views/Jyh/Version/Detail/VersionInfo.vue index 31909d6..d3facfa 100644 --- a/src/views/Jyh/Version/Detail/VersionInfo.vue +++ b/src/views/Jyh/Version/Detail/VersionInfo.vue @@ -97,12 +97,12 @@
- - - 主License分析报告 - https://designcloud.uiplus.huawei.com/developer/main/index.html - - + + + + + +
Copyright报告