From a123c47042d01c9ad3956ea442bf760f9e024999 Mon Sep 17 00:00:00 2001 From: xingyu Date: Tue, 15 Nov 2022 20:12:22 +0800 Subject: [PATCH] refactor: role --- .../src/api/system/role/index.ts | 20 ++- .../src/api/system/role/types.ts | 9 -- .../src/views/system/role/index.vue | 134 ++++++++---------- .../src/views/system/role/role.data.ts | 120 ++++++---------- 4 files changed, 124 insertions(+), 159 deletions(-) delete mode 100644 yudao-ui-admin-vue3/src/api/system/role/types.ts diff --git a/yudao-ui-admin-vue3/src/api/system/role/index.ts b/yudao-ui-admin-vue3/src/api/system/role/index.ts index efbb75d48..83292c72a 100644 --- a/yudao-ui-admin-vue3/src/api/system/role/index.ts +++ b/yudao-ui-admin-vue3/src/api/system/role/index.ts @@ -1,8 +1,24 @@ import request from '@/config/axios' -import type { RoleVO } from './types' + +export type RoleVO = { + id: number + name: string + code: string + sort: number + status: number + type: number + createTime: string +} + +export interface RolePageReqVO extends PageParam { + name?: string + code?: string + status?: number + createTime?: string[] +} // 查询角色列表 -export const getRolePageApi = async (params) => { +export const getRolePageApi = async (params: RolePageReqVO) => { return await request.get({ url: '/system/role/page', params }) } diff --git a/yudao-ui-admin-vue3/src/api/system/role/types.ts b/yudao-ui-admin-vue3/src/api/system/role/types.ts deleted file mode 100644 index f5e17ea99..000000000 --- a/yudao-ui-admin-vue3/src/api/system/role/types.ts +++ /dev/null @@ -1,9 +0,0 @@ -export type RoleVO = { - id: number - name: string - code: string - sort: number - status: number - type: number - createTime: string -} diff --git a/yudao-ui-admin-vue3/src/views/system/role/index.vue b/yudao-ui-admin-vue3/src/views/system/role/index.vue index a082d4973..666cd8908 100644 --- a/yudao-ui-admin-vue3/src/views/system/role/index.vue +++ b/yudao-ui-admin-vue3/src/views/system/role/index.vue @@ -1,42 +1,18 @@