From ba2766373e27c67109250d2f40f9971546ab17f1 Mon Sep 17 00:00:00 2001 From: lishengbo <1171734220@qq.com> Date: Mon, 1 Aug 2022 20:15:21 +0800 Subject: [PATCH] fix:shared/type --- app/.vitepress/src/api/api-security.ts | 4 +- .../src/shared/@types/type-bulletin-detail.ts | 3 -- .../src/shared/@types/type-cvelist.ts | 13 ------ ...ype-safety-bulletin.ts => type-support.ts} | 42 +++++++++++++------ app/.vitepress/src/shared/styles/_filter.scss | 14 ++++++- .../src/views/security/TheCompatibility.vue | 2 +- .../src/views/security/TheCveList.vue | 39 +++++++++-------- .../src/views/security/TheSafetyBulletin.vue | 2 +- .../security/TheSafetyBulletinDetail.vue | 2 +- opendesign/pagination/OPagination.vue | 3 ++ 10 files changed, 72 insertions(+), 52 deletions(-) delete mode 100644 app/.vitepress/src/shared/@types/type-bulletin-detail.ts delete mode 100644 app/.vitepress/src/shared/@types/type-cvelist.ts rename app/.vitepress/src/shared/@types/{type-safety-bulletin.ts => type-support.ts} (44%) diff --git a/app/.vitepress/src/api/api-security.ts b/app/.vitepress/src/api/api-security.ts index 1b1c254bb..7daec2b9a 100644 --- a/app/.vitepress/src/api/api-security.ts +++ b/app/.vitepress/src/api/api-security.ts @@ -18,9 +18,9 @@ export function getSecurityList(params: BulletinParams) { * 调用接口获取Cve列表 * @name getCveList */ -export function getCveList(params: QueryParams) { +export function getCveList(pages: QueryParams) { const url = '/api-cve/cve-security-notice-server/cvedatabase/findAll'; - return request.post(url, params).then((res: AxiosResponse) => res.data); + return request.post(url, { pages }).then((res: AxiosResponse) => res.data); } /** diff --git a/app/.vitepress/src/shared/@types/type-bulletin-detail.ts b/app/.vitepress/src/shared/@types/type-bulletin-detail.ts deleted file mode 100644 index 975bef4d7..000000000 --- a/app/.vitepress/src/shared/@types/type-bulletin-detail.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface DetailParams { - securityNoticeNo: string; -} diff --git a/app/.vitepress/src/shared/@types/type-cvelist.ts b/app/.vitepress/src/shared/@types/type-cvelist.ts deleted file mode 100644 index 58ea339d4..000000000 --- a/app/.vitepress/src/shared/@types/type-cvelist.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface QueryParams { - page: number; - size: number; -} - -export interface CveLists { - announcementTime: string; - cveId: string; - cvsssCoreOE: string; - status: string; - summary: string; - updateTime: string; -} diff --git a/app/.vitepress/src/shared/@types/type-safety-bulletin.ts b/app/.vitepress/src/shared/@types/type-support.ts similarity index 44% rename from app/.vitepress/src/shared/@types/type-safety-bulletin.ts rename to app/.vitepress/src/shared/@types/type-support.ts index c9318887e..41d6e900d 100644 --- a/app/.vitepress/src/shared/@types/type-safety-bulletin.ts +++ b/app/.vitepress/src/shared/@types/type-support.ts @@ -1,12 +1,30 @@ -export interface BulletinParams { - page: number; - size: number; -} -export interface SecurityLists { - affectedComponent: string; - affectedProduct: string; - announcementTime: string; - securityNoticeNo: string; - summary: string; - type: string; -} +export interface DetailParams { + securityNoticeNo: string; +} + +export interface BulletinParams { + page: number; + size: number; +} +export interface SecurityLists { + affectedComponent: string; + affectedProduct: string; + announcementTime: string; + securityNoticeNo: string; + summary: string; + type: string; +} + +export interface QueryParams { + page: number; + size: number; +} + +export interface CveLists { + announcementTime: string; + cveId: string; + cvsssCoreOE: string; + status: string; + summary: string; + updateTime: string; +} diff --git a/app/.vitepress/src/shared/styles/_filter.scss b/app/.vitepress/src/shared/styles/_filter.scss index 58e7c34d7..0125c187b 100644 --- a/app/.vitepress/src/shared/styles/_filter.scss +++ b/app/.vitepress/src/shared/styles/_filter.scss @@ -2,20 +2,32 @@ box-shadow: none !important; --el-popper-border-radius: none; + .is-light { + border: 1px solid red; + } + .el-popper__arrow { display: none; } .el-select-dropdown__item { - color: var(--o-color-base_inverse); + color: var(--o-color-text2); &:hover { color: var(--o-color-brand); } } + .el-select-dropdown__item.selected { + background-color: var(--o-color-bg2); + } + .el-select-dropdown__item.selected { font-weight: normal; color: var(--o-color-brand); } + + .el-select-dropdown__wrap { + background-color: var(--o-color-bg); + } } \ No newline at end of file diff --git a/app/.vitepress/src/views/security/TheCompatibility.vue b/app/.vitepress/src/views/security/TheCompatibility.vue index e7de4687d..86cf0441d 100644 --- a/app/.vitepress/src/views/security/TheCompatibility.vue +++ b/app/.vitepress/src/views/security/TheCompatibility.vue @@ -6,7 +6,7 @@ import BannerLevel2 from '@/components/BannerLevel2.vue'; import banner from '@/assets/banner-secondary.png'; import search from '@/assets/illustrations/search.png'; -import { BulletinParams } from '@/shared/@types/type-safety-bulletin'; +import { BulletinParams } from '@/shared/@types/type-support.ts'; const { theme: i18n } = useData(); const inputName = ref('zhangsan'); diff --git a/app/.vitepress/src/views/security/TheCveList.vue b/app/.vitepress/src/views/security/TheCveList.vue index b91f8dae1..7951e214f 100644 --- a/app/.vitepress/src/views/security/TheCveList.vue +++ b/app/.vitepress/src/views/security/TheCveList.vue @@ -8,7 +8,7 @@ import banner from '@/assets/banner-secondary.png'; import search from '@/assets/illustrations/search.png'; import { getCveList } from '@/api/api-security'; -import { CveLists, QueryParams } from '@/shared/@types/type-cvelist'; +import { CveLists, QueryParams } from '@/shared/@types/type-support.ts'; const inputName = ref(''); const { theme: i18n } = useData(); @@ -27,7 +27,12 @@ const tableData = ref([ }, ]); -const queryData: QueryParams = reactive({ +// const queryData: QueryParams = reactive({ +// page: 1, +// size: 10, +// }); + +const pages: QueryParams = reactive({ page: 1, size: 10, }); @@ -47,23 +52,21 @@ const tagClick = (i: number) => { activeIndex.value = i; }; -const handleSizeChange = (val: number) => { - queryData.size = val; -}; +// const handleSizeChange = (val: number) => { +// queryData.size = val; +// }; + +// const handleCurrentChange = (val: number) => { +// queryData.page = val; +// }; -const handleCurrentChange = (val: number) => { - queryData.page = val; -}; onMounted(() => { - getCveLists(queryData); + getCveLists(pages); }); -watch( - queryData, - // { - // pages: { page: queryData.page, size: queryData.size }, - // } - () => getCveLists(queryData) -); +// watch( +// queryData, +// () => getCveLists(queryData) +// );