diff --git a/package.json b/package.json index 6e2bcd9..7d4b418 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package", "name": "ruoyi-vue-plus", - "version": "5.4.1-2.4.1", + "version": "5.5.0-2.5.0", "description": "RuoYi-Vue-Plus多租户管理系统", "author": "LionLi", "license": "MIT", diff --git a/src/api/system/dept/index.ts b/src/api/system/dept/index.ts index 6177506..03c54d5 100644 --- a/src/api/system/dept/index.ts +++ b/src/api/system/dept/index.ts @@ -38,14 +38,6 @@ export const getDept = (deptId: string | number): AxiosPromise => { }); }; -// 查询部门下拉树结构 -export const treeselect = (): AxiosPromise => { - return request({ - url: '/system/dept/treeselect', - method: 'get' - }); -}; - // 新增部门 export const addDept = (data: DeptForm) => { return request({ diff --git a/src/api/system/post/index.ts b/src/api/system/post/index.ts index 5f6ab18..aba1ec1 100644 --- a/src/api/system/post/index.ts +++ b/src/api/system/post/index.ts @@ -1,6 +1,7 @@ import request from '@/utils/request'; import { PostForm, PostQuery, PostVO } from './types'; import { AxiosPromise } from 'axios'; +import { DeptTreeVO } from '../dept/types'; // 查询岗位列表 export function listPost(query: PostQuery): AxiosPromise { @@ -56,3 +57,13 @@ export function delPost(postId: string | number | (string | number)[]) { method: 'delete' }); } + +/** + * 查询部门下拉树结构 + */ +export const deptTreeSelect = (): AxiosPromise => { + return request({ + url: '/system/post/deptTree', + method: 'get' + }); +}; diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index a61ad14..caffecc 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -1,4 +1,4 @@ -import { DeptTreeVO, DeptVO } from './../dept/types'; +import { DeptTreeVO } from './../dept/types'; import { RoleVO } from '@/api/system/role/types'; import request from '@/utils/request'; import { AxiosPromise } from 'axios'; diff --git a/src/api/system/user/types.ts b/src/api/system/user/types.ts index 304e3bc..8b6924e 100644 --- a/src/api/system/user/types.ts +++ b/src/api/system/user/types.ts @@ -20,7 +20,7 @@ export interface UserQuery extends PageQuery { status?: string; deptId?: string | number; roleId?: string | number; - userIds?: string; + userIds?: string | number | (string | number)[] | undefined; } /** diff --git a/src/api/workflow/definition/types.ts b/src/api/workflow/definition/types.ts index 5de7f77..93d081e 100644 --- a/src/api/workflow/definition/types.ts +++ b/src/api/workflow/definition/types.ts @@ -22,7 +22,10 @@ export interface FlowDefinitionForm { flowName: string; flowCode: string; category: string; + ext: string; formPath: string; + formCustom: string; + modelValue: string; } export interface definitionXmlVO { diff --git a/src/api/workflow/instance/index.ts b/src/api/workflow/instance/index.ts index fde16a2..ad136f0 100644 --- a/src/api/workflow/instance/index.ts +++ b/src/api/workflow/instance/index.ts @@ -87,6 +87,18 @@ export const deleteByInstanceIds = (instanceIds: Array | string method: 'delete' }); }; + +/** + * 删除历史流程实例 + * @param instanceIds + */ +export const deleteHisByInstanceIds = (instanceIds: Array | string | number) => { + return request({ + url: `/workflow/instance/deleteHisByInstanceIds/${instanceIds}`, + method: 'delete' + }); +}; + /** * 作废流程 * @param data 参数 @@ -99,3 +111,15 @@ export const invalid = (data: any) => { data: data }); }; +/** + * 修改流程变量 + * @param data 参数 + * @returns + */ +export const updateVariable = (data: any) => { + return request({ + url: `/workflow/instance/updateVariable`, + method: 'put', + data: data + }); +}; diff --git a/src/api/workflow/instance/types.ts b/src/api/workflow/instance/types.ts index a12dab3..7cb7f97 100644 --- a/src/api/workflow/instance/types.ts +++ b/src/api/workflow/instance/types.ts @@ -23,4 +23,6 @@ export interface FlowInstanceVO extends BaseEntity { flowStatus: string; flowStatusName: string; flowTaskList: FlowTaskVO[]; + businessCode: string; + businessTitle: string; } diff --git a/src/api/workflow/leave/index.ts b/src/api/workflow/leave/index.ts index 4e6f363..5a88edb 100644 --- a/src/api/workflow/leave/index.ts +++ b/src/api/workflow/leave/index.ts @@ -39,6 +39,18 @@ export const addLeave = (data: LeaveForm): AxiosPromise => { }); }; +/** + * 提交请假并发起流程 + * @param data + */ +export const submitAndFlowStart = (data: LeaveForm): AxiosPromise => { + return request({ + url: '/workflow/leave/submitAndFlowStart', + method: 'post', + data: data + }); +}; + /** * 修改请假 * @param data diff --git a/src/api/workflow/leave/types.ts b/src/api/workflow/leave/types.ts index a44d35d..c8e58a7 100644 --- a/src/api/workflow/leave/types.ts +++ b/src/api/workflow/leave/types.ts @@ -1,5 +1,6 @@ export interface LeaveVO { id: string | number; + applyCode?: string; leaveType: string; startDate: string; endDate: string; @@ -10,6 +11,7 @@ export interface LeaveVO { export interface LeaveForm extends BaseEntity { id?: string | number; + applyCode?: string; leaveType?: string; startDate?: string; endDate?: string; diff --git a/src/api/workflow/spel/index.ts b/src/api/workflow/spel/index.ts new file mode 100644 index 0000000..0cc8746 --- /dev/null +++ b/src/api/workflow/spel/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { SpelVO, SpelForm, SpelQuery } from '@/api/workflow/spel/types'; + +/** + * 查询流程spel表达式定义列表 + * @param query + * @returns {*} + */ + +export const listSpel = (query?: SpelQuery): AxiosPromise => { + return request({ + url: '/workflow/spel/list', + method: 'get', + params: query + }); +}; + +/** + * 查询流程spel表达式定义详细 + * @param id + */ +export const getSpel = (id: string | number): AxiosPromise => { + return request({ + url: '/workflow/spel/' + id, + method: 'get' + }); +}; + +/** + * 新增流程spel表达式定义 + * @param data + */ +export const addSpel = (data: SpelForm) => { + return request({ + url: '/workflow/spel', + method: 'post', + data: data + }); +}; + +/** + * 修改流程spel表达式定义 + * @param data + */ +export const updateSpel = (data: SpelForm) => { + return request({ + url: '/workflow/spel', + method: 'put', + data: data + }); +}; + +/** + * 删除流程spel表达式定义 + * @param id + */ +export const delSpel = (id: string | number | Array) => { + return request({ + url: '/workflow/spel/' + id, + method: 'delete' + }); +}; diff --git a/src/api/workflow/spel/types.ts b/src/api/workflow/spel/types.ts new file mode 100644 index 0000000..e0a694c --- /dev/null +++ b/src/api/workflow/spel/types.ts @@ -0,0 +1,111 @@ +export interface SpelVO { + /** + * 主键id + */ + id: string | number; + + /** + * 组件名称 + */ + componentName: string; + + /** + * 方法名 + */ + methodName: string; + + /** + * 参数 + */ + methodParams: string; + + /** + * 预览spel值 + */ + viewSpel: string; + + /** + * 状态(0正常 1停用) + */ + status: string; + + /** + * 备注 + */ + remark?: string; + +} + +export interface SpelForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 组件名称 + */ + componentName?: string; + + /** + * 方法名 + */ + methodName?: string; + + /** + * 参数 + */ + methodParams?: string; + + /** + * 预览spel值 + */ + viewSpel?: string; + + /** + * 状态(0正常 1停用) + */ + status?: string; + + /** + * 备注 + */ + remark?: string; + +} + +export interface SpelQuery extends PageQuery { + + /** + * 组件名称 + */ + componentName?: string; + + /** + * 方法名 + */ + methodName?: string; + + /** + * 参数 + */ + methodParams?: string; + + /** + * 预览spel值 + */ + viewSpel?: string; + + /** + * 状态(0正常 1停用) + */ + status?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/workflow/task/index.ts b/src/api/workflow/task/index.ts index 6d515ec..dc52f62 100644 --- a/src/api/workflow/task/index.ts +++ b/src/api/workflow/task/index.ts @@ -148,9 +148,9 @@ export const terminationTask = (data: any) => { * 获取可驳回得任务节点 * @returns */ -export const getBackTaskNode = (definitionId: string, nodeCode: string) => { +export const getBackTaskNode = (taskId: string | number, nodeCode: string) => { return request({ - url: `/workflow/task/getBackTaskNode/${definitionId}/${nodeCode}`, + url: `/workflow/task/getBackTaskNode/${taskId}/${nodeCode}`, method: 'get' }); }; @@ -191,3 +191,16 @@ export const getNextNodeList = (data: any): any => { data: data }); }; + +/** + * 催办任务 + * @param data参数 + * @returns + */ +export const urgeTask = (data: any): any => { + return request({ + url: '/workflow/task/urgeTask', + method: 'post', + data: data + }); +}; diff --git a/src/api/workflow/task/types.ts b/src/api/workflow/task/types.ts index 8698eff..e3c9abf 100644 --- a/src/api/workflow/task/types.ts +++ b/src/api/workflow/task/types.ts @@ -30,16 +30,20 @@ export interface FlowTaskVO { nodeRatio: string | number; version?: string; applyNode?: boolean; - buttonList?: buttonList[]; + buttonList?: ButtonList[]; + copyList?: FlowCopyVo[]; + varList?: Map; + businessCode: string; + businessTitle: string; } -export interface buttonList { +export interface ButtonList { code: string; show: boolean; } -export interface VariableVo { - key: string; - value: string; +export interface FlowCopyVo { + userId: string | number; + userName: string; } export interface TaskOperationBo { diff --git a/src/api/workflow/workflowCommon/types.ts b/src/api/workflow/workflowCommon/types.ts index 3e7a71d..8ab5a67 100644 --- a/src/api/workflow/workflowCommon/types.ts +++ b/src/api/workflow/workflowCommon/types.ts @@ -10,4 +10,5 @@ export interface StartProcessBo { businessId: string | number; flowCode: string; variables: any; + flowInstanceBizExtBo: any; } diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index 7410b6f..6ffcd33 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -65,7 +65,7 @@ } .svg-icon { - margin-right: 16px; + margin-right: 10px; } .el-menu { @@ -88,12 +88,16 @@ // menu hover .theme-dark .sub-menu-title-noDropdown, .theme-dark .el-sub-menu__title { + border-radius: 8px; + margin: 1px 5px 1px 5px; &:hover { background-color: $base-sub-menu-title-hover !important; } } .sub-menu-title-noDropdown, .el-sub-menu__title { + border-radius: 8px; + margin: 1px 5px 1px 5px; &:hover { background-color: rgba(0, 0, 0, 0.05) !important; } @@ -105,8 +109,11 @@ & .nest-menu .el-sub-menu > .el-sub-menu__title, & .el-sub-menu .el-menu-item { - min-width: $base-sidebar-width !important; - &:hover { + min-width: calc($base-sidebar-width - 20px) !important; + border-radius: 8px; + height: 45px; + margin: 1px 5px 1px 5px; + &:not(.is-active):hover { background-color: rgba(0, 0, 0, 0.1) !important; } } @@ -114,28 +121,54 @@ & .theme-dark .nest-menu .el-sub-menu > .el-sub-menu__title, & .theme-dark .el-sub-menu .el-menu-item { background-color: $base-sub-menu-background !important; + border-radius: 8px; + height: 45px; + margin: 1px 5px 1px 5px; - &:hover { + &.is-active { + background-color: var(--el-menu-active-color) !important; + color: #fff; + } + &:not(.is-active):hover { + // you can use $sub-menuHover background-color: $base-sub-menu-hover !important; } } & .theme-dark .nest-menu .el-sub-menu > .el-sub-menu__title, & .theme-dark .el-menu-item { - &:hover { + border-radius: 8px; + height: 45px; + margin: 1px 5px 1px 5px; + + &.is-active { + background-color: var(--el-menu-active-color) !important; + color: #fff; + } + &:not(.is-active):hover { // you can use $sub-menuHover background-color: $base-menu-hover !important; } } + & .nest-menu .el-sub-menu > .el-sub-menu__title, & .el-menu-item { - &:hover { + border-radius: 8px; + height: 45px; + margin: 1px 5px 1px 5px; + + &.is-active { + background-color: var(--el-menu-active-color) !important; + color: #fff; + } + &:not(.is-active):hover { // you can use $sub-menuHover background-color: rgba(0, 0, 0, 0.04) !important; } } } + // 收起菜单后的样式 .hideSidebar { .sidebar-container { width: 54px !important; @@ -148,29 +181,48 @@ .sub-menu-title-noDropdown { padding: 0 !important; position: relative; + height: 45px; + // 选中状态的菜单 + &.is-active { + background-color: var(--el-menu-active-color) !important; + color: #fff !important; + } .el-tooltip { padding: 0 !important; - - .svg-icon { - margin-left: 20px; - } } } - .el-sub-menu { + + & .el-sub-menu { overflow: hidden; + border-radius: 8px; + .el-sub-menu__title.el-tooltip__trigger { + border-radius: 8px; + height: 45px; + } + + // 选中状态的菜单 + &.is-active .el-sub-menu__title.el-tooltip__trigger { + background-color: var(--el-menu-active-color) !important; + } + & > .el-sub-menu__title { padding: 0 !important; - - .svg-icon { - margin-left: 20px; - } } } .el-menu--collapse { + .is-active .svg-icon { + fill: #fff; + } + .svg-icon { + display: flex; + margin: auto; + height: 100%; + // 这里设置width会跟随sidebar-container的transition 不符合预期 + } .el-sub-menu { & > .el-sub-menu__title { & > span { @@ -232,3 +284,13 @@ } } } +// 收起菜单后悬浮的菜单样式 +.el-popper.is-pure{ + border-radius: 8px; + .el-menu--popup{ + border-radius: 8px; + } + .el-menu-item{ + border-radius: 4px; + } +} diff --git a/src/assets/styles/transition.scss b/src/assets/styles/transition.scss index 468ad3c..7a548ca 100644 --- a/src/assets/styles/transition.scss +++ b/src/assets/styles/transition.scss @@ -6,7 +6,7 @@ transition: opacity 0.28s; } -.fade-enter, +.fade-enter-from, .fade-leave-active { opacity: 0; } @@ -18,7 +18,7 @@ transition: all 0.5s; } -.fade-transform-enter { +.fade-transform-enter-from { opacity: 0; transform: translateX(-30px); } @@ -34,7 +34,7 @@ transition: all 0.5s; } -.breadcrumb-enter, +.breadcrumb-enter-from, .breadcrumb-leave-active { opacity: 0; transform: translateX(20px); diff --git a/src/assets/styles/variables.module.scss b/src/assets/styles/variables.module.scss index 3aa871b..8f9c4bd 100644 --- a/src/assets/styles/variables.module.scss +++ b/src/assets/styles/variables.module.scss @@ -1,6 +1,6 @@ // 全局SCSS变量 :root { - --menuBg: #304156; + --menuBg: #1f2d3d; --menuColor: #bfcbd9; --menuActiveText: #f4f4f5; --menuHover: #263445; @@ -10,6 +10,11 @@ --subMenuHover: #001528; --subMenuTitleHover: #293444; + // 菜单栏缩进 + --el-menu-base-level-padding: 12px; + --el-menu-level-padding: 8px; + --el-menu-item-height: 50px; + --fixedHeaderBg: #ffffff; --tableHeaderBg: #f8f8f9; --tableHeaderTextColor: #515a6e; diff --git a/src/components/Process/MessageType.vue b/src/components/Process/MessageType.vue new file mode 100644 index 0000000..4ef5fa9 --- /dev/null +++ b/src/components/Process/MessageType.vue @@ -0,0 +1,100 @@ + + diff --git a/src/components/Process/approvalButton.vue b/src/components/Process/approvalButton.vue index cb4fe8d..e53ad3b 100644 --- a/src/components/Process/approvalButton.vue +++ b/src/components/Process/approvalButton.vue @@ -1,8 +1,8 @@