diff --git a/src/api/member/group/index.ts b/src/api/member/group/index.ts new file mode 100644 index 00000000..df3054e2 --- /dev/null +++ b/src/api/member/group/index.ts @@ -0,0 +1,38 @@ +import request from '@/config/axios' + +export interface GroupVO { + id: number + name: string + remark: string + status: number +} + +// 查询用户分组列表 +export const getGroupPage = async (params: any) => { + return await request.get({ url: `/member/group/page`, params }) +} + +// 查询用户分组详情 +export const getGroup = async (id: number) => { + return await request.get({ url: `/member/group/get?id=` + id }) +} + +// 新增用户分组 +export const createGroup = async (data: GroupVO) => { + return await request.post({ url: `/member/group/create`, data }) +} + +// 查询用户分组 - 精简信息列表 +export const getSimpleGroupList = async () => { + return await request.get({ url: `/member/group/list-all-simple` }) +} + +// 修改用户分组 +export const updateGroup = async (data: GroupVO) => { + return await request.put({ url: `/member/group/update`, data }) +} + +// 删除用户分组 +export const deleteGroup = async (id: number) => { + return await request.delete({ url: `/member/group/delete?id=` + id }) +} diff --git a/src/views/member/group/GroupForm.vue b/src/views/member/group/GroupForm.vue new file mode 100644 index 00000000..9788dbef --- /dev/null +++ b/src/views/member/group/GroupForm.vue @@ -0,0 +1,112 @@ + + diff --git a/src/views/member/group/components/MemberGroupSelect.vue b/src/views/member/group/components/MemberGroupSelect.vue new file mode 100644 index 00000000..2b38fce1 --- /dev/null +++ b/src/views/member/group/components/MemberGroupSelect.vue @@ -0,0 +1,46 @@ + + + diff --git a/src/views/member/group/index.vue b/src/views/member/group/index.vue new file mode 100644 index 00000000..552a72a6 --- /dev/null +++ b/src/views/member/group/index.vue @@ -0,0 +1,174 @@ + + + diff --git a/src/views/member/level/components/MemberLevelSelect.vue b/src/views/member/level/components/MemberLevelSelect.vue index 73e11f1b..c816a295 100644 --- a/src/views/member/level/components/MemberLevelSelect.vue +++ b/src/views/member/level/components/MemberLevelSelect.vue @@ -18,7 +18,7 @@ defineOptions({ name: 'MemberLevelSelect' }) const props = defineProps({ /** 下拉框选中值 **/ modelValue: { - type: Array, + type: Number, default: undefined } }) diff --git a/src/views/member/user/UserForm.vue b/src/views/member/user/UserForm.vue index 2a86c63e..0b7915a2 100644 --- a/src/views/member/user/UserForm.vue +++ b/src/views/member/user/UserForm.vue @@ -76,6 +76,9 @@ + + + @@ -93,6 +96,7 @@ import * as AreaApi from '@/api/system/area' import { defaultProps } from '@/utils/tree' import MemberTagSelect from '@/views/member/tag/components/MemberTagSelect.vue' import MemberLevelSelect from '@/views/member/level/components/MemberLevelSelect.vue' +import MemberGroupSelect from '@/views/member/group/components/MemberGroupSelect.vue' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -115,7 +119,8 @@ const formData = ref({ mark: undefined, tagIds: [], levelId: undefined, - levelReason: undefined + levelReason: undefined, + groupId: undefined }) const formRules = reactive({ mobile: [{ required: true, message: '手机号不能为空', trigger: 'blur' }], @@ -190,7 +195,8 @@ const resetForm = () => { mark: undefined, tagIds: [], levelId: undefined, - levelReason: undefined + levelReason: undefined, + groupId: undefined } formRef.value?.resetFields() } diff --git a/src/views/member/user/index.vue b/src/views/member/user/index.vue index 673fd63d..3a8e4259 100644 --- a/src/views/member/user/index.vue +++ b/src/views/member/user/index.vue @@ -54,6 +54,9 @@ + + + 搜索 重置 @@ -73,8 +76,7 @@ - - +