Merge branch 'wsw' into 'master'
# Conflicts: # conflict src/views/Jyh/Home/index.vue
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
<div class="ai-panel-header-title">
|
||||
<div>
|
||||
<d-tag color="red-w98" class="mr-1" size="sm">严重</d-tag>
|
||||
<span>Morgan</span>
|
||||
<span>{{ rowItem.title }}</span>
|
||||
</div>
|
||||
<div style="cursor: pointer; display: flex; gap: 8px; align-items: center;" @click="rowItem.expand = !rowItem.expand">
|
||||
<img style="width: 14px; height: 14px;" src="@/assets/imgs/jyh/collapseIcon.png">
|
||||
@@ -44,9 +44,9 @@
|
||||
</div>
|
||||
<div>
|
||||
<span class="weak-text">升级版本</span>
|
||||
<span>xxx</span>
|
||||
<span>1.7.0</span>
|
||||
<img src="@/assets/imgs/jyh/ic_digital_power_next_step_@2x.png" class="icon-sm">
|
||||
<span>xxx</span>
|
||||
<span>1.9.1</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</d-dropdown-menu>
|
||||
<d-button color="primary" variant="solid" @click="search">搜索</d-button>
|
||||
</div>
|
||||
<d-button @click="check" ref="origin" icon="share" class="batch-btn">批量校验</d-button>
|
||||
<d-button v-if="isLogin" @click="check" ref="origin" icon="share" class="batch-btn">批量校验</d-button>
|
||||
<div class="home-information">
|
||||
<div class="info-title">
|
||||
<div class="sub-title">
|
||||
@@ -87,11 +87,11 @@
|
||||
@click="openWarningDetail(item, index)"
|
||||
>
|
||||
<span>{{ item.subject }}</span>
|
||||
<d-tag :color="tagMap[item.importance]" size="sm">{{ item.importance }}</d-tag>
|
||||
<d-tag v-if="item.importance" :color="tagMap[item.importance].color" size="sm">{{ tagMap[item.importance].text }}</d-tag>
|
||||
</div>
|
||||
<div class="time-container">
|
||||
<d-icon name="icon-time"></d-icon>
|
||||
{{ item.pulishTime }}
|
||||
{{ item.publishTime }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -117,6 +117,7 @@ import { useAccount } from '@/utils/hooks/useAccount';
|
||||
import AdvanceSearch from '@/components/AdvanceSearch/index.vue';
|
||||
import { getHomeNoticeList } from '@/api/jyh';
|
||||
import EarlyWarningDetail from '@/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue';
|
||||
import { useDiscussGetUserInfo } from '@/api/discussion/hook';
|
||||
|
||||
const { accountInfo } = useAccount();
|
||||
|
||||
@@ -141,10 +142,23 @@ 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);
|
||||
const openAdvancedSearch = () => {
|
||||
@@ -253,7 +267,6 @@ getNoticeList();
|
||||
|
||||
.home-content {
|
||||
font-size: 14px;
|
||||
height: 80%;
|
||||
width: 50%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -431,8 +444,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) {
|
||||
|
||||
@@ -3,16 +3,20 @@
|
||||
<div class="license-info-content">
|
||||
<d-layout>
|
||||
<d-content class="dcontent">
|
||||
<d-table :data="list" style="width: 100%;">
|
||||
<d-table class="jyh-table" v-if="list.length>0" :data="list" style="width: 100%;">
|
||||
<template #empty>
|
||||
<NoData></NoData>
|
||||
</template>
|
||||
<d-column type="index" width="40"></d-column>
|
||||
<d-column v-for="(column, index) in tableConfig" :field="column.field"
|
||||
:header="column.header" :sortable="column.sortable" :sort-method="column.sortMethod"></d-column>
|
||||
<d-column header="详情" width="100px">
|
||||
<template #default="scope">
|
||||
<a class="devui-link" @click="openPanel">查看</a>
|
||||
<a class="devui-link" @click="openPanel(scope.row)">查看</a>
|
||||
</template>
|
||||
</d-column>
|
||||
</d-table>
|
||||
<NoData v-else :small="false"></NoData>
|
||||
</d-content>
|
||||
</d-layout>
|
||||
</div>
|
||||
@@ -30,7 +34,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<d-drawer v-model="showDetail" style="width: 800px; padding: 20px" >
|
||||
<SidePanel @close="close"/>
|
||||
<SidePanel :data="currentData" @close="close"/>
|
||||
</d-drawer>
|
||||
</template>
|
||||
|
||||
@@ -38,6 +42,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 +58,8 @@ const close = () => {
|
||||
showDetail.value = false;
|
||||
}
|
||||
|
||||
const openPanel = () => {
|
||||
const openPanel = (row) => {
|
||||
currentData.value = row
|
||||
showDetail.value = true;
|
||||
}
|
||||
|
||||
@@ -64,7 +71,7 @@ const tableConfig = ref([
|
||||
sortMethod: null
|
||||
},
|
||||
{
|
||||
field: 'licenseType',
|
||||
field: 'category',
|
||||
header: '许可证种类',
|
||||
sortable: false,
|
||||
sortMethod: null
|
||||
@@ -84,34 +91,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();
|
||||
</script>
|
||||
|
||||
@@ -55,6 +55,7 @@ import { acceptInvite, getInviteListData } from '@/api/jyh';
|
||||
import { ref, shallowReactive } from 'vue';
|
||||
import NoData from "@/components/NoData/NoData.vue";
|
||||
import { Message } from 'vue-devui';
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const noticeTableData = ref([]);
|
||||
const pager = shallowReactive({
|
||||
@@ -73,7 +74,8 @@ const queryInviteListData = async () => {
|
||||
noticeTableData.value = data.data.data.data.map(item => {
|
||||
return {
|
||||
...item,
|
||||
content: `尊敬的用户,您好!为更好地整合资源、协同开发,现诚邀您加入${item.name}。`
|
||||
content: `尊敬的用户,您好!为更好地整合资源、协同开发,现诚邀您加入组织【${item.name}】。`,
|
||||
createTime: dayjs(item.createTime).format('YYYY-MM-DD HH:mm:ss'),
|
||||
}
|
||||
});
|
||||
pager.total = data.data.data.data.length;
|
||||
|
||||
@@ -142,6 +142,7 @@ import {
|
||||
type UserInfoType,
|
||||
} from '@/api/organizationManage/organizationManageType';
|
||||
import {getUserInfo} from "@/api/user";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const userInfo = shallowRef<UserInfoType>({
|
||||
username: '',
|
||||
@@ -323,7 +324,9 @@ async function getMemberList() {
|
||||
try {
|
||||
const res = await getOrganizationMemberListApi({ groupId: organizationInfo.value.groupId });
|
||||
if (res.data?.code === 200) {
|
||||
originMemberList = res.data?.data;
|
||||
originMemberList = res.data?.data.map(item => {
|
||||
return { ...item, createTime: dayjs(item.createTime).format('YYYY-MM-DD HH:mm:ss') };
|
||||
});
|
||||
pager.total = originMemberList.length;
|
||||
updateFilterTableList();
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="BatchVerify">
|
||||
<div class="search-form">
|
||||
<div class="search-form" v-if="isLogin">
|
||||
<FileUploadButton
|
||||
buttonText="批量导入"
|
||||
accept=".xlsx"
|
||||
@@ -105,6 +105,7 @@
|
||||
<template #default="scope">
|
||||
<d-button
|
||||
variant="text"
|
||||
v-if="scope.row.validStatus == 0"
|
||||
:disabled="scope.row.validStatus !== 0"
|
||||
>
|
||||
申请入库
|
||||
@@ -238,6 +239,9 @@ const openDelete = (row: any) => {
|
||||
};
|
||||
|
||||
const getReleaseList = async() => {
|
||||
if (!isLogin.value) {
|
||||
return;
|
||||
}
|
||||
const { data, error } = await releasePage({ current: pager.value.pageIndex,size: pager.value.pageSize });
|
||||
if (!error && data) {
|
||||
debugger
|
||||
@@ -248,7 +252,7 @@ const getReleaseList = async() => {
|
||||
};
|
||||
|
||||
onMounted(async() => {
|
||||
// getReleaseList();
|
||||
getReleaseList();
|
||||
});
|
||||
|
||||
const filterVerifyResult = (type) => {
|
||||
|
||||
@@ -84,8 +84,9 @@
|
||||
<div class="mt-20 mb-20 flex justify-end">
|
||||
<d-pagination size="md" :page-size-options="[10, 20, 50]" :total="pager.total"
|
||||
v-model:pageSize="pager.pageSize" v-model:pageIndex="pager.pageIndex" :max-items="5"
|
||||
:can-change-page-size="true" :can-view-total="true" total-item-text="总计" @page-index-change="changeIndex()"
|
||||
@page-size-change="changeSize()" />
|
||||
:can-change-page-size="true" :can-view-total="true" total-item-text="总计"
|
||||
@page-index-change="getReleaseList()"
|
||||
@page-size-change="getReleaseList()" />
|
||||
</div>
|
||||
|
||||
<!-- 删除组件 -->
|
||||
@@ -118,6 +119,7 @@ import { Message } from 'vue-devui';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import CountryModal from './CountryModal.vue'
|
||||
import OrgModal from './OrgModal.vue'
|
||||
import NoData from '@/components/NoData/NoData.vue';
|
||||
import { useAccountStore } from '@/stores/user';
|
||||
const { formatTime } = useTimeFormat();
|
||||
import { releasePage } from '@/api/jyh';
|
||||
@@ -230,15 +232,6 @@ const gotoDetail = (row) => {
|
||||
path: 'repoDetail/' + row.id
|
||||
});
|
||||
};
|
||||
// 分页
|
||||
const changeIndex = () => {
|
||||
// getGroupClaListData();
|
||||
};
|
||||
|
||||
const changeSize = () => {
|
||||
pager.value.pageIndex = 1;
|
||||
// getGroupClaListData();
|
||||
};
|
||||
|
||||
const repoFun = (arr: any) => {
|
||||
return arr ? (arr.length > 3 ? arr.slice(0, 3) : arr) : [];
|
||||
@@ -305,7 +298,9 @@ const getReleaseList = async() => {
|
||||
...newFormData.value,
|
||||
releaseDateStart: newFormData.value.dateRange&&newFormData.value.dateRange.length>0?newFormData.value.dateRange[0]:'',
|
||||
releaseDateEnd: newFormData.value.dateRange&&newFormData.value.dateRange.length>0?newFormData.value.dateRange[1]:'',
|
||||
current: pager.value.pageIndex,size: pager.value.pageSize });
|
||||
current: pager.value.pageIndex,
|
||||
size: pager.value.pageSize
|
||||
});
|
||||
if (!error && data) {
|
||||
tableData.value = data.data.records;
|
||||
pager.value.total = data.data.total;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<d-tab id="OssQuery" title="软件列表">
|
||||
<OssQuery/>
|
||||
</d-tab>
|
||||
<d-tab id="BatchVerify" title="软件校验">
|
||||
<d-tab v-if="isLogin" id="BatchVerify" title="软件校验">
|
||||
<BatchVerify/>
|
||||
</d-tab>
|
||||
</d-tabs>
|
||||
@@ -28,9 +28,10 @@ import { getOrgInfo } from '@/views/Org/hooks/orgInfo';
|
||||
import { Message } from 'vue-devui';
|
||||
import OssQuery from './Components/OssQuery.vue';
|
||||
import BatchVerify from './Components/BatchVerify.vue';
|
||||
import { useAccountStore } from '@/stores/user';
|
||||
const { namespace } = getOrgInfo();
|
||||
|
||||
|
||||
const { isLogin } = useAccountStore();
|
||||
// 获取当前路由
|
||||
const route = useRoute();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</div>
|
||||
<Card simple class="jyh-card mt-3">
|
||||
<div class="clear-padding">
|
||||
<d-table :indent="32" @check-change="treeCheckChange" :data="baseTreeTableData1" row-key="id">
|
||||
<d-table class="jyh-table" v-if="baseTreeTableData1.length>0" :indent="32" @check-change="treeCheckChange" :data="baseTreeTableData1" row-key="id">
|
||||
<d-column field="firstName" header="组织名称" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<a class="devui-link" @click="showDetail = true">{{ scope.row.firstName }}</a>
|
||||
@@ -13,6 +13,7 @@
|
||||
</d-column>
|
||||
<d-column field="lastName" header="版本"></d-column>
|
||||
</d-table>
|
||||
<NoData v-else :small="false"></NoData>
|
||||
</div>
|
||||
</Card>
|
||||
<d-drawer v-model="showDetail" style="width: 800px; padding: 20px">
|
||||
@@ -22,6 +23,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import SBOMDetail from './SBOMDetail.vue';
|
||||
import NoData from '@/components/NoData/NoData.vue';
|
||||
import { dependencyTree } from '@/api/jyh';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="soft-detail-container">
|
||||
<div class="mt-3">
|
||||
<d-table class="jyh-table" v-if="tableData.length" :striped="false" :data="valLists" table-layout="auto">
|
||||
<d-table class="jyh-table" v-if="tableData.length>0" :striped="false" :data="tableData" table-layout="auto">
|
||||
<d-column type="index" width="40"></d-column>
|
||||
<d-column field="vulnId" header="编码" filterable :filter-list="filterList" @filter-change="handleFilterChange">
|
||||
<template #default="scope">
|
||||
@@ -66,7 +66,7 @@
|
||||
</d-column>
|
||||
</d-table>
|
||||
|
||||
<DataPanel v-else skeleton :card="false" :empty="true"> </DataPanel>
|
||||
<NoData v-else :small="false"></NoData>
|
||||
</div>
|
||||
|
||||
<div class="mt-20 mb-20 flex justify-end">
|
||||
@@ -80,8 +80,8 @@
|
||||
:can-change-page-size="true"
|
||||
:can-view-total="true"
|
||||
total-item-text="总计"
|
||||
@page-index-change="changeIndex()"
|
||||
@page-size-change="changeSize()"
|
||||
@page-index-change="fetchVulnList"
|
||||
@page-size-change="fetchVulnList"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
confirmColor="danger"
|
||||
>
|
||||
<span class="inline-block text-G900 text-sm font-normal leading-[20px] break-all"
|
||||
>你确认删除此项:{{ item.cla_name }} ?</span
|
||||
>你确认删除此项:{{ item.cla_name }} ?</span
|
||||
>
|
||||
</GModal>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
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';
|
||||
import { ref, reactive, onMounted,defineProps } from 'vue';
|
||||
import { getGroupClaList, setGroupClaStatus, deleteGroupCla } from '@/api/cla';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import { GModal } from '@/components/Setting/index';
|
||||
@@ -119,23 +119,10 @@ import { getOrgInfo } from '@/views/Org/hooks/orgInfo';
|
||||
import { Message } from 'vue-devui';
|
||||
import VulnerabilityDetail from '@/views/Jyh/Version/Detail/VulnerabilityDetail.vue';
|
||||
import { getVulnList } from '@/api/jyh';
|
||||
import NoData from '@/components/NoData/NoData.vue';
|
||||
const { namespace } = getOrgInfo();
|
||||
|
||||
const tableData = ref([
|
||||
{
|
||||
versionName: 'HWPSIRT-2022-29348',
|
||||
version: '未修复',
|
||||
code: '7.8 (CVSS3.1)',
|
||||
name: 'CVE-2013-0293',
|
||||
type: '客户指定预装软件(原预装软件)',
|
||||
risk: '中',
|
||||
useType: '软件',
|
||||
versionCode: '2.29.0',
|
||||
key: '',
|
||||
created: '2025-03-10 17:25:19',
|
||||
updated: '2025-03-10 17:25:19'
|
||||
}
|
||||
]);
|
||||
const propsData = defineProps(['versionId']);
|
||||
const tableData = ref([]);
|
||||
const formData = ref({
|
||||
title: '',
|
||||
type: '',
|
||||
@@ -170,16 +157,6 @@ const openDelete = (row: any) => {
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
// 分页
|
||||
const changeIndex = () => {
|
||||
// getGroupClaListData();
|
||||
};
|
||||
|
||||
const changeSize = () => {
|
||||
pager.value.pageIndex = 1;
|
||||
// getGroupClaListData();
|
||||
};
|
||||
|
||||
const repoFun = (arr: any) => {
|
||||
return arr ? (arr.length > 3 ? arr.slice(0, 3) : arr) : [];
|
||||
};
|
||||
@@ -248,20 +225,30 @@ const openVulnDetail = (row) => {
|
||||
currentVuln.value = row;
|
||||
} else {
|
||||
currentVuln.value = {
|
||||
softwareId: 47,
|
||||
// softwareId: 47,
|
||||
softwareId: propsData.versionId,
|
||||
id: 72
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
const valLists = ref([]);
|
||||
onMounted(async () => {
|
||||
const data = await getVulnList({
|
||||
softwareId: 47,
|
||||
current: 1,
|
||||
size: 10
|
||||
const fetchVulnList = async () => {
|
||||
const { data } = await getVulnList({
|
||||
// softwareId: 47,
|
||||
softwareId: propsData.versionId,
|
||||
componentId: '',
|
||||
current: pager.value.pageIndex,
|
||||
size: pager.value.pageSize,
|
||||
});
|
||||
valLists.value = data?.data?.data?.data?.records || [];
|
||||
if(data.data.code===200) {
|
||||
tableData.value = data?.data?.data?.records || [];
|
||||
pager.value.total = data?.data?.data?.total || [];
|
||||
}
|
||||
}
|
||||
|
||||
const valLists = ref([]);
|
||||
onMounted( () => {
|
||||
fetchVulnList()
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -269,7 +256,7 @@ onMounted(async () => {
|
||||
@import 'devui-theme/styles-var/devui-var.scss';
|
||||
|
||||
.soft-detail-container {
|
||||
padding: 7px 20px 12px;
|
||||
//padding: 7px 20px 12px;
|
||||
}
|
||||
|
||||
.error {
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getVulnDetail } from '@/api/jyh';
|
||||
import { ref } from 'vue';
|
||||
import { ref,defineProps } from 'vue';
|
||||
|
||||
const propsData = defineProps(['softwareId', 'vulnId', 'vulnInfo']);
|
||||
const vulnDetail = ref({});
|
||||
@@ -190,4 +190,4 @@ queryVulnDetail();
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
</d-tabs>
|
||||
</div>
|
||||
<div class="version-detail-content">
|
||||
<version-info v-if="selectTab === 'bbxx'" @changeTabs="changeTabs"></version-info>
|
||||
<vulnerabilities-list v-else-if="selectTab === 'ldxx'"></vulnerabilities-list>
|
||||
<community-info v-else-if="selectTab === 'communityInfo'"></community-info>
|
||||
<Dependence v-else-if="selectTab === 'ylgx'"></Dependence>
|
||||
<SBOM v-else-if="selectTab === 'SBOM'" />
|
||||
<AIRepair v-else-if="selectTab === 'ai'"></AIRepair>
|
||||
<LicenseInfo v-else-if="selectTab === 'licenseInfo'"></LicenseInfo>
|
||||
<version-info :versionId="versionId" v-if="selectTab === 'bbxx'" @changeTabs="changeTabs"></version-info>
|
||||
<vulnerabilities-list :versionId="versionId" v-else-if="selectTab === 'ldxx'"></vulnerabilities-list>
|
||||
<community-info :versionId="versionId" v-else-if="selectTab === 'communityInfo'"></community-info>
|
||||
<Dependence :versionId="versionId" v-else-if="selectTab === 'ylgx'"></Dependence>
|
||||
<SBOM :versionId="versionId" v-else-if="selectTab === 'SBOM'" />
|
||||
<AIRepair :versionId="versionId" v-else-if="selectTab === 'ai'"></AIRepair>
|
||||
<LicenseInfo :versionId="versionId" v-else-if="selectTab === 'licenseInfo'"></LicenseInfo>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -86,6 +86,7 @@ const ReleaseInfo = ref({
|
||||
openSourceLicenseList: [],
|
||||
referenceInfo: {},
|
||||
});
|
||||
const versionId = route.params.versionId; // 获取路由参数 versionId
|
||||
|
||||
const getReleaseInfo = async(versionId) => {
|
||||
const { data, error } = await releaseInfo({ softwareId: versionId });
|
||||
|
||||
Reference in New Issue
Block a user