diff --git a/.gitignore b/.gitignore index 0b05e6a6..2500fdef 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ dist-ssr /dist* *-lock.* pnpm-debug +.idea diff --git a/build/vite/index.ts b/build/vite/index.ts index 53f66ec0..dcec1aed 100644 --- a/build/vite/index.ts +++ b/build/vite/index.ts @@ -15,7 +15,7 @@ import vueSetupExtend from 'vite-plugin-vue-setup-extend' import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite' import { createSvgIconsPlugin } from 'vite-plugin-svg-icons' -export function createVitePlugins(VITE_APP_TITLE: string) { +export function createVitePlugins() { const root = process.cwd() // 路径查找 function pathResolve(dir: string) { @@ -95,8 +95,6 @@ export function createVitePlugins(VITE_APP_TITLE: string) { ext: '.gz', // 生成的压缩包后缀 deleteOriginFile: false //压缩后是否删除源文件 }), - ViteEjsPlugin({ - title: VITE_APP_TITLE - }) + ViteEjsPlugin() ] } diff --git a/index.html b/index.html index cce65bdc..8cfcbefa 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ name="description" content="芋道管理系统 基于 vue3 + CompositionAPI + typescript + vite3 + element plus 的后台开源免费管理系统!" /> - <%= title %> + %VITE_APP_TITLE%
@@ -137,7 +137,7 @@
-
<%= title %>
+
%VITE_APP_TITLE%
diff --git a/package.json b/package.json index d067560f..8f1d24e7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yudao-ui-admin-vue3", - "version": "1.7.1-snapshot.1941", + "version": "1.7.1-snapshot.1961", "description": "基于vue3、vite4、element-plus、typesScript", "author": "xingyu", "private": false, @@ -35,6 +35,7 @@ "@zxcvbn-ts/core": "^2.2.1", "animate.css": "^4.1.1", "axios": "^1.3.4", + "benz-amr-recorder": "^1.1.5", "bpmn-js-token-simulation": "^0.10.0", "camunda-bpmn-moddle": "^7.0.1", "cropperjs": "^1.5.13", @@ -43,7 +44,7 @@ "diagram-js": "^11.6.0", "echarts": "^5.4.1", "echarts-wordcloud": "^2.1.0", - "element-plus": "2.2.34", + "element-plus": "2.3.1", "fast-xml-parser": "^4.1.3", "highlight.js": "^11.7.0", "intro.js": "^6.0.0", @@ -62,57 +63,57 @@ "vue-router": "^4.1.6", "vue-types": "^5.0.2", "vuedraggable": "^4.1.0", - "vxe-table": "^4.3.10", + "vxe-table": "^4.3.11", "web-storage-cache": "^1.1.1", "xe-utils": "^3.5.7", "xml-js": "^1.6.11" }, "devDependencies": { - "@commitlint/cli": "^17.4.4", + "@commitlint/cli": "^17.5.0", "@commitlint/config-conventional": "^17.4.4", - "@iconify/json": "^2.2.31", - "@intlify/unplugin-vue-i18n": "^0.8.2", + "@iconify/json": "^2.2.38", + "@intlify/unplugin-vue-i18n": "^0.10.0", "@purge-icons/generated": "^0.9.0", "@types/intro.js": "^5.1.1", - "@types/lodash-es": "^4.17.6", - "@types/node": "^18.14.6", + "@types/lodash-es": "^4.17.7", + "@types/node": "^18.15.5", "@types/nprogress": "^0.2.0", "@types/qrcode": "^1.5.0", "@types/qs": "^6.9.7", - "@typescript-eslint/eslint-plugin": "^5.54.1", - "@typescript-eslint/parser": "^5.54.1", - "@vitejs/plugin-legacy": "^4.0.1", - "@vitejs/plugin-vue": "^4.0.0", - "@vitejs/plugin-vue-jsx": "^3.0.0", - "autoprefixer": "^10.4.13", + "@typescript-eslint/eslint-plugin": "^5.56.0", + "@typescript-eslint/parser": "^5.56.0", + "@vitejs/plugin-legacy": "^4.0.2", + "@vitejs/plugin-vue": "^4.1.0", + "@vitejs/plugin-vue-jsx": "^3.0.1", + "autoprefixer": "^10.4.14", "bpmn-js": "^8.9.0", "bpmn-js-properties-panel": "^0.46.0", "consola": "^2.15.3", - "eslint": "^8.35.0", - "eslint-config-prettier": "^8.7.0", - "eslint-define-config": "^1.15.0", + "eslint": "^8.36.0", + "eslint-config-prettier": "^8.8.0", + "eslint-define-config": "^1.17.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-vue": "^9.9.0", - "lint-staged": "^13.1.2", + "lint-staged": "^13.2.0", "postcss": "^8.4.21", "postcss-html": "^1.5.0", "postcss-scss": "^4.0.6", - "prettier": "^2.8.4", - "rimraf": "^4.3.1", - "rollup": "^3.18.0", - "sass": "^1.58.3", - "stylelint": "^15.2.0", + "prettier": "^2.8.6", + "rimraf": "^4.4.1", + "rollup": "^3.20.0", + "sass": "^1.59.3", + "stylelint": "^15.3.0", "stylelint-config-html": "^1.1.0", "stylelint-config-prettier": "^9.0.5", - "stylelint-config-recommended": "^10.0.1", - "stylelint-config-standard": "^30.0.1", - "stylelint-order": "^6.0.2", - "terser": "^5.16.5", - "typescript": "4.9.5", + "stylelint-config-recommended": "^11.0.0", + "stylelint-config-standard": "^31.0.0", + "stylelint-order": "^6.0.3", + "terser": "^5.16.6", + "typescript": "5.0.2", "unplugin-auto-import": "^0.15.1", "unplugin-element-plus": "^0.7.0", "unplugin-vue-components": "^0.24.1", - "vite": "4.1.4", + "vite": "4.2.1", "vite-plugin-compression": "^0.5.1", "vite-plugin-ejs": "^1.6.4", "vite-plugin-eslint": "^1.8.1", @@ -125,7 +126,7 @@ "windicss": "^3.5.6" }, "engines": { - "node": ">=16.0.0" + "node": ">=16.18.0" }, "license": "MIT", "repository": { diff --git a/src/api/bpm/definition/index.ts b/src/api/bpm/definition/index.ts index 477d6729..c0e51fab 100644 --- a/src/api/bpm/definition/index.ts +++ b/src/api/bpm/definition/index.ts @@ -1,19 +1,19 @@ import request from '@/config/axios' -export const getProcessDefinitionBpmnXMLApi = async (id: number) => { +export const getProcessDefinitionBpmnXML = async (id: number) => { return await request.get({ url: '/bpm/process-definition/get-bpmn-xml?id=' + id }) } -export const getProcessDefinitionPageApi = async (params) => { +export const getProcessDefinitionPage = async (params) => { return await request.get({ url: '/bpm/process-definition/page', params }) } -export const getProcessDefinitionListApi = async (params) => { +export const getProcessDefinitionList = async (params) => { return await request.get({ url: '/bpm/process-definition/list', params diff --git a/src/api/bpm/form/index.ts b/src/api/bpm/form/index.ts index c745201f..142ed24c 100644 --- a/src/api/bpm/form/index.ts +++ b/src/api/bpm/form/index.ts @@ -11,7 +11,7 @@ export type FormVO = { } // 创建工作流的表单定义 -export const createFormApi = async (data: FormVO) => { +export const createForm = async (data: FormVO) => { return await request.post({ url: '/bpm/form/create', data: data @@ -19,7 +19,7 @@ export const createFormApi = async (data: FormVO) => { } // 更新工作流的表单定义 -export const updateFormApi = async (data: FormVO) => { +export const updateForm = async (data: FormVO) => { return await request.put({ url: '/bpm/form/update', data: data @@ -27,21 +27,21 @@ export const updateFormApi = async (data: FormVO) => { } // 删除工作流的表单定义 -export const deleteFormApi = async (id: number) => { +export const deleteForm = async (id: number) => { return await request.delete({ url: '/bpm/form/delete?id=' + id }) } // 获得工作流的表单定义 -export const getFormApi = async (id: number) => { +export const getForm = async (id: number) => { return await request.get({ url: '/bpm/form/get?id=' + id }) } // 获得工作流的表单定义分页 -export const getFormPageApi = async (params) => { +export const getFormPage = async (params) => { return await request.get({ url: '/bpm/form/page', params @@ -49,7 +49,7 @@ export const getFormPageApi = async (params) => { } // 获得动态表单的精简列表 -export const getSimpleFormsApi = async () => { +export const getSimpleFormList = async () => { return await request.get({ url: '/bpm/form/list-all-simple' }) diff --git a/src/api/bpm/model/index.ts b/src/api/bpm/model/index.ts index 0335a3db..2e1d4e64 100644 --- a/src/api/bpm/model/index.ts +++ b/src/api/bpm/model/index.ts @@ -25,20 +25,20 @@ export type ModelVO = { bpmnXml: string } -export const getModelPageApi = async (params) => { +export const getModelPage = async (params) => { return await request.get({ url: '/bpm/model/page', params }) } -export const getModelApi = async (id: number) => { +export const getModel = async (id: number) => { return await request.get({ url: '/bpm/model/get?id=' + id }) } -export const updateModelApi = async (data: ModelVO) => { +export const updateModel = async (data: ModelVO) => { return await request.put({ url: '/bpm/model/update', data: data }) } // 任务状态修改 -export const updateModelStateApi = async (id: number, state: number) => { +export const updateModelState = async (id: number, state: number) => { const data = { id: id, state: state @@ -46,14 +46,14 @@ export const updateModelStateApi = async (id: number, state: number) => { return await request.put({ url: '/bpm/model/update-state', data: data }) } -export const createModelApi = async (data: ModelVO) => { +export const createModel = async (data: ModelVO) => { return await request.post({ url: '/bpm/model/create', data: data }) } -export const deleteModelApi = async (id: number) => { +export const deleteModel = async (id: number) => { return await request.delete({ url: '/bpm/model/delete?id=' + id }) } -export const deployModelApi = async (id: number) => { +export const deployModel = async (id: number) => { return await request.post({ url: '/bpm/model/deploy?id=' + id }) } diff --git a/src/api/bpm/userGroup/index.ts b/src/api/bpm/userGroup/index.ts index 88ee9619..035762bf 100644 --- a/src/api/bpm/userGroup/index.ts +++ b/src/api/bpm/userGroup/index.ts @@ -11,7 +11,7 @@ export type UserGroupVO = { } // 创建用户组 -export const createUserGroupApi = async (data: UserGroupVO) => { +export const createUserGroup = async (data: UserGroupVO) => { return await request.post({ url: '/bpm/user-group/create', data: data @@ -19,7 +19,7 @@ export const createUserGroupApi = async (data: UserGroupVO) => { } // 更新用户组 -export const updateUserGroupApi = async (data: UserGroupVO) => { +export const updateUserGroup = async (data: UserGroupVO) => { return await request.put({ url: '/bpm/user-group/update', data: data @@ -27,21 +27,21 @@ export const updateUserGroupApi = async (data: UserGroupVO) => { } // 删除用户组 -export const deleteUserGroupApi = async (id: number) => { +export const deleteUserGroup = async (id: number) => { return await request.delete({ url: '/bpm/user-group/delete?id=' + id }) } // 获得用户组 -export const getUserGroupApi = async (id: number) => { +export const getUserGroup = async (id: number) => { return await request.get({ url: '/bpm/user-group/get?id=' + id }) } // 获得用户组分页 -export const getUserGroupPageApi = async (params) => { +export const getUserGroupPage = async (params) => { return await request.get({ url: '/bpm/user-group/page', params }) } // 获取用户组精简信息列表 -export const listSimpleUserGroupsApi = async () => { +export const getSimpleUserGroupList = async (): Promise => { return await request.get({ url: '/bpm/user-group/list-all-simple' }) } diff --git a/src/api/infra/apiAccessLog/index.ts b/src/api/infra/apiAccessLog/index.ts index b46199e4..c6b4b45f 100644 --- a/src/api/infra/apiAccessLog/index.ts +++ b/src/api/infra/apiAccessLog/index.ts @@ -19,32 +19,12 @@ export interface ApiAccessLogVO { createTime: Date } -export interface ApiAccessLogPageReqVO extends PageParam { - userId?: number - userType?: number - applicationName?: string - requestUrl?: string - beginTime?: Date[] - duration?: number - resultCode?: number -} - -export interface ApiAccessLogExportReqVO { - userId?: number - userType?: number - applicationName?: string - requestUrl?: string - beginTime?: Date[] - duration?: number - resultCode?: number -} - // 查询列表API 访问日志 -export const getApiAccessLogPageApi = (params: ApiAccessLogPageReqVO) => { +export const getApiAccessLogPage = (params: PageParam) => { return request.get({ url: '/infra/api-access-log/page', params }) } // 导出API 访问日志 -export const exportApiAccessLogApi = (params: ApiAccessLogExportReqVO) => { +export const exportApiAccessLog = (params) => { return request.download({ url: '/infra/api-access-log/export-excel', params }) } diff --git a/src/api/infra/apiErrorLog/index.ts b/src/api/infra/apiErrorLog/index.ts index 06515c36..59ee2143 100644 --- a/src/api/infra/apiErrorLog/index.ts +++ b/src/api/infra/apiErrorLog/index.ts @@ -27,38 +27,20 @@ export interface ApiErrorLogVO { createTime: Date } -export interface ApiErrorLogPageReqVO extends PageParam { - userId?: number - userType?: number - applicationName?: string - requestUrl?: string - exceptionTime?: Date[] - processStatus: number -} - -export interface ApiErrorLogExportReqVO { - userId?: number - userType?: number - applicationName?: string - requestUrl?: string - exceptionTime?: Date[] - processStatus: number -} - // 查询列表API 访问日志 -export const getApiErrorLogPageApi = (params: ApiErrorLogPageReqVO) => { +export const getApiErrorLogPage = (params: PageParam) => { return request.get({ url: '/infra/api-error-log/page', params }) } // 更新 API 错误日志的处理状态 -export const updateApiErrorLogPageApi = (id: number, processStatus: number) => { +export const updateApiErrorLogPage = (id: number, processStatus: number) => { return request.put({ url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus }) } // 导出API 访问日志 -export const exportApiErrorLogApi = (params: ApiErrorLogExportReqVO) => { +export const exportApiErrorLog = (params) => { return request.download({ url: '/infra/api-error-log/export-excel', params diff --git a/src/api/mp/account/index.ts b/src/api/mp/account/index.ts index cbdb1422..d641ef3c 100644 --- a/src/api/mp/account/index.ts +++ b/src/api/mp/account/index.ts @@ -1,5 +1,10 @@ import request from '@/config/axios' +export interface AccountVO { + id?: number + name: string +} + // 创建公众号账号 export const createAccount = async (data) => { return await request.post({ url: '/mp/account/create', data }) @@ -26,7 +31,7 @@ export const getAccountPage = async (query) => { } // 获取公众号账号精简信息列表 -export const getSimpleAccounts = async () => { +export const getSimpleAccountList = async () => { return request.get({ url: '/mp/account/list-all-simple' }) } diff --git a/src/api/mp/message/index.ts b/src/api/mp/message/index.ts index 8b7d3cbd..ad9b95dd 100644 --- a/src/api/mp/message/index.ts +++ b/src/api/mp/message/index.ts @@ -1,7 +1,7 @@ import request from '@/config/axios' // 获得公众号消息分页 -export const getMessagePage = (query) => { +export const getMessagePage = (query: PageParam) => { return request.get({ url: '/mp/message/page', params: query diff --git a/src/api/mp/tag/index.ts b/src/api/mp/tag/index.ts index e681e2e1..50183a51 100644 --- a/src/api/mp/tag/index.ts +++ b/src/api/mp/tag/index.ts @@ -1,7 +1,14 @@ import request from '@/config/axios' +export interface TagVO { + id?: number + name: string + accountId: number + createTime: Date +} + // 创建公众号标签 -export const createTag = (data) => { +export const createTag = (data: TagVO) => { return request.post({ url: '/mp/tag/create', data: data @@ -9,7 +16,7 @@ export const createTag = (data) => { } // 更新公众号标签 -export const updateTag = (data) => { +export const updateTag = (data: TagVO) => { return request.put({ url: '/mp/tag/update', data: data @@ -17,21 +24,21 @@ export const updateTag = (data) => { } // 删除公众号标签 -export const deleteTag = (id) => { +export const deleteTag = (id: number) => { return request.delete({ url: '/mp/tag/delete?id=' + id }) } // 获得公众号标签 -export const getTag = (id) => { +export const getTag = (id: number) => { return request.get({ url: '/mp/tag/get?id=' + id }) } // 获得公众号标签分页 -export const getTagPage = (query) => { +export const getTagPage = (query: PageParam) => { return request.get({ url: '/mp/tag/page', params: query @@ -39,14 +46,14 @@ export const getTagPage = (query) => { } // 获取公众号标签精简信息列表 -export const getSimpleTags = () => { +export const getSimpleTagList = () => { return request.get({ url: '/mp/tag/list-all-simple' }) } // 同步公众号标签 -export const syncTag = (accountId) => { +export const syncTag = (accountId: number) => { return request.post({ url: '/mp/tag/sync?accountId=' + accountId }) diff --git a/src/api/system/dept/index.ts b/src/api/system/dept/index.ts index d66de3f1..e9c31fd7 100644 --- a/src/api/system/dept/index.ts +++ b/src/api/system/dept/index.ts @@ -18,7 +18,7 @@ export interface DeptPageReqVO { } // 查询部门(精简)列表 -export const listSimpleDeptApi = async () => { +export const getSimpleDeptList = async (): Promise => { return await request.get({ url: '/system/dept/list-all-simple' }) } diff --git a/src/api/system/loginLog/index.ts b/src/api/system/loginLog/index.ts index cadaeaf3..f275c3e2 100644 --- a/src/api/system/loginLog/index.ts +++ b/src/api/system/loginLog/index.ts @@ -13,18 +13,12 @@ export interface LoginLogVO { createTime: Date } -export interface LoginLogReqVO extends PageParam { - userIp?: string - username?: string - status?: boolean - createTime?: Date[] -} - // 查询登录日志列表 -export const getLoginLogPageApi = (params: LoginLogReqVO) => { +export const getLoginLogPage = (params: PageParam) => { return request.get({ url: '/system/login-log/page', params }) } + // 导出登录日志 -export const exportLoginLogApi = (params: LoginLogReqVO) => { +export const exportLoginLog = (params) => { return request.download({ url: '/system/login-log/export', params }) } diff --git a/src/api/system/menu/index.ts b/src/api/system/menu/index.ts index 5913972b..13736215 100644 --- a/src/api/system/menu/index.ts +++ b/src/api/system/menu/index.ts @@ -18,18 +18,13 @@ export interface MenuVO { createTime: Date } -export interface MenuPageReqVO { - name?: string - status?: number -} - // 查询菜单(精简)列表 -export const listSimpleMenusApi = () => { +export const getSimpleMenusList = () => { return request.get({ url: '/system/menu/list-all-simple' }) } // 查询菜单列表 -export const getMenuListApi = (params: MenuPageReqVO) => { +export const getMenuList = (params) => { return request.get({ url: '/system/menu/list', params }) } @@ -39,16 +34,16 @@ export const getMenuApi = (id: number) => { } // 新增菜单 -export const createMenuApi = (data: MenuVO) => { +export const createMenu = (data: MenuVO) => { return request.post({ url: '/system/menu/create', data }) } // 修改菜单 -export const updateMenuApi = (data: MenuVO) => { +export const updateMenu = (data: MenuVO) => { return request.put({ url: '/system/menu/update', data }) } // 删除菜单 -export const deleteMenuApi = (id: number) => { +export const deleteMenu = (id: number) => { return request.delete({ url: '/system/menu/delete?id=' + id }) } diff --git a/src/api/system/permission/index.ts b/src/api/system/permission/index.ts index aa355dfc..c529f884 100644 --- a/src/api/system/permission/index.ts +++ b/src/api/system/permission/index.ts @@ -37,6 +37,6 @@ export const listUserRolesApi = async (userId: number) => { } // 赋予用户角色 -export const aassignUserRoleApi = async (data: PermissionAssignUserRoleReqVO) => { +export const assignUserRoleApi = async (data: PermissionAssignUserRoleReqVO) => { return await request.post({ url: '/system/permission/assign-user-role', data }) } diff --git a/src/api/system/post/index.ts b/src/api/system/post/index.ts index 9e2540f0..405db387 100644 --- a/src/api/system/post/index.ts +++ b/src/api/system/post/index.ts @@ -10,49 +10,37 @@ export interface PostVO { createTime?: Date } -export interface PostPageReqVO extends PageParam { - code?: string - name?: string - status?: number -} - -export interface PostExportReqVO { - code?: string - name?: string - status?: number -} - // 查询岗位列表 -export const getPostPageApi = async (params: PostPageReqVO) => { +export const getPostPage = async (params: PageParam) => { return await request.get({ url: '/system/post/page', params }) } // 获取岗位精简信息列表 -export const listSimplePostsApi = async () => { +export const getSimplePostList = async (): Promise => { return await request.get({ url: '/system/post/list-all-simple' }) } // 查询岗位详情 -export const getPostApi = async (id: number) => { +export const getPost = async (id: number) => { return await request.get({ url: '/system/post/get?id=' + id }) } // 新增岗位 -export const createPostApi = async (data: PostVO) => { +export const createPost = async (data: PostVO) => { return await request.post({ url: '/system/post/create', data }) } // 修改岗位 -export const updatePostApi = async (data: PostVO) => { +export const updatePost = async (data: PostVO) => { return await request.put({ url: '/system/post/update', data }) } // 删除岗位 -export const deletePostApi = async (id: number) => { +export const deletePost = async (id: number) => { return await request.delete({ url: '/system/post/delete?id=' + id }) } // 导出岗位 -export const exportPostApi = async (params: PostExportReqVO) => { +export const exportPost = async (params) => { return await request.download({ url: '/system/post/export', params }) } diff --git a/src/api/system/role/index.ts b/src/api/system/role/index.ts index 0d477555..902d5ca6 100644 --- a/src/api/system/role/index.ts +++ b/src/api/system/role/index.ts @@ -10,49 +10,49 @@ export interface RoleVO { createTime: Date } -export interface RolePageReqVO extends PageParam { - name?: string - code?: string - status?: number - createTime?: Date[] -} - export interface UpdateStatusReqVO { id: number status: number } // 查询角色列表 -export const getRolePageApi = async (params: RolePageReqVO) => { +export const getRolePage = async (params: PageParam) => { return await request.get({ url: '/system/role/page', params }) } // 查询角色(精简)列表 -export const listSimpleRolesApi = async () => { +export const getSimpleRoleList = async (): Promise => { return await request.get({ url: '/system/role/list-all-simple' }) } // 查询角色详情 -export const getRoleApi = async (id: number) => { +export const getRole = async (id: number) => { return await request.get({ url: '/system/role/get?id=' + id }) } // 新增角色 -export const createRoleApi = async (data: RoleVO) => { +export const createRole = async (data: RoleVO) => { return await request.post({ url: '/system/role/create', data }) } // 修改角色 -export const updateRoleApi = async (data: RoleVO) => { +export const updateRole = async (data: RoleVO) => { return await request.put({ url: '/system/role/update', data }) } // 修改角色状态 -export const updateRoleStatusApi = async (data: UpdateStatusReqVO) => { +export const updateRoleStatus = async (data: UpdateStatusReqVO) => { return await request.put({ url: '/system/role/update-status', data }) } // 删除角色 -export const deleteRoleApi = async (id: number) => { +export const deleteRole = async (id: number) => { return await request.delete({ url: '/system/role/delete?id=' + id }) } +// 导出角色 +export const exportRole = (params) => { + return request.download({ + url: '/system/role/export-excel', + params + }) +} diff --git a/src/api/system/sensitiveWord/index.ts b/src/api/system/sensitiveWord/index.ts index ffda89c0..1116226f 100644 --- a/src/api/system/sensitiveWord/index.ts +++ b/src/api/system/sensitiveWord/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import qs from 'qs' export interface SensitiveWordVO { id: number @@ -9,56 +10,49 @@ export interface SensitiveWordVO { 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 interface SensitiveWordTestReqVO { + text: string + tag: string[] } // 查询敏感词列表 -export const getSensitiveWordPageApi = (params: SensitiveWordPageReqVO) => { +export const getSensitiveWordPage = (params: PageParam) => { return request.get({ url: '/system/sensitive-word/page', params }) } // 查询敏感词详情 -export const getSensitiveWordApi = (id: number) => { +export const getSensitiveWord = (id: number) => { return request.get({ url: '/system/sensitive-word/get?id=' + id }) } // 新增敏感词 -export const createSensitiveWordApi = (data: SensitiveWordVO) => { +export const createSensitiveWord = (data: SensitiveWordVO) => { return request.post({ url: '/system/sensitive-word/create', data }) } // 修改敏感词 -export const updateSensitiveWordApi = (data: SensitiveWordVO) => { +export const updateSensitiveWord = (data: SensitiveWordVO) => { return request.put({ url: '/system/sensitive-word/update', data }) } // 删除敏感词 -export const deleteSensitiveWordApi = (id: number) => { +export const deleteSensitiveWord = (id: number) => { return request.delete({ url: '/system/sensitive-word/delete?id=' + id }) } // 导出敏感词 -export const exportSensitiveWordApi = (params: SensitiveWordExportReqVO) => { +export const exportSensitiveWord = (params) => { return request.download({ url: '/system/sensitive-word/export-excel', params }) } // 获取所有敏感词的标签数组 -export const getSensitiveWordTagsApi = () => { +export const getSensitiveWordTagList = () => { return request.get({ url: '/system/sensitive-word/get-tags' }) } // 获得文本所包含的不合法的敏感词数组 -export const validateTextApi = (id: number) => { - return request.get({ url: '/system/sensitive-word/validate-text?' + id }) +export const validateText = (query: SensitiveWordTestReqVO) => { + return request.get({ + url: '/system/sensitive-word/validate-text?' + qs.stringify(query, { arrayFormat: 'repeat' }) + }) } diff --git a/src/api/system/sms/smsChannel/index.ts b/src/api/system/sms/smsChannel/index.ts index 176d075f..f335628f 100644 --- a/src/api/system/sms/smsChannel/index.ts +++ b/src/api/system/sms/smsChannel/index.ts @@ -12,39 +12,32 @@ export interface SmsChannelVO { createTime: Date } -export interface SmsChannelPageReqVO extends PageParam { - signature?: string - code?: string - status?: number - createTime?: Date[] -} - // 查询短信渠道列表 -export const getSmsChannelPageApi = (params: SmsChannelPageReqVO) => { +export const getSmsChannelPage = (params: PageParam) => { return request.get({ url: '/system/sms-channel/page', params }) } // 获得短信渠道精简列表 -export function getSimpleSmsChannels() { +export function getSimpleSmsChannelList() { return request.get({ url: '/system/sms-channel/list-all-simple' }) } // 查询短信渠道详情 -export const getSmsChannelApi = (id: number) => { +export const getSmsChannel = (id: number) => { return request.get({ url: '/system/sms-channel/get?id=' + id }) } // 新增短信渠道 -export const createSmsChannelApi = (data: SmsChannelVO) => { +export const createSmsChannel = (data: SmsChannelVO) => { return request.post({ url: '/system/sms-channel/create', data }) } // 修改短信渠道 -export const updateSmsChannelApi = (data: SmsChannelVO) => { +export const updateSmsChannel = (data: SmsChannelVO) => { return request.put({ url: '/system/sms-channel/update', data }) } // 删除短信渠道 -export const deleteSmsChannelApi = (id: number) => { +export const deleteSmsChannel = (id: number) => { return request.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 index 863eabb6..3d54fac1 100644 --- a/src/api/system/sms/smsLog/index.ts +++ b/src/api/system/sms/smsLog/index.ts @@ -1,57 +1,39 @@ import request from '@/config/axios' export interface SmsLogVO { - id: number - channelId: number + id: number | null + channelId: number | null channelCode: string - templateId: number + templateId: number | null templateCode: string - templateType: number + templateType: number | null templateContent: string - templateParams: Map + templateParams: Map | null + apiTemplateId: string mobile: string - userId: number - userType: number - sendStatus: number - sendTime: Date - sendCode: number + userId: number | null + userType: number | null + sendStatus: number | null + sendTime: Date | null + sendCode: number | null sendMsg: string apiSendCode: string apiSendMsg: string apiRequestId: string apiSerialNo: string - receiveStatus: number - receiveTime: Date + receiveStatus: number | null + receiveTime: Date | null 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[] + createTime: Date | null } // 查询短信日志列表 -export const getSmsLogPageApi = (params: SmsLogPageReqVO) => { +export const getSmsLogPage = (params: PageParam) => { return request.get({ url: '/system/sms-log/page', params }) } // 导出短信日志 -export const exportSmsLogApi = (params: SmsLogExportReqVO) => { +export const exportSmsLog = (params) => { return request.download({ url: '/system/sms-log/export-excel', params }) } diff --git a/src/api/system/sms/smsTemplate/index.ts b/src/api/system/sms/smsTemplate/index.ts index 0433fe3a..35cb489d 100644 --- a/src/api/system/sms/smsTemplate/index.ts +++ b/src/api/system/sms/smsTemplate/index.ts @@ -1,18 +1,18 @@ import request from '@/config/axios' export interface SmsTemplateVO { - id: number - type: number + id: number | null + type: number | null status: number code: string name: string content: string remark: string apiTemplateId: string - channelId: number - channelCode: string - params: string[] - createTime: Date + channelId: number | null + channelCode?: string + params?: string[] + createTime?: Date } export interface SendSmsReqVO { @@ -21,60 +21,40 @@ export interface SendSmsReqVO { templateParams: Map } -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 const getSmsTemplatePageApi = (params: SmsTemplatePageReqVO) => { +export const getSmsTemplatePage = (params: PageParam) => { return request.get({ url: '/system/sms-template/page', params }) } // 查询短信模板详情 -export const getSmsTemplateApi = (id: number) => { +export const getSmsTemplate = (id: number) => { return request.get({ url: '/system/sms-template/get?id=' + id }) } // 新增短信模板 -export const createSmsTemplateApi = (data: SmsTemplateVO) => { +export const createSmsTemplate = (data: SmsTemplateVO) => { return request.post({ url: '/system/sms-template/create', data }) } // 修改短信模板 -export const updateSmsTemplateApi = (data: SmsTemplateVO) => { +export const updateSmsTemplate = (data: SmsTemplateVO) => { return request.put({ url: '/system/sms-template/update', data }) } // 删除短信模板 -export const deleteSmsTemplateApi = (id: number) => { +export const deleteSmsTemplate = (id: number) => { return request.delete({ url: '/system/sms-template/delete?id=' + id }) } -// 发送短信 -export const sendSmsApi = (data: SendSmsReqVO) => { - return request.post({ url: '/system/sms-template/send-sms', data }) -} - // 导出短信模板 -export const exportPostApi = (params: SmsTemplateExportReqVO) => { +export const exportSmsTemplate = (params) => { return request.download({ url: '/system/sms-template/export-excel', params }) } + +// 发送短信 +export const sendSms = (data: SendSmsReqVO) => { + return request.post({ url: '/system/sms-template/send-sms', data }) +} diff --git a/src/api/system/tenant/index.ts b/src/api/system/tenant/index.ts index d79fb7b2..176c3757 100644 --- a/src/api/system/tenant/index.ts +++ b/src/api/system/tenant/index.ts @@ -32,31 +32,31 @@ export interface TenantExportReqVO { } // 查询租户列表 -export const getTenantPageApi = (params: TenantPageReqVO) => { +export const getTenantPage = (params: TenantPageReqVO) => { return request.get({ url: '/system/tenant/page', params }) } // 查询租户详情 -export const getTenantApi = (id: number) => { +export const getTenant = (id: number) => { return request.get({ url: '/system/tenant/get?id=' + id }) } // 新增租户 -export const createTenantApi = (data: TenantVO) => { +export const createTenant = (data: TenantVO) => { return request.post({ url: '/system/tenant/create', data }) } // 修改租户 -export const updateTenantApi = (data: TenantVO) => { +export const updateTenant = (data: TenantVO) => { return request.put({ url: '/system/tenant/update', data }) } // 删除租户 -export const deleteTenantApi = (id: number) => { +export const deleteTenant = (id: number) => { return request.delete({ url: '/system/tenant/delete?id=' + id }) } // 导出租户 -export const exportTenantApi = (params: TenantExportReqVO) => { +export const exportTenant = (params: TenantExportReqVO) => { return request.download({ url: '/system/tenant/export-excel', params }) } diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index e505921d..e488c0d7 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -43,12 +43,12 @@ export const getUserApi = (id: number) => { } // 新增用户 -export const createUserApi = (data: UserVO) => { +export const createUserApi = (data: UserVO | Recordable) => { return request.post({ url: '/system/user/create', data }) } // 修改用户 -export const updateUserApi = (data: UserVO) => { +export const updateUserApi = (data: UserVO | Recordable) => { return request.put({ url: '/system/user/update', data }) } @@ -86,6 +86,6 @@ export const updateUserStatusApi = (id: number, status: number) => { } // 获取用户精简信息列表 -export const getListSimpleUsersApi = () => { +export const getSimpleUserList = (): Promise => { return request.get({ url: '/system/user/list-all-simple' }) } diff --git a/src/components/Descriptions/src/Descriptions.vue b/src/components/Descriptions/src/Descriptions.vue index fca37000..f1e77ddf 100644 --- a/src/components/Descriptions/src/Descriptions.vue +++ b/src/components/Descriptions/src/Descriptions.vue @@ -76,7 +76,7 @@ const toggleClick = () => { v-if="title" :class="[ `${prefixCls}-header`, - 'h-50px flex justify-between items-center mb-10px border-bottom-1 border-solid border-[var(--tags-view-border-color)] px-10px cursor-pointer dark:border-[var(--el-border-color)]' + 'h-50px flex justify-between items-center border-bottom-1 border-solid border-[var(--tags-view-border-color)] px-10px cursor-pointer dark:border-[var(--el-border-color)]' ]" @click="toggleClick" > diff --git a/src/components/DictTag/src/DictTag.vue b/src/components/DictTag/src/DictTag.vue index ecbfedb4..e3ba78d2 100644 --- a/src/components/DictTag/src/DictTag.vue +++ b/src/components/DictTag/src/DictTag.vue @@ -34,7 +34,7 @@ export default defineComponent({ return null } // 解决自定义字典标签值为零时标签不渲染的问题 - if (props.value === undefined) { + if (props.value === undefined || props.value === null) { return null } getDictObj(props.type, props.value.toString()) diff --git a/src/components/Editor/src/Editor.vue b/src/components/Editor/src/Editor.vue index 85b849fb..4d8e7dde 100644 --- a/src/components/Editor/src/Editor.vue +++ b/src/components/Editor/src/Editor.vue @@ -178,7 +178,7 @@ defineExpose({ diff --git a/src/views/bpm/taskAssignRule/index.vue b/src/views/bpm/taskAssignRule/index.vue index 012e6f68..feea80a2 100644 --- a/src/views/bpm/taskAssignRule/index.vue +++ b/src/views/bpm/taskAssignRule/index.vue @@ -1,186 +1,73 @@ diff --git a/src/views/bpm/taskAssignRule/taskAssignRule.data.ts b/src/views/bpm/taskAssignRule/taskAssignRule.data.ts deleted file mode 100644 index cad74325..00000000 --- a/src/views/bpm/taskAssignRule/taskAssignRule.data.ts +++ /dev/null @@ -1,54 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -// 表单校验 -export const rules = reactive({ - type: [{ required: true, message: '规则类型不能为空', trigger: 'change' }], - roleIds: [{ required: true, message: '指定角色不能为空', trigger: 'change' }], - deptIds: [{ required: true, message: '指定部门不能为空', trigger: 'change' }], - postIds: [{ required: true, message: '指定岗位不能为空', trigger: 'change' }], - userIds: [{ required: true, message: '指定用户不能为空', trigger: 'change' }], - userGroupIds: [{ required: true, message: '指定用户组不能为空', trigger: 'change' }], - scripts: [{ required: true, message: '指定脚本不能为空', trigger: 'change' }] -}) - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: null, - action: true, - actionWidth: '200px', - columns: [ - { - title: '任务名', - field: 'taskDefinitionName' - }, - { - title: '任务标识', - field: 'taskDefinitionKey' - }, - { - title: '规则类型', - field: 'type', - dictType: DICT_TYPE.BPM_TASK_ASSIGN_RULE_TYPE, - dictClass: 'number' - }, - { - title: '规则范围', - field: 'options', - table: { - slots: { - default: 'options_default' - } - } - } - ] -}) - -export const idShowActionClick = (modelId?: any) => { - if (modelId) { - return true - } else { - return false - } -} -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue b/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue new file mode 100644 index 00000000..d046a521 --- /dev/null +++ b/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue @@ -0,0 +1,65 @@ + + + diff --git a/src/views/infra/apiAccessLog/apiAccessLog.data.ts b/src/views/infra/apiAccessLog/apiAccessLog.data.ts deleted file mode 100644 index cb9e97a7..00000000 --- a/src/views/infra/apiAccessLog/apiAccessLog.data.ts +++ /dev/null @@ -1,74 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'id', - primaryTitle: '日志编号', - action: true, - actionWidth: '80px', - columns: [ - { - title: '链路追踪', - field: 'traceId', - isTable: false - }, - { - title: '用户编号', - field: 'userId', - isSearch: true - }, - { - title: '用户类型', - field: 'userType', - dictType: DICT_TYPE.USER_TYPE, - dictClass: 'number', - isSearch: true - }, - { - title: '应用名', - field: 'applicationName', - isSearch: true - }, - { - title: '请求方法名', - field: 'requestMethod' - }, - { - title: '请求地址', - field: 'requestUrl', - isSearch: true - }, - { - title: '请求时间', - field: 'beginTime', - formatter: 'formatDate', - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - }, - { - title: '执行时长', - field: 'duration', - table: { - slots: { - default: 'duration_default' - } - } - }, - { - title: '操作结果', - field: 'resultCode', - isSearch: true, - table: { - slots: { - default: 'resultCode_default' - } - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/infra/apiAccessLog/index.vue b/src/views/infra/apiAccessLog/index.vue index 6a09927d..3102d39d 100644 --- a/src/views/infra/apiAccessLog/index.vue +++ b/src/views/infra/apiAccessLog/index.vue @@ -1,62 +1,220 @@ + diff --git a/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue b/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue new file mode 100644 index 00000000..5076fe00 --- /dev/null +++ b/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue @@ -0,0 +1,79 @@ + + diff --git a/src/views/infra/apiErrorLog/apiErrorLog.data.ts b/src/views/infra/apiErrorLog/apiErrorLog.data.ts deleted file mode 100644 index a539c167..00000000 --- a/src/views/infra/apiErrorLog/apiErrorLog.data.ts +++ /dev/null @@ -1,76 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'id', - primaryTitle: '日志编号', - action: true, - actionWidth: '300', - columns: [ - { - title: '链路追踪', - field: 'traceId', - isTable: false - }, - { - title: '用户编号', - field: 'userId', - isSearch: true - }, - { - title: '用户类型', - field: 'userType', - dictType: DICT_TYPE.USER_TYPE, - isSearch: true - }, - { - title: '应用名', - field: 'applicationName', - isSearch: true - }, - { - title: '请求方法名', - field: 'requestMethod' - }, - { - title: '请求地址', - field: 'requestUrl', - isSearch: true - }, - { - title: '异常发生时间', - field: 'exceptionTime', - formatter: 'formatDate', - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - }, - { - title: '异常名', - field: 'exceptionName' - }, - { - title: '处理状态', - field: 'processStatus', - dictType: DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: '处理人', - field: 'processUserId', - isTable: false - }, - { - title: '处理时间', - field: 'processTime', - formatter: 'formatDate', - isTable: false - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/infra/apiErrorLog/index.vue b/src/views/infra/apiErrorLog/index.vue index 4193351a..cfe4adb1 100644 --- a/src/views/infra/apiErrorLog/index.vue +++ b/src/views/infra/apiErrorLog/index.vue @@ -1,99 +1,248 @@ + diff --git a/src/views/infra/build/index.vue b/src/views/infra/build/index.vue index 6f577e95..00b56fea 100644 --- a/src/views/infra/build/index.vue +++ b/src/views/infra/build/index.vue @@ -3,77 +3,99 @@
- 导入JSON - 导入Options - 生成JSON - 生成Options + 生成 JSON + 生成O ptions 生成组件 -
+
- -
- - -
- - {{ formValue }} - -
-
-
- 输入内容格式有误! -
+ + + +
+ + {{ t('common.copy') }} + + +
+ + {{ formData }} + +
+
+
+
diff --git a/src/views/infra/codegen/components/BasicInfoForm.vue b/src/views/infra/codegen/components/BasicInfoForm.vue index 2009553f..5ab820a2 100644 --- a/src/views/infra/codegen/components/BasicInfoForm.vue +++ b/src/views/infra/codegen/components/BasicInfoForm.vue @@ -6,7 +6,7 @@ import { useForm } from '@/hooks/web/useForm' import { FormSchema } from '@/types/form' import { CodegenTableVO } from '@/api/infra/codegen/types' import { getIntDictOptions } from '@/utils/dict' -import { listSimpleMenusApi } from '@/api/system/menu' +import { getSimpleMenusList } from '@/api/system/menu' import { handleTree, defaultProps } from '@/utils/tree' import { PropType } from 'vue' @@ -21,7 +21,7 @@ const templateTypeOptions = getIntDictOptions(DICT_TYPE.INFRA_CODEGEN_TEMPLATE_T const sceneOptions = getIntDictOptions(DICT_TYPE.INFRA_CODEGEN_SCENE) const menuOptions = ref([]) // 树形结构 const getTree = async () => { - const res = await listSimpleMenusApi() + const res = await getSimpleMenusList() menuOptions.value = handleTree(res) } diff --git a/src/views/infra/codegen/components/ImportTable.vue b/src/views/infra/codegen/components/ImportTable.vue index 38a81541..aebe7a8f 100644 --- a/src/views/infra/codegen/components/ImportTable.vue +++ b/src/views/infra/codegen/components/ImportTable.vue @@ -41,10 +41,8 @@ @@ -52,7 +50,7 @@ import { VxeTableInstance } from 'vxe-table' import type { DatabaseTableVO } from '@/api/infra/codegen/types' import { getSchemaTableListApi, createCodegenListApi } from '@/api/infra/codegen' -import { getDataSourceConfigListApi, DataSourceConfigVO } from '@/api/infra/dataSourceConfig' +import { getDataSourceConfigList, DataSourceConfigVO } from '@/api/infra/dataSourceConfig' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -63,13 +61,13 @@ const dbLoading = ref(true) const queryParams = reactive({ name: undefined, comment: undefined, - dataSourceConfigId: 0 + dataSourceConfigId: 0 as number | undefined }) const dataSourceConfigs = ref([]) const show = async () => { - const res = await getDataSourceConfigListApi() + const res = await getDataSourceConfigList() dataSourceConfigs.value = res - queryParams.dataSourceConfigId = dataSourceConfigs.value[0].id + queryParams.dataSourceConfigId = dataSourceConfigs.value[0].id as number visible.value = true await getList() } diff --git a/src/views/infra/config/form.vue b/src/views/infra/config/form.vue index 30e2f4d9..8d96b629 100644 --- a/src/views/infra/config/form.vue +++ b/src/views/infra/config/form.vue @@ -35,10 +35,8 @@ diff --git a/src/views/infra/dataSourceConfig/form.vue b/src/views/infra/dataSourceConfig/form.vue index ea699b57..cd79e24b 100644 --- a/src/views/infra/dataSourceConfig/form.vue +++ b/src/views/infra/dataSourceConfig/form.vue @@ -21,10 +21,8 @@ diff --git a/src/views/infra/file/form.vue b/src/views/infra/file/form.vue index 15ef02fd..b0a76e0e 100644 --- a/src/views/infra/file/form.vue +++ b/src/views/infra/file/form.vue @@ -23,10 +23,8 @@ diff --git a/src/views/infra/fileConfig/form.vue b/src/views/infra/fileConfig/form.vue index a23aac9f..f08ba4c4 100644 --- a/src/views/infra/fileConfig/form.vue +++ b/src/views/infra/fileConfig/form.vue @@ -93,10 +93,8 @@ diff --git a/src/views/infra/job/JobLog.vue b/src/views/infra/job/JobLog.vue index 1bf9d745..ba397d51 100644 --- a/src/views/infra/job/JobLog.vue +++ b/src/views/infra/job/JobLog.vue @@ -12,11 +12,7 @@ /> diff --git a/src/views/mp/account/index.vue b/src/views/mp/account/index.vue index 497f72ec..3489998b 100644 --- a/src/views/mp/account/index.vue +++ b/src/views/mp/account/index.vue @@ -1,3 +1,192 @@ + diff --git a/src/views/mp/components/img.png b/src/views/mp/components/img.png new file mode 100644 index 00000000..c25a6e76 Binary files /dev/null and b/src/views/mp/components/img.png differ diff --git a/src/views/mp/components/wx-location/main.vue b/src/views/mp/components/wx-location/main.vue new file mode 100644 index 00000000..47eab571 --- /dev/null +++ b/src/views/mp/components/wx-location/main.vue @@ -0,0 +1,71 @@ + + + diff --git a/src/views/mp/components/wx-msg/card.scss b/src/views/mp/components/wx-msg/card.scss new file mode 100644 index 00000000..67ac9219 --- /dev/null +++ b/src/views/mp/components/wx-msg/card.scss @@ -0,0 +1,101 @@ +.avue-card{ + &__item{ + margin-bottom: 16px; + border: 1px solid #e8e8e8; + background-color: #fff; + box-sizing: border-box; + color: rgba(0,0,0,.65); + font-size: 14px; + font-variant: tabular-nums; + line-height: 1.5; + list-style: none; + font-feature-settings: "tnum"; + cursor: pointer; + height:200px; + &:hover{ + border-color: rgba(0,0,0,.09); + box-shadow: 0 2px 8px rgba(0,0,0,.09); + } + &--add{ + border:1px dashed #000; + width: 100%; + color: rgba(0,0,0,.45); + background-color: #fff; + border-color: #d9d9d9; + border-radius: 2px; + display: flex; + align-items: center; + justify-content: center; + font-size: 16px; + i{ + margin-right: 10px; + } + &:hover{ + color: #40a9ff; + background-color: #fff; + border-color: #40a9ff; + } + } + } + &__body{ + display: flex; + padding: 24px; + } + &__detail{ + flex:1 + } + &__avatar{ + width: 48px; + height: 48px; + border-radius: 48px; + overflow: hidden; + margin-right: 12px; + img{ + width: 100%; + height: 100%; + } + } + &__title{ + color: rgba(0,0,0,.85); + margin-bottom: 12px; + font-size: 16px; + &:hover{ + color:#1890ff; + } + } + &__info{ + color: rgba(0,0,0,.45); + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; + height: 64px; + } + &__menu{ + display: flex; + justify-content:space-around; + height: 50px; + background: #f7f9fa; + color: rgba(0,0,0,.45); + text-align: center; + line-height: 50px; + &:hover{ + color:#1890ff; + } + } +} + +/** joolun 额外加的 */ +.avue-comment__main { + flex: unset!important; + border-radius: 5px!important; + margin: 0 8px!important; +} +.avue-comment__header { + border-top-left-radius: 5px; + border-top-right-radius: 5px; +} +.avue-comment__body { + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; +} diff --git a/src/views/mp/components/wx-msg/comment.scss b/src/views/mp/components/wx-msg/comment.scss new file mode 100644 index 00000000..3f1341b2 --- /dev/null +++ b/src/views/mp/components/wx-msg/comment.scss @@ -0,0 +1,88 @@ +/* 来自 https://github.com/nmxiaowei/avue/blob/master/styles/src/element-ui/comment.scss */ +.avue-comment{ + margin-bottom: 30px; + display: flex; + align-items: flex-start; + &--reverse{ + flex-direction:row-reverse; + .avue-comment__main{ + &:before,&:after{ + left: auto; + right: -8px; + border-width: 8px 0 8px 8px; + } + &:before{ + border-left-color: #dedede; + } + &:after{ + border-left-color: #f8f8f8; + margin-right: 1px; + margin-left: auto; + } + } + } + &__avatar{ + width: 48px; + height: 48px; + border-radius: 50%; + border: 1px solid transparent; + box-sizing: border-box; + vertical-align: middle; + } + &__header{ + padding: 5px 15px; + background: #f8f8f8; + border-bottom: 1px solid #eee; + display: flex; + align-items: center; + justify-content: space-between; + } + &__author{ + font-weight: 700; + font-size: 14px; + color: #999; + } + &__main{ + flex:1; + margin: 0 20px; + position: relative; + border: 1px solid #dedede; + border-radius: 2px; + &:before,&:after{ + position: absolute; + top: 10px; + left: -8px; + right: 100%; + width: 0; + height: 0; + display: block; + content: " "; + border-color: transparent; + border-style: solid solid outset; + border-width: 8px 8px 8px 0; + pointer-events: none; + } + &:before { + border-right-color: #dedede; + z-index: 1; + } + &:after{ + border-right-color: #f8f8f8; + margin-left: 1px; + z-index: 2; + } + } + &__body{ + padding: 15px; + overflow: hidden; + background: #fff; + font-family: Segoe UI,Lucida Grande,Helvetica,Arial,Microsoft YaHei,FreeSans,Arimo,Droid Sans,wenquanyi micro hei,Hiragino Sans GB,Hiragino Sans GB W3,FontAwesome,sans-serif;color: #333; + font-size: 14px; + } + blockquote{ + margin:0; + font-family: Georgia,Times New Roman,Times,Kai,Kaiti SC,KaiTi,BiauKai,FontAwesome,serif; + padding: 1px 0 1px 15px; + border-left: 4px solid #ddd; + } +} diff --git a/src/views/mp/components/wx-msg/main.vue b/src/views/mp/components/wx-msg/main.vue new file mode 100644 index 00000000..b514a73e --- /dev/null +++ b/src/views/mp/components/wx-msg/main.vue @@ -0,0 +1,338 @@ + + + + + diff --git a/src/views/mp/components/wx-music/main.vue b/src/views/mp/components/wx-music/main.vue new file mode 100644 index 00000000..52555f15 --- /dev/null +++ b/src/views/mp/components/wx-music/main.vue @@ -0,0 +1,60 @@ + + + + + + diff --git a/src/views/mp/components/wx-news/main.vue b/src/views/mp/components/wx-news/main.vue new file mode 100644 index 00000000..d08e2813 --- /dev/null +++ b/src/views/mp/components/wx-news/main.vue @@ -0,0 +1,107 @@ + + + + + + diff --git a/src/views/mp/components/wx-reply/main.vue b/src/views/mp/components/wx-reply/main.vue new file mode 100644 index 00000000..57a3cd84 --- /dev/null +++ b/src/views/mp/components/wx-reply/main.vue @@ -0,0 +1,634 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/mp/components/wx-video-play/main.vue b/src/views/mp/components/wx-video-play/main.vue new file mode 100644 index 00000000..880d10f8 --- /dev/null +++ b/src/views/mp/components/wx-video-play/main.vue @@ -0,0 +1,117 @@ + + + + diff --git a/src/views/mp/components/wx-voice-play/main.vue b/src/views/mp/components/wx-voice-play/main.vue new file mode 100644 index 00000000..3260fc05 --- /dev/null +++ b/src/views/mp/components/wx-voice-play/main.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/src/views/mp/freePublish/index.vue b/src/views/mp/freePublish/index.vue index 497f72ec..6ef4a303 100644 --- a/src/views/mp/freePublish/index.vue +++ b/src/views/mp/freePublish/index.vue @@ -1,3 +1,392 @@ + + + diff --git a/src/views/mp/message/index.vue b/src/views/mp/message/index.vue index 497f72ec..10145221 100644 --- a/src/views/mp/message/index.vue +++ b/src/views/mp/message/index.vue @@ -1,3 +1,261 @@ + diff --git a/src/views/mp/tag/TagForm.vue b/src/views/mp/tag/TagForm.vue new file mode 100644 index 00000000..db251cdf --- /dev/null +++ b/src/views/mp/tag/TagForm.vue @@ -0,0 +1,91 @@ + + diff --git a/src/views/mp/tag/index.vue b/src/views/mp/tag/index.vue new file mode 100644 index 00000000..84e6fc17 --- /dev/null +++ b/src/views/mp/tag/index.vue @@ -0,0 +1,183 @@ + + diff --git a/src/views/system/area/form.vue b/src/views/system/area/form.vue index 4e61fe32..f0cff434 100644 --- a/src/views/system/area/form.vue +++ b/src/views/system/area/form.vue @@ -15,10 +15,8 @@ diff --git a/src/views/system/dept/DeptForm.vue b/src/views/system/dept/DeptForm.vue new file mode 100644 index 00000000..f2c3bc02 --- /dev/null +++ b/src/views/system/dept/DeptForm.vue @@ -0,0 +1,174 @@ + + diff --git a/src/views/system/dept/dept.data.ts b/src/views/system/dept/dept.data.ts deleted file mode 100644 index c6945841..00000000 --- a/src/views/system/dept/dept.data.ts +++ /dev/null @@ -1,84 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -const { t } = useI18n() // 国际化 - -// 表单校验 -export const rules = reactive({ - name: [required], - sort: [required], - // email: [required], - email: [ - { required: true, message: t('profile.rules.mail'), trigger: 'blur' }, - { - type: 'email', - message: t('profile.rules.truemail'), - trigger: ['blur', 'change'] - } - ], - phone: [ - { - len: 11, - trigger: 'blur', - message: '请输入正确的手机号码' - } - ] -}) - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: null, - action: true, - columns: [ - { - title: '上级部门', - field: 'parentId', - isTable: false - }, - { - title: '部门名称', - field: 'name', - isSearch: true, - table: { - treeNode: true, - align: 'left' - } - }, - { - title: '负责人', - field: 'leaderUserId', - table: { - slots: { - default: 'leaderUserId_default' - } - } - }, - { - title: '联系电话', - field: 'phone' - }, - { - title: '邮箱', - field: 'email', - isTable: false - }, - { - title: '显示排序', - field: 'sort' - }, - { - title: t('common.status'), - field: 'status', - dictType: DICT_TYPE.COMMON_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - isForm: false - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 3b182e2a..ead319ce 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -1,189 +1,188 @@ diff --git a/src/views/system/dict/data.form.vue b/src/views/system/dict/data.form.vue index c0b70b8e..9271e8a9 100644 --- a/src/views/system/dict/data.form.vue +++ b/src/views/system/dict/data.form.vue @@ -51,10 +51,8 @@ diff --git a/src/views/system/dict/form.vue b/src/views/system/dict/form.vue index af02c597..179656de 100644 --- a/src/views/system/dict/form.vue +++ b/src/views/system/dict/form.vue @@ -33,10 +33,8 @@ diff --git a/src/views/system/errorCode/form.vue b/src/views/system/errorCode/form.vue index 9544c6ab..f261ced1 100644 --- a/src/views/system/errorCode/form.vue +++ b/src/views/system/errorCode/form.vue @@ -21,10 +21,8 @@ diff --git a/src/views/system/errorCode/index.vue b/src/views/system/errorCode/index.vue index fc152903..c95d652c 100644 --- a/src/views/system/errorCode/index.vue +++ b/src/views/system/errorCode/index.vue @@ -99,7 +99,7 @@ width="180" :formatter="dateFormatter" /> - + + diff --git a/src/views/system/loginlog/index.vue b/src/views/system/loginlog/index.vue index f2bb8c67..7b1aca5f 100644 --- a/src/views/system/loginlog/index.vue +++ b/src/views/system/loginlog/index.vue @@ -1,53 +1,175 @@ - diff --git a/src/views/system/loginlog/loginLog.data.ts b/src/views/system/loginlog/loginLog.data.ts deleted file mode 100644 index c0a51fbe..00000000 --- a/src/views/system/loginlog/loginLog.data.ts +++ /dev/null @@ -1,53 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'id', - primaryTitle: '日志编号', - action: true, - actionWidth: '100px', - columns: [ - { - title: '日志类型', - field: 'logType', - dictType: DICT_TYPE.SYSTEM_LOGIN_TYPE, - dictClass: 'number' - }, - { - title: '用户名称', - field: 'username', - isSearch: true - }, - { - title: '登录地址', - field: 'userIp', - isSearch: true - }, - { - title: '浏览器', - field: 'userAgent' - }, - { - title: '登陆结果', - field: 'result', - dictType: DICT_TYPE.SYSTEM_LOGIN_RESULT, - dictClass: 'number' - }, - { - title: '登录日期', - field: 'createTime', - formatter: 'formatDate', - table: { - width: 150 - }, - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/system/mail/template/send.vue b/src/views/system/mail/template/send.vue index 94aaf004..b4b411b9 100644 --- a/src/views/system/mail/template/send.vue +++ b/src/views/system/mail/template/send.vue @@ -26,10 +26,8 @@ diff --git a/src/views/system/menu/MenuForm.vue b/src/views/system/menu/MenuForm.vue new file mode 100644 index 00000000..45bcedfb --- /dev/null +++ b/src/views/system/menu/MenuForm.vue @@ -0,0 +1,253 @@ + + diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 0604aa93..3baf3148 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -1,351 +1,183 @@ diff --git a/src/views/system/menu/menu.data.ts b/src/views/system/menu/menu.data.ts deleted file mode 100644 index 753c1211..00000000 --- a/src/views/system/menu/menu.data.ts +++ /dev/null @@ -1,76 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -const { t } = useI18n() // 国际化 - -// 新增和修改的表单校验 -export const rules = reactive({ - name: [required], - sort: [required], - path: [required], - status: [required] -}) - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: null, - action: true, - columns: [ - { - title: '上级菜单', - field: 'parentId', - isTable: false - }, - { - title: '菜单名称', - field: 'name', - isSearch: true, - table: { - treeNode: true, - align: 'left', - width: '200px', - slots: { - default: 'name_default' - } - } - }, - { - title: '菜单类型', - field: 'type', - dictType: DICT_TYPE.SYSTEM_MENU_TYPE - }, - { - title: '路由地址', - field: 'path' - }, - { - title: '组件路径', - field: 'component' - }, - { - title: '组件名字', - field: 'componentName' - }, - { - title: '权限标识', - field: 'permission' - }, - { - title: '排序', - field: 'sort' - }, - { - title: t('common.status'), - field: 'status', - dictType: DICT_TYPE.COMMON_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - isTable: false - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/system/notice/form.vue b/src/views/system/notice/form.vue index b8a49586..87e75623 100644 --- a/src/views/system/notice/form.vue +++ b/src/views/system/notice/form.vue @@ -38,17 +38,14 @@ diff --git a/src/views/system/oauth2/client/index.vue b/src/views/system/oauth2/client/index.vue index 9ff44692..c88af726 100644 --- a/src/views/system/oauth2/client/index.vue +++ b/src/views/system/oauth2/client/index.vue @@ -133,7 +133,6 @@ import type { FormExpose } from '@/components/Form' // 业务相关的 import import * as ClientApi from '@/api/system/oauth2/client' -import { rules, allSchemas } from './client.data' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 diff --git a/src/views/system/operatelog/detail.vue b/src/views/system/operatelog/detail.vue index 6c856e95..b3603e2e 100644 --- a/src/views/system/operatelog/detail.vue +++ b/src/views/system/operatelog/detail.vue @@ -41,7 +41,7 @@ {{ detailData.javaMethodArgs }} - {{ formatDate(detailData.startTime, 'YYYY-MM-DD HH:mm:ss') }} + {{ formatDate(detailData.startTime) }} {{ detailData.duration }} ms diff --git a/src/views/system/post/PostForm.vue b/src/views/system/post/PostForm.vue new file mode 100644 index 00000000..a9dec8b0 --- /dev/null +++ b/src/views/system/post/PostForm.vue @@ -0,0 +1,120 @@ + + diff --git a/src/views/system/post/form.vue b/src/views/system/post/form.vue deleted file mode 100644 index 065aecaf..00000000 --- a/src/views/system/post/form.vue +++ /dev/null @@ -1,91 +0,0 @@ - - diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue index c5a13e1e..03e491d0 100644 --- a/src/views/system/post/index.vue +++ b/src/views/system/post/index.vue @@ -1,71 +1,198 @@ - diff --git a/src/views/system/post/post.data.ts b/src/views/system/post/post.data.ts deleted file mode 100644 index 4926bcc6..00000000 --- a/src/views/system/post/post.data.ts +++ /dev/null @@ -1,58 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -const { t } = useI18n() // 国际化 - -// 表单校验 -export const rules = reactive({ - name: [required], - code: [required], - sort: [required] -}) - -// 增删改查 CrudSchema 配置 -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'id', - primaryTitle: '岗位编号', - action: true, - columns: [ - { - title: '岗位名称', - field: 'name', - isSearch: true - }, - { - title: '岗位编码', - field: 'code', - isSearch: true - }, - { - title: '岗位顺序', - field: 'sort', - form: { - component: 'InputNumber' - } - }, - { - title: t('common.status'), - field: 'status', - dictType: DICT_TYPE.COMMON_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: '备注', - field: 'remark', - isTable: false - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - isForm: false, - table: { - width: 180 - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/system/role/MenuPermissionForm.vue b/src/views/system/role/MenuPermissionForm.vue new file mode 100644 index 00000000..650fb659 --- /dev/null +++ b/src/views/system/role/MenuPermissionForm.vue @@ -0,0 +1,202 @@ + + + + diff --git a/src/views/system/role/RoleForm.vue b/src/views/system/role/RoleForm.vue new file mode 100644 index 00000000..e6444a03 --- /dev/null +++ b/src/views/system/role/RoleForm.vue @@ -0,0 +1,123 @@ + + diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index da4b8389..0e75d67d 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -1,331 +1,242 @@ - - diff --git a/src/views/system/role/role.data.ts b/src/views/system/role/role.data.ts deleted file mode 100644 index d55b5e21..00000000 --- a/src/views/system/role/role.data.ts +++ /dev/null @@ -1,82 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -// 国际化 -const { t } = useI18n() -// 表单校验 -export const rules = reactive({ - name: [required], - code: [required], - sort: [required] -}) -// CrudSchema -const crudSchemas = reactive({ - // primaryKey: 'id', - // primaryTitle: '角色编号', - // primaryType: 'seq', - action: true, - actionWidth: '400px', - columns: [ - { - title: '角色编号', - field: 'id', - table: { - width: 200 - } - }, - { - title: '角色名称', - field: 'name', - isSearch: true - }, - { - title: '角色类型', - field: 'type', - dictType: DICT_TYPE.SYSTEM_ROLE_TYPE, - dictClass: 'number', - isForm: false - }, - { - title: '角色标识', - field: 'code', - isSearch: true - }, - { - title: '显示顺序', - field: 'sort' - }, - { - title: t('form.remark'), - field: 'remark', - isTable: false, - form: { - component: 'Input', - componentProps: { - type: 'textarea', - rows: 4 - }, - colProps: { - span: 24 - } - } - }, - { - title: t('common.status'), - field: 'status', - dictType: DICT_TYPE.COMMON_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - isForm: false, - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/system/sensitiveWord/form.vue b/src/views/system/sensitiveWord/SensitiveWordForm.vue similarity index 80% rename from src/views/system/sensitiveWord/form.vue rename to src/views/system/sensitiveWord/SensitiveWordForm.vue index 1dccd656..c069756b 100644 --- a/src/views/system/sensitiveWord/form.vue +++ b/src/views/system/sensitiveWord/SensitiveWordForm.vue @@ -33,23 +33,20 @@ placeholder="请选择文章标签" style="width: 380px" > - + - diff --git a/src/views/system/sensitiveWord/index.vue b/src/views/system/sensitiveWord/index.vue index 93ea29f1..cf1fdb82 100644 --- a/src/views/system/sensitiveWord/index.vue +++ b/src/views/system/sensitiveWord/index.vue @@ -1,13 +1,20 @@ diff --git a/src/views/system/sms/smsChannel/form.vue b/src/views/system/sms/channel/SmsChannelForm.vue similarity index 64% rename from src/views/system/sms/smsChannel/form.vue rename to src/views/system/sms/channel/SmsChannelForm.vue index 7c20a90d..3145af91 100644 --- a/src/views/system/sms/smsChannel/form.vue +++ b/src/views/system/sms/channel/SmsChannelForm.vue @@ -1,137 +1,141 @@ - - + + diff --git a/src/views/system/sms/smsChannel/index.vue b/src/views/system/sms/channel/index.vue similarity index 71% rename from src/views/system/sms/smsChannel/index.vue rename to src/views/system/sms/channel/index.vue index bac94f25..65d18029 100644 --- a/src/views/system/sms/smsChannel/index.vue +++ b/src/views/system/sms/channel/index.vue @@ -1,6 +1,12 @@ diff --git a/src/views/system/sms/log/index.vue b/src/views/system/sms/log/index.vue new file mode 100644 index 00000000..ec8a4659 --- /dev/null +++ b/src/views/system/sms/log/index.vue @@ -0,0 +1,263 @@ + + diff --git a/src/views/system/sms/smsLog/index.vue b/src/views/system/sms/smsLog/index.vue deleted file mode 100644 index 334da2ad..00000000 --- a/src/views/system/sms/smsLog/index.vue +++ /dev/null @@ -1,57 +0,0 @@ - - diff --git a/src/views/system/sms/smsLog/sms.log.data.ts b/src/views/system/sms/smsLog/sms.log.data.ts deleted file mode 100644 index c975bb0f..00000000 --- a/src/views/system/sms/smsLog/sms.log.data.ts +++ /dev/null @@ -1,93 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' - -const { t } = useI18n() // 国际化 - -const authorizedGrantOptions = getStrDictOptions(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE) -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'id', - primaryTitle: '日志编号', - action: true, - columns: [ - { - title: '手机号', - field: 'mobile', - isSearch: true - }, - { - title: '短信内容', - field: 'templateContent' - }, - { - title: '模板编号', - field: 'templateId', - isSearch: true - }, - { - title: '短信渠道', - field: 'channelId', - // dictType: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE, - // dictClass: 'number', - isSearch: true, - // table: { - // component: 'Select', - componentProps: { - options: authorizedGrantOptions - // multiple: false, - // filterable: true - } - // } - }, - { - title: '发送状态', - field: 'sendStatus', - dictType: DICT_TYPE.SYSTEM_SMS_SEND_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: '发送时间', - field: 'sendTime', - formatter: 'formatDate', - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - }, - { - title: '短信类型', - field: 'templateType', - dictType: DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE, - dictClass: 'number', - isSearch: true - }, - { - title: '接收状态', - field: 'receiveStatus', - dictType: DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: '接收时间', - field: 'receiveTime', - formatter: 'formatDate', - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate' - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/system/sms/smsTemplate/index.vue b/src/views/system/sms/smsTemplate/index.vue deleted file mode 100644 index bbc7c863..00000000 --- a/src/views/system/sms/smsTemplate/index.vue +++ /dev/null @@ -1,232 +0,0 @@ - - diff --git a/src/views/system/sms/smsTemplate/sms.template.data.ts b/src/views/system/sms/smsTemplate/sms.template.data.ts deleted file mode 100644 index 6178d6c2..00000000 --- a/src/views/system/sms/smsTemplate/sms.template.data.ts +++ /dev/null @@ -1,107 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -import * as smsApi from '@/api/system/sms/smsChannel' -const { t } = useI18n() // 国际化 -const tenantPackageOption = [] -const getTenantPackageOptions = async () => { - const res = await smsApi.getSimpleSmsChannels() - console.log(res, 'resresres') - res.forEach((tenantPackage: TenantPackageVO) => { - tenantPackageOption.push({ - key: tenantPackage.id, - value: tenantPackage.id, - label: tenantPackage.signature - }) - }) -} -getTenantPackageOptions() -// 表单校验 -export const rules = reactive({ - type: [required], - status: [required], - code: [required], - name: [required], - content: [required], - apiTemplateId: [required], - channelId: [required] -}) - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'id', - primaryTitle: '模板编号', - action: true, - actionWidth: '280', - columns: [ - { - title: '短信渠道编码', - field: 'channelId', - isSearch: false, - isForm: true, - isTable: false, - form: { - component: 'Select', - componentProps: { - options: tenantPackageOption - } - } - }, - { - title: '模板编码', - field: 'code', - isSearch: true - }, - { - title: '模板名称', - field: 'name', - isSearch: true - }, - { - title: '模板内容', - field: 'content' - }, - { - title: '短信 API 的模板编号', - field: 'apiTemplateId', - isSearch: true - }, - { - title: '短信类型', - field: 'type', - dictType: DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE, - dictClass: 'number', - isSearch: true, - table: { - width: 80 - } - }, - { - title: t('common.status'), - field: 'status', - dictType: DICT_TYPE.COMMON_STATUS, - dictClass: 'number', - isSearch: true, - table: { - width: 80 - } - }, - { - title: t('form.remark'), - field: 'remark', - isTable: false - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - isForm: false, - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/system/sms/template/SmsTemplateForm.vue b/src/views/system/sms/template/SmsTemplateForm.vue new file mode 100644 index 00000000..03684215 --- /dev/null +++ b/src/views/system/sms/template/SmsTemplateForm.vue @@ -0,0 +1,160 @@ + + diff --git a/src/views/system/sms/template/SmsTemplateSendForm.vue b/src/views/system/sms/template/SmsTemplateSendForm.vue new file mode 100644 index 00000000..f2ecbe9f --- /dev/null +++ b/src/views/system/sms/template/SmsTemplateSendForm.vue @@ -0,0 +1,117 @@ + + diff --git a/src/views/system/sms/template/index.vue b/src/views/system/sms/template/index.vue new file mode 100644 index 00000000..906436a5 --- /dev/null +++ b/src/views/system/sms/template/index.vue @@ -0,0 +1,311 @@ + + diff --git a/src/views/system/tenant/form.vue b/src/views/system/tenant/form.vue new file mode 100644 index 00000000..4a6eaae4 --- /dev/null +++ b/src/views/system/tenant/form.vue @@ -0,0 +1,174 @@ + + diff --git a/src/views/system/tenant/index.vue b/src/views/system/tenant/index.vue index bb1ca1a3..e316992d 100644 --- a/src/views/system/tenant/index.vue +++ b/src/views/system/tenant/index.vue @@ -1,197 +1,257 @@ diff --git a/src/views/system/tenant/tenant.data.ts b/src/views/system/tenant/tenant.data.ts deleted file mode 100644 index 1137b44a..00000000 --- a/src/views/system/tenant/tenant.data.ts +++ /dev/null @@ -1,186 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -import { getTenantPackageList, TenantPackageVO } from '@/api/system/tenantPackage' -import { ComponentOptions } from '@/types/components' - -const { t } = useI18n() // 国际化 - -export const tenantPackageOption: ComponentOptions[] = [] -const getTenantPackageOptions = async () => { - const res = await getTenantPackageList() - res.forEach((tenantPackage: TenantPackageVO) => { - tenantPackageOption.push({ - key: tenantPackage.id, - value: tenantPackage.id, - label: tenantPackage.name - }) - }) - - return tenantPackageOption -} -getTenantPackageOptions() - -const validateName = (rule: any, value: any, callback: any) => { - const reg = /^[a-zA-Z0-9]{4,30}$/ - if (value === '') { - callback(new Error('请输入用户名称')) - } else { - console.log(reg.test(rule), 'reg.test(rule)') - if (!reg.test(value)) { - callback(new Error('用户名称由 数字、字母 组成')) - } else { - callback() - } - } -} -const validateMobile = (rule: any, value: any, callback: any) => { - const reg = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/ - if (value === '') { - callback(new Error('请输入联系手机')) - } else { - if (!reg.test(value)) { - callback(new Error('请输入正确的手机号')) - } else { - callback() - } - } -} - -// 表单校验 -export const rules = reactive({ - name: [required], - packageId: [required], - contactName: [required], - contactMobile: [ - required, - { - validator: validateMobile, - trigger: 'blur' - } - ], - accountCount: [required], - expireTime: [required], - username: [ - required, - { - min: 4, - max: 30, - trigger: 'blur', - message: '用户名称长度为 4-30 个字符' - }, - { validator: validateName, trigger: 'blur' } - ], - password: [ - required, - { - min: 4, - max: 16, - trigger: 'blur', - message: '密码长度为 4-16 位' - } - ], - domain: [required], - status: [required] -}) - -// CrudSchema. -const crudSchemas = reactive({ - primaryKey: 'id', - primaryTitle: '租户编号', - primaryType: 'id', - action: true, - columns: [ - { - title: '租户名称', - field: 'name', - isSearch: true - }, - { - title: '租户套餐', - field: 'packageId', - table: { - slots: { - default: 'packageId_default' - } - }, - form: { - component: 'Select', - componentProps: { - options: tenantPackageOption - } - } - }, - { - title: '联系人', - field: 'contactName', - isSearch: true - }, - { - title: '联系手机', - field: 'contactMobile', - isSearch: true - }, - { - title: '用户名称', - field: 'username', - isTable: false, - isDetail: false - }, - { - title: '用户密码', - field: 'password', - isTable: false, - isDetail: false, - form: { - component: 'InputPassword' - } - }, - { - title: '账号额度', - field: 'accountCount', - table: { - slots: { - default: 'accountCount_default' - } - }, - form: { - component: 'InputNumber' - } - }, - { - title: '过期时间', - field: 'expireTime', - formatter: 'formatDate', - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' - } - } - }, - { - title: '绑定域名', - field: 'domain' - }, - { - title: '租户状态', - field: 'status', - dictType: DICT_TYPE.COMMON_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: t('table.createTime'), - field: 'createTime', - formatter: 'formatDate', - isForm: false, - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/system/tenantPackage/index.vue b/src/views/system/tenantPackage/index.vue index c8f5756a..07ea39c6 100644 --- a/src/views/system/tenantPackage/index.vue +++ b/src/views/system/tenantPackage/index.vue @@ -71,7 +71,7 @@ import type { ElTree } from 'element-plus' // 业务相关的 import import { rules, allSchemas } from './tenantPackage.data' import * as TenantPackageApi from '@/api/system/tenantPackage' -import { listSimpleMenusApi } from '@/api/system/menu' +import { getSimpleMenusList } from '@/api/system/menu' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -102,7 +102,7 @@ const validateCategory = (rule: any, value: any, callback: any) => { rules.menuIds = [{ required: true, validator: validateCategory, trigger: 'blur' }] const getTree = async () => { - const res = await listSimpleMenusApi() + const res = await getSimpleMenusList() menuOptions.value = handleTree(res) } diff --git a/src/views/system/user/AddForm.vue b/src/views/system/user/AddForm.vue new file mode 100644 index 00000000..9a4d6029 --- /dev/null +++ b/src/views/system/user/AddForm.vue @@ -0,0 +1,223 @@ + + diff --git a/src/views/system/user/ImportForm.vue b/src/views/system/user/ImportForm.vue new file mode 100644 index 00000000..4bfa4631 --- /dev/null +++ b/src/views/system/user/ImportForm.vue @@ -0,0 +1,153 @@ + + + diff --git a/src/views/system/user/RoleForm.vue b/src/views/system/user/RoleForm.vue new file mode 100644 index 00000000..cb5603fe --- /dev/null +++ b/src/views/system/user/RoleForm.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 2b4bcc41..138c7373 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -1,277 +1,296 @@ + +
+
+ - - - 搜索 - 重置 - - +
+ + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + - - - 新增 - - - 导入 - - - 导出 - - - - - - - - - - - - - - - - - - - - - - + + + 导出 + + + + + + + + + + + + + + + + + + + + + + + + + + + +