diff --git a/package.json b/package.json index a33d0dc7..8f1d24e7 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "@zxcvbn-ts/core": "^2.2.1", "animate.css": "^4.1.1", "axios": "^1.3.4", + "benz-amr-recorder": "^1.1.5", "bpmn-js-token-simulation": "^0.10.0", "camunda-bpmn-moddle": "^7.0.1", "cropperjs": "^1.5.13", diff --git a/src/api/bpm/userGroup/index.ts b/src/api/bpm/userGroup/index.ts index c3399f27..035762bf 100644 --- a/src/api/bpm/userGroup/index.ts +++ b/src/api/bpm/userGroup/index.ts @@ -42,6 +42,6 @@ export const getUserGroupPage = async (params) => { } // 获取用户组精简信息列表 -export const listSimpleUserGroup = async () => { +export const getSimpleUserGroupList = async (): Promise => { return await request.get({ url: '/bpm/user-group/list-all-simple' }) } diff --git a/src/api/mp/message/index.ts b/src/api/mp/message/index.ts index 8b7d3cbd..ad9b95dd 100644 --- a/src/api/mp/message/index.ts +++ b/src/api/mp/message/index.ts @@ -1,7 +1,7 @@ import request from '@/config/axios' // 获得公众号消息分页 -export const getMessagePage = (query) => { +export const getMessagePage = (query: PageParam) => { return request.get({ url: '/mp/message/page', params: query diff --git a/src/api/system/dept/index.ts b/src/api/system/dept/index.ts index d66de3f1..e9c31fd7 100644 --- a/src/api/system/dept/index.ts +++ b/src/api/system/dept/index.ts @@ -18,7 +18,7 @@ export interface DeptPageReqVO { } // 查询部门(精简)列表 -export const listSimpleDeptApi = async () => { +export const getSimpleDeptList = async (): Promise => { return await request.get({ url: '/system/dept/list-all-simple' }) } diff --git a/src/api/system/menu/index.ts b/src/api/system/menu/index.ts index 5913972b..13736215 100644 --- a/src/api/system/menu/index.ts +++ b/src/api/system/menu/index.ts @@ -18,18 +18,13 @@ export interface MenuVO { createTime: Date } -export interface MenuPageReqVO { - name?: string - status?: number -} - // 查询菜单(精简)列表 -export const listSimpleMenusApi = () => { +export const getSimpleMenusList = () => { return request.get({ url: '/system/menu/list-all-simple' }) } // 查询菜单列表 -export const getMenuListApi = (params: MenuPageReqVO) => { +export const getMenuList = (params) => { return request.get({ url: '/system/menu/list', params }) } @@ -39,16 +34,16 @@ export const getMenuApi = (id: number) => { } // 新增菜单 -export const createMenuApi = (data: MenuVO) => { +export const createMenu = (data: MenuVO) => { return request.post({ url: '/system/menu/create', data }) } // 修改菜单 -export const updateMenuApi = (data: MenuVO) => { +export const updateMenu = (data: MenuVO) => { return request.put({ url: '/system/menu/update', data }) } // 删除菜单 -export const deleteMenuApi = (id: number) => { +export const deleteMenu = (id: number) => { return request.delete({ url: '/system/menu/delete?id=' + id }) } diff --git a/src/api/system/post/index.ts b/src/api/system/post/index.ts index 98df227f..405db387 100644 --- a/src/api/system/post/index.ts +++ b/src/api/system/post/index.ts @@ -16,7 +16,7 @@ export const getPostPage = async (params: PageParam) => { } // 获取岗位精简信息列表 -export const getSimplePostList = async () => { +export const getSimplePostList = async (): Promise => { return await request.get({ url: '/system/post/list-all-simple' }) } diff --git a/src/api/system/role/index.ts b/src/api/system/role/index.ts index 0d477555..9692548a 100644 --- a/src/api/system/role/index.ts +++ b/src/api/system/role/index.ts @@ -28,7 +28,7 @@ export const getRolePageApi = async (params: RolePageReqVO) => { } // 查询角色(精简)列表 -export const listSimpleRolesApi = async () => { +export const getSimpleRoleList = async (): Promise => { return await request.get({ url: '/system/role/list-all-simple' }) } diff --git a/src/api/system/sensitiveWord/index.ts b/src/api/system/sensitiveWord/index.ts index 7da2c28e..1116226f 100644 --- a/src/api/system/sensitiveWord/index.ts +++ b/src/api/system/sensitiveWord/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import qs from 'qs' export interface SensitiveWordVO { id: number @@ -9,22 +10,13 @@ export interface SensitiveWordVO { createTime: Date } -export interface SensitiveWordPageReqVO extends PageParam { - name?: string - tag?: string - status?: number - createTime?: Date[] -} - -export interface SensitiveWordExportReqVO { - name?: string - tag?: string - status?: number - createTime?: Date[] +export interface SensitiveWordTestReqVO { + text: string + tag: string[] } // 查询敏感词列表 -export const getSensitiveWordPage = (params: SensitiveWordPageReqVO) => { +export const getSensitiveWordPage = (params: PageParam) => { return request.get({ url: '/system/sensitive-word/page', params }) } @@ -49,16 +41,18 @@ export const deleteSensitiveWord = (id: number) => { } // 导出敏感词 -export const exportSensitiveWord = (params: SensitiveWordExportReqVO) => { +export const exportSensitiveWord = (params) => { return request.download({ url: '/system/sensitive-word/export-excel', params }) } // 获取所有敏感词的标签数组 -export const getSensitiveWordTags = () => { +export const getSensitiveWordTagList = () => { return request.get({ url: '/system/sensitive-word/get-tags' }) } // 获得文本所包含的不合法的敏感词数组 -export const validateText = (id: number) => { - return request.get({ url: '/system/sensitive-word/validate-text?' + id }) +export const validateText = (query: SensitiveWordTestReqVO) => { + return request.get({ + url: '/system/sensitive-word/validate-text?' + qs.stringify(query, { arrayFormat: 'repeat' }) + }) } diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index 3cc0a84d..058b320a 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -86,6 +86,6 @@ export const updateUserStatusApi = (id: number, status: number) => { } // 获取用户精简信息列表 -export const getSimpleUserList = () => { +export const getSimpleUserList = (): Promise => { return request.get({ url: '/system/user/list-all-simple' }) } diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index b1bdfafe..58d5601b 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -256,7 +256,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ hidden: true, canTo: true, title: '流程定义', - activeMenu: 'bpm/definition/index' + activeMenu: '/bpm/manager/model' } }, { diff --git a/src/types/auto-components.d.ts b/src/types/auto-components.d.ts index 2b199f1a..04eb4d9e 100644 --- a/src/types/auto-components.d.ts +++ b/src/types/auto-components.d.ts @@ -23,13 +23,11 @@ declare module '@vue/runtime-core' { DictTag: typeof import('./../components/DictTag/src/DictTag.vue')['default'] Echart: typeof import('./../components/Echart/src/Echart.vue')['default'] Editor: typeof import('./../components/Editor/src/Editor.vue')['default'] - ElAvatar: typeof import('element-plus/es')['ElAvatar'] ElBadge: typeof import('element-plus/es')['ElBadge'] ElButton: typeof import('element-plus/es')['ElButton'] ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] ElCard: typeof import('element-plus/es')['ElCard'] ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] - ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup'] ElCol: typeof import('element-plus/es')['ElCol'] ElCollapse: typeof import('element-plus/es')['ElCollapse'] ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] @@ -54,6 +52,7 @@ declare module '@vue/runtime-core' { ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] + ElImage: typeof import('element-plus/es')['ElImage'] ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] ElInput: typeof import('element-plus/es')['ElInput'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] @@ -68,11 +67,9 @@ declare module '@vue/runtime-core' { ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSkeleton: typeof import('element-plus/es')['ElSkeleton'] - ElSpace: typeof import('element-plus/es')['ElSpace'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] - ElTableV2: typeof import('element-plus/es')['ElTableV2'] ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 395f7157..05c70dad 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -140,5 +140,9 @@ export enum DICT_TYPE { PAY_ORDER_STATUS = 'pay_order_status', // 商户支付订单状态 PAY_ORDER_REFUND_STATUS = 'pay_order_refund_status', // 商户支付订单退款状态 PAY_REFUND_ORDER_STATUS = 'pay_refund_order_status', // 退款订单状态 - PAY_REFUND_ORDER_TYPE = 'pay_refund_order_type' // 退款订单类别 + PAY_REFUND_ORDER_TYPE = 'pay_refund_order_type', // 退款订单类别 + + // ========== MP 模块 ========== + MP_AUTO_REPLY_REQUEST_MATCH = 'mp_auto_reply_request_match', // 自动回复请求匹配类型 + MP_MESSAGE_TYPE = 'mp_message_type' // 消息类型 } diff --git a/src/views/bpm/taskAssignRule/TaskAssignRuleForm.vue b/src/views/bpm/taskAssignRule/TaskAssignRuleForm.vue new file mode 100644 index 00000000..a452cab9 --- /dev/null +++ b/src/views/bpm/taskAssignRule/TaskAssignRuleForm.vue @@ -0,0 +1,247 @@ + + diff --git a/src/views/bpm/taskAssignRule/index.vue b/src/views/bpm/taskAssignRule/index.vue index 8db7b578..feea80a2 100644 --- a/src/views/bpm/taskAssignRule/index.vue +++ b/src/views/bpm/taskAssignRule/index.vue @@ -1,186 +1,73 @@ diff --git a/src/views/bpm/taskAssignRule/taskAssignRule.data.ts b/src/views/bpm/taskAssignRule/taskAssignRule.data.ts deleted file mode 100644 index cad74325..00000000 --- a/src/views/bpm/taskAssignRule/taskAssignRule.data.ts +++ /dev/null @@ -1,54 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -// 表单校验 -export const rules = reactive({ - type: [{ required: true, message: '规则类型不能为空', trigger: 'change' }], - roleIds: [{ required: true, message: '指定角色不能为空', trigger: 'change' }], - deptIds: [{ required: true, message: '指定部门不能为空', trigger: 'change' }], - postIds: [{ required: true, message: '指定岗位不能为空', trigger: 'change' }], - userIds: [{ required: true, message: '指定用户不能为空', trigger: 'change' }], - userGroupIds: [{ required: true, message: '指定用户组不能为空', trigger: 'change' }], - scripts: [{ required: true, message: '指定脚本不能为空', trigger: 'change' }] -}) - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: null, - action: true, - actionWidth: '200px', - columns: [ - { - title: '任务名', - field: 'taskDefinitionName' - }, - { - title: '任务标识', - field: 'taskDefinitionKey' - }, - { - title: '规则类型', - field: 'type', - dictType: DICT_TYPE.BPM_TASK_ASSIGN_RULE_TYPE, - dictClass: 'number' - }, - { - title: '规则范围', - field: 'options', - table: { - slots: { - default: 'options_default' - } - } - } - ] -}) - -export const idShowActionClick = (modelId?: any) => { - if (modelId) { - return true - } else { - return false - } -} -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/infra/codegen/components/BasicInfoForm.vue b/src/views/infra/codegen/components/BasicInfoForm.vue index 2009553f..5ab820a2 100644 --- a/src/views/infra/codegen/components/BasicInfoForm.vue +++ b/src/views/infra/codegen/components/BasicInfoForm.vue @@ -6,7 +6,7 @@ import { useForm } from '@/hooks/web/useForm' import { FormSchema } from '@/types/form' import { CodegenTableVO } from '@/api/infra/codegen/types' import { getIntDictOptions } from '@/utils/dict' -import { listSimpleMenusApi } from '@/api/system/menu' +import { getSimpleMenusList } from '@/api/system/menu' import { handleTree, defaultProps } from '@/utils/tree' import { PropType } from 'vue' @@ -21,7 +21,7 @@ const templateTypeOptions = getIntDictOptions(DICT_TYPE.INFRA_CODEGEN_TEMPLATE_T const sceneOptions = getIntDictOptions(DICT_TYPE.INFRA_CODEGEN_SCENE) const menuOptions = ref([]) // 树形结构 const getTree = async () => { - const res = await listSimpleMenusApi() + const res = await getSimpleMenusList() menuOptions.value = handleTree(res) } diff --git a/src/views/mp/components/img.png b/src/views/mp/components/img.png new file mode 100644 index 00000000..c25a6e76 Binary files /dev/null and b/src/views/mp/components/img.png differ diff --git a/src/views/mp/components/wx-location/main.vue b/src/views/mp/components/wx-location/main.vue new file mode 100644 index 00000000..47eab571 --- /dev/null +++ b/src/views/mp/components/wx-location/main.vue @@ -0,0 +1,71 @@ + + + diff --git a/src/views/mp/components/wx-msg/card.scss b/src/views/mp/components/wx-msg/card.scss new file mode 100644 index 00000000..67ac9219 --- /dev/null +++ b/src/views/mp/components/wx-msg/card.scss @@ -0,0 +1,101 @@ +.avue-card{ + &__item{ + margin-bottom: 16px; + border: 1px solid #e8e8e8; + background-color: #fff; + box-sizing: border-box; + color: rgba(0,0,0,.65); + font-size: 14px; + font-variant: tabular-nums; + line-height: 1.5; + list-style: none; + font-feature-settings: "tnum"; + cursor: pointer; + height:200px; + &:hover{ + border-color: rgba(0,0,0,.09); + box-shadow: 0 2px 8px rgba(0,0,0,.09); + } + &--add{ + border:1px dashed #000; + width: 100%; + color: rgba(0,0,0,.45); + background-color: #fff; + border-color: #d9d9d9; + border-radius: 2px; + display: flex; + align-items: center; + justify-content: center; + font-size: 16px; + i{ + margin-right: 10px; + } + &:hover{ + color: #40a9ff; + background-color: #fff; + border-color: #40a9ff; + } + } + } + &__body{ + display: flex; + padding: 24px; + } + &__detail{ + flex:1 + } + &__avatar{ + width: 48px; + height: 48px; + border-radius: 48px; + overflow: hidden; + margin-right: 12px; + img{ + width: 100%; + height: 100%; + } + } + &__title{ + color: rgba(0,0,0,.85); + margin-bottom: 12px; + font-size: 16px; + &:hover{ + color:#1890ff; + } + } + &__info{ + color: rgba(0,0,0,.45); + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; + height: 64px; + } + &__menu{ + display: flex; + justify-content:space-around; + height: 50px; + background: #f7f9fa; + color: rgba(0,0,0,.45); + text-align: center; + line-height: 50px; + &:hover{ + color:#1890ff; + } + } +} + +/** joolun 额外加的 */ +.avue-comment__main { + flex: unset!important; + border-radius: 5px!important; + margin: 0 8px!important; +} +.avue-comment__header { + border-top-left-radius: 5px; + border-top-right-radius: 5px; +} +.avue-comment__body { + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; +} diff --git a/src/views/mp/components/wx-msg/comment.scss b/src/views/mp/components/wx-msg/comment.scss new file mode 100644 index 00000000..3f1341b2 --- /dev/null +++ b/src/views/mp/components/wx-msg/comment.scss @@ -0,0 +1,88 @@ +/* 来自 https://github.com/nmxiaowei/avue/blob/master/styles/src/element-ui/comment.scss */ +.avue-comment{ + margin-bottom: 30px; + display: flex; + align-items: flex-start; + &--reverse{ + flex-direction:row-reverse; + .avue-comment__main{ + &:before,&:after{ + left: auto; + right: -8px; + border-width: 8px 0 8px 8px; + } + &:before{ + border-left-color: #dedede; + } + &:after{ + border-left-color: #f8f8f8; + margin-right: 1px; + margin-left: auto; + } + } + } + &__avatar{ + width: 48px; + height: 48px; + border-radius: 50%; + border: 1px solid transparent; + box-sizing: border-box; + vertical-align: middle; + } + &__header{ + padding: 5px 15px; + background: #f8f8f8; + border-bottom: 1px solid #eee; + display: flex; + align-items: center; + justify-content: space-between; + } + &__author{ + font-weight: 700; + font-size: 14px; + color: #999; + } + &__main{ + flex:1; + margin: 0 20px; + position: relative; + border: 1px solid #dedede; + border-radius: 2px; + &:before,&:after{ + position: absolute; + top: 10px; + left: -8px; + right: 100%; + width: 0; + height: 0; + display: block; + content: " "; + border-color: transparent; + border-style: solid solid outset; + border-width: 8px 8px 8px 0; + pointer-events: none; + } + &:before { + border-right-color: #dedede; + z-index: 1; + } + &:after{ + border-right-color: #f8f8f8; + margin-left: 1px; + z-index: 2; + } + } + &__body{ + padding: 15px; + overflow: hidden; + background: #fff; + font-family: Segoe UI,Lucida Grande,Helvetica,Arial,Microsoft YaHei,FreeSans,Arimo,Droid Sans,wenquanyi micro hei,Hiragino Sans GB,Hiragino Sans GB W3,FontAwesome,sans-serif;color: #333; + font-size: 14px; + } + blockquote{ + margin:0; + font-family: Georgia,Times New Roman,Times,Kai,Kaiti SC,KaiTi,BiauKai,FontAwesome,serif; + padding: 1px 0 1px 15px; + border-left: 4px solid #ddd; + } +} diff --git a/src/views/mp/components/wx-msg/main.vue b/src/views/mp/components/wx-msg/main.vue new file mode 100644 index 00000000..b514a73e --- /dev/null +++ b/src/views/mp/components/wx-msg/main.vue @@ -0,0 +1,338 @@ + + + + + diff --git a/src/views/mp/components/wx-music/main.vue b/src/views/mp/components/wx-music/main.vue new file mode 100644 index 00000000..52555f15 --- /dev/null +++ b/src/views/mp/components/wx-music/main.vue @@ -0,0 +1,60 @@ + + + + + + diff --git a/src/views/mp/components/wx-news/main.vue b/src/views/mp/components/wx-news/main.vue new file mode 100644 index 00000000..d08e2813 --- /dev/null +++ b/src/views/mp/components/wx-news/main.vue @@ -0,0 +1,107 @@ + + + + + + diff --git a/src/views/mp/components/wx-reply/main.vue b/src/views/mp/components/wx-reply/main.vue new file mode 100644 index 00000000..57a3cd84 --- /dev/null +++ b/src/views/mp/components/wx-reply/main.vue @@ -0,0 +1,634 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/mp/components/wx-video-play/main.vue b/src/views/mp/components/wx-video-play/main.vue new file mode 100644 index 00000000..880d10f8 --- /dev/null +++ b/src/views/mp/components/wx-video-play/main.vue @@ -0,0 +1,117 @@ + + + + diff --git a/src/views/mp/components/wx-voice-play/main.vue b/src/views/mp/components/wx-voice-play/main.vue new file mode 100644 index 00000000..3260fc05 --- /dev/null +++ b/src/views/mp/components/wx-voice-play/main.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/src/views/mp/freePublish/index.vue b/src/views/mp/freePublish/index.vue index 497f72ec..6ef4a303 100644 --- a/src/views/mp/freePublish/index.vue +++ b/src/views/mp/freePublish/index.vue @@ -1,3 +1,392 @@ + + + diff --git a/src/views/mp/message/index.vue b/src/views/mp/message/index.vue index 497f72ec..10145221 100644 --- a/src/views/mp/message/index.vue +++ b/src/views/mp/message/index.vue @@ -1,3 +1,261 @@ + diff --git a/src/views/system/dept/DeptForm.vue b/src/views/system/dept/DeptForm.vue index 188ecb79..f2c3bc02 100644 --- a/src/views/system/dept/DeptForm.vue +++ b/src/views/system/dept/DeptForm.vue @@ -166,7 +166,7 @@ const resetForm = () => { /** 获得部门树 */ const getTree = async () => { deptTree.value = [] - const data = await DeptApi.listSimpleDeptApi() + const data = await DeptApi.getSimpleDeptList() let dept: Tree = { id: 0, name: '顶级部门', children: [] } dept.children = handleTree(data) deptTree.value.push(dept) diff --git a/src/views/system/menu/MenuForm.vue b/src/views/system/menu/MenuForm.vue new file mode 100644 index 00000000..45bcedfb --- /dev/null +++ b/src/views/system/menu/MenuForm.vue @@ -0,0 +1,253 @@ + + diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 0604aa93..3baf3148 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -1,351 +1,183 @@ diff --git a/src/views/system/menu/menu.data.ts b/src/views/system/menu/menu.data.ts deleted file mode 100644 index 753c1211..00000000 --- a/src/views/system/menu/menu.data.ts +++ /dev/null @@ -1,76 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -const { t } = useI18n() // 国际化 - -// 新增和修改的表单校验 -export const rules = reactive({ - name: [required], - sort: [required], - path: [required], - status: [required] -}) - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: null, - action: true, - columns: [ - { - title: '上级菜单', - field: 'parentId', - isTable: false - }, - { - title: '菜单名称', - field: 'name', - isSearch: true, - table: { - treeNode: true, - align: 'left', - width: '200px', - slots: { - default: 'name_default' - } - } - }, - { - title: '菜单类型', - field: 'type', - dictType: DICT_TYPE.SYSTEM_MENU_TYPE - }, - { - title: '路由地址', - field: 'path' - }, - { - title: '组件路径', - field: 'component' - }, - { - title: '组件名字', - field: 'componentName' - }, - { - title: '权限标识', - field: 'permission' - }, - { - title: '排序', - field: 'sort' - }, - { - title: t('common.status'), - field: 'status', - dictType: DICT_TYPE.COMMON_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - isTable: false - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/system/oauth2/client/client.data.ts b/src/views/system/oauth2/client/client.data.ts deleted file mode 100644 index 52ee8895..00000000 --- a/src/views/system/oauth2/client/client.data.ts +++ /dev/null @@ -1,197 +0,0 @@ -import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -const { t } = useI18n() // 国际化 - -const authorizedGrantOptions = getStrDictOptions(DICT_TYPE.SYSTEM_OAUTH2_GRANT_TYPE) - -// 表单校验 -export const rules = reactive({ - clientId: [required], - secret: [required], - name: [required], - status: [required], - accessTokenValiditySeconds: [required], - refreshTokenValiditySeconds: [required], - redirectUris: [required], - authorizedGrantTypes: [required] -}) - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'clientId', - primaryType: null, - action: true, - columns: [ - { - title: '客户端端号', - field: 'clientId' - }, - { - title: '客户端密钥', - field: 'secret' - }, - { - title: '应用名', - field: 'name', - isSearch: true - }, - { - title: '应用图标', - field: 'logo', - table: { - cellRender: { - name: 'XImg' - } - }, - form: { - component: 'UploadImg' - } - }, - { - title: t('common.status'), - field: 'status', - dictType: DICT_TYPE.COMMON_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: '访问令牌的有效期', - field: 'accessTokenValiditySeconds', - form: { - component: 'InputNumber' - }, - table: { - slots: { - default: 'accessTokenValiditySeconds_default' - } - } - }, - { - title: '刷新令牌的有效期', - field: 'refreshTokenValiditySeconds', - form: { - component: 'InputNumber' - }, - table: { - slots: { - default: 'refreshTokenValiditySeconds_default' - } - } - }, - { - title: '授权类型', - field: 'authorizedGrantTypes', - table: { - width: 400, - slots: { - default: 'authorizedGrantTypes_default' - } - }, - form: { - component: 'Select', - componentProps: { - options: authorizedGrantOptions, - multiple: true, - filterable: true - } - } - }, - { - title: '授权范围', - field: 'scopes', - isTable: false, - form: { - component: 'Select', - componentProps: { - options: [], - multiple: true, - filterable: true, - allowCreate: true, - defaultFirstOption: true - } - } - }, - { - title: '自动授权范围', - field: 'autoApproveScopes', - isTable: false, - form: { - component: 'Select', - componentProps: { - options: [], - multiple: true, - filterable: true, - allowCreate: true, - defaultFirstOption: true - } - } - }, - { - title: '可重定向的 URI 地址', - field: 'redirectUris', - isTable: false, - form: { - component: 'Select', - componentProps: { - options: [], - multiple: true, - filterable: true, - allowCreate: true, - defaultFirstOption: true - } - } - }, - { - title: '权限', - field: 'authorities', - isTable: false, - form: { - component: 'Select', - componentProps: { - options: [], - multiple: true, - filterable: true, - allowCreate: true, - defaultFirstOption: true - } - } - }, - { - title: '资源', - field: 'resourceIds', - isTable: false, - form: { - component: 'Select', - componentProps: { - options: [], - multiple: true, - filterable: true, - allowCreate: true, - defaultFirstOption: true - } - } - }, - { - title: '附加信息', - field: 'additionalInformation', - isTable: false, - form: { - component: 'Input', - componentProps: { - type: 'textarea', - rows: 4 - }, - colProps: { - span: 24 - } - } - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - isForm: false - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/system/oauth2/client/form.vue b/src/views/system/oauth2/client/form.vue new file mode 100644 index 00000000..0822e59f --- /dev/null +++ b/src/views/system/oauth2/client/form.vue @@ -0,0 +1,259 @@ + + diff --git a/src/views/system/oauth2/client/index.vue b/src/views/system/oauth2/client/index.vue index 9ff44692..c88af726 100644 --- a/src/views/system/oauth2/client/index.vue +++ b/src/views/system/oauth2/client/index.vue @@ -133,7 +133,6 @@ import type { FormExpose } from '@/components/Form' // 业务相关的 import import * as ClientApi from '@/api/system/oauth2/client' -import { rules, allSchemas } from './client.data' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 diff --git a/src/views/system/role/MenuPermissionForm.vue b/src/views/system/role/MenuPermissionForm.vue new file mode 100644 index 00000000..4628ef24 --- /dev/null +++ b/src/views/system/role/MenuPermissionForm.vue @@ -0,0 +1,202 @@ + + + + diff --git a/src/views/system/role/RoleForm.vue b/src/views/system/role/RoleForm.vue new file mode 100644 index 00000000..0fdb130b --- /dev/null +++ b/src/views/system/role/RoleForm.vue @@ -0,0 +1,148 @@ + + + diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index da4b8389..12ef7845 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -1,331 +1,249 @@ - - diff --git a/src/views/system/role/role.data.ts b/src/views/system/role/role.data.ts deleted file mode 100644 index d55b5e21..00000000 --- a/src/views/system/role/role.data.ts +++ /dev/null @@ -1,82 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -// 国际化 -const { t } = useI18n() -// 表单校验 -export const rules = reactive({ - name: [required], - code: [required], - sort: [required] -}) -// CrudSchema -const crudSchemas = reactive({ - // primaryKey: 'id', - // primaryTitle: '角色编号', - // primaryType: 'seq', - action: true, - actionWidth: '400px', - columns: [ - { - title: '角色编号', - field: 'id', - table: { - width: 200 - } - }, - { - title: '角色名称', - field: 'name', - isSearch: true - }, - { - title: '角色类型', - field: 'type', - dictType: DICT_TYPE.SYSTEM_ROLE_TYPE, - dictClass: 'number', - isForm: false - }, - { - title: '角色标识', - field: 'code', - isSearch: true - }, - { - title: '显示顺序', - field: 'sort' - }, - { - title: t('form.remark'), - field: 'remark', - isTable: false, - form: { - component: 'Input', - componentProps: { - type: 'textarea', - rows: 4 - }, - colProps: { - span: 24 - } - } - }, - { - title: t('common.status'), - field: 'status', - dictType: DICT_TYPE.COMMON_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - isForm: false, - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/system/sensitiveWord/form.vue b/src/views/system/sensitiveWord/SensitiveWordForm.vue similarity index 87% rename from src/views/system/sensitiveWord/form.vue rename to src/views/system/sensitiveWord/SensitiveWordForm.vue index 0736542e..c069756b 100644 --- a/src/views/system/sensitiveWord/form.vue +++ b/src/views/system/sensitiveWord/SensitiveWordForm.vue @@ -33,7 +33,7 @@ placeholder="请选择文章标签" style="width: 380px" > - + @@ -47,7 +47,6 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import * as SensitiveWordApi from '@/api/system/sensitiveWord' import { CommonStatusEnum } from '@/utils/constants' - const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -67,10 +66,10 @@ const formRules = reactive({ tags: [{ required: true, message: '标签不能为空', trigger: 'blur' }] }) const formRef = ref() // 表单 Ref -const tags = ref([]) // todo @blue-syd:在 openModal 里加载下 +const tagList = ref([]) // 标签数组 /** 打开弹窗 */ -const openModal = async (type: string, id?: number) => { +const open = async (type: string, id?: number) => { modelVisible.value = true modelTitle.value = t('action.' + type) formType.value = type @@ -80,13 +79,14 @@ const openModal = async (type: string, id?: number) => { formLoading.value = true try { formData.value = await SensitiveWordApi.getSensitiveWord(id) - console.log(formData.value) } finally { formLoading.value = false } } + // 获得 Tag 标签列表 + tagList.value = await SensitiveWordApi.getSensitiveWordTagList() } -defineExpose({ openModal }) // 提供 openModal 方法,用于打开弹窗 +defineExpose({ open }) // 提供 open 方法,用于打开弹窗 /** 提交表单 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 @@ -100,10 +100,10 @@ const submitForm = async () => { try { const data = formData.value as unknown as SensitiveWordApi.SensitiveWordVO if (formType.value === 'create') { - await SensitiveWordApi.createSensitiveWord(data) // TODO @blue-syd:去掉 API 后缀 + await SensitiveWordApi.createSensitiveWord(data) message.success(t('common.createSuccess')) } else { - await SensitiveWordApi.updateSensitiveWord(data) // TODO @blue-syd:去掉 API 后缀 + await SensitiveWordApi.updateSensitiveWord(data) message.success(t('common.updateSuccess')) } modelVisible.value = false diff --git a/src/views/system/sensitiveWord/SensitiveWordTestForm.vue b/src/views/system/sensitiveWord/SensitiveWordTestForm.vue new file mode 100644 index 00000000..881309c8 --- /dev/null +++ b/src/views/system/sensitiveWord/SensitiveWordTestForm.vue @@ -0,0 +1,90 @@ + + diff --git a/src/views/system/sensitiveWord/index.vue b/src/views/system/sensitiveWord/index.vue index 17da6ca3..cf1fdb82 100644 --- a/src/views/system/sensitiveWord/index.vue +++ b/src/views/system/sensitiveWord/index.vue @@ -1,13 +1,20 @@ diff --git a/src/views/system/tenantPackage/index.vue b/src/views/system/tenantPackage/index.vue index c8f5756a..07ea39c6 100644 --- a/src/views/system/tenantPackage/index.vue +++ b/src/views/system/tenantPackage/index.vue @@ -71,7 +71,7 @@ import type { ElTree } from 'element-plus' // 业务相关的 import import { rules, allSchemas } from './tenantPackage.data' import * as TenantPackageApi from '@/api/system/tenantPackage' -import { listSimpleMenusApi } from '@/api/system/menu' +import { getSimpleMenusList } from '@/api/system/menu' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -102,7 +102,7 @@ const validateCategory = (rule: any, value: any, callback: any) => { rules.menuIds = [{ required: true, validator: validateCategory, trigger: 'blur' }] const getTree = async () => { - const res = await listSimpleMenusApi() + const res = await getSimpleMenusList() menuOptions.value = handleTree(res) } diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 9bb50930..542ae2f0 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -271,8 +271,8 @@ import { getAccessToken, getTenantId } from '@/utils/auth' import type { FormExpose } from '@/components/Form' import { rules, allSchemas } from './user.data' import * as UserApi from '@/api/system/user' -import { listSimpleDeptApi } from '@/api/system/dept' -import { listSimpleRolesApi } from '@/api/system/role' +import { getSimpleDeptList } from '@/api/system/dept' +import { getSimpleRoleList } from '@/api/system/role' import { getSimplePostList, PostVO } from '@/api/system/post' import { aassignUserRoleApi, @@ -301,7 +301,7 @@ const filterText = ref('') const deptOptions = ref([]) // 树形结构 const treeRef = ref>() const getTree = async () => { - const res = await listSimpleDeptApi() + const res = await getSimpleDeptList() deptOptions.value.push(...handleTree(res)) } const filterNode = (value: string, data: Tree) => { @@ -477,7 +477,7 @@ const handleRole = async (row: UserApi.UserVO) => { const roles = await listUserRolesApi(row.id) userRole.roleIds = roles // 获取角色列表 - const roleOpt = await listSimpleRolesApi() + const roleOpt = await getSimpleRoleList() roleOptions.value = roleOpt roleDialogVisible.value = true }