漏洞信息接口对接参数修改

This commit is contained in:
付民康
2025-03-19 16:20:20 +08:00
parent 4acad9ce30
commit 081b6c74e3
3 changed files with 24 additions and 27 deletions

View File

@@ -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">
@@ -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: '',
@@ -248,20 +235,28 @@ 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,
const fetchVulnList = async () => {
const { data } = await getVulnList({
// softwareId: 47,
softwareId: propsData.versionId,
current: 1,
size: 10
});
valLists.value = data?.data?.data?.data?.records || [];
if(data.data.code===200) {
tableData.value = data?.data?.data?.records || [];
}
}
const valLists = ref([]);
onMounted( () => {
fetchVulnList()
});
</script>
@@ -269,7 +264,7 @@ onMounted(async () => {
@import 'devui-theme/styles-var/devui-var.scss';
.soft-detail-container {
padding: 7px 20px 12px;
//padding: 7px 20px 12px;
}
.error {