diff --git a/README.md b/README.md index a2db129a1..bffb28764 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -> 用上diboot,告别常规SQL和CRUD,写的更少,性能更好! +> 用上Diboot,借助强大易用的代码生成器,告别常规SQL和CRUD,写的更少,性能更好! > 新用户指南: - [开发一个CRM模块,不用手写一行代码](https://www.bilibili.com/video/BV1xF411S7eF/) @@ -10,7 +10,7 @@ > 上手体验: - [开始体验,从这里开始](https://www.diboot.com/guide/beginner/bootstrap.html) -# diboot - 基础组件化繁为简,高效工具以简驭繁 +# Diboot - 基础组件化繁为简,高效工具以简驭繁

@@ -25,9 +25,7 @@ ![diboot平台体系架构图](https://www.diboot.com/img/diboot_structure.png) -> [低代码 工作流版本,看这里->](https://www.diboot.com/guide/workflow/introduce.html) - -> [低代码 微服务版本,看这里->](https://www.diboot.com/guide/cloud/introduce.html) +> [零代码、工作流、微服务,更强的企业版 看这里->](https://www.diboot.com/edition/enterprise.html) ## 1. Diboot 优势特性 @@ -36,14 +34,14 @@ - Diboot基础封装的内部实现,确保运行高效率高性能,帮你规避常见的坑。 ### 低代码能力 ~ 卓越 -- 基于devtools的代码生成能力,后端、前端、关联、复杂页面、非覆盖式更新代码 全支持; +- 基于Devtools的代码生成能力,后端、前端、关联、复杂主子页面、移动端、非覆盖式更新代码、AI辅助命名... 全支持; - 零代码不能满足的复杂场景,基于生成后的代码快速扩展,无任何扩展局限性。 ### 零代码能力 ~ 强大 - 模型设计、页面设计、表单设计、流程设计、数据大屏 等能力全支持,多数功能直接配; -- 表单与流程解耦,流程挂载多表单,表单灵活复用,。 +- 表单与流程解耦,流程挂载多表单,表单灵活复用。 -### 零/低/纯代码之间顺畅融合,自由切换 +### 零/低/全代码之间顺畅融合,自由切换 - 多数常规功能零代码搭建即用; - 复杂功能支持集成自定义手写页面、支持生成前后端代码自由扩展; @@ -55,11 +53,14 @@ ![角色权限配置](https://www.diboot.com/img/role-permission.png) -## 3. 技术交流 -如遇diboot相关技术问题,欢迎加群交流: - -* **VIP技术支持QQ群**(捐助/付费用户尊享): [931266830]() +## 3. 技术交流&支持 +### 支持Diboot: + * Diboot及Devtools完全公益化运营,如您想要支持我们,可通过捐助 或者 顺手点个star,感谢每一份信任与鼓励! + + +### 使用过程中,如遇相关技术问题,欢迎加群交流: -* 技术交流QQ群: [731690096]() + * 技术交流QQ群: [731690096]() -* 技术交流微信群 加: [wx20201024]() (备注diboot) + * 技术交流微信群 加微信 [wx20201024] (备注diboot): + * \ No newline at end of file diff --git a/diboot-admin-ui/mock/_util/crud-template.ts b/diboot-admin-ui/mock/_util/crud-template.ts deleted file mode 100644 index 3cc44cfeb..000000000 --- a/diboot-admin-ui/mock/_util/crud-template.ts +++ /dev/null @@ -1,193 +0,0 @@ -import { type MockMethod } from 'vite-plugin-mock' -import type { ApiRequest } from './index' -import { JsonResult } from './index' -import { Random } from 'mockjs' - -/** - * 选项 - */ -export interface Option { - // 请求接口基础路径 - baseApi: string - // 数据列表(默认:[]) - dataList?: Array - // 附加数据 - attachMore?: Record - // 主键属性(默认:id) - primaryKey?: string - // 关键词搜索字段列表 - keywordsKeys?: Array - // 模糊查询属性列表(默认:[]) - fuzzyMatchKeys?: Array - // 开启分页(默认:true) - enablePagination?: boolean -} - -/** - * 通用接口 - */ -export interface Api { - // 获取列表(默认启用分页) - getList: MockMethod - // 根据IDs获取列表 - listByIds: MockMethod - // 获取详情 - getById: MockMethod - // 创建数据 - create: MockMethod - // 更新数据 - update: MockMethod - // 删除数据 - remove: MockMethod - // 批量删除 - batchRemove: MockMethod -} - -/** - * 通用 CRUD - * - * @param option - */ -export default >(option: Option) => { - const baseUrl = '/api' + option.baseApi - const primaryKey = option.primaryKey || 'id' - const dataList = option.dataList ?? [] - const attachMore = option.attachMore || {} - const keywordsKeys = option.keywordsKeys ?? [] - const fuzzyMatchKeys = option.fuzzyMatchKeys ?? [] - // 删除数据ID列表 - const deleteDataIds: Array = [] - return { - baseUrl, - deleteDataIds, - api: >{ - getList: { - url: `${baseUrl}`, - timeout: Random.natural(50, 300), - method: 'get', - response: (that: unknown, { query }: ApiRequest) => { - // 过滤逻辑删除数据 - let list = dataList.filter(e => !deleteDataIds.includes(`${e[primaryKey as keyof T]}`)) - const keys = Object.keys(query ?? {}) - for (const key of keys) { - // 忽略分页排序属性 - if (['pageIndex', 'pageSize', 'orderBy'].includes(key)) continue - const queryValue = query[key] - // 该属性的查询参数无值时不进行过滤 - if (queryValue == null || queryValue === '') continue - // 判断查询参数是否为日期类型 - if (/\d{4}-\d{2}-\d{2}/.test(queryValue)) { - // 过滤出大与等于指定日期的数据 - if (key.endsWith('Begin')) - list = list.filter(e => `${e[key.replace(/Begin$/, '') as keyof T]}`.slice(0, 10) >= queryValue) - // 过滤出小与等于指定日期的数据 - else if (key.endsWith('End')) - list = list.filter(e => `${e[key.replace(/End$/, '') as keyof T]}`.slice(0, 10) <= queryValue) - // 过滤出指定日期的数据 - else list = list.filter(e => `${e[key as keyof T]}`.slice(0, 10) === queryValue) - } else { - list = list.filter(e => { - const itemValue = e[key as keyof T] - if (key === 'keywords') { - for (const wordsKey of keywordsKeys) { - const val = e[wordsKey as keyof T] - if (fuzzyMatchKeys.includes(wordsKey) && `${val}`.match(queryValue)) { - return true - } - } - return false - } else if (itemValue == null) return false - // 指定属性 模糊匹配 - else if (fuzzyMatchKeys.includes(key)) return `${itemValue}`.match(queryValue) - // 属性值与查询参数同时为数组,判断属性值中是否包含查询参数中的某个 - else if (queryValue instanceof Array && itemValue instanceof Array) - return itemValue.some(e => queryValue.includes(e)) - // 属性值为数组时,判断查询参数是否被包含 - else if (itemValue instanceof Array) return itemValue.includes(queryValue) - // 查询参数为数组时 判断属性值是否被包含 - else if (queryValue instanceof Array) return queryValue.includes(itemValue) - // 转为字符串进行忽略类型比较 - else return String(itemValue) === String(queryValue) - }) - } - } - return option.enablePagination === false - ? JsonResult.OK(list) - : JsonResult.PAGINATION(query.pageIndex, query.pageSize, list) - } - } as MockMethod, - listByIds: { - url: `${baseUrl}/ids`, - timeout: Random.natural(50, 300), - method: 'post', - response: (that: unknown, { body }: ApiRequest) => { - if (!body || body.length) return JsonResult.OK() - const validList = dataList.filter(item => { - return body.includes(item[primaryKey as keyof typeof item] as string) - }) - return JsonResult.OK(validList) - } - } as MockMethod, - attachMore: { - url: `${baseUrl}/attachMore`, - timeout: Random.natural(50, 300), - method: 'get', - response: () => { - return JsonResult.OK(attachMore) - } - } as MockMethod, - getById: { - url: `${baseUrl}/:id`, - timeout: Random.natural(50, 300), - method: 'get', - response: (that: unknown, { query }: ApiRequest) => { - return JsonResult.OK(dataList.find(e => e[primaryKey as keyof T] === query.id)) - } - } as MockMethod, - create: { - url: `${baseUrl}`, - timeout: Random.natural(50, 300), - method: 'post', - response: (that: unknown, { body }: ApiRequest) => { - const id = String(dataList.length + 1) - const now = Random.now('yyyy-MM-DD HH:mm:ss') - Object.assign(body as Record, { [primaryKey]: id, createTime: now, updateTime: now }) - dataList.unshift(body) - return JsonResult.OK(id) - } - } as MockMethod, - update: { - url: `${baseUrl}/:id`, - timeout: Random.natural(50, 300), - method: 'put', - response: (that: unknown, { body, query }: ApiRequest) => { - Object.assign(body as Record, { updateTime: Random.now('yyyy-MM-DD HH:mm:ss') }) - dataList.splice( - dataList.findIndex(e => e[primaryKey as keyof T] === query[primaryKey as keyof T]), - 1, - body - ) - return JsonResult.OK() - } - } as MockMethod, - remove: { - url: `${baseUrl}/:id`, - timeout: Random.natural(50, 300), - method: 'delete', - response: (that: unknown, { query }: ApiRequest) => { - deleteDataIds.push(query.id) - return JsonResult.OK() - } - } as MockMethod, - batchRemove: { - url: `${baseUrl}/batch-delete`, - timeout: Random.natural(50, 300), - method: 'post', - response: (that: unknown, { body }: ApiRequest>) => { - deleteDataIds.push(...body) - return JsonResult.OK() - } - } as MockMethod - } - } -} diff --git a/diboot-admin-ui/mock/_util/index.ts b/diboot-admin-ui/mock/_util/index.ts deleted file mode 100644 index 476a827d7..000000000 --- a/diboot-admin-ui/mock/_util/index.ts +++ /dev/null @@ -1,130 +0,0 @@ -import type { Recordable } from 'vite-plugin-mock' - -// 分页 -export const pagination = (pageNo: number, pageSize: number, array: T[]): T[] => { - const offset = (pageNo - 1) * Number(pageSize) - return offset + Number(pageSize) >= array.length - ? array.slice(offset, array.length) - : array.slice(offset, offset + Number(pageSize)) -} - -/** - * 接口请求 - */ -export interface ApiRequest { - url: string - body: B - query: Q - headers: H -} - -const resultJson = (code: number, msg: string, data?: unknown, ext = {}) => ({ - ...ext, - code, - data, - msg -}) - -/** - * 通用数据返回 - */ -export const JsonResult = { - /** - * 操作成功 - */ - OK(data?: unknown, msg = '操作成功') { - return resultJson(0, msg, data) - }, - - /** - * 数据分页 - */ - PAGINATION(page: number, pageSize: number, list: T[] = []) { - page = page ? page : 1 - pageSize = pageSize ? pageSize : 20 - return resultJson(0, '操作成功', pagination(page, pageSize, list), { - page: { - pageIndex: Number(page), - pageSize: Number(pageSize), - totalCount: list.length - } - }) - }, - - /** - * 部分成功(一般用于批量处理场景,只处理筛选后的合法数据) - */ - WARN_PARTIAL_SUCCESS(msg?: string) { - return resultJson(1001, '部分成功' + (msg ? `:${msg}` : '')) - }, - - /** - * 有潜在的性能问题 - */ - WARN_PERFORMANCE_ISSUE(msg?: string) { - return resultJson(1002, '潜在的性能问题' + (msg ? `:${msg}` : '')) - }, - - /** - * 传入参数不对 - */ - FAIL_INVALID_PARAM(msg?: string) { - return resultJson(4000, '请求参数不匹配' + (msg ? `:${msg}` : '')) - }, - - /** - * Token无效或已过期 - */ - FAIL_INVALID_TOKEN(msg?: string) { - return resultJson(4001, 'Token无效或已过期' + (msg ? `:${msg}` : '')) - }, - - /** - * 没有权限执行该操作 - */ - FAIL_NO_PERMISSION(msg?: string) { - return resultJson(4003, '无权执行该操作' + (msg ? `:${msg}` : '')) - }, - - /** - * 请求资源不存在 - */ - FAIL_NOT_FOUND(msg?: string) { - return resultJson(4004, '请求资源不存在' + (msg ? `:${msg}` : '')) - }, - - /** - * 数据校验不通过 - */ - FAIL_VALIDATION(msg?: string) { - return resultJson(4005, '数据校验不通过' + (msg ? `:${msg}` : '')) - }, - - /** - * 操作执行失败 - */ - FAIL_OPERATION(msg?: string) { - return resultJson(4006, '操作执行失败' + (msg ? `:${msg}` : '')) - }, - - /** - * 请求连接超时 - */ - FAIL_REQUEST_TIMEOUT(msg?: string) { - return resultJson(4008, '请求连接超时' + (msg ? `:${msg}` : '')) - }, - - /** - * 认证不通过(用户名密码错误等认证失败场景) - */ - FAIL_AUTHENTICATION(msg?: string) { - return resultJson(4009, '认证不通过' + (msg ? `:${msg}` : '')) - }, - - /** - * 系统异常 - */ - FAIL_EXCEPTION(msg?: string) { - return resultJson(5000, '系统异常' + (msg ? `:${msg}` : '')) - } -} diff --git a/diboot-admin-ui/mock/_util/list.ts b/diboot-admin-ui/mock/_util/list.ts deleted file mode 100644 index eff72f6e2..000000000 --- a/diboot-admin-ui/mock/_util/list.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * list 转 tree - * - * @param {Array} list 数据源 - * @param {string | number} rootId 根Id 默认 '0' - * @param {string} id ID字段 默认 'id' (同 value) - * @param {string} parentId 父节点字段 默认 'parentId' - * @param {string} children 孩子节点字段 默认 'children' - */ -export const list2Tree = ( - list: T[], - rootId: string | number = '0', - id = 'id', - parentId = 'parentId', - children = 'children' -) => { - //对源数据深度克隆 - const cloneData = _.cloneDeep(list) - const treeData = cloneData.filter(father => { - const childArr = cloneData.filter( - child => (father as Record)[id] === (child as Record)[parentId] - ) - if (childArr.length > 0) (father as Record)[children] = childArr - return (father as Record)[parentId] === rootId - }) - return treeData.length === 0 ? list : treeData -} - -/** - * tree转化为list - * @param tree - */ -export const tree2List = (tree: T[], children = 'children') => { - const list: T[] = [] - const cloneData = _.cloneDeep(tree) - for (const node of cloneData) { - const nodeChildren = ((node as Record)[children] ?? []) as T[] - if (nodeChildren && nodeChildren.length > 0) { - for (const nodeChild of tree2List(nodeChildren)) { - list.push(nodeChild) - } - } - list.push(node) - } - return list -} diff --git a/diboot-admin-ui/mock/auth/index.ts b/diboot-admin-ui/mock/auth/index.ts deleted file mode 100644 index 8a126afa9..000000000 --- a/diboot-admin-ui/mock/auth/index.ts +++ /dev/null @@ -1,367 +0,0 @@ -import type { MockMethod } from 'vite-plugin-mock' -import type { ApiRequest } from '../_util' -import { JsonResult } from '../_util' -import { Random } from 'mockjs' -import * as Element from '@element-plus/icons-vue' - -const baseUrl = '/api/auth' - -export default [ - // { - // url: `${baseUrl}/captcha`, - // timeout: Random.natural(50, 100), - // method: 'get', - // // response: () => Random.dataImage('130x48', 'Diboot') - // rawResponse: (req, res) => { - // res.setHeader('Content-Type', 'image/gif') - // res.setHeader('Pragma', 'No-cache') - // res.setHeader('Cache-Control', 'no-cache') - // res.write(Random.dataImage('130x48', 'Diboot')) - // } - // }, - { - url: `${baseUrl}/login`, - timeout: Random.natural(50, 300), - method: 'post', - response: ({ body }: ApiRequest) => { - if (body.username === 'admin' && body.password != null) { - return JsonResult.OK(Random.string('lower', 32, 32)) - } - return JsonResult.FAIL_OPERATION('用户名或密码错误') - } - }, - { - url: `${baseUrl}/user-info`, - timeout: Random.natural(50, 300), - method: 'get', - response: ({ headers }: ApiRequest) => { - const token = headers.authorization - if (token && token.length >= 32) { - const name = Random.cname() - return JsonResult.OK({ - info: { - realname: name, - email: Random.email() - }, - roles: [Random.pick(['admin', 'develop', 'test'])] - }) - } - return JsonResult.FAIL_INVALID_TOKEN() - } - }, - { - url: `${baseUrl}/logout`, - timeout: Random.natural(50, 300), - method: 'post', - response: () => { - return JsonResult.OK() - } - }, - { - url: `${baseUrl}/ping`, - timeout: Random.natural(50, 300), - method: 'get', - rawResponse: (req, res) => { - const token = req.headers.authorization - if (token && token.length >= 32) res.setHeader('Authorization', Random.string('lower', 32, 32)) - res.end() - } - }, - { - url: `${baseUrl}/route`, - timeout: Random.natural(50, 300), - method: 'get', - response: () => { - return JsonResult.OK(authMenu) - } - } -] as MockMethod[] - -// 随机按钮权限 -const permission = '@pick(["detail", "create", "update", "delete", "import", "export"])' -// 随机图标 -const icon = `Element:@pick(${Object.keys(Element)})` -// 避免@转义 -const prefix = '@pick(["@"])/views/' - -// 授权菜单 -const authMenu = [ - { - path: '/example', - name: 'Example', - meta: { title: '组件示例', icon: 'Element:Guide' }, - children: [ - { - path: 'rich-text', - name: 'RichText', - meta: { - title: '富文本编辑器', - icon: 'Element:Edit', - componentPath: prefix + 'example/RichText.vue', - sort: 1 - } - }, - { - path: 'document', - name: 'Document', - meta: { - title: '预览打印', - icon: 'Element:Printer', - componentPath: prefix + 'example/Document.vue', - sort: 3 - } - }, - { - path: 'watermarkExample', - name: 'WatermarkExample', - meta: { - title: '水印', - icon: 'Element:MagicStick', - componentPath: prefix + 'example/WatermarkExample.vue', - sort: 4 - } - }, - { - path: 'createQRCode', - name: 'CreateQRCode', - meta: { - title: '二维码', - icon: 'Element:FullScreen', - componentPath: prefix + 'example/CreateQRCode.vue', - sort: 5 - } - }, - { - path: 'echarts', - name: 'Echarts', - meta: { - title: '图表', - icon: 'Element:Histogram', - componentPath: prefix + 'example/Echarts.vue', - sort: 6 - } - } - ] - }, - { - path: 'external', - name: 'External ', - meta: { title: '外部链接', icon: 'Element:Connection' }, - children: [ - { - path: 'diboot-website-iframe', - name: 'Diboot-Iframe', - meta: { - title: 'iframe嵌套', - icon: 'Element:Promotion', - url: 'https://www.diboot.com', - iframe: true - } - }, - { - path: 'diboot-website-href', - name: 'Diboot-href', - meta: { title: '外链打开', icon: 'Element:Promotion', url: 'https://www.diboot.com' } - } - ] - }, - { - path: 'tenant', - name: 'TenantMgt ', - meta: { title: '租户管理', icon: 'Element:Platform' }, - children: [ - { - path: 'tenant-info', - name: 'TenantInfo', - meta: { - title: '租户信息管理', - icon: 'Element:Platform', - componentPath: prefix + 'tenant/tenant-info/List.vue', - sort: 2, - keepAlive: false, - permissions: ['detail', 'create', 'update', 'delete'] - } - }, - ] - }, - { - path: 'org-structure', - name: 'OrgStructure ', - redirect: '/org-structure/user', - meta: { title: '组织人员', icon: 'Element:User' }, - children: [ - { - path: 'user', - name: 'User', - meta: { - title: '人员管理', - componentPath: prefix + 'org-structure/user/index.vue', - sort: '1', - keepAlive: false, - icon: 'Element:User', - permissions: ['detail', 'create', 'update', 'delete', 'import', 'export', 'position', 'addPosition'] - } - }, - { - path: 'org', - name: 'Org', - meta: { - title: '组织部门', - componentPath: prefix + 'org-structure/org/index.vue', - sort: '2', - keepAlive: false, - icon: 'Element:Folder', - permissions: ['detail', 'create', 'update', 'delete', 'sort'] - } - }, - { - path: 'position', - name: 'Position', - meta: { - title: '岗位管理', - componentPath: prefix + 'org-structure/position/List.vue', - sort: '3', - keepAlive: false, - hollow: false, - icon: 'Element:Postcard', - permissions: ['detail', 'create', 'update', 'delete'] - } - } - ] - }, - { - path: 'system', - name: 'System', - meta: { title: '系统管理', icon: 'Element:SetUp' }, - children: [ - { - path: 'dictionary', - name: 'Dictionary', - meta: { - title: '数据字典管理', - icon: 'Element:Collection', - componentPath: prefix + 'system/dictionary/List.vue', - sort: 1, - keepAlive: false, - permissions: ['detail', 'create', 'update', 'delete'] - } - }, - { - path: 'resource', - name: 'Resource', - meta: { - title: '菜单资源管理', - icon: 'Element:Menu', - componentPath: prefix + 'system/resource/index.vue', - sort: 2, - keepAlive: false, - permissions: ['create', 'update', 'delete'] - } - }, - { - path: 'role', - name: 'Role', - meta: { - title: '用户角色管理', - icon: 'Element:User', - componentPath: prefix + 'system/role/List.vue', - sort: 3, - permissions: ['detail', 'create', 'update', 'delete'] - } - }, - { - path: 'schedule-job', - name: 'ScheduleJob', - meta: { - title: '定时任务管理', - icon: 'Element:AlarmClock', - componentPath: prefix + 'system/schedule-job/List.vue', - keepAlive: false, - sort: 4, - permissions: ['create', 'update', 'delete', 'executeOnce', 'logList', 'logDelete'] - } - }, - { - path: 'message-template', - name: 'MessageTemplate', - meta: { - title: '消息模板管理', - icon: 'Element:MessageBox', - componentPath: prefix + 'system/message-template/List.vue', - keepAlive: false, - sort: 5, - permissions: ['detail', 'create', 'update', 'delete'] - } - }, - { - path: 'message', - name: 'Message', - meta: { - title: '消息记录管理', - icon: 'Element:Message', - componentPath: prefix + 'system/message/List.vue', - keepAlive: false, - sort: 6, - permissions: ['detail', 'delete'] - } - }, - { - path: 'file-record', - name: 'FileRecord', - meta: { - title: '文件记录管理', - icon: 'Element:FolderOpened', - componentPath: prefix + 'system/file-record/List.vue', - keepAlive: false, - sort: 8, - permissions: ['detail', 'update'] - } - }, - { - path: 'config', - name: 'SystemConfig', - meta: { - title: '系统配置管理', - icon: 'Element:Setting', - componentPath: prefix + 'system/config/index.vue', - keepAlive: false, - sort: 8, - permissions: ['create', 'update', 'delete'] - } - }, - { - path: 'operation-log', - name: 'OperationLog', - meta: { - title: '操作日志管理', - icon: 'Element:Pointer', - componentPath: prefix + 'system/operation-log/List.vue', - sort: 9, - permissions: ['detail'] - } - }, - { - path: 'login-trace', - name: 'LoginTrace', - meta: { - title: '登录日志管理', - icon: 'Element:Document', - componentPath: prefix + 'system/login-trace/List.vue', - sort: 10 - } - }, - { - path: 'i18n-config', - name: 'I18nConfig', - meta: { - title: '国际化管理', - icon: 'Element:Setting', - componentPath: prefix + 'system/i18n-config/List.vue', - keepAlive: false, - sort: 11, - permissions: ['update'] - } - } - ] - } -] diff --git a/diboot-admin-ui/mock/common/_data/object-data-list-map.ts b/diboot-admin-ui/mock/common/_data/object-data-list-map.ts deleted file mode 100644 index d7f2a6610..000000000 --- a/diboot-admin-ui/mock/common/_data/object-data-list-map.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { dataList as roleList } from '../../system/role' - -export default { - Role: roleList as Array -} as Record>> diff --git a/diboot-admin-ui/mock/common/file.ts b/diboot-admin-ui/mock/common/file.ts deleted file mode 100644 index af9a5199f..000000000 --- a/diboot-admin-ui/mock/common/file.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { MockMethod } from 'vite-plugin-mock' -import { Random } from 'mockjs' -import { JsonResult } from '../_util' - -const baseUrl = '/api/file' - -export default [ - { - url: `${baseUrl}/upload`, - timeout: Random.natural(50, 300), - method: 'post', - response: () => { - return JsonResult.FAIL_OPERATION('mock环境不支持上传文件') - } - }, - { - url: `${baseUrl}/batch-uload`, - timeout: Random.natural(50, 300), - method: 'post', - response: () => { - return JsonResult.FAIL_OPERATION('mock环境不支持批量上传文件') - } - }, - { - url: `${baseUrl}/fetch-upload`, - timeout: Random.natural(50, 300), - method: 'post', - response: () => { - return JsonResult.FAIL_OPERATION('mock环境不支持上传文件') - } - }, - { - url: `${baseUrl}/:fileId`, - timeout: Random.natural(50, 300), - method: 'get', - response: () => { - return JsonResult.FAIL_OPERATION('mock环境不支持下载文件') - } - }, - { - url: `${baseUrl}`, - timeout: Random.natural(50, 300), - method: 'post', - response: () => { - return JsonResult.FAIL_OPERATION('mock环境不支持打包下载文件') - } - }, - { - url: `${baseUrl}/:fileId/image`, - timeout: Random.natural(50, 300), - method: 'get', - response: () => { - return JsonResult.FAIL_OPERATION('mock环境不支持预览图片') - } - } -] as MockMethod[] diff --git a/diboot-admin-ui/mock/common/index.ts b/diboot-admin-ui/mock/common/index.ts deleted file mode 100644 index bf433bf31..000000000 --- a/diboot-admin-ui/mock/common/index.ts +++ /dev/null @@ -1,143 +0,0 @@ -import type { MockMethod } from 'vite-plugin-mock' -import type { ApiRequest } from '../_util' -import { JsonResult } from '../_util' -import { Random } from 'mockjs' -import objectDataListMap from './_data/object-data-list-map' -import type { RelatedData, AsyncRelatedData } from '@/hooks/use-option' - -const line2Hump = (value: string, between = '_') => - value.toLowerCase().replace(RegExp(`${between}\\w`, 'g'), str => str.charAt(1).toUpperCase()) - -const baseUrl = '/api/common' - -const buildExtData = (data: Record, extProp?: string | string[]) => { - if (!extProp || extProp.length == 0) return - if (extProp instanceof Array) { - const extData: Record = {} - extProp.forEach(key => (extData[key] = data[key])) - return extData - } - return data[extProp] -} - -// 字典列表 -const dictList: Record[]> = { - // 性别 - GENDER: [ - { value: 'F', label: '女', ext: 'red' }, - { value: 'M', label: '男', ext: 'blue' } - ], - // 定时任务初始化策略 - INIT_STRATEGY: [ - { value: 'DO_NOTHING', label: '周期执行' }, - { value: 'FIRE_AND_PROCEED', label: '立即执行一次,并周期执行' }, - { value: 'IGNORE_MISFIRES', label: '超期立即执行,并周期执行' } - ], - // 定时任务初始化策略 - RESOURCE_CODE: [ - { value: 'detail', label: '详情' }, - { value: 'create', label: '新建' }, - { value: 'update', label: '更新' }, - { value: 'delete', label: '删除' }, - { value: 'export', label: '导出' }, - { value: 'import', label: '导入' } - ], - // 发送通道 - MESSAGE_CHANNEL: [ - { value: 'WEBSOCKET', label: '系统消息' }, - { value: 'SMS', label: '短信' }, - { value: 'EMAIL', label: '邮件' } - ], - // 消息状态 - MESSAGE_STATUS: [ - { value: 'PENDING', label: '待发送' }, - { value: 'FAILED', label: '发送失败' }, - { value: 'DELIVERY', label: '已送达' }, - { value: 'READ', label: '已读' } - ], - DATA_PERMISSION_TYPE: [ - { label: '本人', value: 'SELF' }, - { label: '本人及下属', value: 'SELF_AND_SUB' }, - { label: '本部门', value: 'DEPT' }, - { label: '本部门及下属部门', value: 'DEPT_AND_SUB' }, - { label: '全部', value: 'ALL' } - ], - POSITION_GRADE_OPTIONS: [ - { label: '初级', value: 'E1' }, - { label: '中级', value: 'E2' }, - { label: '高级', value: 'E3' }, - { label: '专家', value: 'E4' }, - { label: '公司领导', value: 'M4' } - ], - TENANT_STATUS: [ - { label: '有效', value: 'A' }, - { label: '无效', value: 'I' } - ] -} - -const remoteRelatedDataFilter = { - url: `${baseUrl}/load-related-data`, - timeout: Random.natural(50, 300), - method: 'get', - response: ( - that: unknown, - { query }: ApiRequest - ) => { - const labelValueList = objectDataListMap[query.type] - ?.filter(e => (query.keyword ? `${e[query.label]}`.match(query.keyword) : true)) - .map( - item => - ({ - value: item.id, - label: item[query.label], - ext: buildExtData(item, query.ext) - }) as LabelValue> - ) - return JsonResult.OK(labelValueList) - } -} as MockMethod - -export default [ - // 绑定字典接口 - { - url: `${baseUrl}/load-related-dict`, - timeout: Random.natural(50, 300), - method: 'post', - response: ({ body }: ApiRequest) => { - const more: Record[]> = {} - body.forEach(type => (more[`${line2Hump(type)}Options`] = dictList[type])) - return JsonResult.OK(more) - } - }, - // 绑定数据接口 - { - url: `${baseUrl}/load-related-data`, - timeout: Random.natural(50, 300), - method: 'post', - response: ({ body }: ApiRequest>) => { - const more: Record = {} - Object.keys(body).forEach(type => { - const bindData = body[type] - more[type] = objectDataListMap[bindData.type].map( - item => - ({ - value: item.id, - label: item[bindData.label], - ext: buildExtData(item, bindData.ext) - }) as LabelValue> - ) as Array - }) - return JsonResult.OK(more) - } - }, - // 绑定数据过滤接口 - remoteRelatedDataFilter, - { - ...remoteRelatedDataFilter, - url: `${baseUrl}/load-related-data/:parentValue` - }, - { - ...remoteRelatedDataFilter, - url: `${baseUrl}/load-related-data/:parentValue/:parentType` - } -] as MockMethod[] diff --git a/diboot-admin-ui/mock/org-user/org.ts b/diboot-admin-ui/mock/org-user/org.ts deleted file mode 100644 index 943c16dad..000000000 --- a/diboot-admin-ui/mock/org-user/org.ts +++ /dev/null @@ -1,90 +0,0 @@ -import type { MockMethod } from 'vite-plugin-mock' -import type { ApiRequest } from '../_util' -import { JsonResult } from '../_util' -import { Random } from 'mockjs' -import { list2Tree } from '../_util/list' -import type { OrgModel } from '@/views/org-structure/org/type' -import crudTemplate from '../_util/crud-template' - -const baseUrl = '/api/org' - -const arrList: any[][] = [ - ['1', '0', '0', '帝博集团', 'COMP', 'DIBO_GROUP', '0', 1, '', '2022-06-01'], - ['2', '1', '1', '苏州帝博', 'COMP', 'SUZHOU_DIBO', '0', 2, '', '2022-06-01'], - ['3', '1', '1', '成都帝博', 'COMP', 'CHENGDU_DIBO', '0', 2, '', '2022-06-01'], - ['4', '2', '2', '总经理办公室', 'DEPT', 'ZJB', '0', 3, '', '2022-06-01'], - ['5', '1', '1', '财务部', 'DEPT', 'CWB', '0', 3, '', '2022-06-01'], - ['6', '1', '1', 'HR', 'DEPT', 'HR', '0', 3, '', '2022-06-01'], - ['7', '1', '1', '研发事业部', 'DEPT', 'XMSYB', '0', 3, '', '2022-06-01'], - ['8', '1', '1', '市场部', 'DEPT', 'SCB', '0', 3, '', '2022-06-01'] -] - -const dataList = initOrgList(arrList) - -const crud = crudTemplate({ - baseApi: '/iam/org', - dataList, - keywordsKeys: ['name', 'code'], - fuzzyMatchKeys: ['name', 'code'] -}) - -const mockMethods: MockMethod[] = [ - { - url: `${baseUrl}/tree`, - timeout: Random.natural(50, 300), - method: 'get', - response: () => { - const { deleteDataIds } = crud - const validList = dataList.filter((item: OrgModel) => { - if (!deleteDataIds || deleteDataIds.length === 0) { - return true - } - if (item.id) { - return !deleteDataIds.includes(item.id) - } else { - return false - } - }) - return JsonResult.OK(buildOrgTree(validList)) - } - }, - { - url: `${crud.baseUrl}/check-code-duplicate`, - timeout: Random.natural(50, 300), - method: 'get', - response: (that: unknown, { query }: ApiRequest) => { - const id = query.id - const isExistence = dataList.filter(item => item.id !== id).some(item => item.code === query.code) - return isExistence ? JsonResult.FAIL_VALIDATION('该编码已存在') : JsonResult.OK() - } - } as MockMethod -] -mockMethods.push(...Object.values(crud.api)) - -export default mockMethods - -function initOrgList(arrList: any[][]): OrgModel[] { - if (!arrList || arrList.length === 0) { - return [] - } - return arrList - .filter((arr: any[]) => arr.length >= 11) - .map((arr: any[]) => { - return { - id: arr[0], - parentId: arr[1], - topOrgId: arr[2], - name: arr[3], - type: arr[4], - code: arr[5], - managerId: arr[6], - depth: arr[7], - orgComment: arr[8], - createTime: arr[9] - } as OrgModel - }) -} - -function buildOrgTree(list: OrgModel[]) { - return list2Tree(list) -} diff --git a/diboot-admin-ui/mock/org-user/position.ts b/diboot-admin-ui/mock/org-user/position.ts deleted file mode 100644 index e30810f89..000000000 --- a/diboot-admin-ui/mock/org-user/position.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { MockMethod } from 'vite-plugin-mock' -import crudTemplate from '../_util/crud-template' -import type { Position } from '@/views/org-structure/position/type' -import { Random } from 'mockjs' -import type { ApiRequest } from '../_util' -import { JsonResult } from '../_util' - -const jsonStr = `{"code":0,"msg":"操作成功","data":[{"id":"1527966280585904129","createTime":"2022-05-21 10:55:24","name":"产品总监","code":"kc6c","isVirtual":false,"gradeName":"高级","gradeValue":"E3","dataPermissionType":"SELF_AND_SUB","updateTime":"2022-05-21 10:55:24","dataPermissionTypeLabel":"本人及下属"},{"id":"9","createTime":"2021-11-27 03:16:59","name":"人事专员","code":"HR","isVirtual":false,"gradeName":"初级","gradeValue":"E1","dataPermissionType":"ALL","updateTime":"2022-03-16 06:24:38","dataPermissionTypeLabel":"全部"},{"id":"8","createTime":"2021-11-26 08:51:48","name":"财务专员","code":"CWZY","isVirtual":false,"gradeName":"初级","gradeValue":"E1","dataPermissionType":"ALL","updateTime":"2022-03-16 06:24:38","dataPermissionTypeLabel":"全部"},{"id":"7","createTime":"2021-11-26 08:41:44","name":"总经理","code":"ZJL","isVirtual":false,"gradeName":"公司领导","gradeValue":"M4","dataPermissionType":"ALL","updateTime":"2022-03-16 06:24:38","dataPermissionTypeLabel":"全部"},{"id":"6","createTime":"2021-11-26 08:40:03","name":"副总经理","code":"FZJL","isVirtual":false,"gradeName":"公司领导","gradeValue":"M4","dataPermissionType":"ALL","updateTime":"2022-03-16 06:24:38","dataPermissionTypeLabel":"全部"},{"id":"5","createTime":"2021-11-26 08:35:40","name":"部门主管","code":"BMZG","isVirtual":false,"gradeName":"高级","gradeValue":"E3","dataPermissionType":"DEPT_AND_SUB","updateTime":"2022-03-16 06:24:38","dataPermissionTypeLabel":"本部门及下属部门"},{"id":"4","createTime":"2021-06-16 06:02:11","name":"研发工程师","code":"YF","isVirtual":false,"gradeName":"初级","gradeValue":"E1","dataPermissionType":"SELF","updateTime":"2022-03-16 06:24:38","dataPermissionTypeLabel":"本人"},{"id":"3","createTime":"2021-01-27 15:36:45","name":"市场专员","code":"SCZY","isVirtual":false,"gradeName":"初级","gradeValue":"E1","dataPermissionType":"SELF","updateTime":"2022-03-16 06:24:38","dataPermissionTypeLabel":"本人"},{"id":"2","createTime":"2021-01-27 15:28:44","name":"技术总监","code":"TECH_DIRECTOR","isVirtual":false,"gradeName":"专家","gradeValue":"E4","dataPermissionType":"DEPT_AND_SUB","updateTime":"2022-03-16 06:24:38","dataPermissionTypeLabel":"本部门及下属部门"},{"id":"1","createTime":"2021-01-27 15:27:42","name":"项目经理","code":"PM","isVirtual":false,"gradeName":"中级","gradeValue":"E2","dataPermissionType":"DEPT","updateTime":"2022-03-16 06:24:38","dataPermissionTypeLabel":"本部门"}],"page":{"pageIndex":1,"pageSize":20,"totalCount":"10","orderBy":"id:DESC","entityClass":"com.diboot.iam.entity.IamPosition","totalPage":1},"ok":true}` -const obj = JSON.parse(jsonStr) -const list: Record[] = obj.data -const arrList = list.map((item: Record) => { - return [ - item.name, - item.code, - item.gradeName, - item.gradeValue, - item.dataPermissionType, - item.dataPermissionTypeLabel, - item.isVirtual, - item.createTime, - item.updateTime - ] -}) -let nextId = 1 -export const dataList: Position[] = arrList - .filter(arr => arr.length >= 9) - .map(arr => { - return { - id: `${++nextId}`, - name: arr[0], - code: arr[1], - gradeName: arr[2], - gradeValue: arr[3], - dataPermissionType: arr[4], - dataPermissionTypeLabel: arr[5], - isVirtual: arr[6], - createTime: arr[7], - updateTime: arr[8] - } as Position - }) - -const crud = crudTemplate({ - baseApi: '/iam/position', - dataList, - keywordsKeys: ['name', 'code'], - fuzzyMatchKeys: ['name', 'code'] -}) - -export default [ - ...Object.values(crud.api), - { - url: `${crud.baseUrl}/check-code-duplicate`, - timeout: Random.natural(50, 300), - method: 'get', - response: ({ query }: ApiRequest) => { - const id = query.id - const isExistence = dataList.filter(item => item.id !== id).some(item => item.code === query.code) - return isExistence ? JsonResult.FAIL_VALIDATION('该编码已存在') : JsonResult.OK() - } - } -] as MockMethod[] diff --git a/diboot-admin-ui/mock/org-user/user.ts b/diboot-admin-ui/mock/org-user/user.ts deleted file mode 100644 index d1eaf4174..000000000 --- a/diboot-admin-ui/mock/org-user/user.ts +++ /dev/null @@ -1,70 +0,0 @@ -import type { ApiRequest } from '../_util' -import { JsonResult } from '../_util' -import { Random } from 'mockjs' -import type { UserModel } from '@/views/org-structure/user/type' -import crudTemplate from '../_util/crud-template' - -const arrList: any[][] = [ - ['1', '1', '松松', '123', '', '123@dibo.ltd', 'F', '女', 'A', '正常', '2022-06-01'], - ['2', '1', '张三', '124', '18700003333', '124@dibo.ltd', 'M', '男', 'A', '正常', '2022-06-01'], - ['3', '1', '李四', '125', '18700003334', '125@dibo.ltd', 'M', '男', 'A', '正常', '2022-06-01'], - ['4', '2', '王五', '126', '18700003335', '126@dibo.ltd', 'F', '女', 'A', '正常', '2022-06-01'], - ['5', '1', '何莉', '127', '', '127@dibo.ltd', 'F', '女', 'A', '正常', '2022-06-01'], - ['6', '1', '蒋灿灿', '128', '', '128@dibo.ltd', 'M', '男', 'A', '正常', '2022-06-01'] -] - -const dataList = initUserList(arrList) - -const crud = crudTemplate({ - baseApi: '/iam/user', - dataList, - keywordsKeys: ['realname', 'userNum', 'mobilePhone', 'email'], - fuzzyMatchKeys: ['realname', 'userNum', 'mobilePhone', 'email'] -}) - -export default [ - ...Object.values(crud.api), - { - url: `${crud.baseUrl}/check-username-duplicate`, - timeout: Random.natural(50, 300), - method: 'get', - response: ({ query }: ApiRequest) => { - const id = query.id - const isExistence = dataList.filter(item => item.id !== id).some(item => item.username === query.username) - return isExistence ? JsonResult.FAIL_VALIDATION('该用户名已存在') : JsonResult.OK() - } - }, - { - url: `${crud.baseUrl}/check-user-num-duplicate`, - timeout: Random.natural(50, 300), - method: 'get', - response: ({ query }: ApiRequest) => { - const id = query.id - const isExistence = dataList.filter(item => item.id !== id).some(item => item.userNum === query.userNum) - return isExistence ? JsonResult.FAIL_VALIDATION('该用户编码已存在') : JsonResult.OK() - } - } -] - -function initUserList(arrList: any[][]): UserModel[] { - if (!arrList || arrList.length === 0) { - return [] - } - return arrList - .filter((arr: any[]) => arr.length >= 11) - .map(arr => { - return { - id: arr[0], - orgId: arr[1], - realname: arr[2], - userNum: arr[3], - mobilePhone: arr[4], - email: arr[5], - gender: arr[6], - genderLabel: arr[7], - status: arr[8], - statusLabel: arr[9], - createTime: arr[10] - } as UserModel - }) -} diff --git a/diboot-admin-ui/mock/server-config/_prod.ts b/diboot-admin-ui/mock/server-config/_prod.ts deleted file mode 100644 index baaa4c295..000000000 --- a/diboot-admin-ui/mock/server-config/_prod.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer' -import type { MockMethod } from 'vite-plugin-mock' - -const modules = import.meta.glob('./**/*.ts', { import: 'default', eager: true }) - -const mockModules: MockMethod[] = [] -Object.keys(modules) - .filter(path => !path.includes('/_')) // Ignore files and directories starting with _ - .forEach(key => mockModules.push(...modules[key])) - -/** - * Used in a production environment. Need to manually import all modules - */ -export function setupProdMockServer() { - createProdMockServer(mockModules) -} diff --git a/diboot-admin-ui/mock/system/config.ts b/diboot-admin-ui/mock/system/config.ts deleted file mode 100644 index 0f04d1194..000000000 --- a/diboot-admin-ui/mock/system/config.ts +++ /dev/null @@ -1,168 +0,0 @@ -import type { MockMethod } from 'vite-plugin-mock' -import { Random } from 'mockjs' -import type { ApiRequest } from '../_util' -import { JsonResult } from '../_util' -import type { SystemConfig } from '@/views/system/config/type' - -const baseUrl = '/api/system-config' - -const configItems: SystemConfig[] = [ - { - id: '1', - category: '邮箱配置', - propKey: '服务', - propValue: 'smtp.136.com', - dataType: 'text' - }, - - { - id: '2', - category: '邮箱配置', - propKey: '用户名', - propValue: '', - dataType: 'text' - }, - { - id: '3', - category: '邮箱配置', - propKey: '授权码', - dataType: 'text' - }, - { - id: '4', - category: '邮箱配置', - propKey: '开启邮箱', - dataType: 'boolean' - }, - { - id: '5', - propKey: '全局配置', - propValue: '示例', - dataType: 'text' - } -] - -const deleteIds: string[] = [] - -const getConfigItems = () => configItems.filter(e => !deleteIds.includes(e.id)) - -export default [ - // 获取配置类型列表 - { - url: `${baseUrl}/category`, - timeout: Random.natural(50, 300), - method: 'get', - response: () => { - return JsonResult.OK([ - ...new Set( - getConfigItems() - .map(e => e.category) - .filter(e => !!e) - ) - ]) - } - }, - // 获取指定类型配置信息列表 - { - url: `${baseUrl}`, - timeout: Random.natural(50, 300), - method: 'get', - response: (that: unknown, { query }: ApiRequest) => { - return JsonResult.OK( - getConfigItems().filter( - e => e.category === query.category || (!e.category?.length && !!e.category === !!query.category) - ) - ) - } - }, - // 删除配置值 - { - url: `${baseUrl}/value`, - timeout: Random.natural(50, 300), - method: 'get', - response: (that: unknown, { query }: ApiRequest) => { - const map = getConfigItems() - .filter(e => e.category === query.category || (!e.category?.length && !!e.category === !!query.category)) - .reduce( - (map, e) => { - map[e.propKey] = map.propValue - return map - }, - {} as Record - ) - return JsonResult.OK(query.propKey ? map[query.propKey] : map) - } - }, - // 检查属性值是否重复 - { - url: `${baseUrl}/check-prop-key-duplicate`, - timeout: Random.natural(50, 300), - method: 'get', - response: (that: unknown, { query }: ApiRequest) => { - if (!query.propKey) { - return JsonResult.OK() - } - let list = getConfigItems() - if (query.id) list = list.filter(e => e.id !== query.id) - if (query.category) list = list.filter(e => e.category === query.category) - else list = list.filter(e => !e.category) - list = list.filter(e => e.propKey === query.propKey) - if (list.length) { - return JsonResult.FAIL_VALIDATION( - (query.category ? '类别[' + query.category + ']中' : '') + '属性名[' + query.propKey + ']已存在' - ) - } - return JsonResult.OK() - } - }, - // 获取指定类型配置信息 - { - url: `${baseUrl}/:id`, - timeout: Random.natural(50, 300), - method: 'get', - response: (that: unknown, { query }: ApiRequest) => { - return JsonResult.OK(getConfigItems().find(e => e.id === query.id)) - } - }, - // 新建配置值 - { - url: `${baseUrl}`, - timeout: Random.natural(50, 300), - method: 'post', - response: (that: unknown, { body }: ApiRequest) => { - body.id = `${configItems.length}` - configItems.push(body) - return JsonResult.OK() - } - }, - // 修改配置值 - { - url: `${baseUrl}/:id`, - timeout: Random.natural(50, 300), - method: 'put', - response: (that: unknown, { query, body }: ApiRequest) => { - configItems.splice(Number(query.id) - 1, 1, body) - return JsonResult.OK() - } - }, - // 批量修改配置值 - { - url: `${baseUrl}`, - timeout: Random.natural(50, 300), - method: 'put', - response: (that: unknown, { body }: ApiRequest) => { - body.forEach(e => configItems.splice(Number(e.id) - 1, 1, e)) - return JsonResult.OK() - } - }, - // 删除配置值 - { - url: `${baseUrl}/:id`, - timeout: Random.natural(50, 300), - method: 'delete', - response: (that: unknown, { query }: ApiRequest) => { - if (!deleteIds.includes(query.id)) deleteIds.push(query.id) - return JsonResult.OK() - } - } -] as MockMethod[] diff --git a/diboot-admin-ui/mock/system/dictionary.ts b/diboot-admin-ui/mock/system/dictionary.ts deleted file mode 100644 index 2f67dda05..000000000 --- a/diboot-admin-ui/mock/system/dictionary.ts +++ /dev/null @@ -1,250 +0,0 @@ -import type { MockMethod } from 'vite-plugin-mock' -import type { ApiRequest } from '../_util' -import { JsonResult } from '../_util' -import { Random } from 'mockjs' -import { cloneDeep } from 'lodash' -import type { Dictionary } from '@/views/system/dictionary/type' -import crudTemplate from '../_util/crud-template' - -const baseUrl = '/api/dictionary' - -const deleteDataIds: string[] = [] - -let nextId = 9 - -const dictionaryDataMap = { - list: [ - { - id: '1', - type: 'GENDER', - parentId: '0', - itemName: '用户性别', - itemValue: '', - description: '用户性别数据字典', - createTime: '2022-05-11', - children: [ - { - id: '2', - parentId: '1', - type: 'GENDER', - itemName: '男', - itemValue: 'M', - description: '男性', - createTime: '2022-05-11' - }, - { - id: '3', - parentId: '1', - type: 'GENDER', - itemName: '女', - itemValue: 'F', - description: '女性', - createTime: '2022-05-11' - } - ] - }, - { - id: '4', - parentId: '0', - type: 'ACCOUNT_STATUS', - itemName: '账号状态', - itemValue: '', - description: '用户账号状态信息', - createTime: '2022-05-11', - children: [ - { - id: '5', - parentId: '4', - type: 'ACCOUNT_STATUS', - itemName: '有效', - itemValue: 'A', - description: '有效', - createTime: '2022-05-11' - }, - { - id: '6', - parentId: '4', - type: 'ACCOUNT_STATUS', - itemName: '无效', - itemValue: 'I', - description: '无效', - createTime: '2022-05-11' - }, - { - id: '7', - parentId: '4', - type: 'ACCOUNT_STATUS', - itemName: '锁定', - itemValue: 'L', - description: '锁定', - createTime: '2022-05-11' - }, - { - id: '8', - parentId: '4', - type: 'ACCOUNT_STATUS', - itemName: '停用', - itemValue: 'S', - description: '停用', - createTime: '2022-05-11' - } - ] - } - ], - detail: { - id: '4', - type: 'ACCOUNT_STATUS', - itemName: '账号状态', - itemValue: '', - description: '用户账号状态信息', - createTime: '2022-05-11', - children: [ - { - id: '5', - type: 'ACCOUNT_STATUS', - itemName: '有效', - itemValue: 'A', - description: '有效', - createTime: '2022-05-11' - }, - { - id: '6', - type: 'ACCOUNT_STATUS', - itemName: '无效', - itemValue: 'I', - description: '无效', - createTime: '2022-05-11' - }, - { - id: '7', - type: 'ACCOUNT_STATUS', - itemName: '锁定', - itemValue: 'L', - description: '锁定', - createTime: '2022-05-11' - }, - { - id: '8', - type: 'ACCOUNT_STATUS', - itemName: '停用', - itemValue: 'S', - description: '停用', - createTime: '2022-05-11' - } - ] - } -} - -const dataList = Array.from({ length: 50 }).map((row, index): Record => { - const i = index % 2 - const item = cloneDeep(dictionaryDataMap.list[i]) - item.id = `${++nextId}` - const { children } = item - if (children && children.length > 0) { - children.forEach(row => { - row.id = `${++nextId}` - row.parentId = item.id - }) - } - return item -}) - -const crud = crudTemplate({ - baseApi: '/dictionary', - dataList, - keywordsKeys: ['type', 'itemName'], - fuzzyMatchKeys: ['type', 'itemName'] -}) - -const mockMethods: MockMethod[] = [ - crud.api.getList, - { - url: `${baseUrl}/:id`, - timeout: Random.natural(50, 300), - method: 'get', - response: ({ query }: any) => { - console.log('dictionary custom get', query.id) - const { id } = query - if (!id) { - return JsonResult.OK() - } - const item = dataList.find(item => item.id === id) - return JsonResult.OK(item) - } - }, - { - url: `${baseUrl}/`, - timeout: Random.natural(50, 300), - method: 'post', - response: (request: any) => { - const formModel: Dictionary = request?.body - if (formModel) { - formModel.id = `${++nextId}` - formModel.parentId = `0` - const { children } = formModel - if (children && children.length > 0) { - children.forEach(item => { - item.id = `${++nextId}` - item.parentId = formModel.id - }) - } - dataList.push(formModel) - } - return JsonResult.OK(formModel) - } - }, - { - url: `${baseUrl}/:id`, - timeout: Random.natural(50, 300), - method: 'put', - response: (request: any) => { - const formModel: Dictionary = request?.body - const currentId = request?.query?.id - formModel.id = String(dataList.length + 1) - const { children } = formModel - if (children && children.length > 0) { - children.forEach(item => { - item.id = `${++nextId}` - item.parentId = formModel.id - }) - } - // 获取当前currentId的序号,使用当前对象替换已有对象 - const index = dataList.findIndex(item => item.id === currentId) - if (index !== -1) { - dataList.splice(index, 1, formModel) - } - return JsonResult.OK(formModel) - } - }, - { - url: `${baseUrl}/:id`, - timeout: Random.natural(50, 300), - method: 'delete', - response: ({ query }: any) => { - deleteDataIds.push(query.id) - return JsonResult.OK() - } - }, - { - url: `${baseUrl}/batch-delete`, - timeout: Random.natural(50, 300), - method: 'post', - response: ({ body }: any) => { - deleteDataIds.push(...body) - console.log(deleteDataIds) - return JsonResult.OK() - } - }, - { - url: `${crud.baseUrl}/check-type-duplicate`, - timeout: Random.natural(50, 300), - method: 'get', - response: ({ query }: ApiRequest) => { - const id = query.id - const isExistence = dataList.filter(item => item.id !== id).some(item => item.type === query.type) - return isExistence ? JsonResult.FAIL_VALIDATION('该编码已存在') : JsonResult.OK() - } - } -] as MockMethod[] - -export default mockMethods diff --git a/diboot-admin-ui/mock/system/file-record.ts b/diboot-admin-ui/mock/system/file-record.ts deleted file mode 100644 index 121fc4489..000000000 --- a/diboot-admin-ui/mock/system/file-record.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { MockMethod } from 'vite-plugin-mock' -import crudTemplate from '../_util/crud-template' - -export const dataList: FileRecord[] = [ - { - id: '037d8cbdd45f4cfa9844942eeb95504c', - fileName: 'logo.png', - fileType: 'png', - fileSizeLabel: '1.9 MB', - accessUrl: '/file/037d8cbdd45f4cfa9844942eeb95504c.png', - createByName: 'DIBOOT', - createTime: '2022-07-18 13:51:59' - } -] - -const crud = crudTemplate({ - baseApi: '/file-record', - dataList, - fuzzyMatchKeys: ['fileName'] -}) - -export default [crud.api.getList, crud.api.getById, crud.api.update] as MockMethod[] diff --git a/diboot-admin-ui/mock/system/i18n-config.ts b/diboot-admin-ui/mock/system/i18n-config.ts deleted file mode 100644 index 2e91a74e4..000000000 --- a/diboot-admin-ui/mock/system/i18n-config.ts +++ /dev/null @@ -1,117 +0,0 @@ -import type { MockMethod } from 'vite-plugin-mock' -import type { I18nConfig } from '@/views/system/i18n-config/type' -import { Random } from 'mockjs' -import type { ApiRequest } from '../_util' -import { JsonResult } from '../_util' -import crudTemplate from '../_util/crud-template' - -const dataList: I18nConfig[] = [ - { - id: '1', - type: 'SYSTEM', - language: 'zh_CN', - code: 'email.not.null', - content: '邮箱不能为空', - createTime: Random.datetime('yyyy-MM-dd HH:mm:ss') - }, - { - id: '2', - type: 'SYSTEM', - language: 'zh_TW', - code: 'email.not.null', - content: '郵箱不能爲空', - createTime: Random.datetime('yyyy-MM-dd HH:mm:ss') - }, - { - id: '3', - type: 'SYSTEM', - language: 'en', - code: 'email.not.null', - content: 'E-mail cannot be empty', - createTime: Random.datetime('yyyy-MM-dd HH:mm:ss') - }, - { - id: '4', - type: 'CUSTOM', - language: 'zh_CN', - code: 'phone.verification.failed', - content: '手机号验证不通过', - createTime: Random.datetime('yyyy-MM-dd HH:mm:ss') - }, - { - id: '5', - type: 'CUSTOM', - language: 'zh_TW', - code: 'phone.verification.failed', - content: '手機號驗證不通過', - createTime: Random.datetime('yyyy-MM-dd HH:mm:ss') - }, - { - id: '6', - type: 'CUSTOM', - language: 'en', - code: 'phone.verification.failed', - content: 'Phone number verification failed', - createTime: Random.datetime('yyyy-MM-dd HH:mm:ss') - } -] - -const crud = crudTemplate({ - baseApi: '/i18n-config', - dataList -}) - -export default [ - { - url: `${crud.baseUrl}`, - timeout: Random.natural(50, 300), - method: 'get', - response: ({ query }: ApiRequest) => { - const list = query.code ? dataList.filter(e => e.code.match(query.code)) : dataList - const data = list.reduce((map: Record, item: I18nConfig) => { - const element = map[item.code] - if (!element) map[item.code] = [item] - else element.push(item) - return map - }, {}) - return JsonResult.PAGINATION(query.pageIndex, query.pageSize, Object.values(data)) - } - }, - { - url: `${crud.baseUrl}/:code`, - timeout: Random.natural(50, 300), - method: 'get', - response: ({ query }: ApiRequest) => JsonResult.OK(dataList.filter(e => e.code === query.code)) - }, - { - url: `${crud.baseUrl}`, - timeout: Random.natural(50, 300), - method: 'post', - response: ({ body }: ApiRequest) => { - if (!Array.isArray(body)) return JsonResult.FAIL_VALIDATION() - for (const item of body) { - if (item.id) { - dataList.splice( - dataList.findIndex(e => e.id === item.id), - 1, - item - ) - } else { - item.id = String(dataList.length + 1) - dataList.push(item) - } - } - return JsonResult.OK() - } - }, - { - url: `${crud.baseUrl}/check-code-duplicate/:code`, - timeout: Random.natural(50, 300), - method: 'post', - response: ({ query, body }: ApiRequest) => { - const isExistence = dataList.filter(item => !body.includes(item.id)).some(item => item.code === query.code) - return isExistence ? JsonResult.FAIL_VALIDATION('该编码已存在') : JsonResult.OK() - } - }, - crud.api.batchRemove -] as MockMethod[] diff --git a/diboot-admin-ui/mock/system/login-trace.ts b/diboot-admin-ui/mock/system/login-trace.ts deleted file mode 100644 index d370a2537..000000000 --- a/diboot-admin-ui/mock/system/login-trace.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { MockMethod } from 'vite-plugin-mock' -import crudTemplate from '../_util/crud-template' -import type { LoginTrace } from '@/views/system/login-trace/type' -import { Random } from 'mockjs' - -const dataList: LoginTrace[] = Array.from({ length: 100 }).map((_, index) => { - const id = String(100 - index) - return { - id, - userId: Random.id(), - userType: Random.pick(['User', 'Mobile']), - authType: Random.pick(['PWD', 'WX', 'SSO']), - authAccount: Random.first(), - isSuccess: Random.boolean(), - ipAddress: Random.ip(), - userAgent: 'headers', - createTime: Random.datetime('yyyy-MM-dd HH:mm:ss'), - logoutTime: Random.datetime('yyyy-MM-dd HH:mm:ss') - } as LoginTrace -}) - -const crud = crudTemplate({ - baseApi: '/iam/login-trace', - dataList: dataList, - fuzzyMatchKeys: ['authAccount'] -}) - -export default [crud.api.getList] as MockMethod[] diff --git a/diboot-admin-ui/mock/system/message-template.ts b/diboot-admin-ui/mock/system/message-template.ts deleted file mode 100644 index 1e91f3a1f..000000000 --- a/diboot-admin-ui/mock/system/message-template.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { MockMethod } from 'vite-plugin-mock' -import crudTemplate from '../_util/crud-template' -import type { MessageTemplate } from '@/views/system/message-template/type' -import { Random } from 'mockjs' -import type { ApiRequest } from '../_util' -import { JsonResult } from '../_util' - -const dataList: MessageTemplate[] = Array.from({ length: 100 }).map((_, index) => { - const id = String(100 - index) - const method = Random.pick(['GET', 'POST', 'PUT', 'DELETE', 'PATCH']) - return { - id, - requestUri: Random.url('http', 'localhost').split('localhost')[1], - requestMethod: method, - appModule: Random.pick(['SYS', 'CRM', 'OA']), - code: Random.pick(['Customer', 'Contract', 'OrderForm']), - title: Random.pick(['订阅通知消息模板', '短信验证码模板', null]), - content: '发送内容模板测试,这里有变量#{用户姓名}: 您好', - createByName: Random.pick(['张三', '李四', null]), - createTime: Random.datetime('yyyy-MM-dd HH:mm:ss'), - updateTime: Random.datetime('yyyy-MM-dd HH:mm:ss') - } as MessageTemplate -}) - -const crud = crudTemplate({ - baseApi: '/message-template', - dataList -}) - -export default [ - crud.api.getList, - crud.api.getById, - { - url: `${crud.baseUrl}/variable-list`, - timeout: Random.natural(50, 300), - method: 'get', - response: () => { - return JsonResult.OK(['${用户姓名}', '${称呼}', '${手机号}', '${验证码}'] as string[]) - } - }, - { - url: `${crud.baseUrl}/check-temp-code-duplicate`, - timeout: Random.natural(50, 300), - method: 'get', - response: ({ query }: ApiRequest) => { - const id = query.id - const isExistence = dataList.filter(item => item.id !== id).some(item => item.code === query.code) - return isExistence ? JsonResult.FAIL_VALIDATION('该编码已存在') : JsonResult.OK() - } - } -] as MockMethod[] diff --git a/diboot-admin-ui/mock/system/message.ts b/diboot-admin-ui/mock/system/message.ts deleted file mode 100644 index cc9b8985a..000000000 --- a/diboot-admin-ui/mock/system/message.ts +++ /dev/null @@ -1,79 +0,0 @@ -import type { MockMethod } from 'vite-plugin-mock' -import crudTemplate from '../_util/crud-template' -import type { Message } from '@/views/system/message/type' -import { Random } from 'mockjs' -import { JsonResult } from '../_util' -import type { ApiRequest } from '../_util' - -const dataList: Message[] = Array.from({ length: 100 }).map((_, index) => { - const id = String(100 - index) - const method = Random.pick(['GET', 'POST', 'PUT', 'DELETE', 'PATCH']) - return { - id, - appModule: Random.pick(['SYS', 'CRM', 'OA']), - templateId: Random.id(), - businessType: Random.pick(['Customer', 'Contract', 'OrderForm']), - businessCode: Random.id(), - sender: Random.pick(['张三', '李四', null]), - receiver: Random.pick(['张三', '李四', null]), - title: Random.pick(['这是一条系统发送的消息通知', null]), - content: '发送内容测试', - channel: Random.pick(['EMAIL', 'SMS', 'SYS']), - channelLabel: Random.pick(['邮件', '短信', 'WebSocket', '系统消息']), - status: Random.pick(['PENDING', 'FAILED', 'DELIVERY', 'READ']), - statusLabel: Random.pick(['发送中', '发送异常', '已送达', '未读', '已读']), - result: Random.pick(['待发送', '已发送']), - scheduleTime: Random.datetime('yyyy-MM-dd HH:mm:ss'), - createTime: Random.datetime('yyyy-MM-dd HH:mm:ss'), - updateTime: Random.datetime('yyyy-MM-dd HH:mm:ss') - } as Message -}) - -const crud = crudTemplate({ - baseApi: '/message', - dataList -}) - -const ownList: Message[] = [ - { - id: '0', - sender: 'Diboot', - status: 'PENDING', - businessType: Random.pick(['Customer', 'Contract', 'OrderForm']), - businessCode: Random.id(), - receiver: '', - channel: 'SYSTEM', - title: '欢迎使用 diboot-admin-ui', - content: - '一个基于 Vue.js 3.x & TypeScript & Vite 的开箱即用的中后台管理系统;包含基本的身份认证和鉴权,DevTools 代码自动生成。', - createTime: Random.now('yyyy-MM-dd HH:mm:ss'), - updateTime: Random.now('yyyy-MM-dd HH:mm:ss') - } -] - -export default [ - crud.api.getList, - crud.api.getById, - { - url: `${crud.baseUrl}/own`, - timeout: Random.natural(50, 300), - method: 'get', - response: () => { - return JsonResult.OK(ownList) - } - }, - { - url: `${crud.baseUrl}/read`, - timeout: Random.natural(50, 300), - method: 'patch', - response: ({ body }: ApiRequest) => { - const ids = body - ownList.forEach(e => { - if (ids.includes(e.id)) { - e.status = 'READ' - } - }) - return JsonResult.OK() - } - } -] as MockMethod[] diff --git a/diboot-admin-ui/mock/system/operation-log.ts b/diboot-admin-ui/mock/system/operation-log.ts deleted file mode 100644 index 79a918416..000000000 --- a/diboot-admin-ui/mock/system/operation-log.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { MockMethod } from 'vite-plugin-mock' -import crudTemplate from '../_util/crud-template' -import type { OperationLog } from '@/views/system/operation-log/type' -import { Random } from 'mockjs' - -const operationMap: Record = { - GET: `@pick(['查看列表', '查看详情'])`, - POST: '创建数据', - PUT: '更新数据', - DELETE: '删除数据', - PATCH: '撤销删除' -} - -const dataList: OperationLog[] = Array.from({ length: 100 }).map((_, index) => { - const id = String(100 - index) - const method = Random.pick(['GET', 'POST', 'PUT', 'DELETE', 'PATCH']) - return { - id, - businessObj: Random.pick(['Customer', 'Contract', 'OrderForm']), - operation: operationMap[method], - userType: Random.pick(['User', 'Mobile']), - userId: Random.id(), - userRealname: 'DIBOOT', - requestUri: Random.url('http', 'localhost').split('localhost')[1], - requestMethod: method, - requestParams: Random.pick(['{Long:10000}', null]), - requestIp: Random.ip(), - statusCode: Random.pick([0, 404, 0, 500, 0]), - errorMsg: '', - createTime: Random.datetime('yyyy-MM-dd HH:mm:ss') - } as OperationLog -}) - -const crud = crudTemplate({ - baseApi: '/iam/operation-log', - dataList -}) - -export default [crud.api.getList, crud.api.getById] as MockMethod[] diff --git a/diboot-admin-ui/mock/system/resource/_data/real-cloud-rest-permission-data.ts b/diboot-admin-ui/mock/system/resource/_data/real-cloud-rest-permission-data.ts deleted file mode 100644 index db82b1ff0..000000000 --- a/diboot-admin-ui/mock/system/resource/_data/real-cloud-rest-permission-data.ts +++ /dev/null @@ -1,935 +0,0 @@ -import type { RestPermission } from '@/views/system/resource/type' - -export default { - test: [ - { - name: '子表', - code: 'Child', - apiPermissionList: [ - { - code: 'Child:list', - apiUriList: [ - { - method: 'GET', - uri: '/child', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'Child:detail', - apiUriList: [ - { - method: 'GET', - uri: '/child/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'Child:create', - apiUriList: [ - { - method: 'POST', - uri: '/child', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'Child:update', - apiUriList: [ - { - method: 'PUT', - uri: '/child/{id}', - label: '更新' - } - ], - label: '更新' - }, - { - code: 'Child:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/child/{id}', - label: '删除' - } - ], - label: '删除' - } - ] - } - ], - system: [ - { - name: '数据字典', - code: 'Dictionary', - apiPermissionList: [ - { - code: 'Dictionary:list', - apiUriList: [ - { - method: 'GET', - uri: '/dictionary', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'Dictionary:detail', - apiUriList: [ - { - method: 'GET', - uri: '/dictionary/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'Dictionary:create', - apiUriList: [ - { - method: 'POST', - uri: '/dictionary', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'Dictionary:update', - apiUriList: [ - { - method: 'PUT', - uri: '/dictionary/{id}', - label: '更新' - } - ], - label: '更新' - }, - { - code: 'Dictionary:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/dictionary/{id}', - label: '删除' - } - ], - label: '删除' - } - ] - }, - { - name: '消息通知', - code: 'Message', - apiPermissionList: [ - { - code: 'Message:list', - apiUriList: [ - { - method: 'GET', - uri: '/message', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'Message:detail', - apiUriList: [ - { - method: 'GET', - uri: '/message/{id}', - label: '查看详情' - } - ], - label: '查看详情' - } - ] - }, - { - name: '消息通知模版', - code: 'MessageTemplate', - apiPermissionList: [ - { - code: 'MessageTemplate:list', - apiUriList: [ - { - method: 'GET', - uri: '/message-template', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'MessageTemplate:detail', - apiUriList: [ - { - method: 'GET', - uri: '/message-template/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'MessageTemplate:create', - apiUriList: [ - { - method: 'POST', - uri: '/message-template', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'MessageTemplate:update', - apiUriList: [ - { - method: 'PUT', - uri: '/message-template/{id}', - label: '更新' - } - ], - label: '更新' - }, - { - code: 'MessageTemplate:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/message-template/{id}', - label: '删除' - } - ], - label: '删除' - } - ] - }, - { - name: '父表', - code: 'Parent', - apiPermissionList: [ - { - code: 'Parent:list', - apiUriList: [ - { - method: 'GET', - uri: '/parent', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'Parent:detail', - apiUriList: [ - { - method: 'GET', - uri: '/parent/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'Parent:create', - apiUriList: [ - { - method: 'POST', - uri: '/parent', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'Parent:update', - apiUriList: [ - { - method: 'PUT', - uri: '/parent/{id}', - label: '更新' - } - ], - label: '更新' - }, - { - code: 'Parent:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/parent/{id}', - label: '删除' - } - ], - label: '删除' - } - ] - }, - { - name: '定时任务', - code: 'ScheduleJob', - apiPermissionList: [ - { - code: 'ScheduleJob:list', - apiUriList: [ - { - method: 'GET', - uri: '/schedule-job', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'ScheduleJob:create', - apiUriList: [ - { - method: 'POST', - uri: '/schedule-job', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'ScheduleJob:update', - apiUriList: [ - { - method: 'PUT', - uri: '/schedule-job/{id}', - label: '更新' - }, - { - method: 'PUT', - uri: '/schedule-job/{id}/{action}', - label: '更新' - } - ], - label: '更新,更新' - }, - { - code: 'ScheduleJob:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/schedule-job/{id}', - label: '删除' - } - ], - label: '删除' - }, - { - code: 'ScheduleJob:EXECUTE_ONCE_JOB', - apiUriList: [ - { - method: 'PUT', - uri: '/schedule-job/executeOnce/{id}', - label: '执行一次定时任务' - } - ], - label: '执行一次定时任务' - }, - { - code: 'ScheduleJob:JOB_LOG_LIST', - apiUriList: [ - { - method: 'GET', - uri: '/schedule-job/log', - label: '定时日志列表' - } - ], - label: '定时日志列表' - }, - { - code: 'ScheduleJob:detail', - apiUriList: [ - { - method: 'GET', - uri: '/schedule-job/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'ScheduleJob:JOB_LOG_DETAIL', - apiUriList: [ - { - method: 'GET', - uri: '/schedule-job/log/{id}', - label: '定时日志详情' - } - ], - label: '定时日志详情' - }, - { - code: 'ScheduleJob:JOB_LOG_DELETE', - apiUriList: [ - { - method: 'DELETE', - uri: '/schedule-job/log/{id}', - label: '删除任务日志' - } - ], - label: '删除任务日志' - } - ] - }, - { - name: '系统配置', - code: 'SystemConfig', - apiPermissionList: [ - { - code: 'SystemConfig:list', - apiUriList: [ - { - method: 'GET', - uri: '/system-config/typeList', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'SystemConfig:detail', - apiUriList: [ - { - method: 'GET', - uri: '/system-config/{type}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'SystemConfig:update', - apiUriList: [ - { - method: 'POST', - uri: '/system-config', - label: '更新' - }, - { - method: 'DELETE', - uri: '/system-config/{type}/{prop}', - label: '重置' - }, - { - method: 'DELETE', - uri: '/system-config/{type}', - label: '重置' - }, - { - method: 'POST', - uri: '/system-config/{type}', - label: '测试' - } - ], - label: '更新,重置,重置,测试' - } - ] - }, - { - name: '文件记录', - code: 'FileRecord', - apiPermissionList: [ - { - code: 'FileRecord:list', - apiUriList: [ - { - method: 'GET', - uri: '/file-record', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'FileRecord:detail', - apiUriList: [ - { - method: 'GET', - uri: '/file-record/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'FileRecord:update', - apiUriList: [ - { - method: 'PUT', - uri: '/file-record/{id}', - label: '更新' - } - ], - label: '更新' - } - ] - }, - { - name: '登录日志', - code: 'IamLoginTrace', - apiPermissionList: [ - { - code: 'IamLoginTrace:list', - apiUriList: [ - { - method: 'GET', - uri: '/iam/login-trace', - label: '查看列表' - } - ], - label: '查看列表' - } - ] - }, - { - name: '操作日志', - code: 'IamOperationLog', - apiPermissionList: [ - { - code: 'IamOperationLog:list', - apiUriList: [ - { - method: 'GET', - uri: '/iam/operation-log', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'IamOperationLog:detail', - apiUriList: [ - { - method: 'GET', - uri: '/iam/operation-log/{id}', - label: '查看详情' - } - ], - label: '查看详情' - } - ] - }, - { - name: '组织机构', - code: 'IamOrg', - apiPermissionList: [ - { - code: 'IamOrg:detail', - apiUriList: [ - { - method: 'GET', - uri: '/iam/org/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'IamOrg:create', - apiUriList: [ - { - method: 'POST', - uri: '/iam/org', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'IamOrg:update', - apiUriList: [ - { - method: 'PUT', - uri: '/iam/org/{id}', - label: '更新' - } - ], - label: '更新' - }, - { - code: 'IamOrg:sort', - apiUriList: [ - { - method: 'POST', - uri: '/iam/org/sort', - label: '列表排序' - } - ], - label: '列表排序' - }, - { - code: 'IamOrg:list', - apiUriList: [ - { - method: 'GET', - uri: '/iam/org', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'IamOrg:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/iam/org/{id}', - label: '删除' - } - ], - label: '删除' - }, - { - code: 'IamOrg:tree', - apiUriList: [ - { - method: 'GET', - uri: '/iam/org/tree', - label: '获取组织树' - } - ], - label: '获取组织树' - }, - { - code: 'IamOrg:subTree', - apiUriList: [ - { - method: 'GET', - uri: '/iam/org/tree/{parentNodeId}', - label: '查看子组织树' - } - ], - label: '查看子组织树' - }, - { - code: 'IamOrg:children', - apiUriList: [ - { - method: 'GET', - uri: '/iam/org/children-list/{parentNodeId}', - label: '获取子组织列表' - } - ], - label: '获取子组织列表' - } - ] - }, - { - name: '岗位', - code: 'IamPosition', - apiPermissionList: [ - { - code: 'IamPosition:list', - apiUriList: [ - { - method: 'GET', - uri: '/iam/position', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'IamPosition:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/iam/position/{id}', - label: '删除' - } - ], - label: '删除' - }, - { - code: 'IamPosition:detail', - apiUriList: [ - { - method: 'GET', - uri: '/iam/position/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'IamPosition:create', - apiUriList: [ - { - method: 'POST', - uri: '/iam/position', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'IamPosition:update', - apiUriList: [ - { - method: 'PUT', - uri: '/iam/position/{id}', - label: '更新' - }, - { - method: 'POST', - uri: '/iam/position/batch-update-user-position-relations', - label: '设置用户岗位关系' - } - ], - label: '更新,设置用户岗位关系' - } - ] - }, - { - name: '系统资源权限', - code: 'IamResource', - apiPermissionList: [ - { - code: 'IamResource:list', - apiUriList: [ - { - method: 'GET', - uri: '/iam/resource', - label: '查看列表' - }, - { - method: 'GET', - uri: '/iam/resource/getMenuTreeList', - label: '查看列表' - } - ], - label: '查看列表,查看列表' - }, - { - code: 'IamResource:detail', - apiUriList: [ - { - method: 'GET', - uri: '/iam/resource/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'IamResource:create', - apiUriList: [ - { - method: 'POST', - uri: '/iam/resource', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'IamResource:update', - apiUriList: [ - { - method: 'PUT', - uri: '/iam/resource/{id}', - label: '更新' - }, - { - method: 'POST', - uri: '/iam/resource/sort', - label: '列表排序' - } - ], - label: '更新,列表排序' - }, - { - code: 'IamResource:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/iam/resource/{id}', - label: '删除' - } - ], - label: '删除' - } - ] - }, - { - name: '角色', - code: 'IamRole', - apiPermissionList: [ - { - code: 'IamRole:list', - apiUriList: [ - { - method: 'GET', - uri: '/iam/role', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'IamRole:detail', - apiUriList: [ - { - method: 'GET', - uri: '/iam/role/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'IamRole:create', - apiUriList: [ - { - method: 'POST', - uri: '/iam/role', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'IamRole:update', - apiUriList: [ - { - method: 'PUT', - uri: '/iam/role/{id}', - label: '更新' - } - ], - label: '更新' - }, - { - code: 'IamRole:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/iam/role/{id}', - label: '删除' - } - ], - label: '删除' - } - ] - }, - { - name: '用户', - code: 'IamUser', - apiPermissionList: [ - { - code: 'IamUser:list', - apiUriList: [ - { - method: 'GET', - uri: '/iam/user', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'IamUser:detail', - apiUriList: [ - { - method: 'GET', - uri: '/iam/user/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'IamUser:create', - apiUriList: [ - { - method: 'POST', - uri: '/iam/user', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'IamUser:update', - apiUriList: [ - { - method: 'PUT', - uri: '/iam/user/{id}', - label: '更新' - } - ], - label: '更新' - }, - { - code: 'IamUser:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/iam/user/{id}', - label: '删除' - } - ], - label: '删除' - } - ] - }, - { - name: '用户Excel上传下载', - code: 'IamUserExcel', - apiPermissionList: [ - { - code: 'IamUserExcel:import', - apiUriList: [ - { - method: 'POST', - uri: '/iam/user/excel/preview-save', - label: '导入' - }, - { - method: 'POST', - uri: '/iam/user/excel/preview', - label: 'excel预览' - }, - { - method: 'GET', - uri: '/iam/user/excel/download-example', - label: '下载示例文件' - }, - { - method: 'POST', - uri: '/iam/user/excel/upload', - label: '导入' - } - ], - label: '导入,excel预览,下载示例文件,导入' - }, - { - code: 'IamUserExcel:export', - apiUriList: [ - { - method: 'GET', - uri: '/iam/user/excel/export', - label: '导出' - } - ], - label: '导出' - } - ] - } - ] -} as Record diff --git a/diboot-admin-ui/mock/system/resource/_data/real-resource-data.ts b/diboot-admin-ui/mock/system/resource/_data/real-resource-data.ts deleted file mode 100644 index 0631cd8d9..000000000 --- a/diboot-admin-ui/mock/system/resource/_data/real-resource-data.ts +++ /dev/null @@ -1,830 +0,0 @@ -export default [ - { - id: '10040', - parentId: '0', - displayType: 'CATALOGUE', - displayName: '组织机构', - routePath: 'orgStructure', - resourceCode: 'orgStructure', - status: 'A', - sortId: '90', - routeMeta: { - icon: 'Element:UserFilled' - }, - children: [ - { - id: '10041', - appModule: 'system', - parentId: '10040', - displayType: 'MENU', - displayName: '组织机构管理', - routePath: 'org', - resourceCode: 'orgIndex', - permissionCode: 'IamOrg:read', - status: 'A', - sortId: '1', - routeMeta: { - icon: 'Element:Folder', - componentPath: '@/views/orgStructure/org/index.vue' - }, - parentDisplayName: '组织机构', - permissionList: [ - { - id: '10042', - parentId: '10041', - displayType: 'PERMISSION', - displayName: '排序', - resourceCode: 'sort', - permissionCode: 'IamOrg:write', - status: 'A', - sortId: '106', - routeMeta: {}, - permissionCodes: ['IamOrg:write'] - }, - { - id: '10043', - parentId: '10041', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamOrg:write', - status: 'A', - sortId: '105', - routeMeta: {}, - permissionCodes: ['IamOrg:write'] - }, - { - id: '10044', - parentId: '10041', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamOrg:write,IamOrg:read', - status: 'A', - sortId: '104', - routeMeta: {}, - permissionCodes: ['IamOrg:write', 'IamOrg:read'] - }, - { - id: '10045', - parentId: '10041', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamOrg:write', - status: 'A', - sortId: '103', - routeMeta: {}, - permissionCodes: ['IamOrg:write'] - }, - { - id: '10046', - parentId: '10041', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamOrg:read', - status: 'A', - sortId: '102', - routeMeta: {}, - permissionCodes: ['IamOrg:read'] - } - ], - permissionCodes: ['IamOrg:read'] - }, - { - id: '10047', - parentId: '10040', - displayType: 'MENU', - displayName: '岗位管理', - routePath: 'position', - resourceCode: 'PositionList', - permissionCode: 'IamPosition:read', - status: 'A', - sortId: '2', - routeMeta: { - icon: 'Element:Avatar', - componentPath: '@/views/orgStructure/position/List.vue' - }, - parentDisplayName: '组织机构', - permissionList: [ - { - id: '10048', - parentId: '10047', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamPosition:write', - status: 'A', - sortId: '112', - routeMeta: {}, - permissionCodes: ['IamPosition:write'] - }, - { - id: '10049', - parentId: '10047', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamPosition:read', - status: 'A', - sortId: '111', - routeMeta: {}, - permissionCodes: ['IamPosition:read'] - }, - { - id: '10050', - parentId: '10047', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamPosition:write,IamPosition:read', - status: 'A', - sortId: '110', - routeMeta: {}, - permissionCodes: ['IamPosition:write', 'IamPosition:read'] - }, - { - id: '10051', - parentId: '10047', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamPosition:write', - status: 'A', - sortId: '108', - routeMeta: {}, - permissionCodes: ['IamPosition:write'] - } - ], - permissionCodes: ['IamPosition:read'] - }, - { - id: '10052', - parentId: '10040', - displayType: 'MENU', - displayName: '组织人员管理', - routePath: 'user', - resourceCode: 'UserIndex', - permissionCode: 'IamOrg:read,IamUser:read', - status: 'A', - sortId: '3', - routeMeta: { - icon: 'Element:User', - componentPath: '@/views/orgStructure/user/index.vue' - }, - parentDisplayName: '组织机构', - permissionList: [ - { - id: '10053', - parentId: '10052', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamUser:write', - status: 'A', - sortId: '40', - routeMeta: {}, - permissionCodes: ['IamUser:write'] - }, - { - id: '10054', - parentId: '10052', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamUser:write,IamUser:read', - status: 'A', - sortId: '39', - routeMeta: {}, - permissionCodes: ['IamUser:write', 'IamUser:read'] - }, - { - id: '10055', - parentId: '10052', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamUser:write', - status: 'A', - sortId: '38', - routeMeta: {}, - permissionCodes: ['IamUser:write'] - }, - { - id: '10056', - parentId: '10052', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamUser:read', - status: 'A', - sortId: '37', - routeMeta: {}, - permissionCodes: ['IamUser:read'] - }, - { - id: '10057', - parentId: '10052', - displayType: 'PERMISSION', - displayName: '导入', - resourceCode: 'import', - permissionCode: 'IamUserExcel:import', - status: 'A', - sortId: '36', - routeMeta: {}, - permissionCodes: ['IamUserExcel:import'] - }, - { - id: '10058', - parentId: '10052', - displayType: 'PERMISSION', - displayName: '导出', - resourceCode: 'export', - permissionCode: 'IamUserExcel:export', - status: 'A', - sortId: '35', - routeMeta: {}, - permissionCodes: ['IamUserExcel:export'] - }, - { - id: '10059', - parentId: '10052', - displayType: 'PERMISSION', - displayName: '人员岗位设置', - resourceCode: 'position', - permissionCode: 'IamPosition:write,IamPosition:read', - status: 'A', - sortId: '34', - routeMeta: {}, - permissionCodes: ['IamPosition:write', 'IamPosition:read'] - }, - { - id: '10060', - parentId: '10052', - displayType: 'PERMISSION', - displayName: '添加岗位', - resourceCode: 'addPosition', - permissionCode: 'IamPosition:write,IamPosition:read', - status: 'A', - sortId: '33', - routeMeta: {}, - permissionCodes: ['IamPosition:write', 'IamPosition:read'] - } - ], - permissionCodes: ['IamOrg:read', 'IamUser:read'] - } - ] - }, - { - id: '10000', - parentId: '0', - displayType: 'CATALOGUE', - displayName: '系统管理', - routePath: 'system', - resourceCode: 'system', - status: 'A', - sortId: '95', - routeMeta: { - icon: 'Element:Tools' - }, - children: [ - { - id: '10001', - parentId: '10000', - displayType: 'MENU', - displayName: '数据字典管理', - routePath: 'dictionary', - resourceCode: 'DictionaryList', - permissionCode: 'Dictionary:read', - status: 'A', - sortId: '10', - routeMeta: { - icon: 'Element:Collection', - componentPath: '@/views/system/dictionary/List.vue' - }, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10002', - parentId: '10001', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'Dictionary:read', - status: 'A', - sortId: '6', - routeMeta: {}, - permissionCodes: ['Dictionary:read'] - }, - { - id: '10003', - parentId: '10001', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'Dictionary:write', - status: 'A', - sortId: '5', - routeMeta: {}, - permissionCodes: ['Dictionary:write'] - }, - { - id: '10004', - parentId: '10001', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'Dictionary:write,Dictionary:read', - status: 'A', - sortId: '4', - routeMeta: {}, - permissionCodes: ['Dictionary:write', 'Dictionary:read'] - }, - { - id: '10005', - parentId: '10001', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'Dictionary:write', - status: 'A', - sortId: '3', - routeMeta: {}, - permissionCodes: ['Dictionary:write'] - } - ], - permissionCodes: ['Dictionary:read'] - }, - { - id: '10006', - parentId: '10000', - displayType: 'MENU', - displayName: '资源权限管理', - routePath: 'resourcePermission', - resourceCode: 'Resource', - permissionCode: 'IamResource:read', - status: 'A', - sortId: '20', - routeMeta: { - icon: 'Element:Menu', - componentPath: '@/views/system/resource/index.vue' - }, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10007', - parentId: '10006', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamResource:read', - status: 'A', - sortId: '23', - routeMeta: {}, - permissionCodes: ['IamResource:read'] - }, - { - id: '10008', - parentId: '10006', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamResource:write', - status: 'A', - sortId: '21', - routeMeta: {}, - permissionCodes: ['IamResource:write'] - }, - { - id: '10009', - parentId: '10006', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamResource:write,IamResource:read', - status: 'A', - sortId: '20', - routeMeta: {}, - permissionCodes: ['IamResource:write', 'IamResource:read'] - }, - { - id: '10010', - parentId: '10006', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamResource:write', - status: 'A', - sortId: '19', - routeMeta: {}, - permissionCodes: ['IamResource:write'] - }, - { - id: '10011', - parentId: '10006', - displayType: 'PERMISSION', - displayName: '排序', - resourceCode: 'sort', - permissionCode: 'IamResource:write', - status: 'A', - sortId: '18', - routeMeta: {}, - permissionCodes: ['IamResource:write'] - } - ], - permissionCodes: ['IamResource:read'] - }, - { - id: '10012', - parentId: '10000', - displayType: 'MENU', - displayName: '角色权限管理', - routePath: 'role', - resourceCode: 'RoleList', - permissionCode: 'IamRole:read', - status: 'A', - sortId: '30', - routeMeta: { - icon: 'Element:Avatar', - componentPath: '@/views/system/role/List.vue' - }, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10013', - parentId: '10012', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamRole:read', - status: 'A', - sortId: '16', - routeMeta: {}, - permissionCodes: ['IamRole:read'] - }, - { - id: '10014', - parentId: '10012', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamRole:write', - status: 'A', - sortId: '15', - routeMeta: {}, - permissionCodes: ['IamRole:write'] - }, - { - id: '10015', - parentId: '10012', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamRole:write,IamRole:read,IamResource:read', - status: 'A', - sortId: '14', - routeMeta: {}, - permissionCodes: ['IamRole:write', 'IamRole:read', 'IamResource:read'] - }, - { - id: '10016', - parentId: '10012', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamRole:write', - status: 'A', - sortId: '13', - routeMeta: {}, - permissionCodes: ['IamRole:write'] - } - ], - permissionCodes: ['IamRole:read'] - }, - { - id: '10017', - parentId: '10000', - displayType: 'MENU', - displayName: '定时任务管理', - routePath: 'scheduleJob', - resourceCode: 'ScheduleJob', - permissionCode: 'ScheduleJob:read', - status: 'A', - sortId: '40', - routeMeta: { - icon: 'Element:AlarmClock', - componentPath: '@/views/system/schedule-job/List.vue' - }, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10018', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'ScheduleJob:write', - status: 'A', - sortId: '7', - routeMeta: {}, - permissionCodes: ['ScheduleJob:write'] - }, - { - id: '10019', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'ScheduleJob:write,ScheduleJob:read', - status: 'A', - sortId: '6', - routeMeta: {}, - permissionCodes: ['ScheduleJob:write', 'ScheduleJob:read'] - }, - { - id: '10020', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'ScheduleJob:write', - status: 'A', - sortId: '5', - routeMeta: {}, - permissionCodes: ['ScheduleJob:write'] - }, - { - id: '10021', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'ScheduleJob:read', - status: 'A', - sortId: '4', - routeMeta: {}, - permissionCodes: ['ScheduleJob:read'] - }, - { - id: '10022', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '运行一次', - resourceCode: 'executeOnce', - permissionCode: 'ScheduleJob:write', - status: 'A', - sortId: '3', - routeMeta: {}, - permissionCodes: ['ScheduleJob:write'] - }, - { - id: '10023', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '日志记录', - resourceCode: 'logList', - permissionCode: 'ScheduleJob:read', - status: 'A', - sortId: '2', - routeMeta: {}, - permissionCodes: ['ScheduleJob:read'] - }, - { - id: '10024', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '日志删除', - resourceCode: 'logDelete', - permissionCode: 'ScheduleJob:write', - status: 'A', - sortId: '1', - routeMeta: {}, - permissionCodes: ['ScheduleJob:write'] - } - ], - permissionCodes: ['ScheduleJob:read'] - }, - { - id: '10025', - parentId: '10000', - displayType: 'MENU', - displayName: '消息模板管理', - routePath: 'messageTemplate', - resourceCode: 'MessageTemplate', - permissionCode: 'MessageTemplate:read', - status: 'A', - sortId: '50', - routeMeta: { - icon: 'Element:ChatLineSquare', - componentPath: '@/views/system/message-template/List.vue' - }, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10026', - parentId: '10025', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'MessageTemplate:read', - status: 'A', - sortId: '16', - routeMeta: {}, - permissionCodes: ['MessageTemplate:read'] - }, - { - id: '10027', - parentId: '10025', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'MessageTemplate:write', - status: 'A', - sortId: '15', - routeMeta: {}, - permissionCodes: ['MessageTemplate:write'] - }, - { - id: '10028', - parentId: '10025', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'MessageTemplate:write,MessageTemplate:read', - status: 'A', - sortId: '14', - routeMeta: {}, - permissionCodes: ['MessageTemplate:write', 'MessageTemplate:read'] - }, - { - id: '10029', - parentId: '10025', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'MessageTemplate:write', - status: 'A', - sortId: '13', - routeMeta: {}, - permissionCodes: ['MessageTemplate:write'] - } - ], - permissionCodes: ['MessageTemplate:read'] - }, - { - id: '10030', - parentId: '10000', - displayType: 'MENU', - displayName: '消息记录管理', - routePath: 'message', - resourceCode: 'Message', - permissionCode: 'Message:read', - status: 'A', - sortId: '60', - routeMeta: { - icon: 'Element:ChatDotRound', - componentPath: '@/views/system/message/List.vue' - }, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10031', - parentId: '10030', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'Message:read', - status: 'A', - sortId: '16', - routeMeta: {}, - permissionCodes: ['Message:read'] - } - ], - permissionCodes: ['Message:read'] - }, - { - id: '10032', - parentId: '10000', - displayType: 'MENU', - displayName: '文件记录管理', - routePath: 'fileRecord', - resourceCode: 'FileRecord', - permissionCode: 'FileRecord:read', - status: 'A', - sortId: '70', - routeMeta: { - icon: 'Element:FolderOpened', - componentPath: '@/views/system/fileRecord/List.vue' - }, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10033', - parentId: '10032', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'FileRecord:read', - status: 'A', - sortId: '16', - routeMeta: {}, - permissionCodes: ['FileRecord:read'] - }, - { - id: '10034', - parentId: '10032', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'FileRecord:write,FileRecord:read', - status: 'A', - sortId: '14', - routeMeta: {}, - permissionCodes: ['FileRecord:write', 'FileRecord:read'] - } - ], - permissionCodes: ['FileRecord:read'] - }, - { - id: '10035', - parentId: '10000', - displayType: 'MENU', - displayName: '系统配置管理', - routePath: 'config', - resourceCode: 'SystemConfig', - permissionCode: 'SystemConfig:read', - status: 'A', - sortId: '80', - routeMeta: { - icon: 'Element:Setting', - componentPath: '@/views/system/config/index.vue' - }, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10036', - parentId: '10035', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'SystemConfig:write', - status: 'A', - sortId: '1', - routeMeta: {}, - permissionCodes: ['SystemConfig:write'] - } - ], - permissionCodes: ['SystemConfig:read'] - }, - { - id: '10037', - parentId: '10000', - displayType: 'MENU', - displayName: '操作日志查看', - routePath: 'operationLog', - resourceCode: 'OperationLog', - permissionCode: 'IamOperationLog:read', - status: 'A', - sortId: '90', - routeMeta: { - icon: 'Element:Pointer', - componentPath: '@/views/system/operation-log/List.vue' - }, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10038', - parentId: '10037', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamOperationLog:read', - status: 'A', - sortId: '1', - routeMeta: {}, - permissionCodes: ['IamOperationLog:read'] - } - ], - permissionCodes: ['IamOperationLog:read'] - }, - { - id: '10039', - parentId: '10000', - displayType: 'MENU', - displayName: '登录日志查看', - routePath: 'loginTrace', - resourceCode: 'LoginTrace', - permissionCode: 'IamLoginTrace:read', - status: 'A', - sortId: '100', - routeMeta: { - icon: 'Element:Finished', - componentPath: '@/views/system/login-trace/List.vue' - }, - parentDisplayName: '系统管理', - permissionCodes: ['IamLoginTrace:read'] - } - ] - } -] diff --git a/diboot-admin-ui/mock/system/resource/_data/real-rest-permission-data.ts b/diboot-admin-ui/mock/system/resource/_data/real-rest-permission-data.ts deleted file mode 100644 index 04cc73c62..000000000 --- a/diboot-admin-ui/mock/system/resource/_data/real-rest-permission-data.ts +++ /dev/null @@ -1,931 +0,0 @@ -import type { RestPermission } from '@/views/system/resource/type' - -export default [ - { - name: '子表', - code: 'Child', - apiPermissionList: [ - { - code: 'Child:list', - apiUriList: [ - { - method: 'GET', - uri: '/child', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'Child:detail', - apiUriList: [ - { - method: 'GET', - uri: '/child/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'Child:create', - apiUriList: [ - { - method: 'POST', - uri: '/child', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'Child:update', - apiUriList: [ - { - method: 'PUT', - uri: '/child/{id}', - label: '更新' - } - ], - label: '更新' - }, - { - code: 'Child:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/child/{id}', - label: '删除' - } - ], - label: '删除' - } - ] - }, - { - name: '数据字典', - code: 'Dictionary', - apiPermissionList: [ - { - code: 'Dictionary:list', - apiUriList: [ - { - method: 'GET', - uri: '/dictionary', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'Dictionary:detail', - apiUriList: [ - { - method: 'GET', - uri: '/dictionary/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'Dictionary:create', - apiUriList: [ - { - method: 'POST', - uri: '/dictionary', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'Dictionary:update', - apiUriList: [ - { - method: 'PUT', - uri: '/dictionary/{id}', - label: '更新' - } - ], - label: '更新' - }, - { - code: 'Dictionary:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/dictionary/{id}', - label: '删除' - } - ], - label: '删除' - } - ] - }, - { - name: '消息通知', - code: 'Message', - apiPermissionList: [ - { - code: 'Message:list', - apiUriList: [ - { - method: 'GET', - uri: '/message', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'Message:detail', - apiUriList: [ - { - method: 'GET', - uri: '/message/{id}', - label: '查看详情' - } - ], - label: '查看详情' - } - ] - }, - { - name: '消息通知模版', - code: 'MessageTemplate', - apiPermissionList: [ - { - code: 'MessageTemplate:list', - apiUriList: [ - { - method: 'GET', - uri: '/message-template', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'MessageTemplate:detail', - apiUriList: [ - { - method: 'GET', - uri: '/message-template/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'MessageTemplate:create', - apiUriList: [ - { - method: 'POST', - uri: '/message-template', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'MessageTemplate:update', - apiUriList: [ - { - method: 'PUT', - uri: '/message-template/{id}', - label: '更新' - } - ], - label: '更新' - }, - { - code: 'MessageTemplate:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/message-template/{id}', - label: '删除' - } - ], - label: '删除' - } - ] - }, - { - name: '父表', - code: 'Parent', - apiPermissionList: [ - { - code: 'Parent:list', - apiUriList: [ - { - method: 'GET', - uri: '/parent', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'Parent:detail', - apiUriList: [ - { - method: 'GET', - uri: '/parent/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'Parent:create', - apiUriList: [ - { - method: 'POST', - uri: '/parent', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'Parent:update', - apiUriList: [ - { - method: 'PUT', - uri: '/parent/{id}', - label: '更新' - } - ], - label: '更新' - }, - { - code: 'Parent:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/parent/{id}', - label: '删除' - } - ], - label: '删除' - } - ] - }, - { - name: '定时任务', - code: 'ScheduleJob', - apiPermissionList: [ - { - code: 'ScheduleJob:list', - apiUriList: [ - { - method: 'GET', - uri: '/schedule-job', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'ScheduleJob:create', - apiUriList: [ - { - method: 'POST', - uri: '/schedule-job', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'ScheduleJob:update', - apiUriList: [ - { - method: 'PUT', - uri: '/schedule-job/{id}', - label: '更新' - }, - { - method: 'PUT', - uri: '/schedule-job/{id}/{action}', - label: '更新' - } - ], - label: '更新,更新' - }, - { - code: 'ScheduleJob:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/schedule-job/{id}', - label: '删除' - } - ], - label: '删除' - }, - { - code: 'ScheduleJob:EXECUTE_ONCE_JOB', - apiUriList: [ - { - method: 'PUT', - uri: '/schedule-job/executeOnce/{id}', - label: '执行一次定时任务' - } - ], - label: '执行一次定时任务' - }, - { - code: 'ScheduleJob:JOB_LOG_LIST', - apiUriList: [ - { - method: 'GET', - uri: '/schedule-job/log', - label: '定时日志列表' - } - ], - label: '定时日志列表' - }, - { - code: 'ScheduleJob:detail', - apiUriList: [ - { - method: 'GET', - uri: '/schedule-job/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'ScheduleJob:JOB_LOG_DETAIL', - apiUriList: [ - { - method: 'GET', - uri: '/schedule-job/log/{id}', - label: '定时日志详情' - } - ], - label: '定时日志详情' - }, - { - code: 'ScheduleJob:JOB_LOG_DELETE', - apiUriList: [ - { - method: 'DELETE', - uri: '/schedule-job/log/{id}', - label: '删除任务日志' - } - ], - label: '删除任务日志' - } - ] - }, - { - name: '系统配置', - code: 'SystemConfig', - apiPermissionList: [ - { - code: 'SystemConfig:list', - apiUriList: [ - { - method: 'GET', - uri: '/system-config/typeList', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'SystemConfig:detail', - apiUriList: [ - { - method: 'GET', - uri: '/system-config/{type}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'SystemConfig:update', - apiUriList: [ - { - method: 'POST', - uri: '/system-config', - label: '更新' - }, - { - method: 'DELETE', - uri: '/system-config/{type}/{prop}', - label: '重置' - }, - { - method: 'DELETE', - uri: '/system-config/{type}', - label: '重置' - }, - { - method: 'POST', - uri: '/system-config/{type}', - label: '测试' - } - ], - label: '更新,重置,重置,测试' - } - ] - }, - { - name: '上传文件', - code: 'UploadFile', - apiPermissionList: [ - { - code: 'UploadFile:list', - apiUriList: [ - { - method: 'GET', - uri: '/uploadFile', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'UploadFile:detail', - apiUriList: [ - { - method: 'GET', - uri: '/uploadFile/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'UploadFile:update', - apiUriList: [ - { - method: 'PUT', - uri: '/uploadFile/{id}', - label: '更新' - } - ], - label: '更新' - } - ] - }, - { - name: '登录日志', - code: 'IamLoginTrace', - apiPermissionList: [ - { - code: 'IamLoginTrace:list', - apiUriList: [ - { - method: 'GET', - uri: '/iam/login-trace', - label: '查看列表' - } - ], - label: '查看列表' - } - ] - }, - { - name: '操作日志', - code: 'IamOperationLog', - apiPermissionList: [ - { - code: 'IamOperationLog:list', - apiUriList: [ - { - method: 'GET', - uri: '/iam/operation-log', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'IamOperationLog:detail', - apiUriList: [ - { - method: 'GET', - uri: '/iam/operation-log/{id}', - label: '查看详情' - } - ], - label: '查看详情' - } - ] - }, - { - name: '组织机构', - code: 'IamOrg', - apiPermissionList: [ - { - code: 'IamOrg:detail', - apiUriList: [ - { - method: 'GET', - uri: '/iam/org/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'IamOrg:create', - apiUriList: [ - { - method: 'POST', - uri: '/iam/org', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'IamOrg:update', - apiUriList: [ - { - method: 'PUT', - uri: '/iam/org/{id}', - label: '更新' - } - ], - label: '更新' - }, - { - code: 'IamOrg:sort', - apiUriList: [ - { - method: 'POST', - uri: '/iam/org/sort', - label: '列表排序' - } - ], - label: '列表排序' - }, - { - code: 'IamOrg:list', - apiUriList: [ - { - method: 'GET', - uri: '/iam/org', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'IamOrg:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/iam/org/{id}', - label: '删除' - } - ], - label: '删除' - }, - { - code: 'IamOrg:tree', - apiUriList: [ - { - method: 'GET', - uri: '/iam/org/tree', - label: '获取组织树' - } - ], - label: '获取组织树' - }, - { - code: 'IamOrg:subTree', - apiUriList: [ - { - method: 'GET', - uri: '/iam/org/tree/{parentNodeId}', - label: '查看子组织树' - } - ], - label: '查看子组织树' - }, - { - code: 'IamOrg:children', - apiUriList: [ - { - method: 'GET', - uri: '/iam/org/children-list/{parentNodeId}', - label: '获取子组织列表' - } - ], - label: '获取子组织列表' - } - ] - }, - { - name: '岗位', - code: 'IamPosition', - apiPermissionList: [ - { - code: 'IamPosition:list', - apiUriList: [ - { - method: 'GET', - uri: '/iam/position', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'IamPosition:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/iam/position/{id}', - label: '删除' - } - ], - label: '删除' - }, - { - code: 'IamPosition:detail', - apiUriList: [ - { - method: 'GET', - uri: '/iam/position/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'IamPosition:create', - apiUriList: [ - { - method: 'POST', - uri: '/iam/position', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'IamPosition:update', - apiUriList: [ - { - method: 'PUT', - uri: '/iam/position/{id}', - label: '更新' - }, - { - method: 'POST', - uri: '/iam/position/batch-update-user-position-relations', - label: '设置用户岗位关系' - } - ], - label: '更新,设置用户岗位关系' - } - ] - }, - { - name: '系统资源权限', - code: 'IamResource', - apiPermissionList: [ - { - code: 'IamResource:list', - apiUriList: [ - { - method: 'GET', - uri: '/iam/resource', - label: '查看列表' - }, - { - method: 'GET', - uri: '/iam/resource/getMenuTreeList', - label: '查看列表' - } - ], - label: '查看列表,查看列表' - }, - { - code: 'IamResource:detail', - apiUriList: [ - { - method: 'GET', - uri: '/iam/resource/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'IamResource:create', - apiUriList: [ - { - method: 'POST', - uri: '/iam/resource', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'IamResource:update', - apiUriList: [ - { - method: 'PUT', - uri: '/iam/resource/{id}', - label: '更新' - }, - { - method: 'POST', - uri: '/iam/resource/sort', - label: '列表排序' - } - ], - label: '更新,列表排序' - }, - { - code: 'IamResource:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/iam/resource/{id}', - label: '删除' - } - ], - label: '删除' - } - ] - }, - { - name: '角色', - code: 'IamRole', - apiPermissionList: [ - { - code: 'IamRole:list', - apiUriList: [ - { - method: 'GET', - uri: '/iam/role', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'IamRole:detail', - apiUriList: [ - { - method: 'GET', - uri: '/iam/role/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'IamRole:create', - apiUriList: [ - { - method: 'POST', - uri: '/iam/role', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'IamRole:update', - apiUriList: [ - { - method: 'PUT', - uri: '/iam/role/{id}', - label: '更新' - } - ], - label: '更新' - }, - { - code: 'IamRole:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/iam/role/{id}', - label: '删除' - } - ], - label: '删除' - } - ] - }, - { - name: '用户', - code: 'IamUser', - apiPermissionList: [ - { - code: 'IamUser:list', - apiUriList: [ - { - method: 'GET', - uri: '/iam/user', - label: '查看列表' - } - ], - label: '查看列表' - }, - { - code: 'IamUser:detail', - apiUriList: [ - { - method: 'GET', - uri: '/iam/user/{id}', - label: '查看详情' - } - ], - label: '查看详情' - }, - { - code: 'IamUser:create', - apiUriList: [ - { - method: 'POST', - uri: '/iam/user', - label: '创建' - } - ], - label: '创建' - }, - { - code: 'IamUser:update', - apiUriList: [ - { - method: 'PUT', - uri: '/iam/user/{id}', - label: '更新' - } - ], - label: '更新' - }, - { - code: 'IamUser:delete', - apiUriList: [ - { - method: 'DELETE', - uri: '/iam/user/{id}', - label: '删除' - } - ], - label: '删除' - } - ] - }, - { - name: '用户Excel上传下载', - code: 'IamUserExcel', - apiPermissionList: [ - { - code: 'IamUserExcel:import', - apiUriList: [ - { - method: 'POST', - uri: '/iam/user/excel/preview-save', - label: '导入' - }, - { - method: 'POST', - uri: '/iam/user/excel/preview', - label: 'excel预览' - }, - { - method: 'GET', - uri: '/iam/user/excel/download-example', - label: '下载示例文件' - }, - { - method: 'POST', - uri: '/iam/user/excel/upload', - label: '导入' - } - ], - label: '导入,excel预览,下载示例文件,导入' - }, - { - code: 'IamUserExcel:export', - apiUriList: [ - { - method: 'GET', - uri: '/iam/user/excel/export', - label: '导出' - } - ], - label: '导出' - } - ] - } -] as RestPermission[] diff --git a/diboot-admin-ui/mock/system/resource/_data/real-role-resource-data.ts b/diboot-admin-ui/mock/system/resource/_data/real-role-resource-data.ts deleted file mode 100644 index c0f7f52ed..000000000 --- a/diboot-admin-ui/mock/system/resource/_data/real-role-resource-data.ts +++ /dev/null @@ -1,1946 +0,0 @@ -export default [ - { - id: '10046', - createTime: '2022-05-19 01:18:33', - parentId: '0', - displayType: 'MENU', - displayName: '组织机构', - resourceCode: 'orgStructure', - meta: '{}', - status: 'A', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - children: [ - { - id: '10047', - createTime: '2022-05-19 01:18:33', - parentId: '10046', - displayType: 'MENU', - displayName: '组织机构管理', - resourceCode: 'IamOrg', - permissionCode: 'IamOrg:read', - meta: '{}', - status: 'A', - sortId: '10044', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '组织机构', - permissionList: [ - { - id: '10048', - createTime: '2022-05-19 01:18:33', - parentId: '10047', - displayType: 'PERMISSION', - displayName: '排序', - resourceCode: 'sort', - permissionCode: 'IamOrg:write', - meta: '{}', - status: 'A', - sortId: '106', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamOrg:write'] - }, - { - id: '10049', - createTime: '2022-05-19 01:18:33', - parentId: '10047', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamOrg:write', - meta: '{}', - status: 'A', - sortId: '105', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamOrg:write'] - }, - { - id: '10050', - createTime: '2022-05-19 01:18:33', - parentId: '10047', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamOrg:write,IamOrg:read', - meta: '{}', - status: 'A', - sortId: '104', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamOrg:write', 'IamOrg:read'] - }, - { - id: '10051', - createTime: '2022-05-19 01:18:33', - parentId: '10047', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamOrg:write', - meta: '{}', - status: 'A', - sortId: '103', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamOrg:write'] - }, - { - id: '10052', - createTime: '2022-05-19 01:18:33', - parentId: '10047', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamOrg:read', - meta: '{}', - status: 'A', - sortId: '102', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamOrg:read'] - } - ], - children: [ - { - id: '10048', - createTime: '2022-05-19 01:18:33', - parentId: '10047', - displayType: 'PERMISSION', - displayName: '排序', - resourceCode: 'sort', - permissionCode: 'IamOrg:write', - meta: '{}', - status: 'A', - sortId: '106', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '组织机构管理', - children: [], - permissionCodes: ['IamOrg:write'] - }, - { - id: '10049', - createTime: '2022-05-19 01:18:33', - parentId: '10047', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamOrg:write', - meta: '{}', - status: 'A', - sortId: '105', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '组织机构管理', - children: [], - permissionCodes: ['IamOrg:write'] - }, - { - id: '10050', - createTime: '2022-05-19 01:18:33', - parentId: '10047', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamOrg:write,IamOrg:read', - meta: '{}', - status: 'A', - sortId: '104', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '组织机构管理', - children: [], - permissionCodes: ['IamOrg:write', 'IamOrg:read'] - }, - { - id: '10051', - createTime: '2022-05-19 01:18:33', - parentId: '10047', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamOrg:write', - meta: '{}', - status: 'A', - sortId: '103', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '组织机构管理', - children: [], - permissionCodes: ['IamOrg:write'] - }, - { - id: '10052', - createTime: '2022-05-19 01:18:33', - parentId: '10047', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamOrg:read', - meta: '{}', - status: 'A', - sortId: '102', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '组织机构管理', - children: [], - permissionCodes: ['IamOrg:read'] - } - ], - permissionCodes: ['IamOrg:read'] - }, - { - id: '10053', - createTime: '2022-05-19 01:18:33', - parentId: '10046', - displayType: 'MENU', - displayName: '岗位管理', - resourceCode: 'IamPosition', - permissionCode: 'IamPosition:read', - meta: '{}', - status: 'A', - sortId: '10038', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '组织机构', - permissionList: [ - { - id: '10054', - createTime: '2022-05-19 01:18:33', - parentId: '10053', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamPosition:write', - meta: '{}', - status: 'A', - sortId: '112', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamPosition:write'] - }, - { - id: '10055', - createTime: '2022-05-19 01:18:33', - parentId: '10053', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamPosition:read', - meta: '{}', - status: 'A', - sortId: '111', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamPosition:read'] - }, - { - id: '10056', - createTime: '2022-05-19 01:18:33', - parentId: '10053', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamPosition:write,IamPosition:read', - meta: '{}', - status: 'A', - sortId: '110', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamPosition:write', 'IamPosition:read'] - }, - { - id: '10057', - createTime: '2022-05-19 01:18:33', - parentId: '10053', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamPosition:write', - meta: '{}', - status: 'A', - sortId: '108', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamPosition:write'] - } - ], - children: [ - { - id: '10054', - createTime: '2022-05-19 01:18:33', - parentId: '10053', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamPosition:write', - meta: '{}', - status: 'A', - sortId: '112', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '岗位管理', - children: [], - permissionCodes: ['IamPosition:write'] - }, - { - id: '10055', - createTime: '2022-05-19 01:18:33', - parentId: '10053', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamPosition:read', - meta: '{}', - status: 'A', - sortId: '111', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '岗位管理', - children: [], - permissionCodes: ['IamPosition:read'] - }, - { - id: '10056', - createTime: '2022-05-19 01:18:33', - parentId: '10053', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamPosition:write,IamPosition:read', - meta: '{}', - status: 'A', - sortId: '110', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '岗位管理', - children: [], - permissionCodes: ['IamPosition:write', 'IamPosition:read'] - }, - { - id: '10057', - createTime: '2022-05-19 01:18:33', - parentId: '10053', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamPosition:write', - meta: '{}', - status: 'A', - sortId: '108', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '岗位管理', - children: [], - permissionCodes: ['IamPosition:write'] - } - ], - permissionCodes: ['IamPosition:read'] - }, - { - id: '10058', - createTime: '2022-05-19 01:18:33', - parentId: '10046', - displayType: 'MENU', - displayName: '组织人员管理', - resourceCode: 'IamOrgUser', - permissionCode: 'IamOrg:read,IamUser:read', - meta: '{}', - status: 'A', - sortId: '10032', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '组织机构', - permissionList: [ - { - id: '10059', - createTime: '2022-05-19 01:18:33', - parentId: '10058', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamUser:write', - meta: '{}', - status: 'A', - sortId: '40', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamUser:write'] - }, - { - id: '10060', - createTime: '2022-05-19 01:18:33', - parentId: '10058', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamUser:write,IamUser:read', - meta: '{}', - status: 'A', - sortId: '39', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamUser:write', 'IamUser:read'] - }, - { - id: '10061', - createTime: '2022-05-19 01:18:33', - parentId: '10058', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamUser:write', - meta: '{}', - status: 'A', - sortId: '38', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamUser:write'] - }, - { - id: '10062', - createTime: '2022-05-19 01:18:33', - parentId: '10058', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamUser:read', - meta: '{}', - status: 'A', - sortId: '37', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamUser:read'] - }, - { - id: '10063', - createTime: '2022-05-19 01:18:33', - parentId: '10058', - displayType: 'PERMISSION', - displayName: '导入', - resourceCode: 'import', - permissionCode: 'IamUserExcel:import', - meta: '{}', - status: 'A', - sortId: '36', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamUserExcel:import'] - }, - { - id: '10064', - createTime: '2022-05-19 01:18:33', - parentId: '10058', - displayType: 'PERMISSION', - displayName: '导出', - resourceCode: 'export', - permissionCode: 'IamUserExcel:export', - meta: '{}', - status: 'A', - sortId: '35', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamUserExcel:export'] - }, - { - id: '10065', - createTime: '2022-05-19 01:18:33', - parentId: '10058', - displayType: 'PERMISSION', - displayName: '人员岗位设置', - resourceCode: 'position', - permissionCode: 'IamPosition:write,IamPosition:read', - meta: '{}', - status: 'A', - sortId: '34', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamPosition:write', 'IamPosition:read'] - }, - { - id: '10066', - createTime: '2022-05-19 01:18:33', - parentId: '10058', - displayType: 'PERMISSION', - displayName: '添加岗位', - resourceCode: 'addPosition', - permissionCode: 'IamPosition:write', - meta: '{}', - status: 'A', - sortId: '33', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamPosition:write'] - } - ], - children: [ - { - id: '10059', - createTime: '2022-05-19 01:18:33', - parentId: '10058', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamUser:write', - meta: '{}', - status: 'A', - sortId: '40', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '组织人员管理', - children: [], - permissionCodes: ['IamUser:write'] - }, - { - id: '10060', - createTime: '2022-05-19 01:18:33', - parentId: '10058', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamUser:write,IamUser:read', - meta: '{}', - status: 'A', - sortId: '39', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '组织人员管理', - children: [], - permissionCodes: ['IamUser:write', 'IamUser:read'] - }, - { - id: '10061', - createTime: '2022-05-19 01:18:33', - parentId: '10058', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamUser:write', - meta: '{}', - status: 'A', - sortId: '38', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '组织人员管理', - children: [], - permissionCodes: ['IamUser:write'] - }, - { - id: '10062', - createTime: '2022-05-19 01:18:33', - parentId: '10058', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamUser:read', - meta: '{}', - status: 'A', - sortId: '37', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '组织人员管理', - children: [], - permissionCodes: ['IamUser:read'] - }, - { - id: '10063', - createTime: '2022-05-19 01:18:33', - parentId: '10058', - displayType: 'PERMISSION', - displayName: '导入', - resourceCode: 'import', - permissionCode: 'IamUserExcel:import', - meta: '{}', - status: 'A', - sortId: '36', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '组织人员管理', - children: [], - permissionCodes: ['IamUserExcel:import'] - }, - { - id: '10064', - createTime: '2022-05-19 01:18:33', - parentId: '10058', - displayType: 'PERMISSION', - displayName: '导出', - resourceCode: 'export', - permissionCode: 'IamUserExcel:export', - meta: '{}', - status: 'A', - sortId: '35', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '组织人员管理', - children: [], - permissionCodes: ['IamUserExcel:export'] - }, - { - id: '10065', - createTime: '2022-05-19 01:18:33', - parentId: '10058', - displayType: 'PERMISSION', - displayName: '人员岗位设置', - resourceCode: 'position', - permissionCode: 'IamPosition:write,IamPosition:read', - meta: '{}', - status: 'A', - sortId: '34', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '组织人员管理', - children: [], - permissionCodes: ['IamPosition:write', 'IamPosition:read'] - }, - { - id: '10066', - createTime: '2022-05-19 01:18:33', - parentId: '10058', - displayType: 'PERMISSION', - displayName: '添加岗位', - resourceCode: 'addPosition', - permissionCode: 'IamPosition:write', - meta: '{}', - status: 'A', - sortId: '33', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '组织人员管理', - children: [], - permissionCodes: ['IamPosition:write'] - } - ], - permissionCodes: ['IamOrg:read', 'IamUser:read'] - } - ] - }, - { - id: '10000', - createTime: '2022-05-19 01:18:33', - parentId: '0', - displayType: 'MENU', - displayName: '系统管理', - resourceCode: 'system', - meta: '{}', - status: 'A', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - children: [ - { - id: '10001', - createTime: '2022-05-19 01:18:33', - parentId: '10000', - displayType: 'MENU', - displayName: '数据字典管理', - routePath: '/directory', - resourceCode: 'Dictionary', - permissionCode: 'Dictionary:read', - meta: '{"keepAlive":true}', - status: 'A', - sortId: '10030', - updateTime: '2022-05-19 03:48:05', - routeMeta: { - keepAlive: true - }, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10002', - createTime: '2022-05-19 01:18:33', - parentId: '10001', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'Dictionary:read', - meta: '{}', - status: 'A', - sortId: '6', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['Dictionary:read'] - }, - { - id: '10003', - createTime: '2022-05-19 01:18:33', - parentId: '10001', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'Dictionary:write', - meta: '{}', - status: 'A', - sortId: '5', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['Dictionary:write'] - }, - { - id: '10004', - createTime: '2022-05-19 01:18:33', - parentId: '10001', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'Dictionary:write,Dictionary:read', - meta: '{}', - status: 'A', - sortId: '4', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['Dictionary:write', 'Dictionary:read'] - }, - { - id: '10005', - createTime: '2022-05-19 01:18:33', - parentId: '10001', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'Dictionary:write', - meta: '{}', - status: 'A', - sortId: '3', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['Dictionary:write'] - } - ], - children: [ - { - id: '10002', - createTime: '2022-05-19 01:18:33', - parentId: '10001', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'Dictionary:read', - meta: '{}', - status: 'A', - sortId: '6', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '数据字典管理', - children: [], - permissionCodes: ['Dictionary:read'] - }, - { - id: '10003', - createTime: '2022-05-19 01:18:33', - parentId: '10001', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'Dictionary:write', - meta: '{}', - status: 'A', - sortId: '5', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '数据字典管理', - children: [], - permissionCodes: ['Dictionary:write'] - }, - { - id: '10004', - createTime: '2022-05-19 01:18:33', - parentId: '10001', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'Dictionary:write,Dictionary:read', - meta: '{}', - status: 'A', - sortId: '4', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '数据字典管理', - children: [], - permissionCodes: ['Dictionary:write', 'Dictionary:read'] - }, - { - id: '10005', - createTime: '2022-05-19 01:18:33', - parentId: '10001', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'Dictionary:write', - meta: '{}', - status: 'A', - sortId: '3', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '数据字典管理', - children: [], - permissionCodes: ['Dictionary:write'] - } - ], - permissionCodes: ['Dictionary:read'] - }, - { - id: '10006', - createTime: '2022-05-19 01:18:33', - parentId: '10000', - displayType: 'IFRAME', - displayName: '系统用户管理', - routePath: 'http://www.baidu.com', - resourceCode: 'IamUser', - permissionCode: 'IamUser:read', - meta: '{"keepAlive":false}', - status: 'A', - sortId: '10029', - updateTime: '2022-05-19 10:42:41', - routeMeta: { - keepAlive: false - }, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10007', - createTime: '2022-05-19 01:18:33', - parentId: '10006', - displayType: 'PERMISSION', - displayName: '部门查看', - resourceCode: 'orgTree', - permissionCode: 'IamUser:read', - meta: '{}', - status: 'A', - sortId: '12', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamUser:read'] - }, - { - id: '10008', - createTime: '2022-05-19 01:18:33', - parentId: '10006', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamUser:read', - meta: '{}', - status: 'A', - sortId: '11', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamUser:read'] - }, - { - id: '10009', - createTime: '2022-05-19 01:18:33', - parentId: '10006', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamUser:write', - meta: '{}', - status: 'A', - sortId: '10', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamUser:write'] - }, - { - id: '10010', - createTime: '2022-05-19 01:18:33', - parentId: '10006', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamUser:write,IamUser:read', - meta: '{}', - status: 'A', - sortId: '9', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamUser:write', 'IamUser:read'] - }, - { - id: '10011', - createTime: '2022-05-19 01:18:33', - parentId: '10006', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamUser:write', - meta: '{}', - status: 'A', - sortId: '8', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamUser:write'] - } - ], - children: [ - { - id: '10007', - createTime: '2022-05-19 01:18:33', - parentId: '10006', - displayType: 'PERMISSION', - displayName: '部门查看', - resourceCode: 'orgTree', - permissionCode: 'IamUser:read', - meta: '{}', - status: 'A', - sortId: '12', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '系统用户管理', - children: [], - permissionCodes: ['IamUser:read'] - }, - { - id: '10008', - createTime: '2022-05-19 01:18:33', - parentId: '10006', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamUser:read', - meta: '{}', - status: 'A', - sortId: '11', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '系统用户管理', - children: [], - permissionCodes: ['IamUser:read'] - }, - { - id: '10009', - createTime: '2022-05-19 01:18:33', - parentId: '10006', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamUser:write', - meta: '{}', - status: 'A', - sortId: '10', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '系统用户管理', - children: [], - permissionCodes: ['IamUser:write'] - }, - { - id: '10010', - createTime: '2022-05-19 01:18:33', - parentId: '10006', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamUser:write,IamUser:read', - meta: '{}', - status: 'A', - sortId: '9', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '系统用户管理', - children: [], - permissionCodes: ['IamUser:write', 'IamUser:read'] - }, - { - id: '10011', - createTime: '2022-05-19 01:18:33', - parentId: '10006', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamUser:write', - meta: '{}', - status: 'A', - sortId: '8', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '系统用户管理', - children: [], - permissionCodes: ['IamUser:write'] - } - ], - permissionCodes: ['IamUser:read'] - }, - { - id: '10012', - createTime: '2022-05-19 01:18:33', - parentId: '10000', - displayType: 'OUTSIDE_URL', - displayName: '角色权限管理', - routePath: 'www', - resourceCode: 'IamRole', - permissionCode: 'IamRole:read', - meta: '{}', - status: 'A', - sortId: '10023', - updateTime: '2022-05-19 10:43:06', - routeMeta: {}, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10013', - createTime: '2022-05-19 01:18:33', - parentId: '10012', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamRole:read', - meta: '{}', - status: 'A', - sortId: '16', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamRole:read'] - }, - { - id: '10014', - createTime: '2022-05-19 01:18:33', - parentId: '10012', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamRole:write', - meta: '{}', - status: 'A', - sortId: '15', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamRole:write'] - }, - { - id: '10015', - createTime: '2022-05-19 01:18:33', - parentId: '10012', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamRole:write,IamRole:read,IamResource:read', - meta: '{}', - status: 'A', - sortId: '14', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamRole:write', 'IamRole:read', 'IamResource:read'] - }, - { - id: '10016', - createTime: '2022-05-19 01:18:33', - parentId: '10012', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamRole:write', - meta: '{}', - status: 'A', - sortId: '13', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamRole:write'] - } - ], - children: [ - { - id: '10013', - createTime: '2022-05-19 01:18:33', - parentId: '10012', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamRole:read', - meta: '{}', - status: 'A', - sortId: '16', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '角色权限管理', - children: [], - permissionCodes: ['IamRole:read'] - }, - { - id: '10014', - createTime: '2022-05-19 01:18:33', - parentId: '10012', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamRole:write', - meta: '{}', - status: 'A', - sortId: '15', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '角色权限管理', - children: [], - permissionCodes: ['IamRole:write'] - }, - { - id: '10015', - createTime: '2022-05-19 01:18:33', - parentId: '10012', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamRole:write,IamRole:read,IamResource:read', - meta: '{}', - status: 'A', - sortId: '14', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '角色权限管理', - children: [], - permissionCodes: ['IamRole:write', 'IamRole:read', 'IamResource:read'] - }, - { - id: '10016', - createTime: '2022-05-19 01:18:33', - parentId: '10012', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamRole:write', - meta: '{}', - status: 'A', - sortId: '13', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '角色权限管理', - children: [], - permissionCodes: ['IamRole:write'] - } - ], - permissionCodes: ['IamRole:read'] - }, - { - id: '10017', - createTime: '2022-05-19 01:18:33', - parentId: '10000', - displayType: 'MENU', - displayName: '资源权限管理', - resourceCode: 'IamResource', - permissionCode: 'IamResource:read', - meta: '{}', - status: 'A', - sortId: '10017', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10018', - createTime: '2022-05-19 01:18:33', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamResource:read', - meta: '{}', - status: 'A', - sortId: '23', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamResource:read'] - }, - { - id: '10019', - createTime: '2022-05-19 01:18:33', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamResource:write', - meta: '{}', - status: 'A', - sortId: '21', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamResource:write'] - }, - { - id: '10020', - createTime: '2022-05-19 01:18:33', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamResource:write,IamResource:read', - meta: '{}', - status: 'A', - sortId: '20', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamResource:write', 'IamResource:read'] - }, - { - id: '10021', - createTime: '2022-05-19 01:18:33', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamResource:write', - meta: '{}', - status: 'A', - sortId: '19', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamResource:write'] - }, - { - id: '10022', - createTime: '2022-05-19 01:18:33', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '排序', - resourceCode: 'sort', - permissionCode: 'IamResource:write', - meta: '{}', - status: 'A', - sortId: '18', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamResource:write'] - } - ], - children: [ - { - id: '10018', - createTime: '2022-05-19 01:18:33', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamResource:read', - meta: '{}', - status: 'A', - sortId: '23', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '资源权限管理', - children: [], - permissionCodes: ['IamResource:read'] - }, - { - id: '10019', - createTime: '2022-05-19 01:18:33', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'IamResource:write', - meta: '{}', - status: 'A', - sortId: '21', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '资源权限管理', - children: [], - permissionCodes: ['IamResource:write'] - }, - { - id: '10020', - createTime: '2022-05-19 01:18:33', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'IamResource:write,IamResource:read', - meta: '{}', - status: 'A', - sortId: '20', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '资源权限管理', - children: [], - permissionCodes: ['IamResource:write', 'IamResource:read'] - }, - { - id: '10021', - createTime: '2022-05-19 01:18:33', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'IamResource:write', - meta: '{}', - status: 'A', - sortId: '19', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '资源权限管理', - children: [], - permissionCodes: ['IamResource:write'] - }, - { - id: '10022', - createTime: '2022-05-19 01:18:33', - parentId: '10017', - displayType: 'PERMISSION', - displayName: '排序', - resourceCode: 'sort', - permissionCode: 'IamResource:write', - meta: '{}', - status: 'A', - sortId: '18', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '资源权限管理', - children: [], - permissionCodes: ['IamResource:write'] - } - ], - permissionCodes: ['IamResource:read'] - }, - { - id: '10023', - createTime: '2022-05-19 01:18:33', - parentId: '10000', - displayType: 'MENU', - displayName: '定时任务管理', - resourceCode: 'ScheduleJob', - permissionCode: 'ScheduleJob:read', - meta: '{}', - status: 'A', - sortId: '10012', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10024', - createTime: '2022-05-19 01:18:33', - parentId: '10023', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'ScheduleJob:write', - meta: '{}', - status: 'A', - sortId: '7', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['ScheduleJob:write'] - }, - { - id: '10025', - createTime: '2022-05-19 01:18:33', - parentId: '10023', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'ScheduleJob:write,ScheduleJob:read', - meta: '{}', - status: 'A', - sortId: '6', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['ScheduleJob:write', 'ScheduleJob:read'] - }, - { - id: '10026', - createTime: '2022-05-19 01:18:33', - parentId: '10023', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'ScheduleJob:write', - meta: '{}', - status: 'A', - sortId: '5', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['ScheduleJob:write'] - }, - { - id: '10027', - createTime: '2022-05-19 01:18:33', - parentId: '10023', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'ScheduleJob:read', - meta: '{}', - status: 'A', - sortId: '4', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['ScheduleJob:read'] - }, - { - id: '10028', - createTime: '2022-05-19 01:18:33', - parentId: '10023', - displayType: 'PERMISSION', - displayName: '运行一次', - resourceCode: 'executeOnce', - permissionCode: 'ScheduleJob:write', - meta: '{}', - status: 'A', - sortId: '3', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['ScheduleJob:write'] - }, - { - id: '10029', - createTime: '2022-05-19 01:18:33', - parentId: '10023', - displayType: 'PERMISSION', - displayName: '日志记录', - resourceCode: 'logList', - permissionCode: 'ScheduleJob:read', - meta: '{}', - status: 'A', - sortId: '2', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['ScheduleJob:read'] - }, - { - id: '10030', - createTime: '2022-05-19 01:18:33', - parentId: '10023', - displayType: 'PERMISSION', - displayName: '日志删除', - resourceCode: 'logDelete', - permissionCode: 'ScheduleJob:write', - meta: '{}', - status: 'A', - sortId: '1', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['ScheduleJob:write'] - } - ], - children: [ - { - id: '10024', - createTime: '2022-05-19 01:18:33', - parentId: '10023', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'ScheduleJob:write', - meta: '{}', - status: 'A', - sortId: '7', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '定时任务管理', - children: [], - permissionCodes: ['ScheduleJob:write'] - }, - { - id: '10025', - createTime: '2022-05-19 01:18:33', - parentId: '10023', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'ScheduleJob:write,ScheduleJob:read', - meta: '{}', - status: 'A', - sortId: '6', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '定时任务管理', - children: [], - permissionCodes: ['ScheduleJob:write', 'ScheduleJob:read'] - }, - { - id: '10026', - createTime: '2022-05-19 01:18:33', - parentId: '10023', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'ScheduleJob:write', - meta: '{}', - status: 'A', - sortId: '5', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '定时任务管理', - children: [], - permissionCodes: ['ScheduleJob:write'] - }, - { - id: '10027', - createTime: '2022-05-19 01:18:33', - parentId: '10023', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'ScheduleJob:read', - meta: '{}', - status: 'A', - sortId: '4', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '定时任务管理', - children: [], - permissionCodes: ['ScheduleJob:read'] - }, - { - id: '10028', - createTime: '2022-05-19 01:18:33', - parentId: '10023', - displayType: 'PERMISSION', - displayName: '运行一次', - resourceCode: 'executeOnce', - permissionCode: 'ScheduleJob:write', - meta: '{}', - status: 'A', - sortId: '3', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '定时任务管理', - children: [], - permissionCodes: ['ScheduleJob:write'] - }, - { - id: '10029', - createTime: '2022-05-19 01:18:33', - parentId: '10023', - displayType: 'PERMISSION', - displayName: '日志记录', - resourceCode: 'logList', - permissionCode: 'ScheduleJob:read', - meta: '{}', - status: 'A', - sortId: '2', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '定时任务管理', - children: [], - permissionCodes: ['ScheduleJob:read'] - }, - { - id: '10030', - createTime: '2022-05-19 01:18:33', - parentId: '10023', - displayType: 'PERMISSION', - displayName: '日志删除', - resourceCode: 'logDelete', - permissionCode: 'ScheduleJob:write', - meta: '{}', - status: 'A', - sortId: '1', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '定时任务管理', - children: [], - permissionCodes: ['ScheduleJob:write'] - } - ], - permissionCodes: ['ScheduleJob:read'] - }, - { - id: '10031', - createTime: '2022-05-19 01:18:33', - parentId: '10000', - displayType: 'MENU', - displayName: '消息模板管理', - resourceCode: 'MessageTemplate', - permissionCode: 'MessageTemplate:read', - meta: '{}', - status: 'A', - sortId: '10010', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10032', - createTime: '2022-05-19 01:18:33', - parentId: '10031', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'MessageTemplate:read', - meta: '{}', - status: 'A', - sortId: '16', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['MessageTemplate:read'] - }, - { - id: '10033', - createTime: '2022-05-19 01:18:33', - parentId: '10031', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'MessageTemplate:write', - meta: '{}', - status: 'A', - sortId: '15', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['MessageTemplate:write'] - }, - { - id: '10034', - createTime: '2022-05-19 01:18:33', - parentId: '10031', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'MessageTemplate:write,MessageTemplate:read', - meta: '{}', - status: 'A', - sortId: '14', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['MessageTemplate:write', 'MessageTemplate:read'] - }, - { - id: '10035', - createTime: '2022-05-19 01:18:33', - parentId: '10031', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'MessageTemplate:write', - meta: '{}', - status: 'A', - sortId: '13', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['MessageTemplate:write'] - } - ], - children: [ - { - id: '10032', - createTime: '2022-05-19 01:18:33', - parentId: '10031', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'MessageTemplate:read', - meta: '{}', - status: 'A', - sortId: '16', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '消息模板管理', - children: [], - permissionCodes: ['MessageTemplate:read'] - }, - { - id: '10033', - createTime: '2022-05-19 01:18:33', - parentId: '10031', - displayType: 'PERMISSION', - displayName: '新建', - resourceCode: 'create', - permissionCode: 'MessageTemplate:write', - meta: '{}', - status: 'A', - sortId: '15', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '消息模板管理', - children: [], - permissionCodes: ['MessageTemplate:write'] - }, - { - id: '10034', - createTime: '2022-05-19 01:18:33', - parentId: '10031', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'MessageTemplate:write,MessageTemplate:read', - meta: '{}', - status: 'A', - sortId: '14', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '消息模板管理', - children: [], - permissionCodes: ['MessageTemplate:write', 'MessageTemplate:read'] - }, - { - id: '10035', - createTime: '2022-05-19 01:18:33', - parentId: '10031', - displayType: 'PERMISSION', - displayName: '删除', - resourceCode: 'delete', - permissionCode: 'MessageTemplate:write', - meta: '{}', - status: 'A', - sortId: '13', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '消息模板管理', - children: [], - permissionCodes: ['MessageTemplate:write'] - } - ], - permissionCodes: ['MessageTemplate:read'] - }, - { - id: '10036', - createTime: '2022-05-19 01:18:33', - parentId: '10000', - displayType: 'MENU', - displayName: '消息记录管理', - resourceCode: 'Message', - permissionCode: 'Message:read', - meta: '{}', - status: 'A', - sortId: '10009', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10037', - createTime: '2022-05-19 01:18:33', - parentId: '10036', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'Message:read', - meta: '{}', - status: 'A', - sortId: '16', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['Message:read'] - } - ], - children: [ - { - id: '10037', - createTime: '2022-05-19 01:18:33', - parentId: '10036', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'Message:read', - meta: '{}', - status: 'A', - sortId: '16', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '消息记录管理', - children: [], - permissionCodes: ['Message:read'] - } - ], - permissionCodes: ['Message:read'] - }, - { - id: '10038', - createTime: '2022-05-19 01:18:33', - parentId: '10000', - displayType: 'MENU', - displayName: '上传文件管理', - resourceCode: 'UploadFile', - permissionCode: 'UploadFile:read', - meta: '{}', - status: 'A', - sortId: '10008', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10039', - createTime: '2022-05-19 01:18:33', - parentId: '10038', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'UploadFile:read', - meta: '{}', - status: 'A', - sortId: '16', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['UploadFile:read'] - }, - { - id: '10040', - createTime: '2022-05-19 01:18:33', - parentId: '10038', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'UploadFile:write,UploadFile:read', - meta: '{}', - status: 'A', - sortId: '14', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['UploadFile:write', 'UploadFile:read'] - } - ], - children: [ - { - id: '10039', - createTime: '2022-05-19 01:18:33', - parentId: '10038', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'UploadFile:read', - meta: '{}', - status: 'A', - sortId: '16', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '上传文件管理', - children: [], - permissionCodes: ['UploadFile:read'] - }, - { - id: '10040', - createTime: '2022-05-19 01:18:33', - parentId: '10038', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'UploadFile:write,UploadFile:read', - meta: '{}', - status: 'A', - sortId: '14', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '上传文件管理', - children: [], - permissionCodes: ['UploadFile:write', 'UploadFile:read'] - } - ], - permissionCodes: ['UploadFile:read'] - }, - { - id: '10041', - createTime: '2022-05-19 01:18:33', - parentId: '10000', - displayType: 'MENU', - displayName: '系统配置管理', - resourceCode: 'SystemConfig', - permissionCode: 'SystemConfig:read', - meta: '{}', - status: 'A', - sortId: '10007', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10042', - createTime: '2022-05-19 01:18:33', - parentId: '10041', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'SystemConfig:write', - meta: '{}', - status: 'A', - sortId: '13', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['SystemConfig:write'] - } - ], - children: [ - { - id: '10042', - createTime: '2022-05-19 01:18:33', - parentId: '10041', - displayType: 'PERMISSION', - displayName: '更新', - resourceCode: 'update', - permissionCode: 'SystemConfig:write', - meta: '{}', - status: 'A', - sortId: '13', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '系统配置管理', - children: [], - permissionCodes: ['SystemConfig:write'] - } - ], - permissionCodes: ['SystemConfig:read'] - }, - { - id: '10043', - createTime: '2022-05-19 01:18:33', - parentId: '10000', - displayType: 'MENU', - displayName: '操作日志查看', - resourceCode: 'IamOperationLog', - permissionCode: 'IamOperationLog:read', - meta: '{}', - status: 'A', - sortId: '10006', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '系统管理', - permissionList: [ - { - id: '10044', - createTime: '2022-05-19 01:18:33', - parentId: '10043', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamOperationLog:read', - meta: '{}', - status: 'A', - sortId: '16', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - permissionCodes: ['IamOperationLog:read'] - } - ], - children: [ - { - id: '10044', - createTime: '2022-05-19 01:18:33', - parentId: '10043', - displayType: 'PERMISSION', - displayName: '详情', - resourceCode: 'detail', - permissionCode: 'IamOperationLog:read', - meta: '{}', - status: 'A', - sortId: '16', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '操作日志查看', - children: [], - permissionCodes: ['IamOperationLog:read'] - } - ], - permissionCodes: ['IamOperationLog:read'] - }, - { - id: '10045', - createTime: '2022-05-19 01:18:33', - parentId: '10000', - displayType: 'MENU', - displayName: '登录日志查看', - resourceCode: 'IamLoginTrace', - permissionCode: 'IamLoginTrace:read', - meta: '{}', - status: 'A', - sortId: '10001', - updateTime: '2022-05-19 01:18:33', - routeMeta: {}, - parentDisplayName: '系统管理', - children: [], - permissionCodes: ['IamLoginTrace:read'] - } - ] - } -] diff --git a/diboot-admin-ui/mock/system/resource/index.ts b/diboot-admin-ui/mock/system/resource/index.ts deleted file mode 100644 index f12a64abe..000000000 --- a/diboot-admin-ui/mock/system/resource/index.ts +++ /dev/null @@ -1,160 +0,0 @@ -import type { Resource } from '@/views/system/resource/type' -import type { MockMethod } from 'vite-plugin-mock' -import type { ApiRequest } from '../../_util' -import { JsonResult } from '../../_util' -import Mock, { Random } from 'mockjs' -import realResourcePermissionData from './_data/real-resource-data' -import dbRestPermissionDataList from './_data/real-rest-permission-data' -import dbCloudRestPermissionDataList from './_data/real-cloud-rest-permission-data' -import realRoleResourcePermissionData from './_data/real-role-resource-data' -const baseUrl = '/api/iam/resource' -const deleteDataIds: string[] = [] -const dbDataList = realResourcePermissionData as unknown as Resource[] -const dbRoleResourcePermissionData = realRoleResourcePermissionData as unknown as Resource[] -/** - * tree转化为list - * @param tree - */ -const tree2List = (tree: Resource[]): Resource[] => { - const list: Resource[] = [] - for (const resourcePermission of tree) { - if (resourcePermission.children && resourcePermission.children.length > 0) { - for (const child of tree2List(resourcePermission.children)) { - list.push(child) - } - } - // 移除children - const temp: Resource = { parentId: '', routeMeta: { icon: 'Plus' } } - Object.assign(temp, resourcePermission) - delete temp.children - list.push(temp) - } - return list -} -/** - * list转化为tree - * @param originList - */ -const list2Tree = (originList: Resource[]) => { - const parentTopList: Resource[] = [] - const removeIds: string[] = [] - for (const resourcePermission of originList) { - resourcePermission.children = [] - if (resourcePermission.parentId === '0') { - removeIds.push(resourcePermission.id as string) - parentTopList.push(resourcePermission) - continue - } - } - originList = originList.filter(item => !removeIds.includes(item.id as string)) - buildChildren(parentTopList, originList) - return parentTopList -} -/** - * list转化为tree 构建子项 - * @param originList - */ -const buildChildren = (parents: Resource[], originList: Resource[]) => { - if (!parents || parents.length === 0) { - return - } - const removeIds: string[] = [] - for (const parent of parents) { - parent.children = [] - for (const resourcePermission of originList) { - if (resourcePermission.parentId === parent.id) { - removeIds.push(resourcePermission.id as string) - parent.children.push(resourcePermission) - } - } - originList = originList.filter(item => !removeIds.includes(item.id as string)) - if (parent.children && parent.children.length > 0) { - buildChildren(parent.children, originList) - } - } -} -export default [ - { - url: `${baseUrl}`, - timeout: Random.natural(50, 300), - method: 'get', - response: ({ query }: ApiRequest) => { - return JsonResult.OK(dbRoleResourcePermissionData) - } - }, - { - url: `${baseUrl}/menu-tree`, - timeout: Random.natural(50, 300), - method: 'get', - response: ({ query }: ApiRequest) => { - const list = tree2List(dbDataList) - const result = list.filter(item => !deleteDataIds.includes(item.id as string)) - return JsonResult.OK(list2Tree(result)) - } - }, - { - url: `${baseUrl}/`, - timeout: Random.natural(50, 300), - method: 'post', - response: ({ body }: ApiRequest) => { - const mock = Mock.mock({ id: '@id' }) - const id = mock.id - Object.assign(body, { id: id }) - dbDataList.unshift(body) - return JsonResult.OK(id) - } - }, - { - url: `${baseUrl}/:id`, - timeout: Random.natural(50, 300), - method: 'put', - response: ({ body }: ApiRequest) => { - const list = tree2List(dbDataList) - const index = list.findIndex(item => item.id === body.id) - list.splice(index, 1, body) - dbDataList.length = 0 - - dbDataList.push(...list2Tree(list)) - return JsonResult.OK(true) - } - }, - { - url: `${baseUrl}/api-list`, - timeout: Random.natural(50, 300), - method: 'get', - response: ({ query }: ApiRequest) => { - return JsonResult.OK(dbRestPermissionDataList) - // return JsonResult.OK(dbCloudRestPermissionDataList) - } - }, - { - url: `${baseUrl}/:id`, - timeout: Random.natural(50, 300), - method: 'get', - response: ({ query }: ApiRequest) => { - const list = tree2List(dbDataList) - return JsonResult.OK(list.find(item => item.id === query.id)) - } - }, - { - url: `${baseUrl}/batch-delete`, - timeout: Random.natural(50, 300), - method: 'post', - response: ({ body }: ApiRequest>) => { - deleteDataIds.push(...body) - return JsonResult.OK() - } - }, - { - url: `${baseUrl}/check-code-duplicate`, - timeout: Random.natural(50, 300), - method: 'get', - response: (that: unknown, { query }: ApiRequest) => { - const id = query.id - const isExistence = tree2List(dbDataList) - .filter(item => item.id !== id) - .some(item => item.resourceCode === query.code) - return isExistence ? JsonResult.FAIL_VALIDATION('该编码已存在') : JsonResult.OK() - } - } as MockMethod -] as MockMethod[] diff --git a/diboot-admin-ui/mock/system/role.ts b/diboot-admin-ui/mock/system/role.ts deleted file mode 100644 index 0ba6415a0..000000000 --- a/diboot-admin-ui/mock/system/role.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { MockMethod } from 'vite-plugin-mock' -import crudTemplate from '../_util/crud-template' -import type { Role } from '@/views/system/role/type' -import Mock, { Random } from 'mockjs' -import type { ApiRequest } from '../_util' -import { JsonResult } from '../_util' - -export const dataList: Role[] = Array.from({ length: 50 }).map((_, index) => { - const id = String(50 - index) - return Mock.mock({ - id, - name: '角色' + id, - code: 'role' + id, - permissionList: [], - description: '@csentence', - createTime: '@datetime', - updateTime: '@datetime' - } as Role) -}) - -const crud = crudTemplate({ - baseApi: '/iam/role', - dataList, - fuzzyMatchKeys: ['name', 'code'] -}) - -export default [ - ...Object.values(crud.api), - { - url: `${crud.baseUrl}/check-code-duplicate`, - timeout: Random.natural(50, 300), - method: 'get', - response: ({ query }: ApiRequest) => { - const id = query.id - const isExistence = dataList.filter(item => item.id !== id).some(item => item.code === query.code) - return isExistence ? JsonResult.FAIL_VALIDATION('该编码已存在') : JsonResult.OK() - } - } -] as MockMethod[] diff --git a/diboot-admin-ui/mock/system/schedule-job.ts b/diboot-admin-ui/mock/system/schedule-job.ts deleted file mode 100644 index e4252d4ad..000000000 --- a/diboot-admin-ui/mock/system/schedule-job.ts +++ /dev/null @@ -1,84 +0,0 @@ -import type { MockMethod } from 'vite-plugin-mock' -import crudTemplate from '../_util/crud-template' -import { Random } from 'mockjs' -import type { ApiRequest } from '../_util' -import { JsonResult } from '../_util' -import type { ScheduleJob, Job, ScheduleJobLog } from '@/views/system/schedule-job/type' - -const jobList: ScheduleJob[] = [ - { - id: '1', - jobKey: 'ClearOperationLogJob', - jobName: '清除过期操作日志', - cron: '0 0 1 * * ?', - initStrategy: 'FIRE_AND_PROCEED', - initStrategyLabel: '立即执行一次,并周期执行', - jobStatus: 'A', - saveLog: true, - createByName: 'Diboot', - createTime: '2022-05-23 22:22:22', - updateTime: '2022-05-23 22:22:22' - } -] - -const scheduleJob = crudTemplate({ - baseApi: '/schedule-job', - dataList: jobList, - enablePagination: false -}) - -const jobLogList: ScheduleJobLog[] = [] - -const jobLog = crudTemplate({ - baseApi: '/schedule-job/log', - dataList: jobLogList -}) - -export default [ - { - url: `${scheduleJob.baseUrl}/all-job`, - timeout: Random.natural(50, 300), - method: 'get', - response: () => { - return JsonResult.OK([ - { - jobKey: 'ClearOperationLogJob', - jobName: '清除过期操作日志', - jobCron: '0 0 1 * * ?', - paramJsonExample: '{"daysBefore":30}' - } - ] as Job[]) - } - }, - ...Object.values(scheduleJob.api), - { - url: `${scheduleJob.baseUrl}/execute-once/:id`, - timeout: Random.natural(50, 300), - method: 'put', - response: ({ query }: ApiRequest) => { - const natural = Random.natural(1_000, 30_000) - const startTime = Random.now('yyyy-MM-dd HH:mm:ss') - setTimeout(() => { - const scheduleJob = jobList.find(e => e.id === query.id) as ScheduleJob - const endTime = Random.now('yyyy-MM-dd HH:mm:ss') - jobLogList.push({ - id: String(jobLogList.length + 1), - jobId: query.id, - paramJson: scheduleJob.paramJson, - startTime, - endTime, - elapsedSeconds: String(Math.round(natural / 1000)), - triggerMode: 'MANUAL', - triggerModeLabel: '手动', - runStatus: Random.pick(['S', 'F']), - createTime: endTime - }) - }, natural) - return JsonResult.OK() - } - }, - jobLog.api.getList, - jobLog.api.getById, - jobLog.api.remove, - jobLog.api.batchRemove -] as MockMethod[] diff --git a/diboot-admin-ui/mock/tenant/tenantInfo.ts b/diboot-admin-ui/mock/tenant/tenantInfo.ts deleted file mode 100644 index e3fee2242..000000000 --- a/diboot-admin-ui/mock/tenant/tenantInfo.ts +++ /dev/null @@ -1,58 +0,0 @@ -import type { MockMethod } from 'vite-plugin-mock' -import crudTemplate from '../_util/crud-template' -import type { Role } from '@/views/system/role/type' -import Mock, { Random } from 'mockjs' -import type { ApiRequest } from '../_util' -import { JsonResult } from '../_util' - -export const dataList: Role[] = Array.from({ length: 50 }).map((_, index) => { - const id = String(50 - index) - return Mock.mock({ - id, - name: '租户' + id, - code: '租户' + id, - startDate: '@date', - endDate: '@date', - status: 'A', - manager: '@cname', - phone: '13466785432', - statusLabel: { - label: '有效', - value: 'A', - ext: { - color: '#409Eff' - } - }, - description: '@csentence', - createTime: '@datetime', - updateTime: '@datetime' - } as Role) -}) - -const crud = crudTemplate({ - baseApi: '/iam/tenant', - dataList, - fuzzyMatchKeys: ['name', 'code'] -}) - -export default [ - ...Object.values(crud.api), - { - url: `${crud.baseUrl}/check-code-duplicate`, - timeout: Random.natural(50, 300), - method: 'get', - response: ({ query }: ApiRequest) => { - const id = query.id - const isExistence = dataList.filter(item => item.id !== id).some(item => item.code === query.code) - return isExistence ? JsonResult.FAIL_VALIDATION('该编码已存在') : JsonResult.OK() - } - }, - { - url: `${crud.baseUrl}/admin/:id`, - timeout: Random.natural(50, 300), - method: 'get', - response: ({ query }: ApiRequest) => { - return JsonResult.OK() - } - } -] as MockMethod[] diff --git a/diboot-admin-ui/package.json b/diboot-admin-ui/package.json index 6bd500425..0cb735357 100644 --- a/diboot-admin-ui/package.json +++ b/diboot-admin-ui/package.json @@ -1,7 +1,7 @@ { "name": "diboot-admin-ui", "private": true, - "version": "3.4.0", + "version": "3.5.0", "scripts": { "vite": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js", "dev": "vite", @@ -15,8 +15,9 @@ }, "dependencies": { "@element-plus/icons-vue": "^2.3.1", - "@vueuse/core": "^10.9.0", "@microsoft/fetch-event-source": "^2.0.1", + "@vue-office/excel": "^1.7.11", + "@vueuse/core": "^10.9.0", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.12", "axios": "^1.6.8", @@ -24,11 +25,10 @@ "echarts": "^5.5.0", "element-plus": "^2.6.1", "element-resize-detector": "^1.2.4", - "highlight.js": "^11.9.0", "fuse.js": "^6.6.2", + "highlight.js": "^11.9.0", "jsencrypt": "^3.3.2", "lodash": "^4.17.21", - "mockjs": "^1.1.0", "marked": "^12.0.2", "nprogress": "^0.2.0", "pinia": "^2.1.7", @@ -43,7 +43,8 @@ "vue-i18n": "^9.10.2", "vue-pdf-embed": "^1.1.5", "vue-router": "^4.3.0", - "vuedraggable": "4.1.0" + "vuedraggable": "4.1.0", + "xgplayer": "^3.0.20" }, "devDependencies": { "@playwright/test": "^1.42.1", @@ -52,7 +53,6 @@ "@types/element-resize-detector": "^1.1.6", "@types/jsdom": "^20.0.1", "@types/lodash": "^4.17.0", - "@types/mockjs": "^1.0.7", "@types/node": "^18.19.24", "@types/nprogress": "^0.2.3", "@types/qs": "^6.9.12", @@ -76,7 +76,6 @@ "vite": "^5.1.6", "vite-plugin-checker": "^0.6.2", "vite-plugin-eslint": "^1.8.1", - "vite-plugin-mock": "^2.9.8", "vite-plugin-vue-setup-extend": "^0.4.0", "vitest": "^0.26.2", "vue-tsc": "^2.0.6" diff --git a/diboot-admin-ui/pnpm-lock.yaml b/diboot-admin-ui/pnpm-lock.yaml index a5ac78d3c..329fc5876 100644 --- a/diboot-admin-ui/pnpm-lock.yaml +++ b/diboot-admin-ui/pnpm-lock.yaml @@ -11,6 +11,9 @@ dependencies: '@microsoft/fetch-event-source': specifier: ^2.0.1 version: 2.0.1 + '@vue-office/excel': + specifier: ^1.7.11 + version: 1.7.11(vue-demi@0.14.7)(vue@3.4.21) '@vueuse/core': specifier: ^10.9.0 version: 10.9.0(vue@3.4.21) @@ -50,9 +53,6 @@ dependencies: marked: specifier: ^12.0.2 version: 12.0.2 - mockjs: - specifier: ^1.1.0 - version: 1.1.0 nprogress: specifier: ^0.2.0 version: 0.2.0 @@ -95,6 +95,9 @@ dependencies: vuedraggable: specifier: 4.1.0 version: 4.1.0(vue@3.4.21) + xgplayer: + specifier: ^3.0.20 + version: 3.0.20(core-js@3.38.1) devDependencies: '@playwright/test': @@ -115,9 +118,6 @@ devDependencies: '@types/lodash': specifier: ^4.17.0 version: 4.17.0 - '@types/mockjs': - specifier: ^1.0.7 - version: 1.0.10 '@types/node': specifier: ^18.19.24 version: 18.19.24 @@ -187,9 +187,6 @@ devDependencies: vite-plugin-eslint: specifier: ^1.8.1 version: 1.8.1(eslint@8.57.0)(vite@5.1.6) - vite-plugin-mock: - specifier: ^2.9.8 - version: 2.9.8(mockjs@1.1.0)(vite@5.1.6) vite-plugin-vue-setup-extend: specifier: ^0.4.0 version: 0.4.0(vite@5.1.6) @@ -460,15 +457,6 @@ packages: dev: true optional: true - /@esbuild/linux-loong64@0.14.54: - resolution: {integrity: sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-loong64@0.18.20: resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} engines: {node: '>=12'} @@ -1071,10 +1059,6 @@ packages: /@types/lodash@4.17.0: resolution: {integrity: sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==} - /@types/mockjs@1.0.10: - resolution: {integrity: sha512-SXgrhajHG7boLv6oU93CcmdDm0HYRiceuz6b+7z+/2lCJPTWDv0V5YiwFHT2ejE4bQqgSXQiVPQYPWv7LGsK1g==} - dev: true - /@types/node@18.19.24: resolution: {integrity: sha512-eghAz3gnbQbvnHqB+mgB2ZR3aH6RhdEmHGS48BnV75KceQPHqabkxKI0BbUSsqhqy2Ddhc2xD/VAR9ySZd57Lw==} dependencies: @@ -1311,6 +1295,21 @@ packages: path-browserify: 1.0.1 dev: true + /@vue-office/excel@1.7.11(vue-demi@0.14.7)(vue@3.4.21): + resolution: {integrity: sha512-LF3R9IV573Sf4qTu6Ik5Ee8UMfkrsZQ6HEQE25/2m1c0CMcHX6KanIy6Cz0b0Q+FrLH3TjIsLTm6oPcqAbDGSA==} + requiresBuild: true + peerDependencies: + '@vue/composition-api': ^1.7.1 + vue: ^2.0.0 || >=3.0.0 + vue-demi: ^0.14.6 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + dependencies: + vue: 3.4.21(typescript@5.4.2) + vue-demi: 0.14.7(vue@3.4.21) + dev: false + /@vue/compiler-core@3.4.21: resolution: {integrity: sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==} dependencies: @@ -1992,10 +1991,6 @@ packages: engines: {node: '>=14'} dev: true - /commander@12.0.0: - resolution: {integrity: sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==} - engines: {node: '>=18'} - /commander@8.3.0: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} engines: {node: '>= 12'} @@ -2020,17 +2015,10 @@ packages: proto-list: 1.2.4 dev: true - /connect@3.7.0: - resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==} - engines: {node: '>= 0.10.0'} - dependencies: - debug: 2.6.9 - finalhandler: 1.1.2 - parseurl: 1.3.3 - utils-merge: 1.0.1 - transitivePeerDependencies: - - supports-color - dev: true + /core-js@3.38.1: + resolution: {integrity: sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==} + requiresBuild: true + dev: false /core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} @@ -2088,6 +2076,12 @@ packages: type: 2.7.2 dev: false + /danmu.js@1.1.13: + resolution: {integrity: sha512-knFd0/cB2HA4FFWiA7eB2suc5vCvoHdqio33FyyCSfP7C+1A+zQcTvnvwfxaZhrxsGj4qaQI2I8XiTqedRaVmg==} + dependencies: + event-emitter: 0.3.5 + dev: false + /data-urls@3.0.2: resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} engines: {node: '>=12'} @@ -2132,17 +2126,6 @@ packages: resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} dev: true - /debug@2.6.9: - resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.0.0 - dev: true - /debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -2228,6 +2211,10 @@ packages: webidl-conversions: 7.0.0 dev: true + /downloadjs@1.4.7: + resolution: {integrity: sha512-LN1gO7+u9xjU5oEScGFKvXhYf7Y/empUIIEAGBs1LzUq/rg5duiDrkuH5A2lQGd5jfMOb9X9usDa2oVXwJ0U/Q==} + dev: false + /duplexer@0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} dev: true @@ -2254,10 +2241,6 @@ packages: semver: 7.6.0 dev: true - /ee-first@1.1.1: - resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - dev: true - /element-plus@2.6.1(vue@3.4.21): resolution: {integrity: sha512-6VRpLjwtIVdtUuITJPPKtpOH1NM6nuAkRE3q5O4Lrx0N1bYMhTkiqb2Jy7zfQuDPbOIkkF2OABTzegpNnzgsnQ==} peerDependencies: @@ -2297,11 +2280,6 @@ packages: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: true - /encodeurl@1.0.2: - resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} - engines: {node: '>= 0.8'} - dev: true - /entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} @@ -2473,215 +2451,6 @@ packages: ext: 1.7.0 dev: false - /esbuild-android-64@0.14.54: - resolution: {integrity: sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /esbuild-android-arm64@0.14.54: - resolution: {integrity: sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /esbuild-darwin-64@0.14.54: - resolution: {integrity: sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /esbuild-darwin-arm64@0.14.54: - resolution: {integrity: sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /esbuild-freebsd-64@0.14.54: - resolution: {integrity: sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-freebsd-arm64@0.14.54: - resolution: {integrity: sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-32@0.14.54: - resolution: {integrity: sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-64@0.14.54: - resolution: {integrity: sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-arm64@0.14.54: - resolution: {integrity: sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-arm@0.14.54: - resolution: {integrity: sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-mips64le@0.14.54: - resolution: {integrity: sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-ppc64le@0.14.54: - resolution: {integrity: sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-riscv64@0.14.54: - resolution: {integrity: sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-s390x@0.14.54: - resolution: {integrity: sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-netbsd-64@0.14.54: - resolution: {integrity: sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-openbsd-64@0.14.54: - resolution: {integrity: sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-sunos-64@0.14.54: - resolution: {integrity: sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-32@0.14.54: - resolution: {integrity: sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-64@0.14.54: - resolution: {integrity: sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-arm64@0.14.54: - resolution: {integrity: sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild@0.14.54: - resolution: {integrity: sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/linux-loong64': 0.14.54 - esbuild-android-64: 0.14.54 - esbuild-android-arm64: 0.14.54 - esbuild-darwin-64: 0.14.54 - esbuild-darwin-arm64: 0.14.54 - esbuild-freebsd-64: 0.14.54 - esbuild-freebsd-arm64: 0.14.54 - esbuild-linux-32: 0.14.54 - esbuild-linux-64: 0.14.54 - esbuild-linux-arm: 0.14.54 - esbuild-linux-arm64: 0.14.54 - esbuild-linux-mips64le: 0.14.54 - esbuild-linux-ppc64le: 0.14.54 - esbuild-linux-riscv64: 0.14.54 - esbuild-linux-s390x: 0.14.54 - esbuild-netbsd-64: 0.14.54 - esbuild-openbsd-64: 0.14.54 - esbuild-sunos-64: 0.14.54 - esbuild-windows-32: 0.14.54 - esbuild-windows-64: 0.14.54 - esbuild-windows-arm64: 0.14.54 - dev: true - /esbuild@0.18.20: resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} engines: {node: '>=12'} @@ -2745,6 +2514,7 @@ packages: /escape-html@1.0.3: resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + dev: false /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} @@ -2961,6 +2731,10 @@ packages: through: 2.3.8 dev: true + /eventemitter3@4.0.7: + resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} + dev: false + /execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} @@ -3029,21 +2803,6 @@ packages: to-regex-range: 5.0.1 dev: true - /finalhandler@1.1.2: - resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==} - engines: {node: '>= 0.8'} - dependencies: - debug: 2.6.9 - encodeurl: 1.0.2 - escape-html: 1.0.3 - on-finished: 2.3.0 - parseurl: 1.3.3 - statuses: 1.5.0 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - dev: true - /find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} @@ -3952,16 +3711,6 @@ packages: ufo: 1.5.1 dev: true - /mockjs@1.1.0: - resolution: {integrity: sha512-eQsKcWzIaZzEZ07NuEyO4Nw65g0hdWAyurVol1IPl1gahRwY+svqzfgfey8U8dahLwG44d6/RwEzuK52rSa/JQ==} - hasBin: true - dependencies: - commander: 12.0.0 - - /ms@2.0.0: - resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} - dev: true - /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -4071,13 +3820,6 @@ packages: object-keys: 1.1.1 dev: true - /on-finished@2.3.0: - resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} - engines: {node: '>= 0.8'} - dependencies: - ee-first: 1.1.1 - dev: true - /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: @@ -4142,11 +3884,6 @@ packages: entities: 4.5.0 dev: true - /parseurl@1.3.3: - resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} - engines: {node: '>= 0.8'} - dev: true - /path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} dev: true @@ -4183,10 +3920,6 @@ packages: minipass: 7.0.4 dev: true - /path-to-regexp@6.2.1: - resolution: {integrity: sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==} - dev: true - /path-type@3.0.0: resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} engines: {node: '>=4'} @@ -4770,11 +4503,6 @@ packages: - supports-color dev: true - /statuses@1.5.0: - resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} - engines: {node: '>= 0.6'} - dev: true - /stream-combiner@0.0.4: resolution: {integrity: sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==} dependencies: @@ -5105,11 +4833,6 @@ packages: engines: {node: '>= 10.0.0'} dev: true - /unpipe@1.0.0: - resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} - engines: {node: '>= 0.8'} - dev: true - /unplugin-auto-import@0.12.2(@vueuse/core@10.9.0)(rollup@3.9.1): resolution: {integrity: sha512-hC4w0GZjPjmLtrxV0u10XO350V9eCtQyEyifXr7B9UGD7SvbbIvKuOcHt58Zd4FAqZJXKWoXkpr9mdhBp85Usw==} engines: {node: '>=14'} @@ -5185,11 +4908,6 @@ packages: /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - /utils-merge@1.0.1: - resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} - engines: {node: '>= 0.4.0'} - dev: true - /validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} dependencies: @@ -5284,27 +5002,6 @@ packages: vite: 5.1.6(@types/node@18.19.24)(sass@1.72.0) dev: true - /vite-plugin-mock@2.9.8(mockjs@1.1.0)(vite@5.1.6): - resolution: {integrity: sha512-YTQM5Sn7t+/DNOwTkr+W26QGTCk1PrDkhGHslTJ90lIPJhJtDTwuSkEYMAuLP9TcVQ/qExTFx/x/GE3kxJ05sw==} - engines: {node: '>=12.0.0'} - peerDependencies: - mockjs: '>=1.1.0' - vite: '>=2.0.0' - dependencies: - '@types/mockjs': 1.0.10 - chalk: 4.1.2 - chokidar: 3.6.0 - connect: 3.7.0 - debug: 4.3.4 - esbuild: 0.14.54 - fast-glob: 3.3.2 - mockjs: 1.1.0 - path-to-regexp: 6.2.1 - vite: 5.1.6(@types/node@18.19.24)(sass@1.72.0) - transitivePeerDependencies: - - supports-color - dev: true - /vite-plugin-vue-setup-extend@0.4.0(vite@5.1.6): resolution: {integrity: sha512-WMbjPCui75fboFoUTHhdbXzu4Y/bJMv5N9QT9a7do3wNMNHHqrk+Tn2jrSJU0LS5fGl/EG+FEDBYVUeWIkDqXQ==} peerDependencies: @@ -5770,6 +5467,28 @@ packages: optional: true dev: true + /xgplayer-subtitles@3.0.20(core-js@3.38.1): + resolution: {integrity: sha512-I1bjsIY+aKOrhYQspLdneOkYg+Vf4cJVGPnDSFnNebnxXl9Mhz5SEpWGzYizMYxL9UvsQ9pgjeEY0o4hkwM+kQ==} + peerDependencies: + core-js: '>=3.12.1' + dependencies: + core-js: 3.38.1 + eventemitter3: 4.0.7 + dev: false + + /xgplayer@3.0.20(core-js@3.38.1): + resolution: {integrity: sha512-UNKZJRyODOZGdka83ao8fI18xdhzOV8qG4aNEOOkuOQbXFXfXsJMr/dazRHFP+uXmTqiCXr568euee3ch7CS7g==} + peerDependencies: + core-js: '>=3.12.1' + dependencies: + core-js: 3.38.1 + danmu.js: 1.1.13 + delegate: 3.2.0 + downloadjs: 1.4.7 + eventemitter3: 4.0.7 + xgplayer-subtitles: 3.0.20(core-js@3.38.1) + dev: false + /xml-name-validator@4.0.0: resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} engines: {node: '>=12'} diff --git a/diboot-admin-ui/public/favicon.ico b/diboot-admin-ui/public/favicon.ico index df36fcfb7..186302198 100644 Binary files a/diboot-admin-ui/public/favicon.ico and b/diboot-admin-ui/public/favicon.ico differ diff --git a/diboot-admin-ui/src/assets/icon/dark.vue b/diboot-admin-ui/src/assets/icon/dark.vue deleted file mode 100644 index e091553b7..000000000 --- a/diboot-admin-ui/src/assets/icon/dark.vue +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/diboot-admin-ui/src/assets/icon/light.vue b/diboot-admin-ui/src/assets/icon/light.vue deleted file mode 100644 index 8cf6b9d35..000000000 --- a/diboot-admin-ui/src/assets/icon/light.vue +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/diboot-admin-ui/src/components/__tests__/HelloWorld.spec.ts b/diboot-admin-ui/src/components/__tests__/HelloWorld.spec.ts deleted file mode 100644 index 253320200..000000000 --- a/diboot-admin-ui/src/components/__tests__/HelloWorld.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { describe, it, expect } from 'vitest' - -import { mount } from '@vue/test-utils' -import HelloWorld from '../HelloWorld.vue' - -describe('HelloWorld', () => { - it('renders properly', () => { - const wrapper = mount(HelloWorld, { props: { msg: 'Hello Vitest' } }) - expect(wrapper.text()).toContain('Hello Vitest') - }) -}) diff --git a/diboot-admin-ui/src/components/locales/en.ts b/diboot-admin-ui/src/components/_locales/en.ts similarity index 95% rename from diboot-admin-ui/src/components/locales/en.ts rename to diboot-admin-ui/src/components/_locales/en.ts index 2a9b8a94a..ce8d2770c 100644 --- a/diboot-admin-ui/src/components/locales/en.ts +++ b/diboot-admin-ui/src/components/_locales/en.ts @@ -44,7 +44,7 @@ const en: Locale = { exportColumn: 'Export Columns' }, i18n: { language: 'Language Identifier', config: 'Internationalization Configuration' }, - icon: { reelect: 'Re-Select', choose: 'Choose', clear: 'Clear', selector: 'Icon Selector' }, + icon: { reselect: 'Re-Select', choose: 'Choose', clear: 'Clear', selector: 'Icon Selector' }, numberRange: { startPlaceholder: 'Start', endPlaceholder: 'End' }, rich: { placeholder: 'Enter content...', uploadError: 'Upload failed, please try again later!' }, watermark: 'Your browser does not support watermark functionality' diff --git a/diboot-admin-ui/src/components/locales/zhCN.ts b/diboot-admin-ui/src/components/_locales/zhCN.ts similarity index 98% rename from diboot-admin-ui/src/components/locales/zhCN.ts rename to diboot-admin-ui/src/components/_locales/zhCN.ts index d3dc57fc6..6412d656e 100644 --- a/diboot-admin-ui/src/components/locales/zhCN.ts +++ b/diboot-admin-ui/src/components/_locales/zhCN.ts @@ -63,7 +63,7 @@ const zhCN = { config: '国际化配置' }, icon: { - reelect: '重选', + reselect: '重选', choose: '选择', clear: '清除', selector: '图标选择器' diff --git a/diboot-admin-ui/src/components/di/Input.vue b/diboot-admin-ui/src/components/di/Input.vue index cd7d8f67f..2b138b17f 100644 --- a/diboot-admin-ui/src/components/di/Input.vue +++ b/diboot-admin-ui/src/components/di/Input.vue @@ -4,8 +4,12 @@ import type { FormItem, Select, Upload } from './type' import type { UploadRawFile, UploadFile, FormItemRule, CascaderNode, CascaderOption } from 'element-plus' import { checkValue } from '@/utils/validate-form' import { useI18n } from 'vue-i18n' + const i18n = useI18n() +const RichEditor = defineAsyncComponent(() => import('../rich/Editor.vue')) +const RichRead = defineAsyncComponent(() => import('../rich/Read.vue')) + const props = withDefaults( defineProps<{ config: FormItem @@ -143,6 +147,8 @@ const convert2accept = (accept?: string) => { }) .join(',') } + +defineExpose({ getFiles: () => _.cloneDeep(unref(fileList)) }) diff --git a/diboot-mobile-ui/src/components/di/type.ts b/diboot-mobile-ui/src/components/di/type.ts index 58e5591df..e39c10467 100644 --- a/diboot-mobile-ui/src/components/di/type.ts +++ b/diboot-mobile-ui/src/components/di/type.ts @@ -143,6 +143,8 @@ export interface Input { export interface InputText extends Input { type: 'input' maxlength?: number + // 扫码 + scanCode?: boolean } export interface Textarea extends Omit { diff --git a/diboot-mobile-ui/src/components/locales/en.ts b/diboot-mobile-ui/src/components/locales/en.ts index dba68b773..b5caeb083 100644 --- a/diboot-mobile-ui/src/components/locales/en.ts +++ b/diboot-mobile-ui/src/components/locales/en.ts @@ -12,6 +12,15 @@ const en: Locale = { placeholder: 'Please Input Content...' } } + }, + di: { + input: { + date: 'Select date', + time: 'Select time', + next: 'Next', + uploadFile: 'Upload file', + fileLarge: 'The file size cannot exceed {0}MB' + } } } diff --git a/diboot-mobile-ui/src/components/locales/zhCN.ts b/diboot-mobile-ui/src/components/locales/zhCN.ts index bc1294a0f..27995dd68 100644 --- a/diboot-mobile-ui/src/components/locales/zhCN.ts +++ b/diboot-mobile-ui/src/components/locales/zhCN.ts @@ -10,6 +10,15 @@ const zhCN = { placeholder: '请输入内容...' } } + }, + di: { + input: { + date: '选择日期', + time: '选择时间', + next: '下一步', + uploadFile: '上传文件', + fileLarge: '文件大小不能超过 {0}MB' + } } } diff --git a/diboot-mobile-ui/src/components/scan-code/index.vue b/diboot-mobile-ui/src/components/scan-code/index.vue new file mode 100644 index 000000000..147e84dd8 --- /dev/null +++ b/diboot-mobile-ui/src/components/scan-code/index.vue @@ -0,0 +1,91 @@ + + + diff --git a/diboot-mobile-ui/src/i18n/locales/en.ts b/diboot-mobile-ui/src/i18n/locales/en.ts index 7a5a68c22..2dee88843 100644 --- a/diboot-mobile-ui/src/i18n/locales/en.ts +++ b/diboot-mobile-ui/src/i18n/locales/en.ts @@ -3,7 +3,36 @@ import type { Locale } from './zhCN' const en: Locale = { language: 'English', operation: { - submit: 'Submit' + submit: 'Submit', + detail: 'Detail', + create: 'Create', + update: 'Edit', + delete: 'Delete', + copy: 'Copy' + }, + bool: { + yes: 'Yes', + no: 'No' + }, + placeholder: { + select: 'Please Select', + input: 'Please Enter' + }, + rules: { + notnull: 'field is required', + validationFailed: 'Form verification fails', + valueNotUnique: 'Content duplicates, {0} already exists!' + }, + msg: { + noMore: 'No more', + requestErr: 'If the request fails, click Reload', + loading: 'loading...', + uploadErr: 'The upload file is abnormal, please try again later!' + }, + select: { + keyword: 'Enter keyword', + search: 'Search options', + noOpt: 'No options' } } diff --git a/diboot-mobile-ui/src/i18n/locales/zhCN.ts b/diboot-mobile-ui/src/i18n/locales/zhCN.ts index 20fb0e297..c15310ade 100644 --- a/diboot-mobile-ui/src/i18n/locales/zhCN.ts +++ b/diboot-mobile-ui/src/i18n/locales/zhCN.ts @@ -1,7 +1,36 @@ const zhCN = { language: '简体中文', operation: { - submit: '提交' + submit: '提交', + detail: '查看详情', + create: '新建', + update: '编辑', + delete: '删除', + copy: '复制' + }, + bool: { + yes: '是', + no: '否' + }, + placeholder: { + select: '请选择', + input: '请输入' + }, + rules: { + notnull: '不能为空', + validationFailed: '表单校验不通过', + valueNotUnique: '内容重复,{0} 已存在!' + }, + msg: { + noMore: '没有更多了', + requestErr: '请求失败,点击重新加载', + loading: '加载中...', + uploadErr: '上传文件异常,请稍后重试!' + }, + select: { + key: '输入关键字', + search: '搜索选项', + noOpt: '无选项' } } diff --git a/diboot-mobile-ui/src/utils/validate-form.ts b/diboot-mobile-ui/src/utils/validate-form.ts new file mode 100644 index 000000000..d47865812 --- /dev/null +++ b/diboot-mobile-ui/src/utils/validate-form.ts @@ -0,0 +1,42 @@ +import type { FieldRuleValidator } from 'vant' +import type { FieldRule } from 'vant/lib/field/types' +import i18n from '@/i18n' + +/** + * 表单校验属性值 + * + * @param validateApi 校验接口 + * @param prop 属性 + * @param id 数据ID + * @param param 额外的参数 + */ +export const checkValue = ( + validateApi: string, + prop: string, + id: () => string | undefined, + param?: () => Record +): FieldRuleValidator => { + return (value: any, rule: FieldRule) => { + if (value) { + const params: Record = (param && param()) ?? {} + params.id = id() + params[prop] = value + return new Promise(resolve => { + api + .get(validateApi, params) + .then(res => { + if (res.data !== false) { + resolve(true) + } else { + resolve(i18n.global.t('rules.valueNotUnique', value)) + } + }) + .catch(err => { + resolve(err.msg || err) + }) + }) + } else { + return true + } + } +} diff --git a/diboot-mobile-ui/src/views/login/index.vue b/diboot-mobile-ui/src/views/login/index.vue index c6c41c51c..441c4c468 100644 --- a/diboot-mobile-ui/src/views/login/index.vue +++ b/diboot-mobile-ui/src/views/login/index.vue @@ -73,15 +73,15 @@ const enableI18n = import.meta.env.VITE_APP_ENABLE_I18N === 'true' +

+ {{ $t('login.submit') }} +
-
- {{ $t('login.submit') }} -
diff --git a/diboot-mobile-ui/src/views/mine/index.vue b/diboot-mobile-ui/src/views/mine/index.vue index 246f94db0..96b53e364 100644 --- a/diboot-mobile-ui/src/views/mine/index.vue +++ b/diboot-mobile-ui/src/views/mine/index.vue @@ -3,20 +3,11 @@ import logo from '@/assets/image/logo.png' import useAuthStore from '@/stores/auth' import router from '@/router' import auth from '@/utils/auth' -import type { OrgModel } from './type' -import { useI18n } from 'vue-i18n' -const i18n = useI18n() + const authStore = useAuthStore() const positions = ref() -const orgName = ref() if (authStore.info) { positions.value = authStore.info.positionList?.map(position => position.name).toString() - api - .get(`/iam/org/${authStore.info.orgId}`) - .then(res => { - orgName.value = res.data?.name - }) - .catch(err => showFailToast(err.msg || err.message || i18n.t('mine.updateFailed'))) } const login = () => { @@ -36,7 +27,7 @@ const login = () => { - + diff --git a/diboot-mobile-ui/types/auto-imports.d.ts b/diboot-mobile-ui/types/auto-imports.d.ts index 803f06707..92e9ec98d 100644 --- a/diboot-mobile-ui/types/auto-imports.d.ts +++ b/diboot-mobile-ui/types/auto-imports.d.ts @@ -1,4 +1,7 @@ -// Generated by 'unplugin-auto-import' +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// Generated by unplugin-auto-import export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] @@ -51,7 +54,6 @@ declare global { const readonly: typeof import('vue')['readonly'] const ref: typeof import('vue')['ref'] const resolveComponent: typeof import('vue')['resolveComponent'] - const resolveDirective: typeof import('vue')['resolveDirective'] const setActivePinia: typeof import('pinia')['setActivePinia'] const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix'] const shallowReactive: typeof import('vue')['shallowReactive'] @@ -67,6 +69,7 @@ declare global { const toRaw: typeof import('vue')['toRaw'] const toRef: typeof import('vue')['toRef'] const toRefs: typeof import('vue')['toRefs'] + const toValue: typeof import('vue')['toValue'] const triggerRef: typeof import('vue')['triggerRef'] const unref: typeof import('vue')['unref'] const useAttrs: typeof import('vue')['useAttrs'] @@ -87,3 +90,8 @@ declare global { const watchPostEffect: typeof import('vue')['watchPostEffect'] const watchSyncEffect: typeof import('vue')['watchSyncEffect'] } +// for type re-export +declare global { + // @ts-ignore + export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue' +} diff --git a/diboot-notification-starter/pom.xml b/diboot-notification-starter/pom.xml index 8ab547fc0..2fe198178 100644 --- a/diboot-notification-starter/pom.xml +++ b/diboot-notification-starter/pom.xml @@ -5,12 +5,12 @@ diboot-root com.diboot - 3.4.0 + 3.5.0 4.0.0 diboot-notification-spring-boot-starter - 3.4.0 + 3.5.0 jar diboot消息通知组件 @@ -37,7 +37,7 @@ com.aliyun dysmsapi20170525 - 2.0.24 + 3.0.0 provided diff --git a/diboot-notification-starter/src/main/java/com/diboot/notification/dto/MessageDTO.java b/diboot-notification-starter/src/main/java/com/diboot/notification/dto/MessageDTO.java index 4bf6a76ef..4867d0ce4 100644 --- a/diboot-notification-starter/src/main/java/com/diboot/notification/dto/MessageDTO.java +++ b/diboot-notification-starter/src/main/java/com/diboot/notification/dto/MessageDTO.java @@ -46,6 +46,6 @@ public class MessageDTO extends Message { /** * 关联字段 MessageTemplate.title */ - @BindQuery(comparison = Comparison.LIKE, entity = MessageTemplate.class, column = "title", condition = "this.template_id=id") + @BindQuery(comparison = Comparison.LIKE, entity = MessageTemplate.class, field = "title", condition = "this.template_id=id") private String messageTemplateTitle; } diff --git a/diboot-notification-starter/src/main/java/com/diboot/notification/dto/MessageTemplateDTO.java b/diboot-notification-starter/src/main/java/com/diboot/notification/dto/MessageTemplateDTO.java index f76b716b4..ae68904f9 100644 --- a/diboot-notification-starter/src/main/java/com/diboot/notification/dto/MessageTemplateDTO.java +++ b/diboot-notification-starter/src/main/java/com/diboot/notification/dto/MessageTemplateDTO.java @@ -41,13 +41,13 @@ public class MessageTemplateDTO extends MessageTemplate { /** * 创建时间-起始 */ - @BindQuery(comparison = Comparison.GE, column = "create_time") + @BindQuery(comparison = Comparison.GE) private LocalDateTime createTime; /** * 创建时间-截止 */ - @BindQuery(comparison = Comparison.LT, column = "create_time") + @BindQuery(comparison = Comparison.LT, field = "createTime") private LocalDateTime createTimeEnd; public MessageTemplateDTO setCreateTime(LocalDateTime createTime) { diff --git a/diboot-notification-starter/src/main/java/com/diboot/notification/entity/Message.java b/diboot-notification-starter/src/main/java/com/diboot/notification/entity/Message.java index 8595ac05c..bf9479ebe 100644 --- a/diboot-notification-starter/src/main/java/com/diboot/notification/entity/Message.java +++ b/diboot-notification-starter/src/main/java/com/diboot/notification/entity/Message.java @@ -87,7 +87,6 @@ public class Message extends BaseEntity { */ public final static String VARIABLES = "variables"; - /** * 租户id */ diff --git a/diboot-notification-starter/src/main/resources/notification_messages.properties b/diboot-notification-starter/src/main/resources/notification_messages.properties index 7f1e283f5..fe715507c 100644 --- a/diboot-notification-starter/src/main/resources/notification_messages.properties +++ b/diboot-notification-starter/src/main/resources/notification_messages.properties @@ -31,5 +31,5 @@ exception.business.messageService.contentNotNull=消息内容不能为空 exception.business.messageService.sendFailed=消息发送失败 #invalidUsageException -exception.invalidUsage.messageService.fetchChannelFailed=获取发送通道 {} 失败 +exception.invalidUsage.messageService.fetchChannelFailed=获取发送通道 '{} 失败 exception.invalidUsage.simpleEmailChannel.send.message=邮件无法发送:无JavaMailSender实例,请检查相关配置及依赖环境。 \ No newline at end of file diff --git a/diboot-notification-starter/src/main/resources/notification_messages_en.properties b/diboot-notification-starter/src/main/resources/notification_messages_en.properties index 6100a940d..e7403f02b 100644 --- a/diboot-notification-starter/src/main/resources/notification_messages_en.properties +++ b/diboot-notification-starter/src/main/resources/notification_messages_en.properties @@ -31,5 +31,5 @@ exception.business.messageService.contentNotNull=message content cannot be empty exception.business.messageService.sendFailed=message sending failed #invalidUsageException -exception.invalidUsage.messageService.fetchChannelFailed=failure to fetch sending channel {} +exception.invalidUsage.messageService.fetchChannelFailed=failure to fetch sending channel '{} exception.invalidUsage.simpleEmailChannel.send.message=email cannot be sent: no JavaMailSender instance, please check related configurations and dependency environments. \ No newline at end of file diff --git a/diboot-notification-starter/src/main/resources/notification_messages_zh.properties b/diboot-notification-starter/src/main/resources/notification_messages_zh.properties new file mode 100644 index 000000000..fe715507c --- /dev/null +++ b/diboot-notification-starter/src/main/resources/notification_messages_zh.properties @@ -0,0 +1,35 @@ +#message +validation.message.appModule.Length.message=应用模块长度应小于{max} +validation.message.businessType.NotNull.message=业务类型不能为空 +validation.message.businessType.Length.message=业务类型长度应小于{max} +validation.message.businessCode.NotNull.message=业务标识不能为空 +validation.message.businessCode.Length.message=业务标识长度应小于{max} +validation.message.title.Length.message=标题长度应小于{max} +validation.message.content.NotNull.message=内容不能为空 +validation.message.sender.NotNull.message=发送方不能为空 +validation.message.sender.Length.message=发送方长度应小于{max} +validation.message.receiver.NotNull.message=接收方不能为空 +validation.message.receiver.Length.message=接收方长度应小于{max} +validation.message.channel.NotNull.message=发送通道不能为空 +validation.message.channel.Length.message=发送通道长度应小于{max} +validation.message.status.NotNull.message=消息状态不能为空 +validation.message.status.Length.message=消息状态长度应小于{max} +validation.message.extData.Length.message=扩展数据长度应小于{max} + +#messageTemplate +validation.messageTemplate.appModule.Length.message=应用模块长度应小于{max} +validation.messageTemplate.code.NotNull.message=模版编码不能为空 +validation.messageTemplate.code.Length.message=模版编码长度应小于{max} +validation.messageTemplate.title.NotNull.message=模版标题不能为空 +validation.messageTemplate.title.Length.message=模版标题长度应小于{max} +validation.messageTemplate.content.NotNull.message=模版内容不能为空 + +# businessException +exception.business.messageService.parseFailed=消息解析失败 +exception.business.messageService.fetchTempFailed=获取模版失败 +exception.business.messageService.contentNotNull=消息内容不能为空 +exception.business.messageService.sendFailed=消息发送失败 + +#invalidUsageException +exception.invalidUsage.messageService.fetchChannelFailed=获取发送通道 '{} 失败 +exception.invalidUsage.simpleEmailChannel.send.message=邮件无法发送:无JavaMailSender实例,请检查相关配置及依赖环境。 \ No newline at end of file diff --git a/diboot-notification-starter/src/main/resources/notification_messages_zh_cn.properties b/diboot-notification-starter/src/main/resources/notification_messages_zh_cn.properties new file mode 100644 index 000000000..fe715507c --- /dev/null +++ b/diboot-notification-starter/src/main/resources/notification_messages_zh_cn.properties @@ -0,0 +1,35 @@ +#message +validation.message.appModule.Length.message=应用模块长度应小于{max} +validation.message.businessType.NotNull.message=业务类型不能为空 +validation.message.businessType.Length.message=业务类型长度应小于{max} +validation.message.businessCode.NotNull.message=业务标识不能为空 +validation.message.businessCode.Length.message=业务标识长度应小于{max} +validation.message.title.Length.message=标题长度应小于{max} +validation.message.content.NotNull.message=内容不能为空 +validation.message.sender.NotNull.message=发送方不能为空 +validation.message.sender.Length.message=发送方长度应小于{max} +validation.message.receiver.NotNull.message=接收方不能为空 +validation.message.receiver.Length.message=接收方长度应小于{max} +validation.message.channel.NotNull.message=发送通道不能为空 +validation.message.channel.Length.message=发送通道长度应小于{max} +validation.message.status.NotNull.message=消息状态不能为空 +validation.message.status.Length.message=消息状态长度应小于{max} +validation.message.extData.Length.message=扩展数据长度应小于{max} + +#messageTemplate +validation.messageTemplate.appModule.Length.message=应用模块长度应小于{max} +validation.messageTemplate.code.NotNull.message=模版编码不能为空 +validation.messageTemplate.code.Length.message=模版编码长度应小于{max} +validation.messageTemplate.title.NotNull.message=模版标题不能为空 +validation.messageTemplate.title.Length.message=模版标题长度应小于{max} +validation.messageTemplate.content.NotNull.message=模版内容不能为空 + +# businessException +exception.business.messageService.parseFailed=消息解析失败 +exception.business.messageService.fetchTempFailed=获取模版失败 +exception.business.messageService.contentNotNull=消息内容不能为空 +exception.business.messageService.sendFailed=消息发送失败 + +#invalidUsageException +exception.invalidUsage.messageService.fetchChannelFailed=获取发送通道 '{} 失败 +exception.invalidUsage.simpleEmailChannel.send.message=邮件无法发送:无JavaMailSender实例,请检查相关配置及依赖环境。 \ No newline at end of file diff --git a/diboot-notification-starter/src/test/java/diboot/message/test/config/SpringMvcConfig.java b/diboot-notification-starter/src/test/java/diboot/message/test/config/SpringMvcConfig.java index fc6be7e3d..996124d5c 100644 --- a/diboot-notification-starter/src/test/java/diboot/message/test/config/SpringMvcConfig.java +++ b/diboot-notification-starter/src/test/java/diboot/message/test/config/SpringMvcConfig.java @@ -31,7 +31,7 @@ import java.util.Arrays; -/*** +/** * Spring配置文件 * @author mazc@dibo.ltd * @version v2.0 diff --git a/diboot-scheduler-starter/pom.xml b/diboot-scheduler-starter/pom.xml index 46400e5b9..7f89f1a19 100644 --- a/diboot-scheduler-starter/pom.xml +++ b/diboot-scheduler-starter/pom.xml @@ -5,13 +5,13 @@ diboot-root com.diboot - 3.4.0 + 3.5.0 4.0.0 com.diboot diboot-scheduler-spring-boot-starter - 3.4.0 + 3.5.0 diff --git a/diboot-scheduler-starter/src/main/resources/scheduler_messages.properties b/diboot-scheduler-starter/src/main/resources/scheduler_messages.properties index a29c92517..ef91fd2db 100644 --- a/diboot-scheduler-starter/src/main/resources/scheduler_messages.properties +++ b/diboot-scheduler-starter/src/main/resources/scheduler_messages.properties @@ -23,5 +23,5 @@ exception.business.scheduleJobService.updateFailed=更新定时任务失败 exception.business.scheduleJobService.updateStatusFailed=更新状态失败 exception.business.scheduleJobService.invalidTask=当前任务无效 exception.business.quartzSchedulerService.addTaskFailed=添加定时任务异常 -exception.business.quartzSchedulerService.illegalTask=非法定时任务:{} +exception.business.quartzSchedulerService.illegalTask=非法定时任务:'{} exception.business.quartzSchedulerService.loadFailed=定时任务加载失败 \ No newline at end of file diff --git a/diboot-scheduler-starter/src/main/resources/scheduler_messages_en.properties b/diboot-scheduler-starter/src/main/resources/scheduler_messages_en.properties index 0f3679a85..5dcdf2c4f 100644 --- a/diboot-scheduler-starter/src/main/resources/scheduler_messages_en.properties +++ b/diboot-scheduler-starter/src/main/resources/scheduler_messages_en.properties @@ -23,5 +23,5 @@ exception.business.scheduleJobService.updateFailed=failed to update scheduled jo exception.business.scheduleJobService.updateStatusFailed=failed to update status exception.business.scheduleJobService.invalidTask=current task is invalid exception.business.quartzSchedulerService.addTaskFailed=exception adding scheduled task -exception.business.quartzSchedulerService.illegalTask=illegal scheduled task: {} +exception.business.quartzSchedulerService.illegalTask=illegal scheduled task: '{} exception.business.quartzSchedulerService.loadFailed=failed to load scheduled tasks \ No newline at end of file diff --git a/diboot-scheduler-starter/src/main/resources/scheduler_messages_zh.properties b/diboot-scheduler-starter/src/main/resources/scheduler_messages_zh.properties new file mode 100644 index 000000000..ef91fd2db --- /dev/null +++ b/diboot-scheduler-starter/src/main/resources/scheduler_messages_zh.properties @@ -0,0 +1,27 @@ +#scheduleJob +validation.scheduleJob.jobKey.NotNull.message=任务不能为空 +validation.scheduleJob.jobName.NotNull.message=名称不能为空 +validation.scheduleJob.jobName.Length.message=名称长度应小于{max} +validation.scheduleJob.cron.NotNull.message=定时表达式不能为空 +validation.scheduleJob.cron.Length.message=定时表达式长度应小于{max} +validation.scheduleJob.jobStatus.NotNull.message=状态不能为空 +validation.scheduleJob.jobStatus.Length.message=状态长度应小于{max} +validation.scheduleJob.jobComment.Length.message=备注长度应小于{max} + +#scheduleJobLog +validation.scheduleJobLog.jobId.NotNull.message=任务id不能为空 +validation.scheduleJobLog.jobName.NotNull.message=任务名称不能为空 +validation.scheduleJobLog.jobName.Length.message=任务名称长度应小于{max} +validation.scheduleJobLog.cron.NotNull.message=执行表达式不能为空 +validation.scheduleJobLog.cron.Length.message=执行表达式长度应小于{max} +validation.scheduleJobLog.runStatus.Length.message=状态长度应小于{max} +validation.scheduleJobLog.executeMsg.Length.message=执行结果信息长度应小于{max} + +# businessException +exception.business.scheduleJobService.createFailed=创建定时任务失败 +exception.business.scheduleJobService.updateFailed=更新定时任务失败 +exception.business.scheduleJobService.updateStatusFailed=更新状态失败 +exception.business.scheduleJobService.invalidTask=当前任务无效 +exception.business.quartzSchedulerService.addTaskFailed=添加定时任务异常 +exception.business.quartzSchedulerService.illegalTask=非法定时任务:'{} +exception.business.quartzSchedulerService.loadFailed=定时任务加载失败 \ No newline at end of file diff --git a/diboot-scheduler-starter/src/main/resources/scheduler_messages_zh_cn.properties b/diboot-scheduler-starter/src/main/resources/scheduler_messages_zh_cn.properties new file mode 100644 index 000000000..ef91fd2db --- /dev/null +++ b/diboot-scheduler-starter/src/main/resources/scheduler_messages_zh_cn.properties @@ -0,0 +1,27 @@ +#scheduleJob +validation.scheduleJob.jobKey.NotNull.message=任务不能为空 +validation.scheduleJob.jobName.NotNull.message=名称不能为空 +validation.scheduleJob.jobName.Length.message=名称长度应小于{max} +validation.scheduleJob.cron.NotNull.message=定时表达式不能为空 +validation.scheduleJob.cron.Length.message=定时表达式长度应小于{max} +validation.scheduleJob.jobStatus.NotNull.message=状态不能为空 +validation.scheduleJob.jobStatus.Length.message=状态长度应小于{max} +validation.scheduleJob.jobComment.Length.message=备注长度应小于{max} + +#scheduleJobLog +validation.scheduleJobLog.jobId.NotNull.message=任务id不能为空 +validation.scheduleJobLog.jobName.NotNull.message=任务名称不能为空 +validation.scheduleJobLog.jobName.Length.message=任务名称长度应小于{max} +validation.scheduleJobLog.cron.NotNull.message=执行表达式不能为空 +validation.scheduleJobLog.cron.Length.message=执行表达式长度应小于{max} +validation.scheduleJobLog.runStatus.Length.message=状态长度应小于{max} +validation.scheduleJobLog.executeMsg.Length.message=执行结果信息长度应小于{max} + +# businessException +exception.business.scheduleJobService.createFailed=创建定时任务失败 +exception.business.scheduleJobService.updateFailed=更新定时任务失败 +exception.business.scheduleJobService.updateStatusFailed=更新状态失败 +exception.business.scheduleJobService.invalidTask=当前任务无效 +exception.business.quartzSchedulerService.addTaskFailed=添加定时任务异常 +exception.business.quartzSchedulerService.illegalTask=非法定时任务:'{} +exception.business.quartzSchedulerService.loadFailed=定时任务加载失败 \ No newline at end of file diff --git a/diboot-tenant-starter/pom.xml b/diboot-tenant-starter/pom.xml index a0f85d606..72e257df3 100644 --- a/diboot-tenant-starter/pom.xml +++ b/diboot-tenant-starter/pom.xml @@ -4,7 +4,7 @@ com.diboot diboot-root - 3.4.0 + 3.5.0 com.diboot diboot-tenant-spring-boot-starter diff --git a/diboot-tenant-starter/src/main/java/com/diboot/tenant/entity/IamTenant.java b/diboot-tenant-starter/src/main/java/com/diboot/tenant/entity/IamTenant.java index 83653b1d2..6fb7cc012 100644 --- a/diboot-tenant-starter/src/main/java/com/diboot/tenant/entity/IamTenant.java +++ b/diboot-tenant-starter/src/main/java/com/diboot/tenant/entity/IamTenant.java @@ -102,7 +102,7 @@ private String description; /** - * 租户状态 + * 租户状态(A: 有效,I: 无效) */ @Length(max = 10, message = "{validation.iamTenant.status.Length.message}") @TableField() diff --git a/diboot-tenant-starter/src/main/resources/tenant_messages_zh.properties b/diboot-tenant-starter/src/main/resources/tenant_messages_zh.properties new file mode 100644 index 000000000..205a954df --- /dev/null +++ b/diboot-tenant-starter/src/main/resources/tenant_messages_zh.properties @@ -0,0 +1,27 @@ +#iamTenant +validation.iamTenant.name.NotNull.message=租户名称不能为空 +validation.iamTenant.name.Length.message=租户名称长度应小于{max} +validation.iamTenant.code.NotNull.message=租户编码不能为空 +validation.iamTenant.code.Length.message=租户编码长度应小于{max} +validation.iamTenant.startDate.NotNull.message=起始日期不能为空 +validation.iamTenant.endDate.NotNull.message=截止日期不能为空 +validation.iamTenant.manager.Length.message=负责人长度应小于{max} +validation.iamTenant.phone.Length.message=联系电话长度应小于{max} +validation.iamTenant.description.Length.message=描述长度应小于{max} +validation.iamTenant.status.Length.message=租户状态长度应小于{max} + +#iamTenantResource +validation.iamTenantResource.tenantId.NotNull.message=租户ID不能为空 +validation.iamTenantResource.resourceId.NotNull.message=资源ID不能为空 + +#tenantPwdCredential +validation.tenantPwdCredential.tenantCode.NotNull.message=租户编码不能为空 + +# businessException +exception.business.tenantPwdCredential.tenant.nonexistent=租户不存在 +exception.business.tenantPwdCredential.tenant.unusable=租户账户不可用 +exception.business.tenantPwdCredential.tenant.configFailed=租户账户配置错误 +exception.business.tenantPwdCredential.tenant.invalid=租户账户尚未生效 +exception.business.tenantPwdCredential.tenant.expired=租户账户已过期 +exception.business.tenantService.createFailed=创建租户信息失败 +exception.business.tenantService.createDefaultIamOrgFailed=创建租户默认IamOrg失败 diff --git a/diboot-tenant-starter/src/main/resources/tenant_messages_zh_cn.properties b/diboot-tenant-starter/src/main/resources/tenant_messages_zh_cn.properties new file mode 100644 index 000000000..205a954df --- /dev/null +++ b/diboot-tenant-starter/src/main/resources/tenant_messages_zh_cn.properties @@ -0,0 +1,27 @@ +#iamTenant +validation.iamTenant.name.NotNull.message=租户名称不能为空 +validation.iamTenant.name.Length.message=租户名称长度应小于{max} +validation.iamTenant.code.NotNull.message=租户编码不能为空 +validation.iamTenant.code.Length.message=租户编码长度应小于{max} +validation.iamTenant.startDate.NotNull.message=起始日期不能为空 +validation.iamTenant.endDate.NotNull.message=截止日期不能为空 +validation.iamTenant.manager.Length.message=负责人长度应小于{max} +validation.iamTenant.phone.Length.message=联系电话长度应小于{max} +validation.iamTenant.description.Length.message=描述长度应小于{max} +validation.iamTenant.status.Length.message=租户状态长度应小于{max} + +#iamTenantResource +validation.iamTenantResource.tenantId.NotNull.message=租户ID不能为空 +validation.iamTenantResource.resourceId.NotNull.message=资源ID不能为空 + +#tenantPwdCredential +validation.tenantPwdCredential.tenantCode.NotNull.message=租户编码不能为空 + +# businessException +exception.business.tenantPwdCredential.tenant.nonexistent=租户不存在 +exception.business.tenantPwdCredential.tenant.unusable=租户账户不可用 +exception.business.tenantPwdCredential.tenant.configFailed=租户账户配置错误 +exception.business.tenantPwdCredential.tenant.invalid=租户账户尚未生效 +exception.business.tenantPwdCredential.tenant.expired=租户账户已过期 +exception.business.tenantService.createFailed=创建租户信息失败 +exception.business.tenantService.createDefaultIamOrgFailed=创建租户默认IamOrg失败 diff --git a/pom.xml b/pom.xml index faac2318f..ea7d3c6a3 100644 --- a/pom.xml +++ b/pom.xml @@ -7,13 +7,13 @@ org.springframework.boot spring-boot-starter-parent - 3.3.0 + 3.3.4 com.diboot diboot-root - 3.4.0 + 3.5.0 pom @@ -30,13 +30,13 @@ 8.0.1.Final - 3.5.7 + 3.5.8 4.12.0 1.9.22.1 - 2.16.1 - 3.3.4 + 2.17.0 + 4.0.3 2.0.1 - 3.4.0 + 3.5.0 @@ -44,7 +44,7 @@ org.projectlombok lombok - 1.18.32 + 1.18.34 provided @@ -53,11 +53,19 @@ 8.4.0 provided + org.springframework.boot spring-boot-configuration-processor true +