fix: bugs
This commit is contained in:
@@ -122,29 +122,16 @@ export function getLicenseList() {
|
||||
});
|
||||
}
|
||||
|
||||
// 获取详情漏洞列表
|
||||
export function getVulnerabilityList() {
|
||||
return request({
|
||||
url: '/api/v1/repo/vulnerability/page',
|
||||
method: 'GET',
|
||||
params: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
softwareId: 47
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 获取漏洞数据
|
||||
export const getVulnList = (data): Promise<any> => {
|
||||
return reqCatchV2(() =>
|
||||
request({
|
||||
url: `/api/v1/repo/vulnerability/page`,
|
||||
method: 'post',
|
||||
data,
|
||||
data
|
||||
})
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
// 获取漏洞数据
|
||||
export const getVulnDetail = (data): Promise<any> => {
|
||||
@@ -152,7 +139,22 @@ export const getVulnDetail = (data): Promise<any> => {
|
||||
request({
|
||||
url: `/api/v1/repo/vulnerability/info`,
|
||||
method: 'POST',
|
||||
data,
|
||||
data
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
// 获取漏洞数据
|
||||
export const dependencyTree = (softwareId: any): Promise<any> => {
|
||||
return reqCatchV2(() =>
|
||||
request({
|
||||
url: `/api/v1/repo/dependency/tree`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
softwareId,
|
||||
current: 1,
|
||||
size: 99999
|
||||
}
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
@@ -30,9 +30,11 @@
|
||||
<GIcon name="gt-plane-add" size="16px" color="#9C9DB4" />
|
||||
<span>新建</span>
|
||||
</d-button>
|
||||
<div class="cursor-pointer hidden-m" @click="handleLogin('login')" v-if="inSearch"><span>搜索记录</span></div>
|
||||
<d-button variant="solid" color="primary" @click="handleLogin('login')">登录</d-button>
|
||||
<div class="cursor-pointer hidden-m" @click="handleLogin('login')" v-if="inSearch">
|
||||
<span>搜索记录</span>
|
||||
</div>
|
||||
<d-button @click="handleLogin('register')" class="min-w-[64px]">注册</d-button>
|
||||
<d-button variant="solid" color="primary" @click="handleLogin('login')">Gitcode账号登录</d-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<!--ai copilot-->
|
||||
@@ -109,9 +111,7 @@ const { isMobile } = usePageResize();
|
||||
|
||||
/* store 用户信息 */
|
||||
/* @test 后面将清除 */
|
||||
watchEffect(() => {
|
||||
|
||||
});
|
||||
watchEffect(() => {});
|
||||
microApp.router.beforeEach({
|
||||
'micoro-app-homeweb-app': (to, from) => {
|
||||
if (to.pathname === '/search') {
|
||||
@@ -150,7 +150,7 @@ $header-bg: #fff;
|
||||
}
|
||||
.g-header-copilot {
|
||||
background: rgba(41, 81, 224, 1);
|
||||
color: #FFF;
|
||||
color: #fff;
|
||||
width: 120px;
|
||||
border-radius: 48px;
|
||||
height: 32px;
|
||||
@@ -159,7 +159,7 @@ $header-bg: #fff;
|
||||
cursor: pointer;
|
||||
justify-content: center;
|
||||
&:hover {
|
||||
background: rgba(41, 81, 224, .8);
|
||||
background: rgba(41, 81, 224, 0.8);
|
||||
}
|
||||
}
|
||||
.g-toolbar {
|
||||
@@ -171,7 +171,7 @@ $header-bg: #fff;
|
||||
flex-basis: 56px;
|
||||
overflow: hidden;
|
||||
padding: 0 24px;
|
||||
border-bottom: 1px solid #F1F1F8;
|
||||
border-bottom: 1px solid #f1f1f8;
|
||||
:deep(.devui-button) {
|
||||
padding: 6px 16px;
|
||||
border-radius: $add-radius;
|
||||
@@ -209,7 +209,7 @@ $header-bg: #fff;
|
||||
border-bottom-color: transparent !important;
|
||||
}
|
||||
&.border-b-show {
|
||||
border-bottom-color: #F1F1F8 !important;
|
||||
border-bottom-color: #f1f1f8 !important;
|
||||
}
|
||||
}
|
||||
.g-header-gray {
|
||||
@@ -261,7 +261,7 @@ $header-bg: #fff;
|
||||
display: none;
|
||||
}
|
||||
.g-header-copilot {
|
||||
display: none!important;;
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<Card simple class="jyh-card mt-3">
|
||||
<div class="card-title">组织预警通知列表</div>
|
||||
<div class="mb-3">
|
||||
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="licenseTableData">
|
||||
<d-column field="code" header="时间"></d-column>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<Card simple class="jyh-card mt-3">
|
||||
<div class="card-title">个人预警通知列表</div>
|
||||
<div class="mb-3">
|
||||
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="licenseTableData">
|
||||
<d-column field="code" header="时间"></d-column>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="invitation-notice-container">
|
||||
<Card simple class="jyh-card mt-3">
|
||||
<div class="card-title">邀请通知列表</div>
|
||||
<div class="mb-3">
|
||||
<d-table
|
||||
class="jyh-table jyh-table-2"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<Card simple class="jyh-card mt-3">
|
||||
<div class="card-title">组织订阅列表</div>
|
||||
<div class="mb-3">
|
||||
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
||||
<d-column field="code" header="订阅时间"></d-column>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<Card simple class="jyh-card mt-3">
|
||||
<div class="card-title">个人订阅列表</div>
|
||||
<div class="mb-3">
|
||||
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
||||
<d-column field="code" header="订阅时间"></d-column>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<div class="font-bold mb-[16px]">预警通知设置</div>
|
||||
</div>
|
||||
<d-form layout="vertical">
|
||||
<d-form-item field="radio" label="是否开启邮件通知">
|
||||
<d-form-item field="radio" label="是否开启预警通知">
|
||||
<d-radio-group direction="row" v-model="radio">
|
||||
<d-radio value="0">开启</d-radio>
|
||||
<d-radio value="1">关闭</d-radio>
|
||||
@@ -38,15 +38,15 @@
|
||||
</d-form>
|
||||
</d-card>
|
||||
<div class="flex">
|
||||
<d-button variant="solid" class="mr-[8px]">提交</d-button>
|
||||
<d-button color="secondary" class="mr-[8px]">保存草稿</d-button>
|
||||
<d-button variant="solid" class="mr-[8px]">保存</d-button>
|
||||
<!-- <d-button color="secondary" class="mr-[8px]">保存草稿</d-button> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, shallowRef } from 'vue';
|
||||
const radio = ref('1');
|
||||
const radio = ref('0');
|
||||
|
||||
const forms = reactive({
|
||||
name: '',
|
||||
|
||||
@@ -1,28 +1,22 @@
|
||||
<template>
|
||||
<div class="soft-detail-container">
|
||||
<div class="mt-3">
|
||||
<d-table class="jyh-table" v-if="tableData.length" :striped="false" :data="tableData" table-layout="auto">
|
||||
<d-table class="jyh-table" v-if="tableData.length" :striped="false" :data="valLists" table-layout="auto">
|
||||
<d-column type="index" width="40"></d-column>
|
||||
<d-column
|
||||
field="versionName"
|
||||
header="编码"
|
||||
filterable
|
||||
:filter-list="filterList"
|
||||
@filter-change="handleFilterChange"
|
||||
>
|
||||
<d-column field="vulnId" header="编码" filterable :filter-list="filterList" @filter-change="handleFilterChange">
|
||||
<template #default="scope">
|
||||
<a @click="openVulnDetail(scope.row)">{{ scope.row.versionName }}</a>
|
||||
<a @click="openVulnDetail(scope.row)">{{ scope.row.vulnId }}</a>
|
||||
</template>
|
||||
</d-column>
|
||||
<d-column
|
||||
field="name"
|
||||
field="cweId"
|
||||
header="CVE ID"
|
||||
filterable
|
||||
:filter-list="filterList"
|
||||
@filter-change="handleFilterChange"
|
||||
></d-column>
|
||||
<d-column
|
||||
field="code"
|
||||
field="cvssScore"
|
||||
header="CVSS 打分"
|
||||
filterable
|
||||
:filter-list="filterList"
|
||||
@@ -40,7 +34,7 @@
|
||||
</template>
|
||||
</d-column>
|
||||
<d-column
|
||||
field="versionCode"
|
||||
field="severity"
|
||||
header="漏洞级别"
|
||||
sortable
|
||||
:sort-method="sortNameMethod"
|
||||
@@ -49,11 +43,11 @@
|
||||
@filter-change="handleFilterChange"
|
||||
>
|
||||
<template #default="scope">
|
||||
<a>{{ scope.row.versionCode }}</a>
|
||||
<a>{{ scope.row.severity }}</a>
|
||||
</template>
|
||||
</d-column>
|
||||
<d-column
|
||||
field="versionCode"
|
||||
field="fixVersion"
|
||||
header="补丁版本"
|
||||
sortable
|
||||
:sort-method="sortNameMethod"
|
||||
@@ -62,10 +56,14 @@
|
||||
@filter-change="handleFilterChange"
|
||||
>
|
||||
<template #default="scope">
|
||||
<a>{{ scope.row.versionCode }}</a>
|
||||
<a>{{ scope.row.fixVersion }}</a>
|
||||
</template>
|
||||
</d-column>
|
||||
<d-column field="publishDate" header="补丁修复时间" fixed-right="0px">
|
||||
<template #default="scope">
|
||||
{{ dayjs(scope.row.publishDate).format('YYYY-MM-DD') }}
|
||||
</template>
|
||||
</d-column>
|
||||
<d-column field="created" header="补丁修复时间" fixed-right="0px"></d-column>
|
||||
</d-table>
|
||||
|
||||
<DataPanel v-else skeleton :card="false" :empty="true"> </DataPanel>
|
||||
@@ -102,13 +100,14 @@
|
||||
</GModal>
|
||||
|
||||
<!-- 漏洞详情 -->
|
||||
<d-drawer v-model="vulnDetailVisable" style="width: auto;">
|
||||
<d-drawer v-model="vulnDetailVisable" style="width: auto">
|
||||
<VulnerabilityDetail :softwareId="currentVuln.softwareId" :vulnId="currentVuln.id"></VulnerabilityDetail>
|
||||
</d-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import * as dayjs from 'dayjs';
|
||||
import SettingTitle from '@/components/Setting/SettingTitle/index.vue';
|
||||
import SettingText from '@/components/Setting/SettingText/index.vue';
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
@@ -119,7 +118,7 @@ import { reqCatch } from '@/utils/catch';
|
||||
import { getOrgInfo } from '@/views/Org/hooks/orgInfo';
|
||||
import { Message } from 'vue-devui';
|
||||
import VulnerabilityDetail from '@/views/Jyh/Version/Detail/VulnerabilityDetail.vue';
|
||||
import { getVulnerabilityList } from '@/api/jyh';
|
||||
import { getVulnList } from '@/api/jyh';
|
||||
const { namespace } = getOrgInfo();
|
||||
|
||||
const tableData = ref([
|
||||
@@ -251,9 +250,19 @@ const openVulnDetail = (row) => {
|
||||
currentVuln.value = {
|
||||
softwareId: 47,
|
||||
id: 72
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const valLists = ref([]);
|
||||
onMounted(async () => {
|
||||
const data = await getVulnList({
|
||||
softwareId: 47,
|
||||
current: 1,
|
||||
size: 10
|
||||
});
|
||||
valLists.value = data?.data?.data?.data?.records || [];
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user