From f67fbff8a0b1df63d220b9ec0864cdd276c42612 Mon Sep 17 00:00:00 2001 From: wkl505997900 <2313665567@qq.com> Date: Wed, 20 Sep 2023 19:23:01 +0800 Subject: [PATCH] change rpm params --- src/api/leaks.js | 2 ++ src/views/leaks/components/CvesTable.vue | 18 ++++++++++++++++-- src/views/leaks/components/HostInCveRpm.vue | 10 ++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/api/leaks.js b/src/api/leaks.js index 99f29c6..cd59dda 100644 --- a/src/api/leaks.js +++ b/src/api/leaks.js @@ -86,6 +86,8 @@ export function getRpmUnderCve(parameters) { page: parameters.page, per_page: parameters.per_page, cve_id: parameters.cve_id, + hp_status: parameters.hp_status, + fixed: parameters.fixed, available_rpm: parameters.available_rpm === null ? undefined : parameters.available_rpm, installed_rpm: parameters.installed_rpm === null ? undefined : parameters.installed_rpm, direction: parameters.direction diff --git a/src/views/leaks/components/CvesTable.vue b/src/views/leaks/components/CvesTable.vue index 72b4703..47eed62 100644 --- a/src/views/leaks/components/CvesTable.vue +++ b/src/views/leaks/components/CvesTable.vue @@ -149,6 +149,7 @@ :locale="tablenodata" :rowSelection="innerRowSelection" :pagination="false"> +
{{ getFixedWay(fixed_way, innerrecord) }}
@@ -401,7 +404,8 @@ export default { { dataIndex: 'fixed_way', key: 'fixed_way', - title: '修复方式' + title: '修复方式', + scopedSlots: {customRender: 'fixed_way'} }, { dataIndex: 'host_num', @@ -421,7 +425,8 @@ export default { { dataIndex: 'fixed_way', key: 'fixed_way', - title: '修复方式' + title: '修复方式', + scopedSlots: {customRender: 'fixed_way'} } ]; }, @@ -495,6 +500,7 @@ export default { searchKey: '', innerCveList: [], // 勾选二级列表rpm参数时传入的数据流 + hpStatus: null, propAvailablerpm: null, propInstalledrpm: null, propData: this.inputList, @@ -531,12 +537,20 @@ export default { }; }, methods: { + getFixedWay(fixedWay, innerrecord) { + if (fixedWay === 'hotpatch') { + return fixedWay + ' (' + innerrecord.hp_status + ')' + } else { + return fixedWay + } + }, closeHostListUnderCve() { this.hostListUnderCveVisible = false; }, showHostListUnderCve(params, innerparams) { this.hostListUnderCveVisible = true; this.hostListOfCveId = params.cve_id; + this.hpStatus = innerparams.hp_status; this.propAvailablerpm = innerparams.available_rpm this.propInstalledrpm = innerparams.installed_rpm }, diff --git a/src/views/leaks/components/HostInCveRpm.vue b/src/views/leaks/components/HostInCveRpm.vue index 789e09f..d7c172d 100644 --- a/src/views/leaks/components/HostInCveRpm.vue +++ b/src/views/leaks/components/HostInCveRpm.vue @@ -29,6 +29,14 @@ export default { type: String, default: null }, + fixed: { + type: Boolean, + default: false + }, + hpStatus: { + type: String, + default: null + }, propAvailablerpm: { type: String, default: null @@ -71,6 +79,8 @@ export default { page: 1, per_page: 10, cve_id: this.cveId, + fixed: this.fixed, + hp_status: this.hpStatus ? this.hpStatus : undefined, available_rpm: this.propAvailablerpm, installed_rpm: this.propInstalledrpm, direction: 'asc' -- Gitee