aops-hermes/0001-Resolve-upload-and-pagination-issues.patch
wkl505997900 0164d1f02c fix fenye and anquan issues
(cherry picked from commit 9e64cc7f67b00c93f9aaadd9885d768f28205505)
2023-09-20 15:30:02 +08:00

52 lines
2.0 KiB
Diff

From 05b4972808e22c2a9c2c36aa639e521e1a6d5809 Mon Sep 17 00:00:00 2001
From: wkl505997900 <2313665567@qq.com>
Date: Wed, 20 Sep 2023 14:43:57 +0800
Subject: [PATCH] solve some bug
---
src/vendor/ant-design-pro/utils/request.js | 6 +++++-
src/views/leaks/components/CvesTable.vue | 3 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/vendor/ant-design-pro/utils/request.js b/src/vendor/ant-design-pro/utils/request.js
index 1f0fe84..c3307ce 100644
--- a/src/vendor/ant-design-pro/utils/request.js
+++ b/src/vendor/ant-design-pro/utils/request.js
@@ -83,7 +83,11 @@ request.interceptors.request.use(config => {
const userName = localStorage.getItem('user_name')
userName && localStorage.setItem('user_name', userName);
}
- config.headers['Content-Type'] = 'application/json'
+ if (config.url === '/vulnerability/cve/advisory/upload' || config.url === '/vulnerability/cve/unaffected/upload') {
+ config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
+ } else {
+ config.headers['Content-Type'] = 'application/json'
+ }
return config;
}, errorHandler);
diff --git a/src/views/leaks/components/CvesTable.vue b/src/views/leaks/components/CvesTable.vue
index eae6a6b..72b4703 100644
--- a/src/views/leaks/components/CvesTable.vue
+++ b/src/views/leaks/components/CvesTable.vue
@@ -705,7 +705,6 @@ export default {
this.pagination = pagination;
// 翻页时清楚展开状态
this.expandedRowKeys = []
-
this.filters = Object.assign({}, this.filters, filters);
if (this.filters['fixStatus'] != null) {
this.assignFiltersFixStatus(this.filters['fixStatus'])
@@ -1072,6 +1071,8 @@ export default {
pageSize: pagination.pageSize,
total: res.data.total_count || (res.data.total_count === 0 ? 0 : pagination.total)
};
+ // 获取cve列表后清楚展开状态
+ _this.expandedRowKeys = [];
})
.catch(function (err) {
_this.$message.error(err.response.message);
--
Gitee