From 992ee5db528ef63a333935134f7384d646e52a6f Mon Sep 17 00:00:00 2001 From: Xinyan Date: Fri, 2 Jun 2023 18:02:56 +0800 Subject: [PATCH 1/3] For test --- src/api/system/group/index.ts | 38 ++++++ src/utils/dict.ts | 1 + src/views/system/group/GroupForm.vue | 110 +++++++++++++++ src/views/system/group/index.vue | 196 +++++++++++++++++++++++++++ yudao-ui-admin-vue3.iml | 9 ++ 5 files changed, 354 insertions(+) create mode 100644 src/api/system/group/index.ts create mode 100644 src/views/system/group/GroupForm.vue create mode 100644 src/views/system/group/index.vue create mode 100644 yudao-ui-admin-vue3.iml diff --git a/src/api/system/group/index.ts b/src/api/system/group/index.ts new file mode 100644 index 000000000..8f1cee836 --- /dev/null +++ b/src/api/system/group/index.ts @@ -0,0 +1,38 @@ +import request from '@/config/axios' + +export interface GroupVO { + id: number + name: string + description: string + status: byte +} + +// 查询用户组列表 +export const getGroupPage = async (params) => { + return await request.get({ url: `/system/group/page`, params }) +} + +// 查询用户组详情 +export const getGroup = async (id: number) => { + return await request.get({ url: `/system/group/get?id=` + id }) +} + +// 新增用户组 +export const createGroup = async (data: GroupVO) => { + return await request.post({ url: `/system/group/create`, data }) +} + +// 修改用户组 +export const updateGroup = async (data: GroupVO) => { + return await request.put({ url: `/system/group/update`, data }) +} + +// 删除用户组 +export const deleteGroup = async (id: number) => { + return await request.delete({ url: `/system/group/delete?id=` + id }) +} + +// 导出用户组 Excel +export const exportGroup = async (params) => { + return await request.download({ url: `/system/group/export-excel`, params }) +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index c742274f7..2c6f76478 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -109,6 +109,7 @@ export enum DICT_TYPE { SYSTEM_OAUTH2_GRANT_TYPE = 'system_oauth2_grant_type', SYSTEM_MAIL_SEND_STATUS = 'system_mail_send_status', SYSTEM_NOTIFY_TEMPLATE_TYPE = 'system_notify_template_type', + SYSTEM_GROUP_STATUS_TYPE = 'system_group_status_type', // ========== INFRA 模块 ========== INFRA_BOOLEAN_STRING = 'infra_boolean_string', diff --git a/src/views/system/group/GroupForm.vue b/src/views/system/group/GroupForm.vue new file mode 100644 index 000000000..3c22b849b --- /dev/null +++ b/src/views/system/group/GroupForm.vue @@ -0,0 +1,110 @@ + + diff --git a/src/views/system/group/index.vue b/src/views/system/group/index.vue new file mode 100644 index 000000000..f28cb7e11 --- /dev/null +++ b/src/views/system/group/index.vue @@ -0,0 +1,196 @@ + + + diff --git a/yudao-ui-admin-vue3.iml b/yudao-ui-admin-vue3.iml new file mode 100644 index 000000000..8021953ed --- /dev/null +++ b/yudao-ui-admin-vue3.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file -- Gitee From 45657ac1b9ae9b65f23e99f248b26895a5e64176 Mon Sep 17 00:00:00 2001 From: Xinyan Date: Fri, 2 Jun 2023 19:04:05 +0800 Subject: [PATCH 2/3] dd --- src/components/Barcode/index.ts | 3 + src/components/Barcode/src/Barcode.vue | 101 +++++++++++++++++++++++++ src/views/system/group/GroupForm.vue | 3 +- 3 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 src/components/Barcode/index.ts create mode 100644 src/components/Barcode/src/Barcode.vue diff --git a/src/components/Barcode/index.ts b/src/components/Barcode/index.ts new file mode 100644 index 000000000..a1c7fbbc7 --- /dev/null +++ b/src/components/Barcode/index.ts @@ -0,0 +1,3 @@ +import Barcode from './src/Barcode.vue' + +export { Barcode } diff --git a/src/components/Barcode/src/Barcode.vue b/src/components/Barcode/src/Barcode.vue new file mode 100644 index 000000000..e3dfd48fb --- /dev/null +++ b/src/components/Barcode/src/Barcode.vue @@ -0,0 +1,101 @@ + + + diff --git a/src/views/system/group/GroupForm.vue b/src/views/system/group/GroupForm.vue index 3c22b849b..7f20f042c 100644 --- a/src/views/system/group/GroupForm.vue +++ b/src/views/system/group/GroupForm.vue @@ -11,7 +11,7 @@ - + @@ -33,6 +33,7 @@ diff --git a/src/components/index.ts b/src/components/index.ts index 4d030c379..57e02776d 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -1,6 +1,8 @@ import type { App } from 'vue' import { Icon } from './Icon' +import Vue3Barcode from 'vue3-barcode' export const setupGlobCom = (app: App): void => { app.component('Icon', Icon) + app.component('Barcode', Vue3Barcode) } diff --git a/src/views/system/group/GroupForm.vue b/src/views/system/group/GroupForm.vue index 7f20f042c..dc5bf8ea2 100644 --- a/src/views/system/group/GroupForm.vue +++ b/src/views/system/group/GroupForm.vue @@ -11,7 +11,9 @@ - + + + @@ -33,7 +35,6 @@