diff --git a/src/api/jyh/index.ts b/src/api/jyh/index.ts index 814bd0c..cd31dc8 100644 --- a/src/api/jyh/index.ts +++ b/src/api/jyh/index.ts @@ -107,3 +107,25 @@ export function getLicenseList() { } }); } + +// 获取漏洞数据 +export const getVulnList = (data): Promise => { + return reqCatchV2(() => + request({ + url: `/api/v1/repo/vulnerability/page`, + method: 'post', + data, + }) + ); +} + +// 获取漏洞数据 +export const getVulnDetail = (data): Promise => { + return reqCatchV2(() => + request({ + url: `/api/v1/repo/vulnerability/info`, + method: 'POST', + data, + }) + ); +} diff --git a/src/api/repo/index.ts b/src/api/repo/index.ts index 3ba175c..435680d 100644 --- a/src/api/repo/index.ts +++ b/src/api/repo/index.ts @@ -1543,13 +1543,3 @@ export const getOriginalComment = (params: types.DiscussionCommentProps): Promis ); } -// 获取漏洞数据 -export const getVulnDetail = (params: types.VulnDetailProps): Promise => { - return reqCatch(() => - request({ - url: `/api/v1/repo/vulnerability/info`, - method: 'get', - params, - }) - ); -} diff --git a/src/views/Jyh/Version/Detail/VulnerabilitiesList.vue b/src/views/Jyh/Version/Detail/VulnerabilitiesList.vue index a4c9f54..61ee762 100644 --- a/src/views/Jyh/Version/Detail/VulnerabilitiesList.vue +++ b/src/views/Jyh/Version/Detail/VulnerabilitiesList.vue @@ -103,7 +103,7 @@ - + @@ -244,7 +244,14 @@ const vulnDetailVisable = ref(false); const currentVuln = ref(); const openVulnDetail = (row) => { vulnDetailVisable.value = true; - currentVuln.value = row; + if(row.softwareId && row.id) { + currentVuln.value = row; + } else { + currentVuln.value = { + softwareId: 47, + id: 72 + } + } } diff --git a/src/views/Jyh/Version/Detail/VulnerabilityDetail.vue b/src/views/Jyh/Version/Detail/VulnerabilityDetail.vue index 0a0e9b6..063dc57 100644 --- a/src/views/Jyh/Version/Detail/VulnerabilityDetail.vue +++ b/src/views/Jyh/Version/Detail/VulnerabilityDetail.vue @@ -82,27 +82,27 @@ 组件名 - {{vulnDetail.compName || '--'}} + {{componentInfo.moduleName || '--'}} 深度 - {{vulnDetail.complexity || '--'}} + {{componentInfo.depth || '--'}} 当前版本 - {{vulnDetail.version || '--'}} + {{componentInfo.currentVersion || '--'}} 最新版本 - {{vulnDetail.cnvdId || '--'}} + {{componentInfo.latestVersion || '--'}} 组件依赖关系 - {{vulnDetail.version || '--'}} + {{componentInfo.version || '--'}} @@ -111,17 +111,17 @@ 补丁版本 - {{vulnDetail.fixVersion || '--'}} + {{remediationInfo.recommendedVersion || '--'}} 修复兼容性 - {{vulnDetail.complexity || '--'}} + {{remediationInfo.compatibility || '--'}} 修复建议 - {{vulnDetail.fixIssue || '--'}} + {{remediationInfo.recommendedFix || '--'}} @@ -129,38 +129,23 @@