From 334962fe09b409bb4742989100a58db0efdfcc29 Mon Sep 17 00:00:00 2001 From: owen Date: Fri, 18 Aug 2023 18:52:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=9A=E5=91=98=EF=BC=9A=201.=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BC=9A=E5=91=98=E6=A0=87=E7=AD=BE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/member/tag/index.ts | 36 +++++++ src/views/member/tag/TagForm.vue | 91 ++++++++++++++++ src/views/member/tag/index.vue | 179 +++++++++++++++++++++++++++++++ 3 files changed, 306 insertions(+) create mode 100644 src/api/member/tag/index.ts create mode 100644 src/views/member/tag/TagForm.vue create mode 100644 src/views/member/tag/index.vue diff --git a/src/api/member/tag/index.ts b/src/api/member/tag/index.ts new file mode 100644 index 00000000..a844dbe3 --- /dev/null +++ b/src/api/member/tag/index.ts @@ -0,0 +1,36 @@ +import request from '@/config/axios' + +export interface TagVO { + id: number + name: string +} + +// 查询会员标签列表 +export const getMemberTagPage = async (params) => { + return await request.get({ url: `/member/tag/page`, params }) +} + +// 查询会员标签详情 +export const getMemberTag = async (id: number) => { + return await request.get({ url: `/member/tag/get?id=` + id }) +} + +// 新增会员标签 +export const createMemberTag = async (data: TagVO) => { + return await request.post({ url: `/member/tag/create`, data }) +} + +// 修改会员标签 +export const updateMemberTag = async (data: TagVO) => { + return await request.put({ url: `/member/tag/update`, data }) +} + +// 删除会员标签 +export const deleteMemberTag = async (id: number) => { + return await request.delete({ url: `/member/tag/delete?id=` + id }) +} + +// 导出会员标签 Excel +export const exportMemberTag = async (params) => { + return await request.download({ url: `/member/tag/export-excel`, params }) +} diff --git a/src/views/member/tag/TagForm.vue b/src/views/member/tag/TagForm.vue new file mode 100644 index 00000000..d45ea589 --- /dev/null +++ b/src/views/member/tag/TagForm.vue @@ -0,0 +1,91 @@ + + diff --git a/src/views/member/tag/index.vue b/src/views/member/tag/index.vue new file mode 100644 index 00000000..49633edf --- /dev/null +++ b/src/views/member/tag/index.vue @@ -0,0 +1,179 @@ + + + From 2964d55435e3a1cced7ee1444e3531ae9c3c4167 Mon Sep 17 00:00:00 2001 From: owen Date: Sat, 19 Aug 2023 20:19:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=9A=E5=91=98=EF=BC=9A=201.=E4=BC=9A?= =?UTF-8?q?=E5=91=98=E8=AE=BE=E7=BD=AE=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/tag/components/MemberTagSelect.vue | 69 +++++++++++++++++++ src/views/member/user/UserForm.vue | 10 ++- src/views/member/user/index.vue | 17 ++++- 3 files changed, 93 insertions(+), 3 deletions(-) create mode 100644 src/views/member/tag/components/MemberTagSelect.vue diff --git a/src/views/member/tag/components/MemberTagSelect.vue b/src/views/member/tag/components/MemberTagSelect.vue new file mode 100644 index 00000000..ec4f4617 --- /dev/null +++ b/src/views/member/tag/components/MemberTagSelect.vue @@ -0,0 +1,69 @@ + + + diff --git a/src/views/member/user/UserForm.vue b/src/views/member/user/UserForm.vue index a6d02582..c10d3fea 100644 --- a/src/views/member/user/UserForm.vue +++ b/src/views/member/user/UserForm.vue @@ -57,6 +57,9 @@ :render-after-expand="true" /> + + + @@ -72,6 +75,7 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import * as UserApi from '@/api/member/user' import * as AreaApi from '@/api/system/area' import { defaultProps } from '@/utils/tree' +import MemberTagSelect from '@/views/member/tag/components/MemberTagSelect.vue' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -90,7 +94,8 @@ const formData = ref({ sex: undefined, areaId: undefined, birthday: undefined, - mark: undefined + mark: undefined, + tagIds: [] }) const formRules = reactive({ mobile: [{ required: true, message: '手机号不能为空', trigger: 'blur' }], @@ -163,7 +168,8 @@ const resetForm = () => { areaId: undefined, birthday: undefined, mark: undefined, - createTime: undefined + createTime: undefined, + tagIds: [] } formRef.value?.resetFields() } diff --git a/src/views/member/user/index.vue b/src/views/member/user/index.vue index 925eca04..0389de37 100644 --- a/src/views/member/user/index.vue +++ b/src/views/member/user/index.vue @@ -48,6 +48,9 @@ class="!w-240px" /> + + + 搜索 重置 @@ -69,6 +72,16 @@ + + +