diff --git a/index.html b/index.html index 5605a0e..c46e660 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + diff --git a/public/logo.png b/public/logo.png new file mode 100644 index 0000000..bb3d540 Binary files /dev/null and b/public/logo.png differ diff --git a/src/api/jyh/index.ts b/src/api/jyh/index.ts index 2b7aa46..54a92d9 100644 --- a/src/api/jyh/index.ts +++ b/src/api/jyh/index.ts @@ -142,10 +142,48 @@ export const getVulnList = (data): Promise => { request({ url: `/api/v1/repo/vulnerability/page`, method: 'post', - data, + data }) ); -} +}; + +// 获取SBOM依赖树 +export const dependencyTree = (softwareId: any): Promise => { + return reqCatchV2(() => + request({ + url: `/api/v1/repo/dependency/tree`, + method: 'POST', + data: { + softwareId, + current: 1, + size: 99999 + } + }) + ); +}; +// 获取开发者社区信息 +export const communityInfo = (softwareId: any): Promise => { + return reqCatchV2(() => + request({ + url: `/api/v1/repo/community/info`, + method: 'POST', + data: { + softwareId + } + }) + ); +}; + +// 编辑用户信息(包含订阅默认预警方式) +export const userEdit = (data: any): Promise => { + return reqCatchV2(() => + request({ + url: `/api/v1/user/edit`, + method: 'POST', + data + }) + ); +}; // 获取漏洞数据 export const getVulnDetail = (data): Promise => { @@ -153,21 +191,65 @@ export const getVulnDetail = (data): Promise => { request({ url: `/api/v1/repo/vulnerability/info`, method: 'POST', - data, + data }) ); -} +}; // 迁移批量导入 -export function repoImport(data: types.commonRepoReqType){ +export function repoImport(data: types.commonRepoReqType) { return reqCatchV2(() => request({ url: `/api/v1/home/software/valid`, method: 'post', data, headers: { - 'Content-Type': 'multipart/form-data', // 设置请求头 - }, + 'Content-Type': 'multipart/form-data' // 设置请求头 + } + }) + ); +} + +// 个人中心-获取预警列表 +export const getNoticeList = (data): Promise => { + return reqCatchV2(() => + request({ + url: `/api/v1/alert/notice/list`, + method: 'POST', + data + }) + ); +}; + +// 个人中心-获取组织级预警列表 +export const getgroupNoticeList = (data): Promise => { + return reqCatchV2(() => + request({ + url: `/api/v1/alert/group/notice/list`, + method: 'POST', + data + }) + ); +}; + +// 个人中心-获取订阅列表 +export const getSubscribeList = (data): Promise => { + return reqCatchV2(() => + request({ + url: `/api/v1/alert/subscribe/list`, + method: 'POST', + data, + }) + ); +} + +// 个人中心-获取组织级订阅列表 +export const getGroupSubscribeList = (data): Promise => { + return reqCatchV2(() => + request({ + url: `/api/v1/alert/group/subscribe/list`, + method: 'POST', + data, }) ); } diff --git a/src/api/organizationManage/organizationManageApi.ts b/src/api/organizationManage/organizationManageApi.ts index cdeaf3c..ee46843 100644 --- a/src/api/organizationManage/organizationManageApi.ts +++ b/src/api/organizationManage/organizationManageApi.ts @@ -40,7 +40,7 @@ export function inviteOrganizationMemberApi(params: { groupId: number, username: export function deleteOrganizationMemberApi(params: { groupId: number, username: string }): Promise> { return request({ url: `/api/v1/group/member/remove`, - method: 'delete', + method: 'post', data: params, }); } diff --git a/src/assets/imgs/logo.png b/src/assets/imgs/logo.png index 3b74073..bb3d540 100644 Binary files a/src/assets/imgs/logo.png and b/src/assets/imgs/logo.png differ diff --git a/src/assets/imgs/logo2.png b/src/assets/imgs/logo2.png new file mode 100644 index 0000000..6a37d13 Binary files /dev/null and b/src/assets/imgs/logo2.png differ diff --git a/src/components/ChartLine/index.vue b/src/components/ChartLine/index.vue index ccccbde..fffa54f 100644 --- a/src/components/ChartLine/index.vue +++ b/src/components/ChartLine/index.vue @@ -1,5 +1,5 @@ - diff --git a/src/components/SettingTable/index.vue b/src/components/SettingTable/index.vue index 8ea7dd3..2967f43 100644 --- a/src/components/SettingTable/index.vue +++ b/src/components/SettingTable/index.vue @@ -368,7 +368,7 @@ const columns = ref([ { 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: '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 }, diff --git a/src/views/Jyh/Home/index.vue b/src/views/Jyh/Home/index.vue index 4fe718c..6f55e3c 100644 --- a/src/views/Jyh/Home/index.vue +++ b/src/views/Jyh/Home/index.vue @@ -2,7 +2,7 @@
- logo + logo

可信开源代码库

- + @@ -100,9 +100,10 @@ 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'; +import { useDiscussGetUserInfo } from '@/api/discussion/hook'; -const userStore = useAccountStore(); +// 获取当前用户信息 & 是否登录 +const { isLogin = false, userInfo = {}} = useDiscussGetUserInfo(); const route = useRoute(); const router = useRouter(); const inputGlow = ref(false); @@ -202,7 +203,7 @@ const openWarningDetail = (event, index) => { item.dotColor = ''; } }) - + warningModalVisable.value = true; currentWarning.value = event; } @@ -269,7 +270,7 @@ getNoticeList(); img { width: 50px; - filter: brightness(0); + //filter: brightness(0); } } @@ -409,7 +410,7 @@ getNoticeList(); flex: 1; overflow: hidden; margin-right: 8px; - + span { white-space: nowrap; overflow: hidden; diff --git a/src/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue b/src/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue index 42ecfba..df84f8c 100644 --- a/src/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue +++ b/src/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue @@ -1,7 +1,7 @@