diff --git a/mock/sys/user.ts b/mock/sys/user.ts index 9dac0fd..cd7082a 100644 --- a/mock/sys/user.ts +++ b/mock/sys/user.ts @@ -12,7 +12,7 @@ export function createFakeUserList() { password: '123456', token: 'QNT iHP4V/g6O5DXHixyNrf7tjJzhv1uzd15gp7AgTwJsmPLbOmqa7ZoSiaGTLfB/eLpbse0PBxScusDqEpdm1ZVRA==', - homePath: '/customer/user', + homePath: '/clue/clueList', roles: [ { roleName: 'Super Admin', @@ -28,7 +28,7 @@ export function createFakeUserList() { avatar: 'https://q1.qlogo.cn/g?b=qq&nk=339449197&s=640', desc: 'tester', token: 'fakeToken2', - homePath: '/customer/user', + homePath: '/clue/clueList', roles: [ { roleName: 'Tester', diff --git a/src/api/message/index.ts b/src/api/clue/index.ts similarity index 100% rename from src/api/message/index.ts rename to src/api/clue/index.ts diff --git a/src/api/message/model.ts b/src/api/message/model.ts deleted file mode 100644 index b99edf3..0000000 --- a/src/api/message/model.ts +++ /dev/null @@ -1,30 +0,0 @@ - -export interface MessageItemModel { - nickName: string - contentTime: string - miId: string - userMarriageInformationType: number -} - -export interface MessageRoomModel { - cityName: string - finalActivityTime: string - miId: string - finalContent: string - genderCode: number - roomId: string - roomName: string - roomPic: string - unreadContentCount: number -} - -export interface MessageModel { - content: string - contentTime: string - readStatus: boolean - finalContent: string - roomContentRecordId: number - roomId: string - sendMiId: string - type: number -} \ No newline at end of file diff --git a/src/locales/lang/zh-CN/routes/clue.ts b/src/locales/lang/zh-CN/routes/clue.ts new file mode 100644 index 0000000..a35d7c1 --- /dev/null +++ b/src/locales/lang/zh-CN/routes/clue.ts @@ -0,0 +1,6 @@ +export default { + clue: '线索管理', + cluePool: '线索池', + clueList: '我的线索', + customer: '客户信息' +} diff --git a/src/router/menu.ts b/src/router/menu.ts index d6c4ad7..1621aab 100644 --- a/src/router/menu.ts +++ b/src/router/menu.ts @@ -1,31 +1,39 @@ import type { Menu } from '/@/router/types' -const messageMenu: Menu = { - path: '/message', - name: 'message', +const clueMenu: Menu = { + path: '/clue', + name: 'clue', component: 'LAYOUT', - redirect: '/message/messageList', + redirect: '/clue/messageList', meta: { orderNo: 90013, hideChildrenInMenu: false, - icon: 'ant-design:send-outlined', - title: 'routes.message.message', + icon: 'ant-design:dribbble-circle-filled', + title: 'routes.clue.clue', }, children: [ { - path: 'messageList', - name: 'MessageList', - component: '/message/messageList/index.vue', + path: 'cluePool', + name: 'CluePool', + component: '/clue/cluePool/index.vue', meta: { - title: 'routes.message.messageList', + title: 'routes.clue.cluePool', }, }, { - path: 'chatInfo', - name: 'ChatInfo', - component: '/message/chatInfo/index.vue', + path: 'clueList', + name: 'ClueList', + component: '/clue/clueList/index.vue', meta: { - title: 'routes.message.chatInfo', + title: 'routes.clue.clueList', + }, + }, + { + path: 'customer', + name: 'Customer', + component: '/clue/customer/index.vue', + meta: { + title: 'routes.clue.customer', hideMenu: true, }, }, @@ -72,7 +80,7 @@ const systemMenu: Menu = { } const appMenuList: Menu[] = [ - messageMenu, + clueMenu, systemMenu, ] // 测试账号:15014242835 diff --git a/src/router/menus/modules/clue.ts b/src/router/menus/modules/clue.ts new file mode 100644 index 0000000..afbd976 --- /dev/null +++ b/src/router/menus/modules/clue.ts @@ -0,0 +1,24 @@ +import type { MenuModule } from '/@/router/types' +import { t } from '/@/hooks/web/useI18n' +const clueMenu: MenuModule = { + orderNo: 90003, + menu: { + path: '/clue', + name: t('routes.clue.clue'), + children: [ + { + path: 'cluePool', + name: t('routes.clue.cluePool'), + }, + { + path: 'clueList', + name: t('routes.clue.clueList'), + }, + { + path: 'customer', + name: t('routes.clue.customer'), + }, + ], + }, +} +export default clueMenu diff --git a/src/router/menus/modules/message.ts b/src/router/menus/modules/message.ts deleted file mode 100644 index 60f0be2..0000000 --- a/src/router/menus/modules/message.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { MenuModule } from '/@/router/types' -import { t } from '/@/hooks/web/useI18n' -const messageMenu: MenuModule = { - orderNo: 90003, - menu: { - path: '/message', - name: t('routes.message.message'), - children: [ - { - path: 'messageList', - name: t('routes.message.messageList'), - }, - { - path: 'chatInfo', - name: t('routes.message.chatInfo'), - }, - ], - }, -} -export default messageMenu diff --git a/src/router/routes/modules/clue.ts b/src/router/routes/modules/clue.ts new file mode 100644 index 0000000..f26162f --- /dev/null +++ b/src/router/routes/modules/clue.ts @@ -0,0 +1,49 @@ +import type { AppRouteModule } from '/@/router/types' + +import { LAYOUT } from '/@/router/constant' +import { t } from '/@/hooks/web/useI18n' + +const messageRoute: AppRouteModule = { + path: '/clue', + name: 'Clue', + component: LAYOUT, + redirect: '/clue/cluePool', + meta: { + orderNo: 90013, + hideChildrenInMenu: false, + icon: 'ant-design:dribbble-circle-filled', + title: t('routes.clue.clue'), + }, + children: [ + { + path: 'cluePool', + name: 'CluePool', + component: () => import('/src/views/clue/cluePool/index.vue'), + meta: { + // roles: ['/staff/staff'], + title: t('routes.clue.cluePool'), + }, + }, + { + path: 'clueList', + name: 'ClueList', + component: () => import('/src/views/clue/clueList/index.vue'), + meta: { + // roles: ['/staff/staff'], + title: t('routes.clue.clueList'), + }, + }, + { + path: 'customer', + name: 'Customer', + component: () => import('/src/views/clue/customer/index.vue'), + meta: { + // roles: ['/staff/staff'], + title: t('routes.clue.customer'), + hideMenu: true, + }, + }, + ], +} + +export default messageRoute diff --git a/src/router/routes/modules/message.ts b/src/router/routes/modules/message.ts deleted file mode 100644 index 23e1f65..0000000 --- a/src/router/routes/modules/message.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type { AppRouteModule } from '/@/router/types' - -import { LAYOUT } from '/@/router/constant' -import { t } from '/@/hooks/web/useI18n' - -const messageRoute: AppRouteModule = { - path: '/message', - name: 'Message', - component: LAYOUT, - redirect: '/message/messageList', - meta: { - orderNo: 90013, - hideChildrenInMenu: false, - icon: 'ant-design:send-outlined', - title: t('routes.message.message'), - }, - children: [ - { - path: 'messageList', - name: 'MessageList', - component: () => import('/src/views/message/messageList/index.vue'), - meta: { - // roles: ['/staff/staff'], - title: t('routes.message.message'), - }, - }, - { - path: 'chatInfo', - name: 'ChatInfo', - component: () => import('/src/views/message/chatInfo/index.vue'), - meta: { - // roles: ['/staff/staff'], - title: t('routes.message.chatInfo'), - hideMenu: true, - }, - }, - ], -} - -export default messageRoute diff --git a/src/settings/projectSetting.ts b/src/settings/projectSetting.ts index 8745a8d..d6e1b07 100644 --- a/src/settings/projectSetting.ts +++ b/src/settings/projectSetting.ts @@ -24,7 +24,7 @@ const setting: ProjectConfig = { settingButtonPosition: SettingButtonPositionEnum.AUTO, // Permission mode - permissionMode: PermissionModeEnum.BACK, + permissionMode: PermissionModeEnum.ROLE, // Permission-related cache is stored in sessionStorage or localStorage permissionCacheType: CacheTypeEnum.LOCAL, diff --git a/src/views/message/messageList/data.ts b/src/views/clue/clueList/data.ts similarity index 100% rename from src/views/message/messageList/data.ts rename to src/views/clue/clueList/data.ts diff --git a/src/views/clue/clueList/index.vue b/src/views/clue/clueList/index.vue new file mode 100644 index 0000000..13064e2 --- /dev/null +++ b/src/views/clue/clueList/index.vue @@ -0,0 +1,71 @@ + + + + + + + + + + + + + diff --git a/src/views/clue/cluePool/data.ts b/src/views/clue/cluePool/data.ts new file mode 100644 index 0000000..84cf3de --- /dev/null +++ b/src/views/clue/cluePool/data.ts @@ -0,0 +1,26 @@ +import { BasicColumn, FormSchema } from '/@/components/Table' +const userTypeList = [ + { label: '正常用户', value: 1 }, + { label: '录入用户', value: 2}, + { label: '红娘', value: 3 }, +] + +export const tableColumns: BasicColumn[] = [ + { title: '用户昵称', dataIndex: 'nickName' }, + { title: '用户身份', dataIndex: 'userMarriageInformationType', + customRender: ({ text }) => { + return userTypeList.find((find) => find.value === text)?.label + }, + }, + // { title: '客户手机号', dataIndex: 'userPhone' }, + { title: '最新消息时间', dataIndex: 'contentTime' }, +] + +export const tableFormSchema: FormSchema[] = [ + { + field: 'nickName', + label: '用户昵称', + component: 'Input', + colProps: { span: 8}, + }, +] diff --git a/src/views/clue/cluePool/index.vue b/src/views/clue/cluePool/index.vue new file mode 100644 index 0000000..3dca43d --- /dev/null +++ b/src/views/clue/cluePool/index.vue @@ -0,0 +1,72 @@ + + + + + + + + + + + + + diff --git a/src/views/clue/customer/data.ts b/src/views/clue/customer/data.ts new file mode 100644 index 0000000..84cf3de --- /dev/null +++ b/src/views/clue/customer/data.ts @@ -0,0 +1,26 @@ +import { BasicColumn, FormSchema } from '/@/components/Table' +const userTypeList = [ + { label: '正常用户', value: 1 }, + { label: '录入用户', value: 2}, + { label: '红娘', value: 3 }, +] + +export const tableColumns: BasicColumn[] = [ + { title: '用户昵称', dataIndex: 'nickName' }, + { title: '用户身份', dataIndex: 'userMarriageInformationType', + customRender: ({ text }) => { + return userTypeList.find((find) => find.value === text)?.label + }, + }, + // { title: '客户手机号', dataIndex: 'userPhone' }, + { title: '最新消息时间', dataIndex: 'contentTime' }, +] + +export const tableFormSchema: FormSchema[] = [ + { + field: 'nickName', + label: '用户昵称', + component: 'Input', + colProps: { span: 8}, + }, +] diff --git a/src/views/message/messageList/index.vue b/src/views/clue/customer/index.vue similarity index 97% rename from src/views/message/messageList/index.vue rename to src/views/clue/customer/index.vue index 51745f8..3cee924 100644 --- a/src/views/message/messageList/index.vue +++ b/src/views/clue/customer/index.vue @@ -27,7 +27,7 @@ import { useRouter } from 'vue-router' import { tableColumns, tableFormSchema } from './data' import { BasicTable, useTable, TableAction } from '/@/components/Table' - import { getChatMessagePage } from '/@/api/message' + import { getChatMessagePage } from '/@/api/clue' const [registerTable] = useTable({ bordered: true, diff --git a/src/views/message/chatInfo/index.vue b/src/views/message/chatInfo/index.vue deleted file mode 100644 index 392ae8d..0000000 --- a/src/views/message/chatInfo/index.vue +++ /dev/null @@ -1,572 +0,0 @@ - - - - - 用户资料 - - - - {{details.name}} - - 手机号: - {{details.phone}} - - - 身份: - {{matchmakerTypeList.find((find) => find.value === details.type)?.label}} - / {{details.matchmakerLevel == 3 ? '站点服务商' : '区域服务商'}} - - - 所属门店: - {{details.storeName}} - - - 入驻时间: - {{details.validityPeriodFrom}} - - - 到期时间: - {{details.validityPeriodTo}} - - - 评分: - {{details.score || '5.0'}} - - - - - {{details.nickName}} - - 姓名: - {{details.name}} - - - 手机号: - {{details.phone}} - - - 性别: - {{details.genderCode == 0 ? '男' : '女'}} - - - 嘉宾来源: - {{details.identityTypeName || '红娘录入'}} - - - - - - 消息列表 - - - - - - - - - {{item.roomName}} - - - {{item.cityName}} - - - - {{item.finalContent}} - {{item.finalActivityTime}} - - - - - - - - - - 对话框 - {{nowItem.roomName}} - - - - - {{item.contentTime}} - - - - - - - - - - {{item.info.content || ''}} - - - - - - - - - - - 申请查看Ta的照片,是否同意? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{item.info.content}} - - - - - - - - - - - Hi!我是你的红娘,邀请你发布悬赏,现在去发布? - - - - - - - - - - - - - - - {{item.info.nickName}} - - {{item.info.age}}岁 / {{item.info.height}}cm - - - {{item.info.nowtown}} - | - {{item.info.hometown}} - - - {{item.info.education}} - | - {{item.info.occupation}} - | - {{item.info.income}} - - - - - - - - - - - - {{item.info.nickName}} - - {{item.info.age}}岁 / {{item.info.height}}cm - - - {{item.info.nowtown}} - | - {{item.info.hometown}} - - - {{item.info.education}} - | - {{item.info.occupation}} - | - {{item.info.income}} - - - 嘉宾申请与你见面,请确认! - - - 你已接受见面,待对方同意后红娘安排见面,你也可主动联系对方红娘了解进程。 - 你已经拒绝见面 - - - - - - - - - - - - - - - {{item.info.nickName}} - - {{item.info.age}}岁 / {{item.info.height}}cm - - - {{item.info.nowtown}} - | - {{item.info.hometown}} - - - {{item.info.education}} - | - {{item.info.occupation}} - | - {{item.info.income}} - - - - - - - - - - - - {{item.info.nickName}} - - {{item.info.age}}岁 / {{item.info.height}}cm - - - {{item.info.nowtown}} - | - {{item.info.hometown}} - - - {{item.info.education}} - | - {{item.info.occupation}} - | - {{item.info.income}} - - - - - - - - - - - - - - {{item.content || ''}} - - - - - - - - - - - - {{item.content || ''}} - - - - - - - - - - - - - - - - \ No newline at end of file