diff --git a/src/api/common/data/entity/index.ts b/src/api/common/data/entity/index.ts index d5d5f49..186a4ed 100644 --- a/src/api/common/data/entity/index.ts +++ b/src/api/common/data/entity/index.ts @@ -26,7 +26,7 @@ export interface CommonEntity { } /** 树结构模型 */ -export interface TreeEntity { +export interface TreeEntity extends CommonEntity { id:string; parentId: string; name: string; diff --git a/src/api/platform/common/controller/pushChatGroup.ts b/src/api/platform/common/controller/pushChatGroup.ts new file mode 100644 index 0000000..339e348 --- /dev/null +++ b/src/api/platform/common/controller/pushChatGroup.ts @@ -0,0 +1,28 @@ +/** + * 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 + * Copyright © 2020-2022 entfrm All rights reserved. + * author entfrm开发团队-王翔 + */ +import type { PushChatGroup, PushChatGroupParams, PushChatGroupResult } from '/@/api/platform/common/entity/pushChatGroup'; +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + list = '/common_proxy/common/pushChatGroup/list', + get = '/common_proxy/common/pushChatGroup', + add = '/common_proxy/common/pushChatGroup/save', + edit = '/common_proxy/common/pushChatGroup/update', + del = '/common_proxy/common/pushChatGroup/remove', + rejectAuth = '/common_proxy/common/pushChatGroup/rejectAuth', +} + +export const listPushChatGroup = (params?: Partial) => defHttp.get({ url: Api.list, params }); + +export const addPushChatGroup = (params: Partial) => defHttp.post({ url: Api.add, data: params }); + +export const editPushChatGroup = (params: Partial) => defHttp.put({ url: Api.edit, data: params }); + +export const getPushChatGroup = (id: string) => defHttp.get({ url: `${Api.get}/${id}` }); + +export const delPushChatGroup = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); + +export const rejectAuthPushChatGroup = (ids: string) => defHttp.put({ url: `${Api.rejectAuth}/${ids}` }); diff --git a/src/api/platform/common/controller/pushChatGroupType.ts b/src/api/platform/common/controller/pushChatGroupType.ts new file mode 100644 index 0000000..257b291 --- /dev/null +++ b/src/api/platform/common/controller/pushChatGroupType.ts @@ -0,0 +1,25 @@ +/** + * 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 + * Copyright © 2020-2022 entfrm All rights reserved. + * author entfrm开发团队-王翔 + */ +import type { PushChatGroupType, PushChatGroupParams, PushChatTypeResult } from '/@/api/platform/common/entity/pushChatGroupType'; +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + list = '/common_proxy/common/pushChatGroupType/list', + get = '/common_proxy/common/pushChatGroupType', + add = '/common_proxy/common/pushChatGroupType/save', + edit = '/common_proxy/common/pushChatGroupType/update', + del = '/common_proxy/common/pushChatGroupType/remove', +} + +export const listPushChatGroupType = (params?: Partial) => defHttp.get({ url: Api.list, params }, { isReturnResultResponse: true }); + +export const addPushChatGroupType = (params: Partial) => defHttp.post({ url: Api.add, data: params }); + +export const editPushChatGroupType = (params: Partial) => defHttp.put({ url: Api.edit, data: params }); + +export const getPushChatGroupType = (id: string) => defHttp.get({ url: `${Api.get}/${id}` }); + +export const delPushChatGroupType = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); diff --git a/src/api/platform/common/entity/pushChatGroup.ts b/src/api/platform/common/entity/pushChatGroup.ts new file mode 100644 index 0000000..d1f5986 --- /dev/null +++ b/src/api/platform/common/entity/pushChatGroup.ts @@ -0,0 +1,13 @@ +import type { R } from '/#/axios'; +import type { Page } from '/@/api/common/data/entity'; +import { TreeEntity } from '/@/api/common/data/entity'; + +export type PushChatGroupParams = Page & PushChatGroup; + +export interface PushChatGroup extends TreeEntity { + status: number; + typeId: string; + [key:string]: any; +} + +export type PushChatGroupResult = R; diff --git a/src/api/platform/common/entity/pushChatGroupType.ts b/src/api/platform/common/entity/pushChatGroupType.ts new file mode 100644 index 0000000..a798f48 --- /dev/null +++ b/src/api/platform/common/entity/pushChatGroupType.ts @@ -0,0 +1,13 @@ +import type { R } from '/#/axios'; +import type { CommonEntity, Page } from '/@/api/common/data/entity'; + +export type PushChatGroupParams = Page & PushChatGroupType; + +export interface PushChatGroupType extends CommonEntity { + id: string; + name: string; + isReviewed: string; + [key:string]: any; +} + +export type PushChatTypeResult = R; diff --git a/src/views/common/push/pushChatGroup/ChatGroupModal.vue b/src/views/common/push/pushChatGroup/ChatGroupModal.vue new file mode 100644 index 0000000..5035dc0 --- /dev/null +++ b/src/views/common/push/pushChatGroup/ChatGroupModal.vue @@ -0,0 +1,83 @@ + + diff --git a/src/views/common/push/pushChatGroup/chatGroup.data.ts b/src/views/common/push/pushChatGroup/chatGroup.data.ts new file mode 100644 index 0000000..104245b --- /dev/null +++ b/src/views/common/push/pushChatGroup/chatGroup.data.ts @@ -0,0 +1,122 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { h } from 'vue'; +import { Tag } from 'ant-design-vue'; +import { listPushChatGroupType } from '/@/api/platform/common/controller/pushChatGroupType'; + +/** 表格列配置 */ +export const columns: BasicColumn[] = [ + { + title: '聊天室名称', + dataIndex: 'name' + }, + { + title: '聊天室排序', + dataIndex: 'sort', + width: 100 + }, + { + title: '备注', + dataIndex: 'remarks', + customRender: ({record}) => { + return record.remarks || h(Tag, { color: 'red' }, () => '暂无数据'); + } + }, + { + title: '创建人', + dataIndex: 'createByName' + }, + { + title: '创建时间', + dataIndex: 'createTime', + width: 200 + } +]; + +/** 搜索表单配置 */ +export const searchFormSchema: FormSchema[] = [ + { + field: 'name', + label: '聊天室名称', + component: 'Input', + componentProps: { + placeholder: '请输入聊天室名称', + }, + colProps: { span: 6 } + } +]; + +/** 表单配置 */ +export const formSchema: FormSchema[] = [ + { + field: 'id', + label: 'ID', + component: 'Input', + show: false + }, + { + field: 'parentId', + label: '上级菜单', + component: 'TreeSelect', + defaultValue: '0', + required: true, + componentProps: { + allowClear: false, + fieldNames: { + label: 'name', + key: 'id', + value: 'id' + }, + getPopupContainer: () => document.body + } + }, + { + field: 'name', + label: '聊天室名称', + component: 'Input', + required: true, + colProps: { + span: 24 + } + }, + { + field: 'sort', + label: '聊天室排序', + component: 'InputNumber', + componentProps: { + style: { width:'100%' }, + min: 0 + }, + required: true, + colProps: { + span: 12 + } + }, + { + field: 'typeId', + label: '聊天室类型', + component: 'ApiSelect', + required: true, + componentProps: { + api: listPushChatGroupType, + params: { size: 30 }, + resultField: 'data', + labelField: 'name', + valueField: 'id' + }, + colProps: { + span: 12 + } + }, + { + label: '备注', + field: 'remarks', + component: 'InputTextArea', + componentProps: { + rows: 6 + }, + colProps: { + span: 24 + } + } +]; diff --git a/src/views/common/push/pushChatGroup/index.vue b/src/views/common/push/pushChatGroup/index.vue new file mode 100644 index 0000000..2017d86 --- /dev/null +++ b/src/views/common/push/pushChatGroup/index.vue @@ -0,0 +1,105 @@ + + + diff --git a/src/views/common/push/pushChatGroupAudit/ChatGroupAuditModal.vue b/src/views/common/push/pushChatGroupAudit/ChatGroupAuditModal.vue new file mode 100644 index 0000000..5035dc0 --- /dev/null +++ b/src/views/common/push/pushChatGroupAudit/ChatGroupAuditModal.vue @@ -0,0 +1,83 @@ + + diff --git a/src/views/common/push/pushChatGroupAudit/chatGroup.data.ts b/src/views/common/push/pushChatGroupAudit/chatGroup.data.ts new file mode 100644 index 0000000..0be4aa2 --- /dev/null +++ b/src/views/common/push/pushChatGroupAudit/chatGroup.data.ts @@ -0,0 +1,120 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { h } from 'vue'; +import { Tag } from 'ant-design-vue'; +import { listPushChatGroupType } from '/@/api/platform/common/controller/pushChatGroupType'; + +/** 表格列配置 */ +export const columns: BasicColumn[] = [ + { + title: '聊天室名称', + dataIndex: 'name' + }, + { + title: '聊天室排序', + dataIndex: 'sort', + width: 100 + }, + { + title: '备注', + dataIndex: 'remarks', + customRender: ({record}) => { + return record.remarks || h(Tag, { color: 'red' }, () => '暂无数据'); + } + }, + { + title: '创建人', + dataIndex: 'createByName' + }, + { + title: '创建时间', + dataIndex: 'createTime', + width: 200 + } +]; + +/** 搜索表单配置 */ +export const searchFormSchema: FormSchema[] = [ + { + field: 'name', + label: '聊天室名称', + component: 'Input', + componentProps: { + placeholder: '请输入聊天室名称', + }, + colProps: { span: 6 } + } +]; + +/** 表单配置 */ +export const formSchema: FormSchema[] = [ + { + field: 'id', + label: 'ID', + component: 'Input', + show: false + }, + { + field: 'parentId', + label: '上级菜单', + component: 'TreeSelect', + defaultValue: '0', + required: true, + componentProps: { + allowClear: false, + fieldNames: { + label: 'name', + key: 'id', + value: 'id' + }, + getPopupContainer: () => document.body + } + }, + { + field: 'name', + label: '聊天室名称', + component: 'Input', + required: true, + colProps: { + span: 24 + } + }, + { + field: 'sort', + label: '聊天室排序', + component: 'InputNumber', + componentProps: { + style: { width:'100%' }, + min: 0 + }, + required: true, + colProps: { + span: 12 + } + }, + { + field: 'typeId', + label: '聊天室类型', + component: 'ApiSelect', + required: true, + componentProps: { + api: listPushChatGroupType, + params: { size: 30 }, + resultField: 'data' + }, + colProps: { + span: 12 + } + }, + { + label: '备注', + field: 'remarks', + component: 'InputTextArea', + componentProps: { + rows: 6 + }, + colProps: { + span: 24 + } + } +]; diff --git a/src/views/common/push/pushChatGroupAudit/index.vue b/src/views/common/push/pushChatGroupAudit/index.vue new file mode 100644 index 0000000..c1323ab --- /dev/null +++ b/src/views/common/push/pushChatGroupAudit/index.vue @@ -0,0 +1,100 @@ + + + diff --git a/src/views/common/push/pushChatGroupMessageAudit/ChatGroupAuditModal.vue b/src/views/common/push/pushChatGroupMessageAudit/ChatGroupAuditModal.vue new file mode 100644 index 0000000..5035dc0 --- /dev/null +++ b/src/views/common/push/pushChatGroupMessageAudit/ChatGroupAuditModal.vue @@ -0,0 +1,83 @@ + + diff --git a/src/views/common/push/pushChatGroupMessageAudit/chatGroup.data.ts b/src/views/common/push/pushChatGroupMessageAudit/chatGroup.data.ts new file mode 100644 index 0000000..0be4aa2 --- /dev/null +++ b/src/views/common/push/pushChatGroupMessageAudit/chatGroup.data.ts @@ -0,0 +1,120 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { h } from 'vue'; +import { Tag } from 'ant-design-vue'; +import { listPushChatGroupType } from '/@/api/platform/common/controller/pushChatGroupType'; + +/** 表格列配置 */ +export const columns: BasicColumn[] = [ + { + title: '聊天室名称', + dataIndex: 'name' + }, + { + title: '聊天室排序', + dataIndex: 'sort', + width: 100 + }, + { + title: '备注', + dataIndex: 'remarks', + customRender: ({record}) => { + return record.remarks || h(Tag, { color: 'red' }, () => '暂无数据'); + } + }, + { + title: '创建人', + dataIndex: 'createByName' + }, + { + title: '创建时间', + dataIndex: 'createTime', + width: 200 + } +]; + +/** 搜索表单配置 */ +export const searchFormSchema: FormSchema[] = [ + { + field: 'name', + label: '聊天室名称', + component: 'Input', + componentProps: { + placeholder: '请输入聊天室名称', + }, + colProps: { span: 6 } + } +]; + +/** 表单配置 */ +export const formSchema: FormSchema[] = [ + { + field: 'id', + label: 'ID', + component: 'Input', + show: false + }, + { + field: 'parentId', + label: '上级菜单', + component: 'TreeSelect', + defaultValue: '0', + required: true, + componentProps: { + allowClear: false, + fieldNames: { + label: 'name', + key: 'id', + value: 'id' + }, + getPopupContainer: () => document.body + } + }, + { + field: 'name', + label: '聊天室名称', + component: 'Input', + required: true, + colProps: { + span: 24 + } + }, + { + field: 'sort', + label: '聊天室排序', + component: 'InputNumber', + componentProps: { + style: { width:'100%' }, + min: 0 + }, + required: true, + colProps: { + span: 12 + } + }, + { + field: 'typeId', + label: '聊天室类型', + component: 'ApiSelect', + required: true, + componentProps: { + api: listPushChatGroupType, + params: { size: 30 }, + resultField: 'data' + }, + colProps: { + span: 12 + } + }, + { + label: '备注', + field: 'remarks', + component: 'InputTextArea', + componentProps: { + rows: 6 + }, + colProps: { + span: 24 + } + } +]; diff --git a/src/views/common/push/pushChatGroupMessageAudit/index.vue b/src/views/common/push/pushChatGroupMessageAudit/index.vue new file mode 100644 index 0000000..c1323ab --- /dev/null +++ b/src/views/common/push/pushChatGroupMessageAudit/index.vue @@ -0,0 +1,100 @@ + + + diff --git a/src/views/common/push/pushChatGroupType/ChatGroupTypeModal.vue b/src/views/common/push/pushChatGroupType/ChatGroupTypeModal.vue new file mode 100644 index 0000000..085299d --- /dev/null +++ b/src/views/common/push/pushChatGroupType/ChatGroupTypeModal.vue @@ -0,0 +1,73 @@ + + diff --git a/src/views/common/push/pushChatGroupType/chatGroupType.data.ts b/src/views/common/push/pushChatGroupType/chatGroupType.data.ts new file mode 100644 index 0000000..253ddc8 --- /dev/null +++ b/src/views/common/push/pushChatGroupType/chatGroupType.data.ts @@ -0,0 +1,99 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { h } from 'vue'; +import { Tag } from 'ant-design-vue'; + +/** 表格列配置 */ +export const columns: BasicColumn[] = [ + { + title: '类型名称', + dataIndex: 'name' + }, + { + title: '是否审核', + dataIndex: 'isReviewed', + width: 80, + customRender: ({ record }) => { + const playSound = record?.isReviewed; + const enable = ~~playSound === 1; + const color = enable ? 'green' : 'red'; + const text = enable ? '是' : '否'; + return h(Tag, { color: color }, () => text); + } + }, + { + title: '备注', + dataIndex: 'remarks', + customRender: ({record}) => { + return record.remarks || h(Tag, { color: 'red' }, () => '暂无数据'); + } + }, + { + title: '创建人', + dataIndex: 'createByName' + }, + { + title: '创建时间', + dataIndex: 'createTime', + width: 200 + } +]; + +/** 搜索表单配置 */ +export const searchFormSchema: FormSchema[] = [ + { + field: 'name', + label: '类型名称', + component: 'Input', + componentProps: { + placeholder: '请输入聊天室类型名称', + }, + colProps: { span: 6 } + } +]; + +/** 表单配置 */ +export const formSchema: FormSchema[] = [ + { + field: 'id', + label: 'ID', + component: 'Input', + show: false + }, + { + field: 'name', + label: '类型名称', + component: 'Input', + required: true, + colProps: { + span: 24 + } + }, + { + field: 'isReviewed', + label: '是否审核', + component: 'RadioGroup', + required: true, + defaultValue: '0', + componentProps: { + options: [ + { label: '否', value: '0' }, + { label: '是', value: '1' } + ] + }, + colProps: { + span: 12 + } + }, + { + label: '备注', + field: 'remarks', + component: 'InputTextArea', + componentProps: { + rows: 6 + }, + colProps: { + span: 24 + } + } +]; diff --git a/src/views/common/push/pushChatGroupType/index.vue b/src/views/common/push/pushChatGroupType/index.vue new file mode 100644 index 0000000..04e5e8f --- /dev/null +++ b/src/views/common/push/pushChatGroupType/index.vue @@ -0,0 +1,137 @@ + + +