From 67a97aaafe4ed85752d8f1dbcb727910715006b0 Mon Sep 17 00:00:00 2001 From: "@user8949" Date: Wed, 19 Mar 2025 13:13:35 +0800 Subject: [PATCH 1/6] =?UTF-8?q?update:=20=E9=A6=96=E9=A1=B5bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=EF=BC=8CAI=E4=BF=AE=E5=A4=8D=E5=BB=BA=E8=AE=AE=20&=20?= =?UTF-8?q?=E8=AE=B8=E5=8F=AF=E8=AF=81=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/jyh/index.ts | 18 +++--- src/components/LicenseInfo/SidePanel.vue | 10 ++- src/views/Jyh/AIRepair/index.vue | 77 ++++-------------------- src/views/Jyh/Home/index.vue | 26 +++++--- src/views/Jyh/LicenseInfo/index.vue | 71 +++++++++++++--------- 5 files changed, 87 insertions(+), 115 deletions(-) diff --git a/src/api/jyh/index.ts b/src/api/jyh/index.ts index c577a92..2b7aa46 100644 --- a/src/api/jyh/index.ts +++ b/src/api/jyh/index.ts @@ -103,9 +103,9 @@ export function getRepairInfo() { url: '/api/v1/repo/repair/info', method: 'POST', data: { - current: 1, - size: 10, - softwareId: 47 + "current": 1, + "size": 10, + "softwareId": 47 } }); } @@ -113,12 +113,12 @@ export function getRepairInfo() { // 获取许可证列表 export function getLicenseList() { return request({ - url: '/api/v1/repo/license/list', - method: 'GET', - params: { - current: 1, - size: 10, - softwareId: 47 + url: '/api/v1/repo/license/info', + method: 'POST', + data: { + "current": 1, + "size": 10, + "softwareId": 47 } }); } diff --git a/src/components/LicenseInfo/SidePanel.vue b/src/components/LicenseInfo/SidePanel.vue index e118232..9197f90 100644 --- a/src/components/LicenseInfo/SidePanel.vue +++ b/src/components/LicenseInfo/SidePanel.vue @@ -2,14 +2,14 @@
-

Apache License 2.0

+

{{ data.licenseName }}

分数 3 类型 - 获准的 + {{ data.category }}
@@ -78,7 +78,11 @@ diff --git a/src/views/Jyh/AIRepair/index.vue b/src/views/Jyh/AIRepair/index.vue index f73f259..106938c 100644 --- a/src/views/Jyh/AIRepair/index.vue +++ b/src/views/Jyh/AIRepair/index.vue @@ -24,7 +24,7 @@
严重 - Morgan + {{ rowItem.title }}
@@ -44,9 +44,9 @@
升级版本 - xxx + 1.7.0 - xxx + 1.9.1
@@ -106,25 +106,27 @@ const tableConfig = ref([ const list = ref([ { expand: true, + title: 'Morgan', data: { listData: [ - { + { securityProblemCode: '1', type: '安全问题', CWEcode: 'CWE-123', - score: 100 + score: 70 }, { securityProblemCode: '2', type: '安全问题', - CWEcode: 'CWE-123', - score: 100 + CWEcode: 'MIT-LICENSE', + score: 89 } ] } }, { expand: true, + title: 'webpack', data: { listData: [ { @@ -136,65 +138,8 @@ const list = ref([ { securityProblemCode: '2', type: '安全问题', - CWEcode: 'CWE-123', - score: 100 - } - ] - } - }, - { - expand: true, - data: { - listData: [ - { - securityProblemCode: '1', - type: '安全问题', - CWEcode: 'CWE-123', - score: 100 - }, - { - securityProblemCode: '2', - type: '安全问题', - CWEcode: 'CWE-123', - score: 100 - } - ] - } - }, - { - expand: true, - data: { - listData: [ - { - securityProblemCode: '1', - type: '安全问题', - CWEcode: 'CWE-123', - score: 100 - }, - { - securityProblemCode: '2', - type: '安全问题', - CWEcode: 'CWE-123', - score: 100 - } - ] - } - }, - { - expand: true, - data: { - listData: [ - { - securityProblemCode: '1', - type: '安全问题', - CWEcode: 'CWE-123', - score: 100 - }, - { - securityProblemCode: '2', - type: '安全问题', - CWEcode: 'CWE-123', - score: 100 + CWEcode: 'MIT-LICENSE', + score: 90 } ] } diff --git a/src/views/Jyh/Home/index.vue b/src/views/Jyh/Home/index.vue index 7410311..b18193c 100644 --- a/src/views/Jyh/Home/index.vue +++ b/src/views/Jyh/Home/index.vue @@ -54,7 +54,7 @@ 搜索 - 批量校验 + 批量校验
@@ -71,11 +71,11 @@
{{ item.subject }} - {{ item.importance }} + {{ tagMap[item.importance].text }}
- {{ item.pulishTime }} + {{ item.publishTime }}
@@ -100,7 +100,9 @@ import { useRoute, useRouter } from 'vue-router'; import AdvanceSearch from '@/components/AdvanceSearch/index.vue'; import { getHomeNoticeList } from '@/api/jyh' import EarlyWarningDetail from '@/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue'; +import { useAccountStore } from '@/stores/user'; +const userStore = useAccountStore(); const route = useRoute(); const router = useRouter(); const inputGlow = ref(false); @@ -121,9 +123,18 @@ const homeSearch = ref(null); const dropdownWidth = ref(0); const selectedCate = ref('软件'); const tagMap = { - '高': '#f66f6a', - '中': '#fac20a', - '低': '#5e7ce0' + 'High': { + text: '高', + color: '#f66f6a' + }, + 'Medium': { + text: '中', + color: '#fac20a' + }, + 'Low': { + text: '低', + color: '#5e7ce0' + } } const searchInput = ref(null); @@ -235,7 +246,6 @@ getNoticeList(); .home-content { font-size: 14px; - height: 50%; width: 50%; display: flex; flex-direction: column; @@ -408,7 +418,7 @@ getNoticeList(); display: flex; align-items: center; gap: 8px; - width: 120px; + width: 150px; flex-shrink: 0; } diff --git a/src/views/Jyh/LicenseInfo/index.vue b/src/views/Jyh/LicenseInfo/index.vue index 4b7a7e1..367fd2a 100644 --- a/src/views/Jyh/LicenseInfo/index.vue +++ b/src/views/Jyh/LicenseInfo/index.vue @@ -4,12 +4,15 @@ + @@ -30,7 +33,7 @@
- + @@ -38,6 +41,8 @@ import { ref } from 'vue'; import SidePanel from '@/components/LicenseInfo/SidePanel.vue'; import { getLicenseList } from '@/api/jyh'; +import NoData from '@/components/NoData/NoData.vue'; +const currentData = ref(null); const pager = ref({ pageIndex: 1, pageSize: 30, @@ -52,7 +57,8 @@ const close = () => { showDetail.value = false; } -const openPanel = () => { +const openPanel = (row) => { + currentData.value = row showDetail.value = true; } @@ -64,7 +70,7 @@ const tableConfig = ref([ sortMethod: null }, { - field: 'licenseType', + field: 'category', header: '许可证种类', sortable: false, sortMethod: null @@ -84,34 +90,41 @@ const tableConfig = ref([ ]) const list = ref([ - { - licenseName: 'Apache License 2.0', - licenseType: '获准的', - affectedComponent: 'org.apache.commons:commons-collections4', - version: '4.4', - }, - { - licenseName: 'Apache License 2.0', - licenseType: '获准的', - affectedComponent: 'org.apache.commons:commons-collections4', - version: '4.4', - }, - { - licenseName: 'Apache License 2.0', - licenseType: '获准的', - affectedComponent: 'org.apache.commons:commons-collections4', - version: '4.4', - }, - { - licenseName: 'Apache License 2.0', - licenseType: '获准的', - affectedComponent: 'org.apache.commons:commons-collections4', - version: '4.4', - } + // { + // licenseName: 'Apache License 2.0', + // licenseType: '获准的', + // affectedComponent: 'org.apache.commons:commons-collections4', + // version: '4.4', + // }, + // { + // licenseName: 'Apache License 2.0', + // licenseType: '获准的', + // affectedComponent: 'org.apache.commons:commons-collections4', + // version: '4.4', + // }, + // { + // licenseName: 'Apache License 2.0', + // licenseType: '获准的', + // affectedComponent: 'org.apache.commons:commons-collections4', + // version: '4.4', + // }, + // { + // licenseName: 'Apache License 2.0', + // licenseType: '获准的', + // affectedComponent: 'org.apache.commons:commons-collections4', + // version: '4.4', + // } ]) const getList = async() => { - const res = await getLicenseList() + const res: any = await getLicenseList(); + if (!res.error) { + console.log(res); + list.value = res.data.data.records; + pager.value.total = res.data.data.records.length; + } else { + list.value = []; + } } getList(); From 4f86eb9eb323754c8ba738f494accbaf0069ed41 Mon Sep 17 00:00:00 2001 From: "@user8949" Date: Wed, 19 Mar 2025 13:15:52 +0800 Subject: [PATCH 2/6] =?UTF-8?q?update:=20=E9=A6=96=E9=A1=B5=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Jyh/Home/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Jyh/Home/index.vue b/src/views/Jyh/Home/index.vue index b18193c..8c7479c 100644 --- a/src/views/Jyh/Home/index.vue +++ b/src/views/Jyh/Home/index.vue @@ -71,7 +71,7 @@
{{ item.subject }} - {{ tagMap[item.importance].text }} + {{ tagMap[item.importance]?.text }}
From 54d10ebdc6703a325a394af94631e2f3707fffbe Mon Sep 17 00:00:00 2001 From: "@user8949" Date: Wed, 19 Mar 2025 13:22:34 +0800 Subject: [PATCH 3/6] =?UTF-8?q?update:=20=E9=A6=96=E9=A1=B5=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Jyh/Home/index.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/views/Jyh/Home/index.vue b/src/views/Jyh/Home/index.vue index 8c7479c..4fe718c 100644 --- a/src/views/Jyh/Home/index.vue +++ b/src/views/Jyh/Home/index.vue @@ -123,6 +123,10 @@ const homeSearch = ref(null); const dropdownWidth = ref(0); const selectedCate = ref('软件'); const tagMap = { + 'Critical': { + text: '致命', + color: '#c7000b' + }, 'High': { text: '高', color: '#f66f6a' @@ -420,6 +424,9 @@ getNoticeList(); gap: 8px; width: 150px; flex-shrink: 0; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } :deep(.devui-timeline-item-data-right) { From 20c85c8e80eb3fe173a2b26cf15f866f8ff54515 Mon Sep 17 00:00:00 2001 From: "@user8949" Date: Wed, 19 Mar 2025 13:29:09 +0800 Subject: [PATCH 4/6] =?UTF-8?q?update:=20=E9=A6=96=E9=A1=B5=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Jyh/Home/index.vue | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/views/Jyh/Home/index.vue b/src/views/Jyh/Home/index.vue index b102c3c..19f600a 100644 --- a/src/views/Jyh/Home/index.vue +++ b/src/views/Jyh/Home/index.vue @@ -71,7 +71,7 @@
{{ item.subject }} - {{ item.importance }} + {{ tagMap[item.importance].text }}
@@ -124,9 +124,22 @@ const homeSearch = ref(null); const dropdownWidth = ref(0); const selectedCate = ref('软件'); const tagMap = { - '高': '#f66f6a', - '中': '#fac20a', - '低': '#5e7ce0' + 'Critical': { + text: '致命', + color: '#c7000b' + }, + 'High': { + text: '高', + color: '#f66f6a' + }, + 'Medium': { + text: '中', + color: '#fac20a' + }, + 'Low': { + text: '低', + color: '#5e7ce0' + } } const searchInput = ref(null); @@ -238,7 +251,6 @@ getNoticeList(); .home-content { font-size: 14px; - height: 50%; width: 50%; display: flex; flex-direction: column; From c1941eb113aa64b692b93b44b64f2d249f5c209e Mon Sep 17 00:00:00 2001 From: "@user8949" Date: Wed, 19 Mar 2025 13:30:27 +0800 Subject: [PATCH 5/6] =?UTF-8?q?update:=20=E9=A6=96=E9=A1=B5=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Jyh/Home/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/Jyh/Home/index.vue b/src/views/Jyh/Home/index.vue index 19f600a..c535444 100644 --- a/src/views/Jyh/Home/index.vue +++ b/src/views/Jyh/Home/index.vue @@ -54,7 +54,7 @@ 搜索
- 批量校验 + 批量校验
@@ -75,7 +75,7 @@
- {{ item.pulishTime }} + {{ item.publishTime }}
From 300faeae48c70a8460fe0299449abd6d85a8c213 Mon Sep 17 00:00:00 2001 From: "@user8949" Date: Wed, 19 Mar 2025 13:32:35 +0800 Subject: [PATCH 6/6] =?UTF-8?q?update:=20=E9=A6=96=E9=A1=B5=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Jyh/Home/index.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/Jyh/Home/index.vue b/src/views/Jyh/Home/index.vue index c535444..ea6bc45 100644 --- a/src/views/Jyh/Home/index.vue +++ b/src/views/Jyh/Home/index.vue @@ -423,8 +423,11 @@ getNoticeList(); display: flex; align-items: center; gap: 8px; - width: 120px; + width: 150px; flex-shrink: 0; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } :deep(.devui-timeline-item-data-right) {