fix: fix issue
This commit is contained in:
@@ -72,9 +72,13 @@ export function getHomeNoticeList() {
|
||||
// 获取依赖关系列表
|
||||
export function getDepencyList(softwareId: string) {
|
||||
return request({
|
||||
url: '/api/v1/repo/release/info',
|
||||
method: 'get',
|
||||
params: { softwareId: 2 }
|
||||
url: '/api/v1/repo/dependency/info',
|
||||
method: 'POST',
|
||||
data: {
|
||||
softwareId: 47,
|
||||
current: 1,
|
||||
size: 20
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -82,7 +86,24 @@ export function getDepencyList(softwareId: string) {
|
||||
export function getRepairInfo() {
|
||||
return request({
|
||||
url: '/api/v1/repo/repair/info',
|
||||
method: 'get',
|
||||
params: {}
|
||||
method: 'POST',
|
||||
data: {
|
||||
"current": 1,
|
||||
"size": 10,
|
||||
"softwareId": 47
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 获取许可证列表
|
||||
export function getLicenseList() {
|
||||
return request({
|
||||
url: '/api/v1/repo/license/list',
|
||||
method: 'GET',
|
||||
params: {
|
||||
"current": 1,
|
||||
"size": 10,
|
||||
"softwareId": 47
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
import { ref } from 'vue';
|
||||
import Panel from '@/components/AIRepair/Panel.vue';
|
||||
import Table from '@/components/AIRepair/Table.vue';
|
||||
import { getRepairInfo } from '@/api/jyh';
|
||||
|
||||
const infoList = ref([
|
||||
'当前代码主要风险为易受常见的注入攻击,包括命令注入、SQL注入、表达式注入,针对每种攻击,应提供相应的防范措施,如数据校验、使用安全函数和限制程序权限。',
|
||||
@@ -200,6 +201,10 @@ const list = ref([
|
||||
}
|
||||
])
|
||||
|
||||
const getInfo = async() => {
|
||||
const res = await getRepairInfo();
|
||||
}
|
||||
getInfo();
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import SidePanel from '@/components/LicenseInfo/SidePanel.vue';
|
||||
import { getLicenseList } from '@/api/jyh';
|
||||
const pager = ref({
|
||||
pageIndex: 1,
|
||||
pageSize: 30,
|
||||
@@ -108,6 +109,11 @@ const list = ref([
|
||||
version: '4.4',
|
||||
}
|
||||
])
|
||||
|
||||
const getList = async() => {
|
||||
const res = await getLicenseList()
|
||||
}
|
||||
getList();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="BatchVerify">
|
||||
<div class="search-form">
|
||||
<FileUploadButton
|
||||
buttonText="批量导入"
|
||||
buttonText="导入"
|
||||
accept=".xml"
|
||||
:onFileUpload="handleFileUpload"
|
||||
/>
|
||||
@@ -20,13 +20,13 @@
|
||||
<div class="tjsj">
|
||||
<span style="height: 14px" class="split"></span>
|
||||
<span>可使用:</span>
|
||||
<span class="green">3</span>
|
||||
<span class="green" @click="filterVerifyResult(1)">3</span>
|
||||
<span style="height: 14px" class="split"></span>
|
||||
<span>未治理:</span>
|
||||
<span class="yellow">3</span>
|
||||
<span class="yellow" @click="filterVerifyResult(2)">3</span>
|
||||
<span style="height: 14px" class="split"></span>
|
||||
<span>有风险:</span>
|
||||
<span class="red">3</span>
|
||||
<span class="red" @click="filterVerifyResult(0)">3</span>
|
||||
</div>
|
||||
<div class="left-btn">
|
||||
<a v-if="isLogin" class="cursor-pointer" href="/static/template.xlsx" download><i class="icon icon-download-2"></i>下载excel模板</a>
|
||||
@@ -156,12 +156,13 @@ const handleFileUpload = async (file) => {
|
||||
}, 2000); // 模拟 2 秒上传时间
|
||||
});
|
||||
};
|
||||
const currentReusltFilter = ref(null);
|
||||
const userInfo = useAccountStore();
|
||||
const { isLogin } = storeToRefs(userInfo);
|
||||
|
||||
const { namespace } = getOrgInfo();
|
||||
|
||||
const tableData = ref([
|
||||
const allTableData = ref([
|
||||
{result:1,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||
{result:1,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||
{result:0,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||
@@ -172,7 +173,9 @@ const tableData = ref([
|
||||
{result:2,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||
{result:1,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||
{result:1,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||
]);
|
||||
])
|
||||
|
||||
const tableData = ref([...allTableData.value]);
|
||||
const columns = ref([
|
||||
{ key: 'result', label: '校验结果', visible: true, filterable: true, sortable: false },
|
||||
{ key: 'versionName', label: '选取版本火车名称', visible: true, filterable: true, sortable: false },
|
||||
@@ -282,6 +285,18 @@ const goMember = (row: any) => {
|
||||
query: { claId: row.object_id, claName: row.cla_name, group_path: namespace.value, pageType: 'edit' }
|
||||
});
|
||||
};
|
||||
|
||||
const filterVerifyResult = (type) => {
|
||||
if (currentReusltFilter.value === type) {
|
||||
currentReusltFilter.value = null;
|
||||
tableData.value = [...allTableData.value]
|
||||
} else {
|
||||
tableData.value = allTableData.value.filter(row => row.result === type);
|
||||
currentReusltFilter.value = type;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const getGroupClaListData = async () => {
|
||||
// const params = {
|
||||
// group_id: namespace.value,
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
</div>
|
||||
<d-tabs class="jyh-tabs jyh-tabs-2" type="wrapped" v-model="selectTab">
|
||||
<d-tab id="bbxx" title="版本信息"></d-tab>
|
||||
<d-tab id="ylgx" title="依赖关系"></d-tab>
|
||||
<d-tab id="SBOM" title="SBOM"></d-tab>
|
||||
<d-tab id="ldxx" title="漏洞信息"></d-tab>
|
||||
<d-tab id="ai" title="AI修复建议"></d-tab>
|
||||
|
||||
Reference in New Issue
Block a user