diff --git a/src/api/system/area/index.ts b/src/api/system/area/index.ts deleted file mode 100644 index cf318f9..0000000 --- a/src/api/system/area/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -// 获得地区树 -export function getAreaTree() { - return defHttp.get({ url: '/system/area/tree' }) -} - -// 获得 IP 对应的地区名 -export function getAreaByIp(ip: string) { - return defHttp.get({ url: `/system/area/get-by-ip?ip=${ip}` }) -} diff --git a/src/api/system/dict/data.ts b/src/api/system/dict/data.ts deleted file mode 100644 index 1cb23ff..0000000 --- a/src/api/system/dict/data.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { DictDataExportReqVO, DictDataPageReqVO, DictDataVO } from './types' -import { defHttp } from '@/utils/http/axios' - -// 查询字典数据(精简)列表 -export function listSimpleDictData() { - return defHttp.get({ url: '/system/dict-data/list-all-simple' }) -} - -// 查询字典数据列表 -export function getDictDataPage(params: DictDataPageReqVO) { - return defHttp.get({ url: '/system/dict-data/page', params }) -} - -// 查询字典数据详情 -export function getDictData(id: number) { - return defHttp.get({ url: `/system/dict-data/get?id=${id}` }) -} - -// 新增字典数据 -export function createDictData(data: DictDataVO) { - return defHttp.post({ url: '/system/dict-data/create', data }) -} - -// 修改字典数据 -export function updateDictData(data: DictDataVO) { - return defHttp.put({ url: '/system/dict-data/update', data }) -} - -// 删除字典数据 -export function deleteDictData(id: number) { - return defHttp.delete({ url: `/system/dict-data/delete?id=${id}` }) -} -// 导出字典类型数据 -export function exportDictData(params: DictDataExportReqVO) { - return defHttp.get({ url: '/system/dict-data/export', params }) -} diff --git a/src/api/system/dict/type.ts b/src/api/system/dict/type.ts deleted file mode 100644 index c07b585..0000000 --- a/src/api/system/dict/type.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { DictTypeExportReqVO, DictTypePageReqVO, DictTypeVO } from './types' -import { defHttp } from '@/utils/http/axios' - -// 查询字典(精简)列表 -export function listSimpleDictType() { - return defHttp.get({ url: '/system/dict-type/list-all-simple' }) -} - -// 查询字典列表 -export function getDictTypePage(params: DictTypePageReqVO) { - return defHttp.get({ url: '/system/dict-type/page', params }) -} - -// 查询字典详情 -export function getDictType(id: number) { - return defHttp.get({ url: `/system/dict-type/get?id=${id}` }) -} - -// 新增字典 -export function createDictType(data: DictTypeVO) { - return defHttp.post({ url: '/system/dict-type/create', data }) -} - -// 修改字典 -export function updateDictType(data: DictTypeVO) { - return defHttp.put({ url: '/system/dict-type/update', data }) -} - -// 删除字典 -export function deleteDictType(id: number) { - return defHttp.delete({ url: `/system/dict-type/delete?id=${id}` }) -} -// 导出字典类型 -export function exportDictType(params: DictTypeExportReqVO) { - return defHttp.get({ url: '/system/dict-type/export', params }) -} diff --git a/src/api/system/dict/types.ts b/src/api/system/dict/types.ts deleted file mode 100644 index 4be0d98..0000000 --- a/src/api/system/dict/types.ts +++ /dev/null @@ -1,46 +0,0 @@ -export interface DictTypeVO { - id: number - name: string - type: string - status: number - remark: string - createTime: Date -} - -export interface DictTypePageReqVO { - name: string - type: string - status: number - createTime: Date[] -} - -export interface DictTypeExportReqVO { - name: string - type: string - status: number - createTime: Date[] -} - -export interface DictDataVO { - id: number - sort: number - label: string - value: string - dictType: string - status: number - colorType: string - cssClass: string - remark: string - createTime: Date -} -export interface DictDataPageReqVO { - label: string - dictType: string - status: number -} - -export interface DictDataExportReqVO { - label: string - dictType: string - status: number -} diff --git a/src/api/system/errorCode/index.ts b/src/api/system/errorCode/index.ts deleted file mode 100644 index de5a79a..0000000 --- a/src/api/system/errorCode/index.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -export interface ErrorCodeVO { - id: number - type: number - applicationName: string - code: number - message: string - memo: string - createTime: Date -} - -export interface ErrorCodePageReqVO extends PageParam { - type?: number - applicationName?: string - code?: number - message?: string - createTime?: Date[] -} - -// 查询错误码列表 -export function getErrorCodePage(params: ErrorCodePageReqVO) { - return defHttp.get({ url: '/system/error-code/page', params }) -} - -// 查询错误码详情 -export function getErrorCode(id: number) { - return defHttp.get({ url: `/system/error-code/get?id=${id}` }) -} - -// 新增错误码 -export function createErrorCode(data: ErrorCodeVO) { - return defHttp.post({ url: '/system/error-code/create', data }) -} - -// 修改错误码 -export function updateErrorCode(data: ErrorCodeVO) { - return defHttp.put({ url: '/system/error-code/update', data }) -} - -// 删除错误码 -export function deleteErrorCode(id: number) { - return defHttp.delete({ url: `/system/error-code/delete?id=${id}` }) -} - -// 导出错误码 -export function excelErrorCode(params: ErrorCodePageReqVO) { - return defHttp.download({ url: '/system/error-code/export-excel', params }, '错误码.xls') -} diff --git a/src/api/system/loginLog/index.ts b/src/api/system/loginLog/index.ts deleted file mode 100644 index db9150a..0000000 --- a/src/api/system/loginLog/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -export interface LoginLogVO { - id: number - logType: number - traceId: number - userId: number - userType: number - username: string - status: number - userIp: string - userAgent: string - createTime: Date -} - -export interface LoginLogReqVO extends PageParam { - userIp?: string - username?: string - status?: boolean - createTime?: Date[] -} - -// 查询登录日志列表 -export function getLoginLogPage(params: LoginLogReqVO) { - return defHttp.get({ url: '/system/login-log/page', params }) -} -// 导出登录日志 -export function exportLoginLog(params: LoginLogReqVO) { - return defHttp.download({ url: '/system/login-log/export', params }, '登录日志.xls') -} diff --git a/src/api/system/mail/account.ts b/src/api/system/mail/account.ts deleted file mode 100644 index ef71ae5..0000000 --- a/src/api/system/mail/account.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -// 创建邮箱账号 -export function createMailAccount(data) { - return defHttp.post({ url: '/system/mail-account/create', data }) -} - -// 更新邮箱账号 -export function updateMailAccount(data) { - return defHttp.put({ url: '/system/mail-account/update', data }) -} - -// 删除邮箱账号 -export function deleteMailAccount(id: number) { - return defHttp.delete({ url: `/system/mail-account/delete?id=${id}` }) -} - -// 获得邮箱账号 -export function getMailAccount(id: number) { - return defHttp.get({ url: `/system/mail-account/get?id=${id}` }) -} - -// 获得邮箱账号分页 -export function getMailAccountPage(params) { - return defHttp.get({ url: '/system/mail-account/page', params }) -} - -// 获取邮箱账号的精简信息列表 -export function getSimpleMailAccountList() { - return defHttp.get({ url: '/system/mail-account/list-all-simple' }) -} diff --git a/src/api/system/mail/log.ts b/src/api/system/mail/log.ts deleted file mode 100644 index 3afebca..0000000 --- a/src/api/system/mail/log.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -// 获得邮件日志 -export function getMailLog(id: number) { - return defHttp.get({ url: `/system/mail-log/get?id=${id}` }) -} - -// 获得邮件日志分页 -export function getMailAccountPage(params) { - return defHttp.get({ url: '/system/mail-log/page', params }) -} diff --git a/src/api/system/mail/template.ts b/src/api/system/mail/template.ts deleted file mode 100644 index 85ed36c..0000000 --- a/src/api/system/mail/template.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -// 创建邮件模版 -export function createMailTemplate(data) { - return defHttp.post({ url: '/system/mail-template/create', data }) -} - -// 更新邮件模版 -export function updateMailTemplate(data) { - return defHttp.put({ url: '/system/mail-template/update', data }) -} - -// 删除邮件模版 -export function deleteMailTemplate(id: number) { - return defHttp.delete({ url: `/system/mail-template/delete?id=${id}` }) -} - -// 获得邮件模版 -export function getMailTemplate(id: number) { - return defHttp.get({ url: `/system/mail-template/get?id=${id}` }) -} - -// 获得邮件模版分页 -export function getMailTemplatePage(params) { - return defHttp.get({ url: '/system/mail-template/page', params }) -} - -// 邮件模板 -export interface MailTemplate { - name: string // 标题 - code: string // 编码 - accountId: number - nickname: string // 发送人 - title: string // 标题 - content: string // 内容 - status: number // - remark?: any // 备注 - id: number - params: string[] // 模板里的参数 - createTime: number -} - -export interface SendMailParams { - mail: string - templateCode: string - templateParams: { - [key: string]: any - } -} - -// 发送测试邮件 -export function sendMail(data: SendMailParams) { - return defHttp.post({ url: '/system/mail-template/send-mail', data }) -} diff --git a/src/api/system/notice/index.ts b/src/api/system/notice/index.ts deleted file mode 100644 index 79cf924..0000000 --- a/src/api/system/notice/index.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -export interface NoticeVO { - id: number - title: string - type: number - content: string - status: number - remark: string - creator: string - createTime: Date -} - -export interface NoticePageReqVO extends PageParam { - title?: string - status?: number -} - -// 查询公告列表 -export function getNoticePage(params: NoticePageReqVO) { - return defHttp.get({ url: '/system/notice/page', params }) -} - -// 查询公告详情 -export function getNotice(id: number) { - return defHttp.get({ url: `/system/notice/get?id=${id}` }) -} - -// 新增公告 -export function createNotice(data: NoticeVO) { - return defHttp.post({ url: '/system/notice/create', data }) -} - -// 修改公告 -export function updateNotice(data: NoticeVO) { - return defHttp.put({ url: '/system/notice/update', data }) -} - -// 删除公告 -export function deleteNotice(id: number) { - return defHttp.delete({ url: `/system/notice/delete?id=${id}` }) -} diff --git a/src/api/system/notify/message.ts b/src/api/system/notify/message.ts deleted file mode 100644 index 7b99571..0000000 --- a/src/api/system/notify/message.ts +++ /dev/null @@ -1,32 +0,0 @@ -import qs from 'qs' -import { defHttp } from '@/utils/http/axios' - -// 获得站内信分页 -export function getNotifyMessagePage(params) { - return defHttp.get({ url: '/system/notify-message/page', params }) -} - -// 获得我的站内信分页 -export function getMyNotifyMessagePage(params) { - return defHttp.get({ url: '/system/notify-message/my-page', params }) -} - -// 批量标记已读 -export function updateNotifyMessageRead(ids: number[]) { - return defHttp.put({ url: `/system/notify-message/update-read?${qs.stringify({ ids }, { indices: false })}` }) -} - -// 标记所有站内信为已读 -export function updateAllNotifyMessageRead() { - return defHttp.put({ url: '/system/notify-message/update-all-read' }) -} - -// 获取当前用户的最新站内信列表 -export function getUnreadNotifyMessageList() { - return defHttp.get({ url: '/system/notify-message/get-unread-list' }) -} - -// 获得当前用户的未读站内信数量 -export function getUnreadNotifyMessageCount() { - return defHttp.get({ url: '/system/notify-message/get-unread-count' }) -} diff --git a/src/api/system/notify/template.ts b/src/api/system/notify/template.ts deleted file mode 100644 index eb6a563..0000000 --- a/src/api/system/notify/template.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -// 创建站内信模板 -export function createNotifyTemplate(data) { - return defHttp.post({ url: '/system/notify-template/create', data }) -} - -// 更新站内信模板 -export function updateNotifyTemplate(data) { - return defHttp.put({ url: '/system/notify-template/update', data }) -} - -// 删除站内信模板 -export function deleteNotifyTemplate(id: number) { - return defHttp.delete({ url: `/system/notify-template/delete?id=${id}` }) -} - -// 获得站内信模板 -export function getNotifyTemplate(id: number) { - return defHttp.get({ url: `/system/notify-template/get?id=${id}` }) -} - -// 获得站内信模板分页 -export function getNotifyTemplatePage(params) { - return defHttp.get({ url: '/system/notify-template/page', params }) -} - -// 获取岗位精简信息列表 -export function listSimplePosts() { - return defHttp.get({ url: '/system/post/list-all-simple' }) -} - -// 导出站内信模板 Excel -export function exportNotifyTemplateExcel(params) { - return defHttp.download({ url: '/system/notify-template/export-excel', params }, '导出站内信模板.xls') -} - -export interface SendNotifyParam { - userId: number - templateCode: string - templateParams: { - [key: string]: string - } -} - -export interface NotifyTemplate { - name: string - code: string - type: number - nickname: string - content: string - status: number - remark?: any - id: number - params: string[] - createTime: number - key: string -} - -// 发送 -export function sendNotify(data: SendNotifyParam) { - return defHttp.post({ url: '/system/notify-template/send-notify', data }) -} diff --git a/src/api/system/oauth2/client.ts b/src/api/system/oauth2/client.ts deleted file mode 100644 index 61dc611..0000000 --- a/src/api/system/oauth2/client.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -export interface OAuth2ClientVO { - id: number - clientId: string - secret: string - name: string - logo: string - description: string - status: number - accessTokenValiditySeconds: number - refreshTokenValiditySeconds: number - redirectUris: string[] - autoApprove: boolean - authorizedGrantTypes: string[] - scopes: string[] - authorities: string[] - resourceIds: string[] - additionalInformation: string - isAdditionalInformationJson: boolean - createTime: Date -} - -export interface OAuth2ClientPageReqVO extends PageParam { - name?: string - status?: number -} -// 查询 OAuth2列表 -export function getOAuth2ClientPage(params: OAuth2ClientPageReqVO) { - return defHttp.get({ url: '/system/oauth2-client/page', params }) -} - -// 查询 OAuth2详情 -export function getOAuth2Client(id: number) { - return defHttp.get({ url: `/system/oauth2-client/get?id=${id}` }) -} - -// 新增 OAuth2 -export function createOAuth2Client(data: OAuth2ClientVO) { - return defHttp.post({ url: '/system/oauth2-client/create', data }) -} - -// 修改 OAuth2 -export function updateOAuth2Client(data: OAuth2ClientVO) { - return defHttp.put({ url: '/system/oauth2-client/update', data }) -} - -// 删除 OAuth2 -export function deleteOAuth2Client(id: number) { - return defHttp.delete({ url: `/system/oauth2-client/delete?id=${id}` }) -} diff --git a/src/api/system/oauth2/token.ts b/src/api/system/oauth2/token.ts deleted file mode 100644 index 26b7080..0000000 --- a/src/api/system/oauth2/token.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -export interface OAuth2TokenVO { - id: number - accessToken: string - refreshToken: string - userId: number - userType: number - clientId: string - createTime: Date - expiresTime: Date -} - -export interface OAuth2TokenPageReqVO extends PageParam { - userId?: number - userType?: number - clientId?: string -} - -// 查询 token列表 -export function getAccessTokenPage(params: OAuth2TokenPageReqVO) { - return defHttp.get({ url: '/system/oauth2-token/page', params }) -} - -// 删除 token -export function deleteAccessToken(accessToken: number) { - return defHttp.delete({ url: `/system/oauth2-token/delete?accessToken=${accessToken}` }) -} diff --git a/src/api/system/operatelog/index.ts b/src/api/system/operatelog/index.ts deleted file mode 100644 index edbd944..0000000 --- a/src/api/system/operatelog/index.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -export interface OperateLogVO { - id: number - userNickname: string - traceId: string - userId: number - module: string - name: string - type: number - content: string - exts: Map - defHttpMethod: string - defHttpUrl: string - userIp: string - userAgent: string - javaMethod: string - javaMethodArgs: string - startTime: Date - duration: number - resultCode: number - resultMsg: string - resultData: string -} - -export interface OperateLogPageReqVO extends PageParam { - module?: string - userNickname?: string - type?: number - success?: boolean - startTime?: Date[] -} - -// 查询操作日志列表 -export function getOperateLogPage(params: OperateLogPageReqVO) { - return defHttp.get({ url: '/system/operate-log/page', params }) -} -// 导出操作日志 -export function exportOperateLog(params: OperateLogPageReqVO) { - return defHttp.download({ url: '/system/operate-log/export', params }, '操作日志.xls') -} diff --git a/src/api/system/permission/index.ts b/src/api/system/permission/index.ts deleted file mode 100644 index 6e9182a..0000000 --- a/src/api/system/permission/index.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -export interface PermissionAssignUserRoleReqVO { - userId: number - roleIds: number[] -} - -export interface PermissionAssignRoleMenuReqVO { - roleId: number - menuIds: number[] -} - -export interface PermissionAssignRoleDataScopeReqVO { - roleId: number - dataScope: number - dataScopeDeptIds: number[] -} - -// 查询角色拥有的菜单权限 -export function listRoleMenus(roleId: number) { - return defHttp.get({ url: `/system/permission/list-role-menus?roleId=${roleId}` }) -} - -// 赋予角色菜单权限 -export function assignRoleMenu(data: PermissionAssignRoleMenuReqVO) { - return defHttp.post({ url: '/system/permission/assign-role-menu', data }) -} - -// 赋予角色数据权限 -export function assignRoleDataScope(data: PermissionAssignRoleDataScopeReqVO) { - return defHttp.post({ url: '/system/permission/assign-role-data-scope', data }) -} - -// 查询用户拥有的角色数组 -export function listUserRoles(userId: number) { - return defHttp.get({ url: `/system/permission/list-user-roles?userId=${userId}` }) -} - -// 赋予用户角色 -export function assignUserRole(data: PermissionAssignUserRoleReqVO) { - return defHttp.post({ url: '/system/permission/assign-user-role', data }) -} diff --git a/src/api/system/post/index.ts b/src/api/system/post/index.ts deleted file mode 100644 index ca1ac00..0000000 --- a/src/api/system/post/index.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -export interface PostVO { - id?: number - name: string - code: string - sort: number - status: number - remark: string - createTime?: Date -} - -export interface PostPageReqVO extends PageParam { - code?: string - name?: string - status?: number -} - -export interface PostExportReqVO { - code?: string - name?: string - status?: number -} - -// 查询岗位列表 -export function getPostPage(params: PostPageReqVO) { - return defHttp.get>({ url: '/system/post/page', params }) -} - -// 获取岗位精简信息列表 -export function listSimplePosts() { - return defHttp.get({ url: '/system/post/list-all-simple' }) -} - -// 查询岗位详情 -export function getPost(id: number) { - return defHttp.get({ url: `/system/post/get?id=${id}` }) -} - -// 新增岗位 -export function createPost(data) { - return defHttp.post({ url: '/system/post/create', data }) -} - -// 修改岗位 -export function updatePost(data) { - return defHttp.put({ url: '/system/post/update', data }) -} - -// 删除岗位 -export function deletePost(id: number) { - return defHttp.delete({ url: `/system/post/delete?id=${id}` }) -} - -// 导出岗位 -export function exportPost(params: PostExportReqVO) { - return defHttp.download({ url: '/system/post/export', params }, '导出岗位.xls') -} diff --git a/src/api/system/sensitiveWord/index.ts b/src/api/system/sensitiveWord/index.ts deleted file mode 100644 index 4dfa79a..0000000 --- a/src/api/system/sensitiveWord/index.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -export interface SensitiveWordVO { - id: number - name: string - status: number - description: string - tags: string[] - createTime: Date -} - -export interface SensitiveWordPageReqVO extends PageParam { - name?: string - tag?: string - status?: number - createTime?: Date[] -} - -export interface SensitiveWordExportReqVO { - name?: string - tag?: string - status?: number - createTime?: Date[] -} - -// 查询敏感词列表 -export function getSensitiveWordPage(params: SensitiveWordPageReqVO) { - return defHttp.get({ url: '/system/sensitive-word/page', params }) -} - -// 查询敏感词详情 -export function getSensitiveWord(id: number) { - return defHttp.get({ url: `/system/sensitive-word/get?id=${id}` }) -} - -// 新增敏感词 -export function createSensitiveWord(data: SensitiveWordVO) { - return defHttp.post({ url: '/system/sensitive-word/create', data }) -} - -// 修改敏感词 -export function updateSensitiveWord(data: SensitiveWordVO) { - return defHttp.put({ url: '/system/sensitive-word/update', data }) -} - -// 删除敏感词 -export function deleteSensitiveWord(id: number) { - return defHttp.delete({ url: `/system/sensitive-word/delete?id=${id}` }) -} - -// 导出敏感词 -export function exportSensitiveWord(params: SensitiveWordExportReqVO) { - return defHttp.download({ url: '/system/sensitive-word/export-excel', params }, '导出敏感词.xls') -} - -// 获取所有敏感词的标签数组 -export function getSensitiveWordTags() { - return defHttp.get({ url: '/system/sensitive-word/get-tags' }) -} - -// 获得文本所包含的不合法的敏感词数组 -export function validateText(id: number) { - return defHttp.get({ url: `/system/sensitive-word/validate-text?${id}` }) -} diff --git a/src/api/system/sms/smsChannel/index.ts b/src/api/system/sms/smsChannel/index.ts deleted file mode 100644 index 46c0e38..0000000 --- a/src/api/system/sms/smsChannel/index.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -export interface SmsChannelVO { - id: number - code: string - status: number - signature: string - remark: string - apiKey: string - apiSecret: string - callbackUrl: string - createTime: Date -} - -export interface SmsChannelPageReqVO extends PageParam { - signature?: string - code?: string - status?: number - createTime?: Date[] -} - -// 查询短信渠道列表 -export function getSmsChannelPage(params: SmsChannelPageReqVO) { - return defHttp.get({ url: '/system/sms-channel/page', params }) -} - -// 获得短信渠道精简列表 -export function getSimpleSmsChannels() { - return defHttp.get({ url: '/system/sms-channel/list-all-simple' }) -} - -// 查询短信渠道详情 -export function getSmsChannel(id: number) { - return defHttp.get({ url: `/system/sms-channel/get?id=${id}` }) -} - -// 新增短信渠道 -export function createSmsChannel(data: SmsChannelVO) { - return defHttp.post({ url: '/system/sms-channel/create', data }) -} - -// 修改短信渠道 -export function updateSmsChannel(data: SmsChannelVO) { - return defHttp.put({ url: '/system/sms-channel/update', data }) -} - -// 删除短信渠道 -export function deleteSmsChannel(id: number) { - return defHttp.delete({ url: `/system/sms-channel/delete?id=${id}` }) -} diff --git a/src/api/system/sms/smsLog/index.ts b/src/api/system/sms/smsLog/index.ts deleted file mode 100644 index af1a528..0000000 --- a/src/api/system/sms/smsLog/index.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -export interface SmsLogVO { - id: number - channelId: number - channelCode: string - templateId: number - templateCode: string - templateType: number - templateContent: string - templateParams: Map - mobile: string - userId: number - userType: number - sendStatus: number - sendTime: Date - apiSendCode: string - apiSendMsg: string - apidefHttpId: string - apiSerialNo: string - receiveStatus: number - receiveTime: Date - apiReceiveCode: string - apiReceiveMsg: string - createTime: Date -} - -export interface SmsLogPageReqVO extends PageParam { - channelId?: number - templateId?: number - mobile?: string - sendStatus?: number - sendTime?: Date[] - receiveStatus?: number - receiveTime?: Date[] -} -export interface SmsLogExportReqVO { - channelId?: number - templateId?: number - mobile?: string - sendStatus?: number - sendTime?: Date[] - receiveStatus?: number - receiveTime?: Date[] -} - -// 查询短信日志列表 -export function getSmsLogPage(params: SmsLogPageReqVO) { - return defHttp.get({ url: '/system/sms-log/page', params }) -} - -// 导出短信日志 -export function exportSmsLog(params: SmsLogExportReqVO) { - return defHttp.download({ url: '/system/sms-log/export', params }, '短信日志.xls') -} diff --git a/src/api/system/sms/smsTemplate/index.ts b/src/api/system/sms/smsTemplate/index.ts deleted file mode 100644 index 5dfe192..0000000 --- a/src/api/system/sms/smsTemplate/index.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -export interface SmsTemplateVO { - id: number - type: number - status: number - code: string - name: string - content: string - remark: string - apiTemplateId: string - channelId: number - channelCode: string - params: string[] - createTime: Date -} - -export interface SendSmsReqVO { - mobile: string - templateCode: string - templateParams: { - [key: string]: any - } -} - -export interface SmsTemplatePageReqVO { - type?: number - status?: number - code?: string - content?: string - apiTemplateId?: string - channelId?: number - createTime?: Date[] -} - -export interface SmsTemplateExportReqVO { - type?: number - status?: number - code?: string - content?: string - apiTemplateId?: string - channelId?: number - createTime?: Date[] -} - -// 查询短信模板列表 -export function getSmsTemplatePage(params: SmsTemplatePageReqVO) { - return defHttp.get({ url: '/system/sms-template/page', params }) -} - -// 查询短信模板详情 -export function getSmsTemplate(id: number) { - return defHttp.get({ url: `/system/sms-template/get?id=${id}` }) -} - -// 新增短信模板 -export function createSmsTemplate(data: SmsTemplateVO) { - return defHttp.post({ url: '/system/sms-template/create', data }) -} - -// 修改短信模板 -export function updateSmsTemplate(data: SmsTemplateVO) { - return defHttp.put({ url: '/system/sms-template/update', data }) -} - -// 删除短信模板 -export function deleteSmsTemplate(id: number) { - return defHttp.delete({ url: `/system/sms-template/delete?id=${id}` }) -} - -// 邮件模板 -export interface SmsTemplate { - name: string // 标题 - code: string // 编码 - accountId: number - nickname: string // 发送人 - title: string // 标题 - content: string // 内容 - status: number // - remark?: any // 备注 - id: number - params: string[] // 模板里的参数 - createTime: number -} - -// 发送短信 -export function sendSms(data: SendSmsReqVO) { - return defHttp.post({ url: '/system/sms-template/send-sms', data }) -} - -// 导出短信模板 -export function exportSmsTemplate(params: SmsTemplateExportReqVO) { - return defHttp.download({ url: '/system/sms-template/export-excel', params }, '短信模板.xls') -} diff --git a/src/api/system/tenantPackage/index.ts b/src/api/system/tenantPackage/index.ts deleted file mode 100644 index 853a234..0000000 --- a/src/api/system/tenantPackage/index.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { defHttp } from '@/utils/http/axios' - -export interface TenantPackageVO { - id: number - name: string - status: number - remark: string - creator: string - updater: string - updateTime: string - menuIds: number[] - createTime: Date -} - -export interface TenantPackagePageReqVO extends PageParam { - name?: string - status?: number - remark?: string - createTime?: Date[] -} - -// 查询租户套餐列表 -export function getTenantPackagePage(params: TenantPackagePageReqVO) { - return defHttp.get({ url: '/system/tenant-package/page', params }) -} - -// 获得租户 -export function getTenantPackage(id: number) { - return defHttp.get({ url: `/system/tenant-package/get?id=${id}` }) -} - -// 新增租户套餐 -export function createTenantPackage(data: TenantPackageVO) { - return defHttp.post({ url: '/system/tenant-package/create', data }) -} - -// 修改租户套餐 -export function updateTenantPackage(data: TenantPackageVO) { - return defHttp.put({ url: '/system/tenant-package/update', data }) -} - -// 删除租户套餐 -export function deleteTenantPackage(id: number) { - return defHttp.delete({ url: `/system/tenant-package/delete?id=${id}` }) -} -// 获取租户套餐精简信息列表 -export function getTenantPackageList() { - return defHttp.get({ url: '/system/tenant-package/get-simple-list' }) -} diff --git a/src/components/DictTag/index.ts b/src/components/DictTag/index.ts deleted file mode 100644 index 5aff2f9..0000000 --- a/src/components/DictTag/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import dictTag from './src/DictTag.vue' -import { withInstall } from '@/utils' - -export const DictTag = withInstall(dictTag) diff --git a/src/components/DictTag/src/DictTag.vue b/src/components/DictTag/src/DictTag.vue deleted file mode 100644 index 34f6679..0000000 --- a/src/components/DictTag/src/DictTag.vue +++ /dev/null @@ -1,72 +0,0 @@ - diff --git a/src/components/Table/src/hooks/useRender.ts b/src/components/Table/src/hooks/useRender.ts index 437b051..a15f3f2 100644 --- a/src/components/Table/src/hooks/useRender.ts +++ b/src/components/Table/src/hooks/useRender.ts @@ -3,7 +3,6 @@ import dayjs from 'dayjs' import { Button, Tag } from 'ant-design-vue' import TableImg from '../components/TableImg.vue' import { isArray, isString } from '@/utils/is' -import { DictTag } from '@/components/DictTag' import { JsonPreview } from '@/components/CodeEditor' export const useRender = { @@ -87,18 +86,6 @@ export const useRender = { else return dayjs(text).format(format) }, - /** - * 渲染字典 - * @param text 字典值 - * @param dictType 字典类型 - * @returns 字典标签 - */ - renderDict: (text: string, dictType: string) => { - if (dictType) - return h(DictTag, { type: dictType, value: text }) - - return '' - }, /** * 渲染图标icon * @param text icon diff --git a/src/enums/cacheEnum.ts b/src/enums/cacheEnum.ts index 2e92ee6..055de73 100644 --- a/src/enums/cacheEnum.ts +++ b/src/enums/cacheEnum.ts @@ -16,9 +16,6 @@ export const ROLES_KEY = 'ROLES__KEY__' // project config key export const PROJ_CFG_KEY = 'PROJ__CFG__KEY__' -// dict info key -export const DICT_KEY = 'DICT__KEY__' - // lock info export const LOCK_INFO_KEY = 'LOCK__INFO__KEY__' diff --git a/src/router/guard/permissionGuard.ts b/src/router/guard/permissionGuard.ts index 57a6ea3..366bf40 100644 --- a/src/router/guard/permissionGuard.ts +++ b/src/router/guard/permissionGuard.ts @@ -16,7 +16,6 @@ const LOGIN_PATH = PageEnum.BASE_LOGIN const whitePathList: PageEnum[] = [LOGIN_PATH] export function createPermissionGuard(router: Router) { - // const dictStore = useDictStoreWithOut() const userStore = useUserStoreWithOut() const permissionStore = usePermissionStoreWithOut() router.beforeEach(async (to, from, next) => { @@ -78,9 +77,6 @@ export function createPermissionGuard(router: Router) { return } - // if (!dictStore.getIsSetDict) - // await dictStore.setDictMap() - // get userinfo while last fetch time is empty if (userStore.getLastUpdateTime === 0) { try { diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts deleted file mode 100644 index 9379eb4..0000000 --- a/src/store/modules/dict.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { defineStore } from 'pinia' -import type { DictState } from '@/types/store' - -import { store } from '@/store' - -import { DICT_KEY } from '@/enums/cacheEnum' -import { createLocalStorage } from '@/utils/cache' -import { listSimpleDictData } from '@/api/system/dict/data' -import type { DictDataVO } from '@/api/system/dict/types' - -const ls = createLocalStorage() - -export const useDictStore = defineStore({ - id: 'app-dict', - state: (): DictState => ({ - dictMap: new Map(), - isSetDict: false, - }), - getters: { - getDictMap(state): Recordable { - const dictMap = ls.get(DICT_KEY) - if (dictMap) - state.dictMap = dictMap - - return state.dictMap - }, - getIsSetDict(state): boolean { - return state.isSetDict - }, - }, - actions: { - async setDictMap() { - const dictMap = ls.get(DICT_KEY) - if (dictMap) { - this.dictMap = dictMap - this.isSetDict = true - } - else { - const res = await listSimpleDictData() - // 设置数据 - const dictDataMap = new Map() - res.forEach((dictData: DictDataVO) => { - // 获得 dictType 层级 - const enumValueObj = dictDataMap[dictData.dictType] - if (!enumValueObj) - dictDataMap[dictData.dictType] = [] - - // 处理 dictValue 层级 - dictDataMap[dictData.dictType].push({ - value: dictData.value, - label: dictData.label, - colorType: dictData.colorType, - cssClass: dictData.cssClass, - }) - }) - this.dictMap = dictDataMap - this.isSetDict = true - ls.set(DICT_KEY, dictDataMap, 60) // 60 秒 过期 - } - }, - }, -}) - -// Need to be used outside the setup -export function useDictStoreWithOut() { - return useDictStore(store) -} diff --git a/src/store/modules/userMessage.ts b/src/store/modules/userMessage.ts deleted file mode 100644 index 5d5c11c..0000000 --- a/src/store/modules/userMessage.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { defineStore } from 'pinia' -import { getUnreadNotifyMessageCount } from '@/api/system/notify/message' - -interface MessageState { - unreadCount: number // 未读消息数量 -} - -export const useUserMessageStore = defineStore('userMessage', { - state: (): MessageState => ({ - unreadCount: 0, - }), - getters: { - getUnreadCount(state) { - return state.unreadCount - }, - }, - actions: { - // 更新未读消息的数量 - async updateUnreadCount() { - const count = await getUnreadNotifyMessageCount() - this.unreadCount = count - }, - }, -}) diff --git a/src/types/store.d.ts b/src/types/store.d.ts index 73d31b0..96fd788 100644 --- a/src/types/store.d.ts +++ b/src/types/store.d.ts @@ -45,8 +45,3 @@ export interface BeforeMiniState { menuMode?: MenuModeEnum menuType?: MenuTypeEnum } - -export interface DictState { - dictMap: Map - isSetDict: boolean -} diff --git a/src/utils/dict.ts b/src/utils/dict.ts deleted file mode 100644 index 35a4ac7..0000000 --- a/src/utils/dict.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * 数据字典工具类 - */ -import { useDictStoreWithOut } from '@/store/modules/dict' -import type { StringLiteralsToType } from '@/types/utils' - -const dictStore = useDictStoreWithOut() - -/** - * 获取 dictType 对应的数据字典数组 - * - * @param dictType 数据类型 - * @returns {*|Array} 数据字典数组 - */ -export interface DictDataType { - dictType: string - label: string - value: T - key?: any - colorType: string - cssClass: string -} - -export function getDictDatas(dictType: string) { - return dictStore.getDictMap[dictType] || [] -} - -export function getDictOpts(dictType: string) { - /** - * 这里原来是转换类型 转换类型后反而显示不出来正确的Tag - * 实际类型转换交给下面的getDictOptions来处理 - * - * bugfix: - * dictOption.push({ - ...dict, - value: parseInt(dict.value + '') - }) - 原来的这种写法是造成页面卡死的原因 - */ - return getDictDatas(dictType) -} - -export function getDictOptions(dictType: string, valueType?: T) { - const dictOption: DictDataType>[] = [] - const dictOptions: DictDataType[] = getDictDatas(dictType) - if (dictOptions && dictOptions.length > 0) { - dictOptions.forEach((dict: DictDataType) => { - dictOption.push({ - ...dict, - key: dict.value, - value: - valueType === 'string' - ? `${dict.value}` - : valueType === 'boolean' - ? `${dict.value}` === 'true' - : Number.parseInt(`${dict.value}`), - } as DictDataType>) - }) - } - return dictOption -} - -export function getDictObj(dictType: string, value: any) { - const dictOptions: DictDataType[] = getDictDatas(dictType) - if (dictOptions) { - dictOptions.forEach((dict: DictDataType) => { - if (dict.value === value.toString()) - return dict - }) - } - else { - return null - } -} - -export enum DICT_TYPE { - USER_TYPE = 'user_type', - COMMON_STATUS = 'common_status', - SYSTEM_TENANT_PACKAGE_ID = 'system_tenant_package_id', - SYSTEM_USER_SEX = 'system_user_sex', - SYSTEM_MENU_TYPE = 'system_menu_type', - SYSTEM_ROLE_TYPE = 'system_role_type', - SYSTEM_DATA_SCOPE = 'system_data_scope', - SYSTEM_NOTICE_TYPE = 'system_notice_type', - SYSTEM_OPERATE_TYPE = 'system_operate_type', - SYSTEM_LOGIN_TYPE = 'system_login_type', - SYSTEM_LOGIN_RESULT = 'system_login_result', - SYSTEM_SMS_CHANNEL_CODE = 'system_sms_channel_code', - SYSTEM_SMS_TEMPLATE_TYPE = 'system_sms_template_type', - SYSTEM_SMS_SEND_STATUS = 'system_sms_send_status', - SYSTEM_SMS_RECEIVE_STATUS = 'system_sms_receive_status', - SYSTEM_ERROR_CODE_TYPE = 'system_error_code_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', - INFRA_BOOLEAN_STRING = 'infra_boolean_string', -} diff --git a/src/views/system/area/AreaModal.vue b/src/views/system/area/AreaModal.vue deleted file mode 100644 index f6c40f5..0000000 --- a/src/views/system/area/AreaModal.vue +++ /dev/null @@ -1,42 +0,0 @@ - - - diff --git a/src/views/system/area/area.data.ts b/src/views/system/area/area.data.ts deleted file mode 100644 index 752ee70..0000000 --- a/src/views/system/area/area.data.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { BasicColumn, FormSchema } from '@/components/Table' - -export const columns: BasicColumn[] = [ - { - title: '编号', - dataIndex: 'id', - width: 100, - align: 'left', - }, - { - title: '名字', - dataIndex: 'name', - width: 180, - }, -] - -export const formSchema: FormSchema[] = [ - { - label: 'IP', - field: 'ip', - required: true, - component: 'Input', - }, - { - label: '地址', - field: 'result', - component: 'Input', - }, -] diff --git a/src/views/system/area/index.vue b/src/views/system/area/index.vue deleted file mode 100644 index dfbe457..0000000 --- a/src/views/system/area/index.vue +++ /dev/null @@ -1,53 +0,0 @@ - - - diff --git a/src/views/system/dict/DictData.vue b/src/views/system/dict/DictData.vue deleted file mode 100644 index 40b451a..0000000 --- a/src/views/system/dict/DictData.vue +++ /dev/null @@ -1,102 +0,0 @@ - - - diff --git a/src/views/system/dict/DictDataModal.vue b/src/views/system/dict/DictDataModal.vue deleted file mode 100644 index 7a4eaf2..0000000 --- a/src/views/system/dict/DictDataModal.vue +++ /dev/null @@ -1,63 +0,0 @@ - - - diff --git a/src/views/system/dict/DictTypeModal.vue b/src/views/system/dict/DictTypeModal.vue deleted file mode 100644 index 6c787da..0000000 --- a/src/views/system/dict/DictTypeModal.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/src/views/system/dict/dict.data.ts b/src/views/system/dict/dict.data.ts deleted file mode 100644 index 41d17cf..0000000 --- a/src/views/system/dict/dict.data.ts +++ /dev/null @@ -1,206 +0,0 @@ -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' - -const options = [ - { - value: '', - label: '无', - }, - { - value: 'processing', - label: '主要', - }, - { - value: 'success', - label: '成功', - }, - { - value: 'default', - label: '默认', - }, - { - value: 'warning', - label: '警告', - }, - { - value: 'error', - label: '危险', - }, - { - value: 'pink', - label: 'pink', - }, - { - value: 'red', - label: 'red', - }, - { - value: 'orange', - label: 'orange', - }, - { - value: 'green', - label: 'green', - }, - { - value: 'cyan', - label: 'cyan', - }, - { - value: 'blue', - label: 'blue', - }, - { - value: 'purple', - label: 'purple', - }, -] - -function previewOptions() { - return options.map((option) => { - const { value, label } = option - if (value === '') - return option - - return { - label: useRender.renderTag(label, value), - value, - } - }) -} - -export const dataColumns: BasicColumn[] = [ - { - title: '字典编码', - dataIndex: 'id', - width: 100, - }, - { - title: '字典标签', - dataIndex: 'label', - width: 180, - }, - { - title: '字典键值', - dataIndex: 'value', - width: 100, - }, - { - title: '字典排序', - dataIndex: 'sort', - width: 120, - }, - { - title: '状态', - dataIndex: 'status', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.COMMON_STATUS) - }, - }, - { - title: '颜色类型', - dataIndex: 'colorType', - width: 180, - }, - { - title: 'CSS Class', - dataIndex: 'cssClass', - width: 180, - }, - { - title: '备注', - dataIndex: 'remark', - width: 180, - }, - { - title: '创建时间', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const dataSearchFormSchema: FormSchema[] = [ - { - label: '字典标签', - field: 'label', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - colProps: { span: 8 }, - }, -] - -export const dataFormSchema: FormSchema[] = [ - { - label: '编号', - field: 'id', - show: false, - component: 'Input', - }, - { - label: '字典类型', - field: 'dictType', - required: true, - component: 'Input', - dynamicDisabled: ({ values }) => !!values.dictType, - }, - { - label: '数据标签', - field: 'label', - required: true, - component: 'Input', - }, - { - label: '数据键值', - field: 'value', - required: true, - component: 'Input', - }, - { - label: '显示排序', - field: 'sort', - required: true, - defaultValue: 0, - component: 'InputNumber', - }, - { - label: '状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - }, - { - label: '颜色类型', - field: 'colorType', - component: 'Select', - componentProps: { - options: previewOptions(), - }, - }, - { - label: 'CSS Class', - field: 'cssClass', - component: 'Input', - helpMessage: '输入hex模式的颜色, 例如#108ee9', - rules: [{ required: false, message: '输入正确的16进制颜色', pattern: /^#([0-9a-fA-F]{3}){1,2}$/, trigger: 'blur' }], - }, - { - label: '备注', - field: 'remark', - component: 'InputTextArea', - }, -] diff --git a/src/views/system/dict/dict.type.ts b/src/views/system/dict/dict.type.ts deleted file mode 100644 index 3b0c7d0..0000000 --- a/src/views/system/dict/dict.type.ts +++ /dev/null @@ -1,89 +0,0 @@ -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' - -export const typeColumns: BasicColumn[] = [ - { - title: '字典编号', - dataIndex: 'id', - width: 100, - }, - { - title: '字典名称', - dataIndex: 'name', - width: 180, - }, - { - title: '状态', - dataIndex: 'status', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.COMMON_STATUS) - }, - }, - { - title: '备注', - dataIndex: 'remark', - width: 180, - }, - { - title: '创建时间', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const typeSearchFormSchema: FormSchema[] = [ - { - label: '字典名称', - field: 'name', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - colProps: { span: 8 }, - }, -] - -export const typeFormSchema: FormSchema[] = [ - { - label: '编号', - field: 'id', - show: false, - component: 'Input', - }, - { - label: '字典名称', - field: 'name', - required: true, - component: 'Input', - }, - { - label: '字典类型', - field: 'type', - required: true, - component: 'Input', - }, - { - label: '状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - }, - { - label: '备注', - field: 'remark', - component: 'InputTextArea', - }, -] diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue deleted file mode 100644 index c3aec21..0000000 --- a/src/views/system/dict/index.vue +++ /dev/null @@ -1,90 +0,0 @@ - - - diff --git a/src/views/system/errorCode/ErrorCodeModal.vue b/src/views/system/errorCode/ErrorCodeModal.vue deleted file mode 100644 index c6af167..0000000 --- a/src/views/system/errorCode/ErrorCodeModal.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/src/views/system/errorCode/errorCode.data.ts b/src/views/system/errorCode/errorCode.data.ts deleted file mode 100644 index a781ed7..0000000 --- a/src/views/system/errorCode/errorCode.data.ts +++ /dev/null @@ -1,115 +0,0 @@ -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' - -export const columns: BasicColumn[] = [ - { - title: '编号', - dataIndex: 'id', - width: 100, - }, - { - title: '类型', - dataIndex: 'type', - width: 80, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.SYSTEM_ERROR_CODE_TYPE) - }, - }, - { - title: '应用名', - dataIndex: 'applicationName', - width: 200, - }, - { - title: '错误码编码', - dataIndex: 'code', - width: 120, - }, - { - title: '错误码提示', - dataIndex: 'message', - width: 300, - }, - { - title: '备注', - dataIndex: 'memo', - width: 200, - }, - { - title: '创建时间', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '错误码类型', - field: 'type', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.SYSTEM_ERROR_CODE_TYPE), - }, - colProps: { span: 8 }, - }, - { - label: '应用名', - field: 'applicationName', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '错误码编码', - field: 'code', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '错误码提示', - field: 'message', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '创建时间', - field: 'createTime', - component: 'RangePicker', - colProps: { span: 8 }, - }, -] - -export const formSchema: FormSchema[] = [ - { - label: '编号', - field: 'id', - show: false, - component: 'Input', - }, - { - label: '应用名', - field: 'applicationName', - required: true, - component: 'Input', - }, - { - label: '错误码编码', - field: 'code', - required: true, - component: 'Input', - }, - { - label: '错误码提示', - field: 'message', - required: true, - component: 'Input', - }, - { - label: '备注', - field: 'memo', - component: 'InputTextArea', - }, -] diff --git a/src/views/system/errorCode/index.vue b/src/views/system/errorCode/index.vue deleted file mode 100644 index 5989da3..0000000 --- a/src/views/system/errorCode/index.vue +++ /dev/null @@ -1,94 +0,0 @@ - - - diff --git a/src/views/system/loginlog/index.vue b/src/views/system/loginlog/index.vue deleted file mode 100644 index e66c1d8..0000000 --- a/src/views/system/loginlog/index.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - diff --git a/src/views/system/loginlog/loginLog.data.ts b/src/views/system/loginlog/loginLog.data.ts deleted file mode 100644 index 153de59..0000000 --- a/src/views/system/loginlog/loginLog.data.ts +++ /dev/null @@ -1,83 +0,0 @@ -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE } from '@/utils/dict' - -export const columns: BasicColumn[] = [ - { - title: '访问编号', - dataIndex: 'id', - width: 100, - }, - { - title: '日志类型', - dataIndex: 'logType', - width: 120, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.SYSTEM_LOGIN_TYPE) - }, - }, - { - title: '用户名称', - dataIndex: 'username', - width: 120, - }, - { - title: '登录地址', - dataIndex: 'userIp', - width: 120, - }, - { - title: 'userAgent', - dataIndex: 'userAgent', - width: 400, - }, - { - title: '结果', - dataIndex: 'result', - width: 100, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.SYSTEM_LOGIN_RESULT) - }, - }, - { - title: '登录日期', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '登录地址', - field: 'userIp', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '用户名称', - field: 'username', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '结果', - field: 'result', - component: 'Select', - componentProps: { - options: [ - { label: '成功', value: 'true', key: 'true' }, - { label: '失败', value: 'false', key: 'false' }, - ], - }, - colProps: { span: 8 }, - }, - { - label: '登录时间', - field: 'createTime', - component: 'RangePicker', - colProps: { span: 8 }, - }, -] diff --git a/src/views/system/mail/account/AccountModal.vue b/src/views/system/mail/account/AccountModal.vue deleted file mode 100644 index b35ff86..0000000 --- a/src/views/system/mail/account/AccountModal.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/src/views/system/mail/account/account.data.ts b/src/views/system/mail/account/account.data.ts deleted file mode 100644 index 559fdc9..0000000 --- a/src/views/system/mail/account/account.data.ts +++ /dev/null @@ -1,121 +0,0 @@ -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' - -export const columns: BasicColumn[] = [ - { - title: '编号', - dataIndex: 'id', - width: 100, - }, - { - title: '邮箱', - dataIndex: 'mail', - width: 180, - }, - { - title: '用户名', - dataIndex: 'username', - width: 100, - }, - { - title: 'SMTP 服务器域名', - dataIndex: 'host', - width: 120, - }, - { - title: 'SMTP 服务器端口', - dataIndex: 'port', - width: 120, - }, - { - title: '是否开启 SSL', - dataIndex: 'sslEnable', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.INFRA_BOOLEAN_STRING) - }, - }, - { - title: '创建时间', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '邮箱', - field: 'mail', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '用户名', - field: 'username', - component: 'Input', - colProps: { span: 8 }, - }, -] - -export const formSchema: FormSchema[] = [ - { - label: '编号', - field: 'id', - show: false, - component: 'Input', - }, - { - label: '邮箱', - field: 'mail', - required: true, - component: 'Input', - helpMessage: '填写发件邮箱地址', - rules: [ - { - required: true, - message: '请输入正确的邮箱地址', - pattern: /^\w{3,}(\.\w+)*@[A-z0-9]+(\.[A-z]{2,5}){1,2}$/, - trigger: 'blur', - }, - ], - }, - { - label: '用户名', - field: 'username', - required: true, - component: 'Input', - }, - { - label: '密码/授权码', - field: 'password', - required: true, - component: 'InputPassword', - helpMessage: '填写邮件密码, 部分邮件商需要填写授权码', - }, - { - label: 'SMTP 服务器域名', - field: 'host', - required: true, - component: 'Input', - }, - { - label: 'SMTP 服务器端口', - field: 'port', - required: true, - component: 'InputNumber', - }, - { - label: '是否开启 SSL', - field: 'sslEnable', - required: true, - defaultValue: false, - component: 'RadioButtonGroup', - componentProps: { - options: getDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING, 'boolean'), - }, - }, -] diff --git a/src/views/system/mail/account/index.vue b/src/views/system/mail/account/index.vue deleted file mode 100644 index 0ddeaa1..0000000 --- a/src/views/system/mail/account/index.vue +++ /dev/null @@ -1,78 +0,0 @@ - - - diff --git a/src/views/system/mail/log/MailLogModal.vue b/src/views/system/mail/log/MailLogModal.vue deleted file mode 100644 index 66234dd..0000000 --- a/src/views/system/mail/log/MailLogModal.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - diff --git a/src/views/system/mail/log/index.vue b/src/views/system/mail/log/index.vue deleted file mode 100644 index 5e16ebe..0000000 --- a/src/views/system/mail/log/index.vue +++ /dev/null @@ -1,55 +0,0 @@ - - - diff --git a/src/views/system/mail/log/mailLog.data.ts b/src/views/system/mail/log/mailLog.data.ts deleted file mode 100644 index abeab97..0000000 --- a/src/views/system/mail/log/mailLog.data.ts +++ /dev/null @@ -1,192 +0,0 @@ -import { h } from 'vue' -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' -import { getSimpleMailAccountList } from '@/api/system/mail/account' -import type { DescItem } from '@/components/Description/index' - -export const columns: BasicColumn[] = [ - { - title: '编号', - dataIndex: 'id', - width: 100, - }, - { - title: '接收邮箱', - dataIndex: 'toMail', - width: 200, - }, - { - title: '邮件标题', - dataIndex: 'templateTitle', - width: 180, - }, - { - title: '发送状态', - dataIndex: 'sendStatus', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.SYSTEM_MAIL_SEND_STATUS) - }, - }, - { - title: '邮箱账号', - dataIndex: 'fromMail', - width: 180, - }, - { - title: '模板编号', - dataIndex: 'templateId', - width: 100, - }, - { - title: '发送时间', - dataIndex: 'sendTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '接收邮箱', - field: 'toMail', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '邮箱账号', - field: 'accountId', - component: 'ApiSelect', - componentProps: { - api: () => getSimpleMailAccountList(), - labelField: 'mail', - valueField: 'id', - }, - colProps: { span: 8 }, - }, - { - label: '模板编号', - field: 'templateId', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '发送状态', - field: 'sendStatus', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.SYSTEM_MAIL_SEND_STATUS), - }, - colProps: { span: 8 }, - }, - { - label: '用户编号', - field: 'userId', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '用户类型', - field: 'userType', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.USER_TYPE), - }, - colProps: { span: 8 }, - }, - { - label: '发送时间', - field: 'sendTime', - component: 'RangePicker', - colProps: { span: 8 }, - }, -] - -export const logSchema: DescItem[] = [ - { - field: 'sendStatus', - label: '发送状态', - labelMinWidth: 80, - render(value) { - return useRender.renderDict(value, DICT_TYPE.SYSTEM_MAIL_SEND_STATUS) - }, - }, - { - field: 'sendException', - label: '异常信息', - labelMinWidth: 80, - show: data => data && data.sendException && data.sendException.length > 0, - render(value) { - return h('span', { style: { fontWeight: 'bold' } }, value) - }, - }, - { - field: 'sendTime', - label: '发送时间', - render(value) { - return useRender.renderDate(value) - }, - }, - { - field: 'userId', - label: '用户类型', - render(_, data) { - const { userId, userType } = data - const uidTag = useRender.renderTag(`uid: ${userId}`) - const typeTag = useRender.renderDict(userType, DICT_TYPE.USER_TYPE) - return h('span', {}, [typeTag, uidTag]) - }, - }, - { - field: 'fromMail', - label: '发件邮箱', - }, - { - field: 'toMail', - label: '收件邮箱', - }, - { - field: 'templateNickname', - label: '发件昵称', - }, - { - field: 'templateTitle', - label: '邮件标题', - }, - { - field: 'templateContent', - label: '邮件内容', - render(value) { - return h('div', { innerHTML: value }) - }, - }, - { - field: 'templateParams', - label: '邮件参数', - render(value) { - return useRender.renderJsonPreview(value) - }, - }, - { - field: 'sendMessageId', - label: '返回ID', - }, - { - field: 'templateCode', - label: '模板编码', - }, - { - field: 'templateId', - label: '模板编号', - }, - { - field: 'createTime', - label: '记录时间', - render(value) { - return useRender.renderDate(value) - }, - }, -] diff --git a/src/views/system/mail/template/SendMailModal.vue b/src/views/system/mail/template/SendMailModal.vue deleted file mode 100644 index d1117f3..0000000 --- a/src/views/system/mail/template/SendMailModal.vue +++ /dev/null @@ -1,107 +0,0 @@ - - - diff --git a/src/views/system/mail/template/TemplateModal.vue b/src/views/system/mail/template/TemplateModal.vue deleted file mode 100644 index ceca89f..0000000 --- a/src/views/system/mail/template/TemplateModal.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/src/views/system/mail/template/index.vue b/src/views/system/mail/template/index.vue deleted file mode 100644 index ec4f3e2..0000000 --- a/src/views/system/mail/template/index.vue +++ /dev/null @@ -1,96 +0,0 @@ - - - diff --git a/src/views/system/mail/template/template.data.ts b/src/views/system/mail/template/template.data.ts deleted file mode 100644 index 669fe83..0000000 --- a/src/views/system/mail/template/template.data.ts +++ /dev/null @@ -1,220 +0,0 @@ -import { h } from 'vue' -import { getSimpleMailAccountList } from '@/api/system/mail/account' -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' -import { ScrollContainer } from '@/components/Container' - -export const columns: BasicColumn[] = [ - { - title: '模板编码', - dataIndex: 'code', - width: 100, - }, - { - title: '模板名称', - dataIndex: 'name', - width: 180, - }, - { - title: '模板标题', - dataIndex: 'title', - width: 100, - }, - { - title: '模板内容', - dataIndex: 'content', - width: 300, - }, - { - title: '邮箱账号', - dataIndex: 'accountId', - width: 120, - }, - { - title: '发送人名称', - dataIndex: 'nickname', - width: 100, - }, - { - title: '开启状态', - dataIndex: 'status', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.COMMON_STATUS) - }, - }, - { - title: '创建时间', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '模板名称', - field: 'name', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '模板编码', - field: 'code', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '发件邮箱', - field: 'accountId', - component: 'ApiSelect', - componentProps: { - api: () => getSimpleMailAccountList(), - fieldNames: { - label: 'mail', - key: 'id', - value: 'id', - }, - }, - colProps: { span: 8 }, - }, - { - label: '开启状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - colProps: { span: 8 }, - }, - { - label: '创建时间', - field: 'createTime', - component: 'RangePicker', - colProps: { span: 8 }, - }, -] - -export const formSchema: FormSchema[] = [ - { - label: '编号', - field: 'id', - show: false, - component: 'Input', - }, - { - label: '模板名称', - field: 'name', - required: true, - component: 'Input', - }, - { - label: '模板编码', - field: 'code', - required: true, - component: 'Input', - helpMessage: '建议使用下划线/数字/字母命名', - }, - { - label: '发件邮箱', - field: 'accountId', - required: true, - component: 'ApiSelect', - componentProps: { - api: () => getSimpleMailAccountList(), - fieldNames: { - label: 'mail', - key: 'id', - value: 'id', - }, - }, - }, - { - label: '发送人名称', - field: 'nickname', - required: true, - component: 'Input', - helpMessage: '发件人的名称, 如:系统发件人', - }, - { - label: '模板标题', - field: 'title', - required: true, - component: 'Input', - helpMessage: '邮件的标题', - }, - { - label: '模板内容', - field: 'content', - component: 'Editor', - required: true, - helpMessage: '{}括号中的内容作为模板参数', - }, - { - label: '开启状态', - field: 'status', - component: 'Select', - defaultValue: 0, - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - }, - { - label: '备注', - field: 'remark', - component: 'InputTextArea', - }, -] - -// 发送邮件 -// 这里加上前缀 防止和表单其他字段重名 -export const keyPrefix = 'key$-' -export const baseSendSchemas: FormSchema[] = [ - { - field: 'code', - label: '编码', - component: 'Input', - show: () => false, - }, - { - field: 'content', - component: 'Editor', - label: '模板内容 ', - required: false, - defaultValue: '', - render({ model }) { - let content: string = model.content - Object.keys(model).forEach((key) => { - if (!key.startsWith(keyPrefix)) - return - - const realKey = key.split(keyPrefix)[1] - content = content.replace(`{${realKey}}`, model[key]) - }) - return h(ScrollContainer, { - innerHTML: content, - style: { border: '1px solid #e8e8e8', borderRadius: '6px', padding: '10px' }, - }) - }, - }, - { - field: 'mail', - label: '收件邮箱 ', - component: 'Input', - componentProps: { - placeholder: '输入收件邮箱', - }, - required: true, - rules: [ - { - required: true, - pattern: /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/, - trigger: 'blur', - message: '邮箱格式不正确', - }, - ], - }, -] diff --git a/src/views/system/notice/NoticeModal.vue b/src/views/system/notice/NoticeModal.vue deleted file mode 100644 index dd6d7ae..0000000 --- a/src/views/system/notice/NoticeModal.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue deleted file mode 100644 index a017720..0000000 --- a/src/views/system/notice/index.vue +++ /dev/null @@ -1,78 +0,0 @@ - - - diff --git a/src/views/system/notice/notice.data.ts b/src/views/system/notice/notice.data.ts deleted file mode 100644 index d5cce4b..0000000 --- a/src/views/system/notice/notice.data.ts +++ /dev/null @@ -1,93 +0,0 @@ -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' - -export const columns: BasicColumn[] = [ - { - title: '公告编号', - dataIndex: 'id', - width: 100, - }, - { - title: '公告标题', - dataIndex: 'title', - width: 180, - }, - { - title: '公告类型', - dataIndex: 'type', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.SYSTEM_NOTICE_TYPE) - }, - }, - { - title: '状态', - dataIndex: 'status', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.COMMON_STATUS) - }, - }, - { - title: '创建时间', - dataIndex: 'createTime', - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '公告标题', - field: 'title', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '公告状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - colProps: { span: 8 }, - }, -] - -export const formSchema: FormSchema[] = [ - { - label: '编号', - field: 'id', - show: false, - component: 'Input', - }, - { - label: '公告标题', - field: 'title', - required: true, - component: 'Input', - }, - { - label: '公告类型', - field: 'type', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.SYSTEM_NOTICE_TYPE), - }, - }, - { - label: '状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - }, - { - label: '内容', - field: 'content', - component: 'Editor', - }, -] diff --git a/src/views/system/notify/components/MessageInfoModal.vue b/src/views/system/notify/components/MessageInfoModal.vue deleted file mode 100644 index 77063e1..0000000 --- a/src/views/system/notify/components/MessageInfoModal.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - diff --git a/src/views/system/notify/components/message.data.ts b/src/views/system/notify/components/message.data.ts deleted file mode 100644 index c237600..0000000 --- a/src/views/system/notify/components/message.data.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { h } from 'vue' -import { useRender } from '@/components/Table' -import { DICT_TYPE } from '@/utils/dict' -import { JsonPreview } from '@/components/CodeEditor' -import type { DescItem } from '@/components/Description/index' - -// 站内信详情modal -export const infoSchema: DescItem[] = [ - { - field: 'id', - label: '编号', - labelMinWidth: 50, - }, - { - field: 'readStatus', - label: '是否已读', - render: (value) => { - return useRender.renderDict(value, DICT_TYPE.INFRA_BOOLEAN_STRING) - }, - }, - { - field: 'userType', - label: '用户类型', - render: (value) => { - return useRender.renderDict(value, DICT_TYPE.USER_TYPE) - }, - }, - { - field: 'userType', - label: '用户编号', - }, - { - field: 'templateId', - label: '模板编号', - }, - { - field: 'templateCode', - label: '模板编码', - }, - { - field: 'templateNickname', - label: '发送人名称', - }, - { - field: 'templateContent', - label: '模板内容', - }, - { - field: 'templateParams', - label: '模板参数', - render: (value) => { - return h(JsonPreview, { data: value }) - }, - }, - { - field: 'templateType', - label: '模板类型', - render: (value) => { - return useRender.renderDict(value, DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) - }, - }, - { - field: 'readTime', - label: '阅读时间', - render: (value) => { - if (!value) - return useRender.renderTag('未阅读') - - return useRender.renderDate(value) - }, - }, - { - field: 'createTime', - label: '创建时间', - render: (value) => { - return useRender.renderDate(value) - }, - }, -] - -// 站内信详情 -export interface MessageInfo { - userId: number - userType: number - templateId: number - templateCode: string - templateNickname: string - templateContent: string - templateType: number - templateParams: { [key: string]: string } - readStatus: boolean - readTime?: any - id: number - createTime: number - key: string -} diff --git a/src/views/system/notify/message/index.vue b/src/views/system/notify/message/index.vue deleted file mode 100644 index cc4dbf6..0000000 --- a/src/views/system/notify/message/index.vue +++ /dev/null @@ -1,56 +0,0 @@ - - - diff --git a/src/views/system/notify/message/message.data.ts b/src/views/system/notify/message/message.data.ts deleted file mode 100644 index b0ca975..0000000 --- a/src/views/system/notify/message/message.data.ts +++ /dev/null @@ -1,204 +0,0 @@ -import { h } from 'vue' -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' -import { JsonPreview } from '@/components/CodeEditor' -import type { DescItem } from '@/components/Description/index' - -export const columns: BasicColumn[] = [ - { - title: '编号', - dataIndex: 'id', - width: 100, - }, - { - title: '用户编号', - dataIndex: 'userId', - width: 100, - }, - { - title: '用户类型', - dataIndex: 'userType', - width: 100, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.USER_TYPE) - }, - }, - { - title: '模板编码', - dataIndex: 'templateCode', - width: 100, - }, - { - title: '发送人名称', - dataIndex: 'templateNickname', - width: 120, - }, - { - title: '模版内容', - dataIndex: 'templateContent', - width: 240, - }, - { - title: '模版类型', - dataIndex: 'templateType', - width: 140, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) - }, - }, - { - title: '是否已读', - dataIndex: 'readStatus', - width: 140, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.INFRA_BOOLEAN_STRING) - }, - }, - { - title: '阅读时间', - dataIndex: 'readTime', - width: 180, - customRender: ({ text }) => { - if (!text) - return useRender.renderTag('未阅读') - - return useRender.renderDate(text) - }, - }, - { - title: '创建时间', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '用户编号', - field: 'userId', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '用户类型', - field: 'userType', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '模板编码', - field: 'templateCode', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '模版类型', - field: 'templateType', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE), - }, - colProps: { span: 8 }, - }, - { - label: '创建时间', - field: 'createTime', - component: 'RangePicker', - colProps: { span: 8 }, - }, -] - -// 站内信详情modal -export const infoSchema: DescItem[] = [ - { - field: 'id', - label: '编号', - labelMinWidth: 50, - }, - { - field: 'readStatus', - label: '是否已读', - render: (value) => { - return useRender.renderDict(value, DICT_TYPE.INFRA_BOOLEAN_STRING) - }, - }, - { - field: 'userType', - label: '用户类型', - render: (value) => { - return useRender.renderDict(value, DICT_TYPE.USER_TYPE) - }, - }, - { - field: 'userType', - label: '用户编号', - }, - { - field: 'templateId', - label: '模板编号', - }, - { - field: 'templateCode', - label: '模板编码', - }, - { - field: 'templateNickname', - label: '发送人名称', - }, - { - field: 'templateContent', - label: '模板内容', - }, - { - field: 'templateParams', - label: '模板参数', - render: (value) => { - return h(JsonPreview, { data: value }) - }, - }, - { - field: 'templateType', - label: '模板类型', - render: (value) => { - return useRender.renderDict(value, DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) - }, - }, - { - field: 'readTime', - label: '阅读时间', - render: (value) => { - if (!value) - return useRender.renderTag('未阅读') - - return useRender.renderDate(value) - }, - }, - { - field: 'createTime', - label: '创建时间', - render: (value) => { - return useRender.renderDate(value) - }, - }, -] - -// 站内信详情 -export interface MessageInfo { - userId: number - userType: number - templateId: number - templateCode: string - templateNickname: string - templateContent: string - templateType: number - templateParams: { [key: string]: string } - readStatus: boolean - readTime?: any - id: number - createTime: number - key: string -} diff --git a/src/views/system/notify/my/index.vue b/src/views/system/notify/my/index.vue deleted file mode 100644 index fdb4dc0..0000000 --- a/src/views/system/notify/my/index.vue +++ /dev/null @@ -1,125 +0,0 @@ - - - diff --git a/src/views/system/notify/my/my.data.ts b/src/views/system/notify/my/my.data.ts deleted file mode 100644 index 1d884e8..0000000 --- a/src/views/system/notify/my/my.data.ts +++ /dev/null @@ -1,112 +0,0 @@ -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' - -export const columns: BasicColumn[] = [ - { - title: '发送人', - dataIndex: 'templateNickname', - width: 100, - }, - { - title: '发送时间', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, - { - title: '类型', - dataIndex: 'templateType', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) - }, - }, - { - title: '内容', - dataIndex: 'templateContent', - width: 300, - }, - { - title: '是否已读', - dataIndex: 'readStatus', - width: 100, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.INFRA_BOOLEAN_STRING) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '是否已读', - field: 'readStatus', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING), - }, - colProps: { span: 8 }, - }, - { - label: '发送时间', - field: 'createTime', - component: 'RangePicker', - colProps: { span: 8 }, - }, -] - -export const formSchema: FormSchema[] = [ - { - label: '编号', - field: 'id', - show: false, - component: 'Input', - }, - { - label: '模版编码', - field: 'code', - required: true, - component: 'Input', - }, - { - label: '模板名称', - field: 'name', - required: true, - component: 'Input', - }, - { - label: '发件人名称', - field: 'nickname', - required: true, - component: 'Input', - }, - { - label: '模板内容', - field: 'content', - required: true, - component: 'InputTextArea', - }, - { - label: '类型', - field: 'type', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE), - }, - }, - { - label: '开启状态', - field: 'status', - component: 'RadioGroup', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - }, - { - label: '备注', - field: 'remark', - component: 'InputTextArea', - }, -] diff --git a/src/views/system/notify/template/SendNotifyModal.vue b/src/views/system/notify/template/SendNotifyModal.vue deleted file mode 100644 index 83ad6b0..0000000 --- a/src/views/system/notify/template/SendNotifyModal.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - diff --git a/src/views/system/notify/template/TemplateModal.vue b/src/views/system/notify/template/TemplateModal.vue deleted file mode 100644 index 9ab8c48..0000000 --- a/src/views/system/notify/template/TemplateModal.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/src/views/system/notify/template/index.vue b/src/views/system/notify/template/index.vue deleted file mode 100644 index 3423570..0000000 --- a/src/views/system/notify/template/index.vue +++ /dev/null @@ -1,97 +0,0 @@ - - - diff --git a/src/views/system/notify/template/template.data.ts b/src/views/system/notify/template/template.data.ts deleted file mode 100644 index ca865f5..0000000 --- a/src/views/system/notify/template/template.data.ts +++ /dev/null @@ -1,181 +0,0 @@ -import { h } from 'vue' -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' -import { getListSimpleUsers } from '@/api/system/user/index' -import { ScrollContainer } from '@/components/Container' - -export const columns: BasicColumn[] = [ - { - title: '模板编码', - dataIndex: 'code', - width: 100, - }, - { - title: '模板名称', - dataIndex: 'name', - width: 180, - }, - { - title: '类型', - dataIndex: 'type', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE) - }, - }, - { - title: '发送人名称', - dataIndex: 'nickname', - width: 100, - }, - { - title: '模板内容', - dataIndex: 'content', - width: 300, - }, - { - title: '开启状态', - dataIndex: 'status', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.COMMON_STATUS) - }, - }, - { - title: '备注', - dataIndex: 'remark', - width: 180, - }, - { - title: '创建时间', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '模板名称', - field: 'name', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '模版编码', - field: 'code', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - colProps: { span: 8 }, - }, - { - label: '创建时间', - field: 'createTime', - component: 'RangePicker', - colProps: { span: 8 }, - }, -] - -export const formSchema: FormSchema[] = [ - { - label: '编号', - field: 'id', - show: false, - component: 'Input', - }, - { - label: '模版编码', - field: 'code', - required: true, - component: 'Input', - }, - { - label: '模板名称', - field: 'name', - required: true, - component: 'Input', - }, - { - label: '发件人名称', - field: 'nickname', - required: true, - component: 'Input', - }, - { - label: '模板内容', - field: 'content', - required: true, - component: 'InputTextArea', - }, - { - label: '类型', - field: 'type', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE), - }, - }, - { - label: '开启状态', - field: 'status', - required: true, - component: 'RadioGroup', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - }, - { - label: '备注', - field: 'remark', - component: 'InputTextArea', - }, -] - -// 发送站内信 -// 这里加上前缀 防止和表单其他字段重名 -export const keyPrefix = 'key$-' -export const baseSendSchemas: FormSchema[] = [ - { - field: 'content', - component: 'Editor', - label: '模板内容 ', - required: false, - defaultValue: '', - render({ model }) { - let content: string = model.content - Object.keys(model).forEach((key) => { - if (!key.startsWith(keyPrefix)) - return - - const realKey = key.split(keyPrefix)[1] - content = content.replace(`{${realKey}}`, model[key]) - }) - return h(ScrollContainer, { - innerHTML: content, - style: { border: '1px solid #e8e8e8', borderRadius: '6px', padding: '10px' }, - }) - }, - }, - { - field: 'userId', - component: 'ApiSelect', - label: '接收人 ', - required: true, - componentProps: { - api: getListSimpleUsers, - labelField: 'nickname', - valueField: 'id', - }, - }, -] diff --git a/src/views/system/oauth2/client/ClientModal.vue b/src/views/system/oauth2/client/ClientModal.vue deleted file mode 100644 index ab9e909..0000000 --- a/src/views/system/oauth2/client/ClientModal.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/src/views/system/oauth2/client/client.data.ts b/src/views/system/oauth2/client/client.data.ts deleted file mode 100644 index 8a107a1..0000000 --- a/src/views/system/oauth2/client/client.data.ts +++ /dev/null @@ -1,212 +0,0 @@ -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' - -export const columns: BasicColumn[] = [ - { - title: '客户端编号', - dataIndex: 'clientId', - width: 200, - }, - { - title: '客户端密钥', - dataIndex: 'secret', - width: 100, - }, - { - title: '应用名', - dataIndex: 'name', - width: 100, - }, - { - title: '应用图标', - dataIndex: 'logo', - width: 120, - customRender: ({ text }) => { - return useRender.renderImg(text) - }, - }, - { - title: '状态', - dataIndex: 'status', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.COMMON_STATUS) - }, - }, - { - title: '访问令牌的有效期', - dataIndex: 'accessTokenValiditySeconds', - width: 100, - customRender: ({ text }) => { - return useRender.renderText(text, '秒') - }, - }, - { - title: '刷新令牌的有效期', - dataIndex: 'refreshTokenValiditySeconds', - width: 100, - customRender: ({ text }) => { - return useRender.renderText(text, '秒') - }, - }, - { - title: '授权类型', - dataIndex: 'authorizedGrantTypes', - width: 180, - customRender: ({ text }) => { - return useRender.renderTags(text) - }, - }, - { - title: '创建时间', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '应用名', - field: 'name', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - colProps: { span: 8 }, - }, -] - -export const formSchema: FormSchema[] = [ - { - label: '编号', - field: 'id', - show: false, - component: 'Input', - }, - { - label: '客户端编号', - field: 'clientId', - required: true, - component: 'Input', - }, - { - label: '客户端密钥', - field: 'secret', - required: true, - component: 'Input', - }, - { - label: '应用名', - field: 'name', - required: true, - component: 'Input', - }, - { - label: '应用图标', - field: 'logo', - required: true, - component: 'FileUpload', - componentProps: { - fileType: 'image', - maxCount: 1, - }, - }, - { - label: '应用描述', - field: 'description', - component: 'InputTextArea', - }, - { - label: '状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - }, - { - label: '访问令牌的有效期', - field: 'accessTokenValiditySeconds', - required: true, - defaultValue: 0, - component: 'InputNumber', - }, - { - label: '刷新令牌的有效期', - field: 'refreshTokenValiditySeconds', - required: true, - defaultValue: 0, - component: 'InputNumber', - }, - { - label: '授权类型', - field: 'authorizedGrantTypes', - required: true, - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.SYSTEM_OAUTH2_GRANT_TYPE, 'string'), - mode: 'multiple', - }, - }, - { - label: '授权范围', - field: 'scopes', - component: 'Select', - componentProps: { - mode: 'tags', - options: [], - }, - }, - { - label: '自动授权范围', - field: 'autoApproveScopes', - component: 'Select', - componentProps: { - mode: 'tags', - options: [], - }, - }, - { - label: '可重定向的 URI 地址', - field: 'redirectUris', - required: true, - component: 'Select', - componentProps: { - mode: 'tags', - options: [], - }, - }, - { - label: '权限', - field: 'authorities', - component: 'Select', - componentProps: { - mode: 'tags', - options: [], - }, - }, - { - label: '资源', - field: 'resourceIds', - component: 'Select', - componentProps: { - mode: 'tags', - options: [], - }, - }, - { - label: '附加信息', - field: 'additionalInformation', - component: 'InputTextArea', - }, -] diff --git a/src/views/system/oauth2/client/index.vue b/src/views/system/oauth2/client/index.vue deleted file mode 100644 index c8d996c..0000000 --- a/src/views/system/oauth2/client/index.vue +++ /dev/null @@ -1,78 +0,0 @@ - - - diff --git a/src/views/system/oauth2/token/index.vue b/src/views/system/oauth2/token/index.vue deleted file mode 100644 index c467fbe..0000000 --- a/src/views/system/oauth2/token/index.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - diff --git a/src/views/system/oauth2/token/token.data.ts b/src/views/system/oauth2/token/token.data.ts deleted file mode 100644 index 7a40dcf..0000000 --- a/src/views/system/oauth2/token/token.data.ts +++ /dev/null @@ -1,69 +0,0 @@ -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' - -export const columns: BasicColumn[] = [ - { - title: '访问令牌', - dataIndex: 'accessToken', - width: 300, - }, - { - title: '刷新令牌', - dataIndex: 'refreshToken', - width: 300, - }, - { - title: '用户编号', - dataIndex: 'userId', - width: 100, - }, - { - title: '用户类型', - dataIndex: 'userType', - width: 120, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.USER_TYPE) - }, - }, - { - title: '创建时间', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, - { - title: '过期时间', - dataIndex: 'expiresTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '用户编号', - field: 'userId', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '客户端编号', - field: 'clientId', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '用户类型', - field: 'userType', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.USER_TYPE), - }, - colProps: { span: 8 }, - }, -] diff --git a/src/views/system/operatelog/LogInfoModal.vue b/src/views/system/operatelog/LogInfoModal.vue deleted file mode 100644 index b1a41d3..0000000 --- a/src/views/system/operatelog/LogInfoModal.vue +++ /dev/null @@ -1,25 +0,0 @@ - - - diff --git a/src/views/system/operatelog/index.vue b/src/views/system/operatelog/index.vue deleted file mode 100644 index 5ffb516..0000000 --- a/src/views/system/operatelog/index.vue +++ /dev/null @@ -1,74 +0,0 @@ - - - diff --git a/src/views/system/operatelog/operateLog.data.ts b/src/views/system/operatelog/operateLog.data.ts deleted file mode 100644 index 56b6179..0000000 --- a/src/views/system/operatelog/operateLog.data.ts +++ /dev/null @@ -1,202 +0,0 @@ -import { h } from 'vue' -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' -import type { DescItem } from '@/components/Description/index' - -export const columns: BasicColumn[] = [ - { - title: '日志编号', - dataIndex: 'id', - width: 100, - }, - { - title: '操作模块', - dataIndex: 'module', - width: 200, - }, - { - title: '操作名', - dataIndex: 'name', - width: 180, - }, - { - title: '操作类型', - dataIndex: 'type', - width: 120, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.SYSTEM_OPERATE_TYPE) - }, - }, - { - title: '操作人', - dataIndex: 'userNickname', - width: 120, - }, - // { - // title: 'userAgent', - // dataIndex: 'userAgent', - // width: 400 - // }, - { - title: '请求路径', - dataIndex: 'requestUrl', - }, - { - title: '操作结果', - dataIndex: 'resultCode', - width: 180, - customRender: ({ text }) => { - return useRender.renderTag(text === 0 ? '成功' : '失败', text === 0 ? '#87d068' : '#f50') - }, - }, - { - title: '执行时长', - dataIndex: 'duration', - width: 180, - customRender: ({ text }) => { - return useRender.renderText(text, 'ms') - }, - }, - { - title: '操作日期', - dataIndex: 'startTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '系统模块', - field: 'title', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '操作人员', - field: 'operName', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '类型', - field: 'type', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.SYSTEM_OPERATE_TYPE), - }, - colProps: { span: 8 }, - }, - { - label: '状态', - field: 'success', - component: 'Select', - componentProps: { - options: [ - { value: 1, key: true, label: '成功' }, - { value: 0, key: false, label: '失败' }, - ], - }, - colProps: { span: 8 }, - }, - { - label: '操作时间', - field: 'startTime', - component: 'RangePicker', - colProps: { span: 8 }, - }, -] - -const httpMethods = [ - { value: 'GET', color: '#108ee9' }, - { value: 'POST', color: '#2db7f5' }, - { value: 'PUT', color: 'warning' }, - { value: 'DELETE', color: '#f50' }, -] - -export const infoSchema: DescItem[] = [ - { - field: 'module', - label: '操作模块', - }, - { - field: 'name', - label: '操作名', - }, - { - field: 'userNickname', - label: '操作人', - render(_, data) { - const { userNickname, userId } = data - // return useRender.renderText(userNickname, 'uid: ' + userId) - return useRender.renderTags([userNickname, `uid: ${userId}`]) - }, - }, - { - field: 'resultCode', - label: '请求结果', - render(value) { - return useRender.renderTag(value === 0 ? '成功' : '失败', value === 0 ? '#87d068' : '#f50') - }, - }, - { - field: 'resultMsg', - label: '响应信息', - show(data) { - return data && data.resultMsg && data.resultMsg !== '' - }, - render(value) { - return h('span', { style: { color: 'red', fontWeight: 'bold' } }, value) - }, - }, - { - field: 'userIp', - label: '请求ip', - }, - { - field: 'startTime', - label: '请求时间', - render(value) { - return useRender.renderDate(value) - }, - }, - { - field: 'requestUrl', - label: '请求路径', - render(_, data) { - if (!data) - return '' - - const { requestMethod, requestUrl } = data - const current = httpMethods.find(item => item.value === requestMethod.toUpperCase()) - const methodTag = current ? useRender.renderTag(requestMethod, current.color) : requestMethod - return h('span', {}, [methodTag, requestUrl]) - }, - }, - { - field: 'javaMethod', - label: '操作方法', - labelMinWidth: 80, - }, - { - field: 'javaMethodArgs', - label: '请求参数', - render(value) { - return useRender.renderJsonPreview(value) - }, - }, - { - field: 'userAgent', - label: 'userAgent', - }, - { - field: 'duration', - label: '请求耗时', - render(value) { - return useRender.renderText(value, 'ms') - }, - }, -] diff --git a/src/views/system/post/PostModal.vue b/src/views/system/post/PostModal.vue deleted file mode 100644 index 8a03d4d..0000000 --- a/src/views/system/post/PostModal.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue deleted file mode 100644 index b7125e3..0000000 --- a/src/views/system/post/index.vue +++ /dev/null @@ -1,94 +0,0 @@ - - - diff --git a/src/views/system/post/post.data.ts b/src/views/system/post/post.data.ts deleted file mode 100644 index dc32c13..0000000 --- a/src/views/system/post/post.data.ts +++ /dev/null @@ -1,112 +0,0 @@ -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' - -export const columns: BasicColumn[] = [ - { - title: '岗位编号', - dataIndex: 'id', - width: 100, - }, - { - title: '岗位名称', - dataIndex: 'name', - width: 180, - }, - { - title: '岗位编码', - dataIndex: 'code', - width: 100, - }, - { - title: '岗位顺序', - dataIndex: 'sort', - width: 120, - }, - { - title: '状态', - dataIndex: 'status', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.COMMON_STATUS) - }, - }, - { - title: '备注', - dataIndex: 'remark', - width: 180, - }, - { - title: '创建时间', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '岗位名称', - field: 'name', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '岗位编码', - field: 'code', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - colProps: { span: 8 }, - }, -] - -export const formSchema: FormSchema[] = [ - { - label: '编号', - field: 'id', - show: false, - component: 'Input', - }, - { - label: '岗位名称', - field: 'name', - required: true, - component: 'Input', - }, - { - label: '岗位编码', - field: 'code', - required: true, - component: 'Input', - }, - { - label: '岗位顺序', - field: 'sort', - required: true, - defaultValue: 0, - component: 'InputNumber', - }, - { - label: '状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - }, - { - label: '备注', - field: 'remark', - component: 'InputTextArea', - }, -] diff --git a/src/views/system/sensitiveWord/SensitiveWordModal.vue b/src/views/system/sensitiveWord/SensitiveWordModal.vue deleted file mode 100644 index 76338f6..0000000 --- a/src/views/system/sensitiveWord/SensitiveWordModal.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/src/views/system/sensitiveWord/index.vue b/src/views/system/sensitiveWord/index.vue deleted file mode 100644 index ad41045..0000000 --- a/src/views/system/sensitiveWord/index.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - diff --git a/src/views/system/sensitiveWord/sensitiveWord.data.ts b/src/views/system/sensitiveWord/sensitiveWord.data.ts deleted file mode 100644 index eb27da5..0000000 --- a/src/views/system/sensitiveWord/sensitiveWord.data.ts +++ /dev/null @@ -1,113 +0,0 @@ -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' - -export const columns: BasicColumn[] = [ - { - title: '编号', - dataIndex: 'id', - width: 100, - }, - { - title: '敏感词', - dataIndex: 'name', - width: 180, - }, - { - title: '状态', - dataIndex: 'status', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.COMMON_STATUS) - }, - }, - { - title: '描述', - dataIndex: 'description', - width: 200, - }, - { - title: '标签', - dataIndex: 'tags', - width: 180, - customRender: ({ text }) => { - return useRender.renderTags(text) - }, - }, - { - title: '创建时间', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '敏感词', - field: 'name', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '标签', - field: 'tag', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - colProps: { span: 8 }, - }, - { - label: '创建时间', - field: 'createTime', - component: 'RangePicker', - colProps: { span: 8 }, - }, -] - -export const formSchema: FormSchema[] = [ - { - label: '编号', - field: 'id', - show: false, - component: 'Input', - }, - { - label: '敏感词', - field: 'name', - required: true, - component: 'Input', - }, - { - label: '状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - }, - { - label: '备注', - field: 'remark', - component: 'InputTextArea', - }, - { - label: '标签', - field: 'tags', - required: true, - component: 'Select', - componentProps: { - mode: 'tags', - options: [], - }, - }, -] diff --git a/src/views/system/sms/channel/SmsChannelModal.vue b/src/views/system/sms/channel/SmsChannelModal.vue deleted file mode 100644 index 6fba6c4..0000000 --- a/src/views/system/sms/channel/SmsChannelModal.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/src/views/system/sms/channel/index.vue b/src/views/system/sms/channel/index.vue deleted file mode 100644 index 1de8795..0000000 --- a/src/views/system/sms/channel/index.vue +++ /dev/null @@ -1,79 +0,0 @@ - - - diff --git a/src/views/system/sms/channel/smsChannel.data.ts b/src/views/system/sms/channel/smsChannel.data.ts deleted file mode 100644 index a744e70..0000000 --- a/src/views/system/sms/channel/smsChannel.data.ts +++ /dev/null @@ -1,138 +0,0 @@ -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' - -export const columns: BasicColumn[] = [ - { - title: '编号', - dataIndex: 'id', - width: 100, - }, - { - title: '短信签名', - dataIndex: 'signature', - width: 180, - }, - { - title: '渠道编码', - dataIndex: 'code', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE) - }, - }, - { - title: '启用状态', - dataIndex: 'status', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.COMMON_STATUS) - }, - }, - { - title: '备注', - dataIndex: 'remark', - width: 180, - }, - { - title: '短信 API 的账号', - dataIndex: 'apiKey', - width: 180, - }, - { - title: '短信 API 的密钥', - dataIndex: 'apiSecret', - width: 180, - }, - { - title: '短信发送回调 URL', - dataIndex: 'callbackUrl', - width: 180, - }, - { - title: '创建时间', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '短信签名', - field: 'signature', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '启用状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - colProps: { span: 8 }, - }, - { - label: '创建时间', - field: 'createTime', - component: 'RangePicker', - colProps: { span: 8 }, - }, -] - -export const formSchema: FormSchema[] = [ - { - label: '编号', - field: 'id', - show: false, - component: 'Input', - }, - { - label: '短信签名', - field: 'signature', - required: true, - component: 'Input', - }, - { - label: '渠道编码', - field: 'code', - component: 'Select', - required: true, - componentProps: { - options: getDictOptions(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE, 'string'), - }, - }, - { - label: '启用状态', - field: 'status', - component: 'Select', - defaultValue: 0, - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - }, - { - label: '备注', - field: 'remark', - component: 'InputTextArea', - }, - { - label: '短信 API 的账号', - field: 'apiKey', - required: true, - component: 'Input', - }, - { - label: '短信 API 的密钥', - field: 'apiSecret', - component: 'Input', - }, - { - label: '短信发送回调 URL', - field: 'callbackUrl', - component: 'Input', - }, -] diff --git a/src/views/system/sms/log/index.vue b/src/views/system/sms/log/index.vue deleted file mode 100644 index 76837c1..0000000 --- a/src/views/system/sms/log/index.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - diff --git a/src/views/system/sms/log/smsLog.data.ts b/src/views/system/sms/log/smsLog.data.ts deleted file mode 100644 index f2c382b..0000000 --- a/src/views/system/sms/log/smsLog.data.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { getSimpleSmsChannels } from '@/api/system/sms/smsChannel' -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' - -let channelOptions: any[] = [] - -async function getchannelList() { - const res = await getSimpleSmsChannels() - channelOptions = res -} - -await getchannelList() - -export const columns: BasicColumn[] = [ - { - title: '日志编号', - dataIndex: 'id', - width: 100, - }, - { - title: '创建时间', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, - { - title: '手机号', - dataIndex: 'mobile', - width: 180, - customRender: ({ text, record }) => { - if (record.userType && record.userId) - return useRender.renderDict(record.userType, DICT_TYPE.USER_TYPE) - else return text - }, - }, - { - title: '短信内容', - dataIndex: 'templateContent', - width: 300, - }, - { - title: '发送状态', - dataIndex: 'sendStatus', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.SYSTEM_SMS_SEND_STATUS) - }, - }, - { - title: '接收状态', - dataIndex: 'receiveStatus', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS) - }, - }, - { - title: '短信渠道', - dataIndex: 'channelCode', - width: 180, - customRender: ({ text, record }) => { - if (!text) - return '未设置' - - for (const channel of channelOptions) { - if (record.channelId === channel.id) - return channel.signature - } - - return `找不到签名:${record.channelId}` - }, - }, - { - title: '模板编号', - dataIndex: 'templateId', - width: 120, - }, - { - title: '短信类型', - dataIndex: 'templateType', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '手机号', - field: 'mobile', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '短信渠道', - field: 'channelId', - component: 'ApiSelect', - componentProps: { - api: getSimpleSmsChannels, - fieldNames: { - label: 'signature', - key: 'id', - value: 'id', - }, - }, - colProps: { span: 8 }, - }, - { - label: '模板编号', - field: 'templateId', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '发送状态', - field: 'sendStatus', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.SYSTEM_SMS_SEND_STATUS), - }, - colProps: { span: 8 }, - }, - { - label: '发送时间', - field: 'sendTime', - component: 'RangePicker', - colProps: { span: 8 }, - }, - { - label: '接收状态', - field: 'receiveStatus', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS), - }, - colProps: { span: 8 }, - }, - { - label: '接收时间', - field: 'receiveTime', - component: 'RangePicker', - colProps: { span: 8 }, - }, -] diff --git a/src/views/system/sms/template/SendSmsModal.vue b/src/views/system/sms/template/SendSmsModal.vue deleted file mode 100644 index 43b4b9c..0000000 --- a/src/views/system/sms/template/SendSmsModal.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - diff --git a/src/views/system/sms/template/SmsTemplateModal.vue b/src/views/system/sms/template/SmsTemplateModal.vue deleted file mode 100644 index 4c7e56d..0000000 --- a/src/views/system/sms/template/SmsTemplateModal.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/src/views/system/sms/template/index.vue b/src/views/system/sms/template/index.vue deleted file mode 100644 index 66ee735..0000000 --- a/src/views/system/sms/template/index.vue +++ /dev/null @@ -1,107 +0,0 @@ - - - diff --git a/src/views/system/sms/template/smsTemplate.data.ts b/src/views/system/sms/template/smsTemplate.data.ts deleted file mode 100644 index 0a12cda..0000000 --- a/src/views/system/sms/template/smsTemplate.data.ts +++ /dev/null @@ -1,209 +0,0 @@ -import { h } from 'vue' -import { ScrollContainer } from '@/components/Container' -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' - -export const columns: BasicColumn[] = [ - { - title: '模板编码', - dataIndex: 'code', - width: 180, - }, - { - title: '模板名称', - dataIndex: 'name', - width: 100, - }, - { - title: '模板内容', - dataIndex: 'content', - width: 300, - }, - { - title: '短信类型', - dataIndex: 'type', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE) - }, - }, - { - title: '开启状态', - dataIndex: 'status', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.COMMON_STATUS) - }, - }, - { - title: '备注', - dataIndex: 'remark', - width: 180, - }, - { - title: '短信 API 的模板编号', - dataIndex: 'apiTemplateId', - width: 180, - }, - { - title: '短信渠道', - dataIndex: 'channelCode', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE) - }, - }, - { - title: '创建时间', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '短信类型', - field: 'type', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE), - }, - colProps: { span: 8 }, - }, - { - label: '开启状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - colProps: { span: 8 }, - }, - { - label: '模板编码', - field: 'code', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '短信 API 的模板编号', - field: 'apiTemplateId', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '短信渠道', - field: 'channelId', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE), - }, - colProps: { span: 8 }, - }, - { - label: '创建时间', - field: 'createTime', - component: 'RangePicker', - colProps: { span: 8 }, - }, -] - -export const formSchema: FormSchema[] = [ - { - label: '编号', - field: 'id', - show: false, - component: 'Input', - }, - { - label: '短信渠道编号', - field: 'channelId', - required: true, - component: 'Input', - }, - { - label: '短信类型', - field: 'type', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE), - }, - }, - { - label: '模板编号', - field: 'code', - required: true, - component: 'Input', - }, - { - label: '模板名称', - field: 'name', - required: true, - component: 'Input', - }, - { - label: '模板内容', - field: 'content', - required: true, - component: 'Input', - }, - { - label: '开启状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - }, - { - label: '短信 API 模板编号', - field: 'apiTemplateId', - required: true, - component: 'Input', - }, - { - label: '备注', - field: 'remark', - component: 'InputTextArea', - }, -] - -// 发送短信 -// 这里加上前缀 防止和表单其他字段重名 -export const keyPrefix = 'key$-' -export const baseSendSchemas: FormSchema[] = [ - { - field: 'content', - component: 'Editor', - label: '模板内容 ', - required: false, - defaultValue: '', - render({ model }) { - let content: string = model.content - Object.keys(model).forEach((key) => { - if (!key.startsWith(keyPrefix)) - return - - const realKey = key.split(keyPrefix)[1] - content = content.replace(`{${realKey}}`, model[key]) - }) - return h(ScrollContainer, { - innerHTML: content, - style: { border: '1px solid #e8e8e8', borderRadius: '6px', padding: '10px' }, - }) - }, - }, - { - field: 'mobile', - label: '手机号 ', - component: 'Input', - componentProps: { - placeholder: '请输入手机号', - }, - required: true, - }, -] diff --git a/src/views/system/tenantPackage/TenantPackageModal.vue b/src/views/system/tenantPackage/TenantPackageModal.vue deleted file mode 100644 index 15bf1db..0000000 --- a/src/views/system/tenantPackage/TenantPackageModal.vue +++ /dev/null @@ -1,128 +0,0 @@ - - - diff --git a/src/views/system/tenantPackage/index.vue b/src/views/system/tenantPackage/index.vue deleted file mode 100644 index af50443..0000000 --- a/src/views/system/tenantPackage/index.vue +++ /dev/null @@ -1,83 +0,0 @@ - - - diff --git a/src/views/system/tenantPackage/tenantPackage.data.ts b/src/views/system/tenantPackage/tenantPackage.data.ts deleted file mode 100644 index bf6ad15..0000000 --- a/src/views/system/tenantPackage/tenantPackage.data.ts +++ /dev/null @@ -1,89 +0,0 @@ -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' - -export const columns: BasicColumn[] = [ - { - title: '套餐编号', - dataIndex: 'id', - width: 100, - }, - { - title: '套餐名', - dataIndex: 'name', - width: 180, - }, - { - title: '状态', - dataIndex: 'status', - width: 180, - customRender: ({ text }) => { - return useRender.renderDict(text, DICT_TYPE.COMMON_STATUS) - }, - }, - { - title: '备注', - dataIndex: 'remark', - width: 180, - }, - { - title: '创建时间', - dataIndex: 'createTime', - width: 180, - customRender: ({ text }) => { - return useRender.renderDate(text) - }, - }, -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '套餐名', - field: 'name', - component: 'Input', - colProps: { span: 8 }, - }, - { - label: '状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - colProps: { span: 8 }, - }, - { - label: '创建时间', - field: 'createTime', - component: 'RangePicker', - colProps: { span: 8 }, - }, -] - -export const formSchema: FormSchema[] = [ - { - label: '编号', - field: 'id', - show: false, - component: 'Input', - }, - { - label: '套餐名', - field: 'name', - required: true, - component: 'Input', - }, - { - label: '菜单权限', - field: 'menuIds', - slot: 'menuIds', - }, - { - label: '状态', - field: 'status', - component: 'Select', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS), - }, - }, -]