From 5da9ae25fe49a7c19dc33fb9cd6a523e64a3046e Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Tue, 22 Nov 2022 13:34:17 +0800 Subject: [PATCH] feat: sensitiveword --- .../src/api/system/sensitiveWord/index.ts | 25 ++- .../src/api/system/sensitiveWord/types.ts | 9 -- .../src/views/system/sensitiveWord/index.vue | 151 ++++++++---------- .../sensitiveWord/sensitiveWord.data.ts | 109 ++++++------- 4 files changed, 137 insertions(+), 157 deletions(-) delete mode 100644 yudao-ui-admin-vue3/src/api/system/sensitiveWord/types.ts diff --git a/yudao-ui-admin-vue3/src/api/system/sensitiveWord/index.ts b/yudao-ui-admin-vue3/src/api/system/sensitiveWord/index.ts index 4ad3f8df1..cad4f36a9 100644 --- a/yudao-ui-admin-vue3/src/api/system/sensitiveWord/index.ts +++ b/yudao-ui-admin-vue3/src/api/system/sensitiveWord/index.ts @@ -1,8 +1,27 @@ import request from '@/config/axios' -import type { SensitiveWordVO } from './types' + +export type SensitiveWordVO = { + id: number + name: string + status: number + description: string + tags: string + type: number + createTime: string +} + +export interface SensitiveWordPageReqVO extends PageParam { + name?: string + status?: number +} + +export interface SensitiveWordExportReqVO { + name?: string + status?: number +} // 查询敏感词列表 -export const getSensitiveWordPageApi = (params) => { +export const getSensitiveWordPageApi = (params: SensitiveWordPageReqVO) => { return request.get({ url: '/system/sensitive-word/page', params }) } @@ -27,7 +46,7 @@ export const deleteSensitiveWordApi = (id: number) => { } // 导出敏感词 -export const exportSensitiveWordApi = (params) => { +export const exportSensitiveWordApi = (params: SensitiveWordExportReqVO) => { return request.download({ url: '/system/sensitive-word/export-excel', params }) } diff --git a/yudao-ui-admin-vue3/src/api/system/sensitiveWord/types.ts b/yudao-ui-admin-vue3/src/api/system/sensitiveWord/types.ts deleted file mode 100644 index 68219fe43..000000000 --- a/yudao-ui-admin-vue3/src/api/system/sensitiveWord/types.ts +++ /dev/null @@ -1,9 +0,0 @@ -export type SensitiveWordVO = { - id: number - name: string - status: number - description: string - tags: string - type: number - createTime: string -} diff --git a/yudao-ui-admin-vue3/src/views/system/sensitiveWord/index.vue b/yudao-ui-admin-vue3/src/views/system/sensitiveWord/index.vue index 39e605c6b..b17992364 100644 --- a/yudao-ui-admin-vue3/src/views/system/sensitiveWord/index.vue +++ b/yudao-ui-admin-vue3/src/views/system/sensitiveWord/index.vue @@ -1,40 +1,24 @@