commit
e354db74a7
@ -11,7 +11,7 @@ VITE_APP_CONTEXT_PATH = '/'
|
|||||||
VITE_APP_MONITRO_ADMIN = '/admin/applications'
|
VITE_APP_MONITRO_ADMIN = '/admin/applications'
|
||||||
|
|
||||||
# SnailJob 控制台地址
|
# SnailJob 控制台地址
|
||||||
VITE_APP_SNAILJOB_ADMIN = 'http://localhost:8800/snail-job'
|
VITE_APP_SNAILJOB_ADMIN = '/snail-job'
|
||||||
|
|
||||||
# 生产环境
|
# 生产环境
|
||||||
VITE_APP_BASE_API = '/prod-api'
|
VITE_APP_BASE_API = '/prod-api'
|
||||||
|
12
package.json
12
package.json
@ -20,15 +20,12 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@element-plus/icons-vue": "2.3.1",
|
"@element-plus/icons-vue": "2.3.1",
|
||||||
"@highlightjs/vue-plugin": "2.1.0",
|
"@highlightjs/vue-plugin": "2.1.0",
|
||||||
"@lezer/common": "1.2.1",
|
|
||||||
"@vueup/vue-quill": "1.2.0",
|
"@vueup/vue-quill": "1.2.0",
|
||||||
"@vueuse/core": "10.9.0",
|
"@vueuse/core": "10.9.0",
|
||||||
"animate.css": "4.1.1",
|
"animate.css": "4.1.1",
|
||||||
"await-to-js": "3.0.0",
|
"await-to-js": "3.0.0",
|
||||||
"axios": "1.6.8",
|
"axios": "1.6.8",
|
||||||
"bpmn-js": "16.4.0",
|
"bpmn-js": "16.4.0",
|
||||||
"camunda-bpmn-js-behaviors": "1.2.2",
|
|
||||||
"camunda-bpmn-moddle": "7.0.1",
|
|
||||||
"crypto-js": "4.2.0",
|
"crypto-js": "4.2.0",
|
||||||
"diagram-js": "12.3.0",
|
"diagram-js": "12.3.0",
|
||||||
"didi": "9.0.2",
|
"didi": "9.0.2",
|
||||||
@ -40,21 +37,15 @@
|
|||||||
"image-conversion": "^2.1.1",
|
"image-conversion": "^2.1.1",
|
||||||
"js-cookie": "3.0.5",
|
"js-cookie": "3.0.5",
|
||||||
"jsencrypt": "3.3.2",
|
"jsencrypt": "3.3.2",
|
||||||
"moddle": "6.2.3",
|
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"path-browserify": "1.0.1",
|
|
||||||
"path-to-regexp": "6.2.1",
|
|
||||||
"pinia": "2.1.7",
|
"pinia": "2.1.7",
|
||||||
"preact": "10.19.7",
|
|
||||||
"screenfull": "6.0.2",
|
"screenfull": "6.0.2",
|
||||||
"vform3-builds": "3.0.10",
|
|
||||||
"vue": "3.4.25",
|
"vue": "3.4.25",
|
||||||
"vue-cropper": "1.1.1",
|
"vue-cropper": "1.1.1",
|
||||||
"vue-i18n": "9.10.2",
|
"vue-i18n": "9.10.2",
|
||||||
"vue-router": "4.3.2",
|
"vue-router": "4.3.2",
|
||||||
"vue-types": "5.1.1",
|
"vue-types": "5.1.1",
|
||||||
"vxe-table": "4.5.22",
|
"vxe-table": "4.5.22"
|
||||||
"zeebe-bpmn-moddle": "1.0.0"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@iconify/json": "2.2.201",
|
"@iconify/json": "2.2.201",
|
||||||
@ -64,7 +55,6 @@
|
|||||||
"@types/js-cookie": "3.0.6",
|
"@types/js-cookie": "3.0.6",
|
||||||
"@types/node": "18.18.2",
|
"@types/node": "18.18.2",
|
||||||
"@types/nprogress": "0.2.3",
|
"@types/nprogress": "0.2.3",
|
||||||
"@types/path-browserify": "1.0.2",
|
|
||||||
"@typescript-eslint/eslint-plugin": "7.3.1",
|
"@typescript-eslint/eslint-plugin": "7.3.1",
|
||||||
"@typescript-eslint/parser": "7.3.1",
|
"@typescript-eslint/parser": "7.3.1",
|
||||||
"@unocss/preset-attributify": "0.58.6",
|
"@unocss/preset-attributify": "0.58.6",
|
||||||
|
@ -10,7 +10,7 @@ import { LeaveVO, LeaveQuery, LeaveForm } from '@/api/workflow/leave/types';
|
|||||||
|
|
||||||
export const listLeave = (query?: LeaveQuery): AxiosPromise<LeaveVO[]> => {
|
export const listLeave = (query?: LeaveQuery): AxiosPromise<LeaveVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/demo/leave/list',
|
url: '/workflow/leave/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@ -22,7 +22,7 @@ export const listLeave = (query?: LeaveQuery): AxiosPromise<LeaveVO[]> => {
|
|||||||
*/
|
*/
|
||||||
export const getLeave = (id: string | number): AxiosPromise<LeaveVO> => {
|
export const getLeave = (id: string | number): AxiosPromise<LeaveVO> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/demo/leave/' + id,
|
url: '/workflow/leave/' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -33,7 +33,7 @@ export const getLeave = (id: string | number): AxiosPromise<LeaveVO> => {
|
|||||||
*/
|
*/
|
||||||
export const addLeave = (data: LeaveForm): AxiosPromise<LeaveVO> => {
|
export const addLeave = (data: LeaveForm): AxiosPromise<LeaveVO> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/demo/leave',
|
url: '/workflow/leave',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -45,7 +45,7 @@ export const addLeave = (data: LeaveForm): AxiosPromise<LeaveVO> => {
|
|||||||
*/
|
*/
|
||||||
export const updateLeave = (data: LeaveForm): AxiosPromise<LeaveVO> => {
|
export const updateLeave = (data: LeaveForm): AxiosPromise<LeaveVO> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/demo/leave',
|
url: '/workflow/leave',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -57,7 +57,7 @@ export const updateLeave = (data: LeaveForm): AxiosPromise<LeaveVO> => {
|
|||||||
*/
|
*/
|
||||||
export const delLeave = (id: string | number | Array<string | number>) => {
|
export const delLeave = (id: string | number | Array<string | number>) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/demo/leave/' + id,
|
url: '/workflow/leave/' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -5,7 +5,7 @@ export interface LeaveVO {
|
|||||||
endDate: string;
|
endDate: string;
|
||||||
leaveDays: number;
|
leaveDays: number;
|
||||||
remark: string;
|
remark: string;
|
||||||
processInstanceVo: any;
|
status?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LeaveForm extends BaseEntity {
|
export interface LeaveForm extends BaseEntity {
|
||||||
@ -15,7 +15,7 @@ export interface LeaveForm extends BaseEntity {
|
|||||||
endDate?: string;
|
endDate?: string;
|
||||||
leaveDays?: number;
|
leaveDays?: number;
|
||||||
remark?: string;
|
remark?: string;
|
||||||
processInstanceVo?: any;
|
status?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LeaveQuery extends PageQuery {
|
export interface LeaveQuery extends PageQuery {
|
||||||
|
@ -29,33 +29,33 @@ export const getPageByFinish = (query: ProcessInstanceQuery): AxiosPromise<Proce
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过流程实例id获取历史流程图
|
* 通过业务id获取历史流程图
|
||||||
*/
|
*/
|
||||||
export const getHistoryImage = (processInstanceId: string) => {
|
export const getHistoryImage = (businessKey: string) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processInstance/getHistoryImage/${processInstanceId}` + '?t' + Math.random(),
|
url: `/workflow/processInstance/getHistoryImage/${businessKey}` + '?t' + Math.random(),
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过流程实例id获取历史流程图运行中,历史等节点
|
* 通过业务id获取历史流程图运行中,历史等节点
|
||||||
*/
|
*/
|
||||||
export const getHistoryList = (instanceId: string): AxiosPromise<Record<string, any>> => {
|
export const getHistoryList = (businessKey: string): AxiosPromise<Record<string, any>> => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processInstance/getHistoryList/${instanceId}` + '?t' + Math.random(),
|
url: `/workflow/processInstance/getHistoryList/${businessKey}` + '?t' + Math.random(),
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取审批记录
|
* 获取审批记录
|
||||||
* @param processInstanceId 流程实例id
|
* @param businessKey 业务id
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const getHistoryRecord = (processInstanceId: string) => {
|
export const getHistoryRecord = (businessKey: string) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processInstance/getHistoryRecord/${processInstanceId}`,
|
url: `/workflow/processInstance/getHistoryRecord/${businessKey}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -75,24 +75,24 @@ export const deleteRunInstance = (data: object) => {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 运行中的实例 删除程实例,删除历史记录,删除业务与流程关联信息
|
* 运行中的实例 删除程实例,删除历史记录,删除业务与流程关联信息
|
||||||
* @param processInstanceId 流程实例id
|
* @param businessKey 业务id
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const deleteRunAndHisInstance = (processInstanceId: string | string[]) => {
|
export const deleteRunAndHisInstance = (businessKey: string | string[]) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processInstance/deleteRunAndHisInstance/${processInstanceId}`,
|
url: `/workflow/processInstance/deleteRunAndHisInstance/${businessKey}`,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 已完成的实例 删除程实例,删除历史记录,删除业务与流程关联信息
|
* 已完成的实例 删除程实例,删除历史记录,删除业务与流程关联信息
|
||||||
* @param processInstanceId 流程实例id
|
* @param businessKey 业务id
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const deleteFinishAndHisInstance = (processInstanceId: string | string[]) => {
|
export const deleteFinishAndHisInstance = (businessKey: string | string[]) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processInstance/deleteFinishAndHisInstance/${processInstanceId}`,
|
url: `/workflow/processInstance/deleteFinishAndHisInstance/${businessKey}`,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -112,12 +112,12 @@ export const getPageByCurrent = (query: ProcessInstanceQuery): AxiosPromise<Proc
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 撤销流程
|
* 撤销流程
|
||||||
* @param processInstanceId 流程实例id
|
* @param businessKey 业务id
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const cancelProcessApply = (processInstanceId: string) => {
|
export const cancelProcessApply = (businessKey: string) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processInstance/cancelProcessApply/${processInstanceId}`,
|
url: `/workflow/processInstance/cancelProcessApply/${businessKey}`,
|
||||||
method: 'post'
|
method: 'post'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -1,29 +1,29 @@
|
|||||||
import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
|
import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
routerJump(routerJumpVo: RouterJumpVo,proxy){
|
routerJump(routerJumpVo: RouterJumpVo, proxy) {
|
||||||
if (routerJumpVo.wfNodeConfigVo && routerJumpVo.wfNodeConfigVo.formType === 'static' && routerJumpVo.wfNodeConfigVo.wfFormManageVo) {
|
if (routerJumpVo.wfNodeConfigVo && routerJumpVo.wfNodeConfigVo.formType === 'static' && routerJumpVo.wfNodeConfigVo.wfFormManageVo) {
|
||||||
proxy.$tab.closePage(proxy.$route);
|
proxy.$tab.closePage(proxy.$route);
|
||||||
proxy.$router.push({
|
proxy.$router.push({
|
||||||
path: `${routerJumpVo.wfNodeConfigVo.wfFormManageVo.router}`,
|
path: `${routerJumpVo.wfNodeConfigVo.wfFormManageVo.router}`,
|
||||||
query: {
|
query: {
|
||||||
id: routerJumpVo.businessKey,
|
id: routerJumpVo.businessKey,
|
||||||
type: routerJumpVo.type,
|
type: routerJumpVo.type,
|
||||||
taskId: routerJumpVo.taskId
|
taskId: routerJumpVo.taskId
|
||||||
}
|
|
||||||
});
|
|
||||||
} else if (routerJumpVo.wfNodeConfigVo && routerJumpVo.wfNodeConfigVo.formType === 'dynamic' && routerJumpVo.wfNodeConfigVo.wfFormManageVo) {
|
|
||||||
proxy.$tab.closePage(proxy.$route);
|
|
||||||
proxy.$router.push({
|
|
||||||
path: `${routerJumpVo.wfNodeConfigVo.wfFormManageVo.router}`,
|
|
||||||
query: {
|
|
||||||
id: routerJumpVo.businessKey,
|
|
||||||
type: routerJumpVo.type,
|
|
||||||
taskId: routerJumpVo.taskId
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}else {
|
|
||||||
proxy?.$modal.msgError('请到模型配置菜单!');
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
} else if (routerJumpVo.wfNodeConfigVo && routerJumpVo.wfNodeConfigVo.formType === 'dynamic' && routerJumpVo.wfNodeConfigVo.wfFormManageVo) {
|
||||||
|
proxy.$tab.closePage(proxy.$route);
|
||||||
|
proxy.$router.push({
|
||||||
|
path: `${routerJumpVo.wfNodeConfigVo.wfFormManageVo.router}`,
|
||||||
|
query: {
|
||||||
|
id: routerJumpVo.businessKey,
|
||||||
|
type: routerJumpVo.type,
|
||||||
|
taskId: routerJumpVo.taskId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
proxy?.$modal.msgError('请到模型配置菜单!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import showConfig from '../assets/showConfig';
|
import showConfig from '../assets/showConfig';
|
||||||
import { ModdleElement } from 'bpmn';
|
import type { ModdleElement } from 'bpmn';
|
||||||
import useModelerStore from '@/store/modules/modeler';
|
import useModelerStore from '@/store/modules/modeler';
|
||||||
import { MultiInstanceTypeEnum } from '@/enums/bpmn/IndexEnums';
|
import { MultiInstanceTypeEnum } from '@/enums/bpmn/IndexEnums';
|
||||||
interface Options {
|
interface Options {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ModdleElement } from 'bpmn';
|
import type { ModdleElement } from 'bpmn';
|
||||||
|
|
||||||
interface Options {
|
interface Options {
|
||||||
element: ModdleElement;
|
element: ModdleElement;
|
||||||
|
@ -90,7 +90,7 @@ import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css';
|
|||||||
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css';
|
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css';
|
||||||
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css';
|
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css';
|
||||||
import './assets/style/index.scss';
|
import './assets/style/index.scss';
|
||||||
import { Canvas, Modeler } from 'bpmn';
|
import type { Canvas, Modeler } from 'bpmn';
|
||||||
import PropertyPanel from './panel/index.vue';
|
import PropertyPanel from './panel/index.vue';
|
||||||
import BpmnModeler from 'bpmn-js/lib/Modeler.js';
|
import BpmnModeler from 'bpmn-js/lib/Modeler.js';
|
||||||
import defaultXML from './assets/defaultXML';
|
import defaultXML from './assets/defaultXML';
|
||||||
|
@ -41,8 +41,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import useParseElement from '../hooks/useParseElement';
|
import useParseElement from '../hooks/useParseElement';
|
||||||
import usePanel from '../hooks/usePanel';
|
import usePanel from '../hooks/usePanel';
|
||||||
import { Modeler, ModdleElement } from 'bpmn';
|
import type { Modeler, ModdleElement } from 'bpmn';
|
||||||
import { GatewayPanel } from 'bpmnDesign';
|
import type { GatewayPanel } from 'bpmnDesign';
|
||||||
import ExecutionListener from './property/ExecutionListener.vue';
|
import ExecutionListener from './property/ExecutionListener.vue';
|
||||||
|
|
||||||
interface PropType {
|
interface PropType {
|
||||||
|
@ -42,8 +42,8 @@
|
|||||||
import useParseElement from '../hooks/useParseElement';
|
import useParseElement from '../hooks/useParseElement';
|
||||||
import usePanel from '../hooks/usePanel';
|
import usePanel from '../hooks/usePanel';
|
||||||
import ExecutionListener from './property/ExecutionListener.vue';
|
import ExecutionListener from './property/ExecutionListener.vue';
|
||||||
import { ModdleElement } from 'bpmn';
|
import type { ModdleElement } from 'bpmn';
|
||||||
import { ParticipantPanel } from 'bpmnDesign';
|
import type { ParticipantPanel } from 'bpmnDesign';
|
||||||
|
|
||||||
interface PropType {
|
interface PropType {
|
||||||
element: ModdleElement;
|
element: ModdleElement;
|
||||||
|
@ -43,8 +43,8 @@
|
|||||||
import ExecutionListener from './property/ExecutionListener.vue';
|
import ExecutionListener from './property/ExecutionListener.vue';
|
||||||
import useParseElement from '../hooks/useParseElement';
|
import useParseElement from '../hooks/useParseElement';
|
||||||
import usePanel from '../hooks/usePanel';
|
import usePanel from '../hooks/usePanel';
|
||||||
import { Modeler, ModdleElement } from 'bpmn';
|
import type { Modeler, ModdleElement } from 'bpmn';
|
||||||
import { ProcessPanel } from 'bpmnDesign';
|
import type { ProcessPanel } from 'bpmnDesign';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
|
@ -49,8 +49,8 @@ import useParseElement from '../hooks/useParseElement';
|
|||||||
import useModelerStore from '@/store/modules/modeler';
|
import useModelerStore from '@/store/modules/modeler';
|
||||||
import usePanel from '../hooks/usePanel';
|
import usePanel from '../hooks/usePanel';
|
||||||
import ExecutionListener from './property/ExecutionListener.vue';
|
import ExecutionListener from './property/ExecutionListener.vue';
|
||||||
import { Modeler, ModdleElement } from 'bpmn';
|
import type { Modeler, ModdleElement } from 'bpmn';
|
||||||
import { SequenceFlowPanel } from 'bpmnDesign';
|
import type { SequenceFlowPanel } from 'bpmnDesign';
|
||||||
|
|
||||||
interface PropType {
|
interface PropType {
|
||||||
element: ModdleElement;
|
element: ModdleElement;
|
||||||
|
@ -42,8 +42,8 @@
|
|||||||
import ExecutionListener from './property/ExecutionListener.vue';
|
import ExecutionListener from './property/ExecutionListener.vue';
|
||||||
import useParseElement from '../hooks/useParseElement';
|
import useParseElement from '../hooks/useParseElement';
|
||||||
import usePanel from '../hooks/usePanel';
|
import usePanel from '../hooks/usePanel';
|
||||||
import { Modeler, ModdleElement } from 'bpmn';
|
import type { Modeler, ModdleElement } from 'bpmn';
|
||||||
import { StartEndPanel } from 'bpmnDesign';
|
import type { StartEndPanel } from 'bpmnDesign';
|
||||||
|
|
||||||
interface PropType {
|
interface PropType {
|
||||||
element: ModdleElement;
|
element: ModdleElement;
|
||||||
|
@ -111,8 +111,8 @@
|
|||||||
import ExecutionListener from './property/ExecutionListener.vue';
|
import ExecutionListener from './property/ExecutionListener.vue';
|
||||||
import useParseElement from '../hooks/useParseElement';
|
import useParseElement from '../hooks/useParseElement';
|
||||||
import usePanel from '../hooks/usePanel';
|
import usePanel from '../hooks/usePanel';
|
||||||
import { ModdleElement } from 'bpmn';
|
import type { ModdleElement } from 'bpmn';
|
||||||
import { SubProcessPanel } from 'bpmnDesign';
|
import type { SubProcessPanel } from 'bpmnDesign';
|
||||||
import { MultiInstanceTypeEnum } from '@/enums/bpmn/IndexEnums';
|
import { MultiInstanceTypeEnum } from '@/enums/bpmn/IndexEnums';
|
||||||
|
|
||||||
interface PropType {
|
interface PropType {
|
||||||
|
@ -243,8 +243,8 @@ import RoleSelect from '@/components/RoleSelect';
|
|||||||
import ExecutionListener from './property/ExecutionListener.vue';
|
import ExecutionListener from './property/ExecutionListener.vue';
|
||||||
import TaskListener from './property/TaskListener.vue';
|
import TaskListener from './property/TaskListener.vue';
|
||||||
import DueDate from './property/DueDate.vue';
|
import DueDate from './property/DueDate.vue';
|
||||||
import { ModdleElement } from 'bpmn';
|
import type { ModdleElement } from 'bpmn';
|
||||||
import { TaskPanel } from 'bpmnDesign';
|
import type { TaskPanel } from 'bpmnDesign';
|
||||||
import { AllocationTypeEnum, MultiInstanceTypeEnum, SpecifyDescEnum } from '@/enums/bpmn/IndexEnums';
|
import { AllocationTypeEnum, MultiInstanceTypeEnum, SpecifyDescEnum } from '@/enums/bpmn/IndexEnums';
|
||||||
import { UserVO } from '@/api/system/user/types';
|
import { UserVO } from '@/api/system/user/types';
|
||||||
import { RoleVO } from '@/api/system/role/types';
|
import { RoleVO } from '@/api/system/role/types';
|
||||||
|
@ -13,7 +13,7 @@ import GatewayPanel from './GatewayPanel.vue';
|
|||||||
import SequenceFlowPanel from './SequenceFlowPanel.vue';
|
import SequenceFlowPanel from './SequenceFlowPanel.vue';
|
||||||
import ParticipantPanel from './ParticipantPanel.vue';
|
import ParticipantPanel from './ParticipantPanel.vue';
|
||||||
import SubProcessPanel from './SubProcessPanel.vue';
|
import SubProcessPanel from './SubProcessPanel.vue';
|
||||||
import { Modeler, ModdleElement } from 'bpmn';
|
import type { Modeler, ModdleElement } from 'bpmn';
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
interface propsType {
|
interface propsType {
|
||||||
modeler: Modeler;
|
modeler: Modeler;
|
||||||
|
@ -90,8 +90,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import ListenerParam from './ListenerParam.vue';
|
import ListenerParam from './ListenerParam.vue';
|
||||||
import { VxeTableEvents, VxeTableInstance, VxeTablePropTypes } from 'vxe-table';
|
import { VxeTableEvents, VxeTableInstance, VxeTablePropTypes } from 'vxe-table';
|
||||||
import { ExecutionListenerVO } from 'bpmnDesign';
|
import type { ExecutionListenerVO } from 'bpmnDesign';
|
||||||
import { Moddle, Modeler, ModdleElement } from 'bpmn';
|
import type { Moddle, Modeler, ModdleElement } from 'bpmn';
|
||||||
|
|
||||||
import usePanel from '../../hooks/usePanel';
|
import usePanel from '../../hooks/usePanel';
|
||||||
import useDialog from '@/hooks/useDialog';
|
import useDialog from '@/hooks/useDialog';
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { VXETable, VxeTableInstance, VxeTablePropTypes } from 'vxe-table';
|
import { VXETable, VxeTableInstance, VxeTablePropTypes } from 'vxe-table';
|
||||||
import { ParamVO } from 'bpmnDesign';
|
import type { ParamVO } from 'bpmnDesign';
|
||||||
import useDialog from '@/hooks/useDialog';
|
import useDialog from '@/hooks/useDialog';
|
||||||
|
|
||||||
interface PropType {
|
interface PropType {
|
||||||
|
@ -91,8 +91,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import ListenerParam from './ListenerParam.vue';
|
import ListenerParam from './ListenerParam.vue';
|
||||||
import { VxeTableEvents, VxeTableInstance, VxeTablePropTypes } from 'vxe-table';
|
import { VxeTableEvents, VxeTableInstance, VxeTablePropTypes } from 'vxe-table';
|
||||||
import { TaskListenerVO } from 'bpmnDesign';
|
import type { TaskListenerVO } from 'bpmnDesign';
|
||||||
import { ModdleElement } from 'bpmn';
|
import type { ModdleElement } from 'bpmn';
|
||||||
|
|
||||||
import usePanel from '../../hooks/usePanel';
|
import usePanel from '../../hooks/usePanel';
|
||||||
import useDialog from '@/hooks/useDialog';
|
import useDialog from '@/hooks/useDialog';
|
||||||
|
@ -37,7 +37,7 @@ import BpmnViewer from 'bpmn-js/lib/Viewer';
|
|||||||
import MoveCanvasModule from 'diagram-js/lib/navigation/movecanvas';
|
import MoveCanvasModule from 'diagram-js/lib/navigation/movecanvas';
|
||||||
import ZoomScrollModule from 'diagram-js/lib/navigation/zoomscroll';
|
import ZoomScrollModule from 'diagram-js/lib/navigation/zoomscroll';
|
||||||
import { ModuleDeclaration } from 'didi';
|
import { ModuleDeclaration } from 'didi';
|
||||||
import { Canvas, ModdleElement } from 'bpmn';
|
import type { Canvas, ModdleElement } from 'bpmn';
|
||||||
import EventBus from 'diagram-js/lib/core/EventBus';
|
import EventBus from 'diagram-js/lib/core/EventBus';
|
||||||
import Overlays from 'diagram-js/lib/features/overlays/Overlays';
|
import Overlays from 'diagram-js/lib/features/overlays/Overlays';
|
||||||
import processApi from '@/api/workflow/processInstance/index';
|
import processApi from '@/api/workflow/processInstance/index';
|
||||||
@ -51,7 +51,7 @@ const loading = ref(false);
|
|||||||
const bpmnVisible = ref(true);
|
const bpmnVisible = ref(true);
|
||||||
const historyList = ref([]);
|
const historyList = ref([]);
|
||||||
|
|
||||||
const init = (instanceId) => {
|
const init = (businessKey) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
bpmnVisible.value = true;
|
bpmnVisible.value = true;
|
||||||
nextTick(async () => {
|
nextTick(async () => {
|
||||||
@ -67,7 +67,7 @@ const init = (instanceId) => {
|
|||||||
MoveCanvasModule
|
MoveCanvasModule
|
||||||
] as ModuleDeclaration[]
|
] as ModuleDeclaration[]
|
||||||
});
|
});
|
||||||
const resp = await processApi.getHistoryList(instanceId);
|
const resp = await processApi.getHistoryList(businessKey);
|
||||||
xml.value = resp.data.xml;
|
xml.value = resp.data.xml;
|
||||||
taskList.value = resp.data.taskList;
|
taskList.value = resp.data.taskList;
|
||||||
historyList.value = resp.data.historyList;
|
historyList.value = resp.data.historyList;
|
||||||
@ -133,6 +133,7 @@ const genNodeDetailBox = (e, overlays, data) => {
|
|||||||
<p>开始时间:${data.startTime || ''}</p>
|
<p>开始时间:${data.startTime || ''}</p>
|
||||||
<p>结束时间:${data.endTime || ''}</p>
|
<p>结束时间:${data.endTime || ''}</p>
|
||||||
<p>审批耗时:${data.runDuration || ''}</p>
|
<p>审批耗时:${data.runDuration || ''}</p>
|
||||||
|
<p>流程版本:v${data.version || ''}</p>
|
||||||
</div>`
|
</div>`
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -67,17 +67,17 @@ const tabActiveName = ref('bpmn');
|
|||||||
const bpmnViewRef = ref<BpmnView>();
|
const bpmnViewRef = ref<BpmnView>();
|
||||||
|
|
||||||
//初始化查询审批记录
|
//初始化查询审批记录
|
||||||
const init = async (instanceId: string) => {
|
const init = async (businessKey: string) => {
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
tabActiveName.value = 'bpmn';
|
tabActiveName.value = 'bpmn';
|
||||||
historyList.value = [];
|
historyList.value = [];
|
||||||
processApi.getHistoryRecord(instanceId).then((resp) => {
|
processApi.getHistoryRecord(businessKey).then((resp) => {
|
||||||
historyList.value = resp.data;
|
historyList.value = resp.data;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
await nextTick(() => {
|
await nextTick(() => {
|
||||||
bpmnViewRef.value.init(instanceId);
|
bpmnViewRef.value.init(businessKey);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -8,29 +8,43 @@
|
|||||||
<el-checkbox label="3" name="type">短信</el-checkbox>
|
<el-checkbox label="3" name="type">短信</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="附件" v-if="task.businessStatus === 'waiting'">
|
<el-form-item v-if="task.businessStatus === 'waiting'" label="附件">
|
||||||
<fileUpload v-model="form.fileId" :fileType="['doc', 'xls', 'ppt', 'txt', 'pdf', 'xlsx', 'docx', 'zip']" :fileSize="'20'"/>
|
<fileUpload v-model="form.fileId" :file-type="['doc', 'xls', 'ppt', 'txt', 'pdf', 'xlsx', 'docx', 'zip']" :file-size="'20'" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="抄送">
|
<el-form-item label="抄送">
|
||||||
<el-button type="primary" @click="openUserSelectCopy" icon="Plus" circle />
|
<el-button type="primary" icon="Plus" circle @click="openUserSelectCopy" />
|
||||||
<el-tag v-for="user in selectCopyUserList" :key="user.userId" closable style="margin: 2px" @close="handleCopyCloseTag(user)">
|
<el-tag v-for="user in selectCopyUserList" :key="user.userId" closable style="margin: 2px" @close="handleCopyCloseTag(user)">
|
||||||
{{ user.userName }}
|
{{ user.userName }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审批意见" v-if="task.businessStatus === 'waiting'">
|
<el-form-item v-if="task.businessStatus === 'waiting'" label="审批意见">
|
||||||
<el-input v-model="form.message" type="textarea" resize="none" />
|
<el-input v-model="form.message" type="textarea" resize="none" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button v-loading="buttonLoading" type="primary" @click="handleCompleteTask"> 提交 </el-button>
|
<el-button :disabled="buttonDisabled" type="primary" @click="handleCompleteTask"> 提交 </el-button>
|
||||||
<el-button v-if="task.businessStatus === 'waiting'" v-loading="buttonLoading" type="primary" @click="openDelegateTask"> 委托 </el-button>
|
<el-button v-if="task.businessStatus === 'waiting'" :disabled="buttonDisabled" type="primary" @click="openDelegateTask"> 委托 </el-button>
|
||||||
<el-button v-if="task.businessStatus === 'waiting'" v-loading="buttonLoading" type="primary" @click="openTransferTask"> 转办 </el-button>
|
<el-button v-if="task.businessStatus === 'waiting'" :disabled="buttonDisabled" type="primary" @click="openTransferTask"> 转办 </el-button>
|
||||||
<el-button v-if="task.businessStatus === 'waiting' && task.multiInstance" v-loading="buttonLoading" type="primary" @click="addMultiInstanceUser"> 加签 </el-button>
|
<el-button
|
||||||
<el-button v-if="task.businessStatus === 'waiting' && task.multiInstance" v-loading="buttonLoading" type="primary" @click="deleteMultiInstanceUser"> 减签 </el-button>
|
v-if="task.businessStatus === 'waiting' && task.multiInstance"
|
||||||
<el-button v-if="task.businessStatus === 'waiting'" v-loading="buttonLoading" type="danger" @click="handleTerminationTask"> 终止 </el-button>
|
:disabled="buttonDisabled"
|
||||||
<el-button v-if="task.businessStatus === 'waiting'" v-loading="buttonLoading" type="danger" @click="handleBackProcessOpen"> 退回 </el-button>
|
type="primary"
|
||||||
<el-button v-loading="buttonLoading" @click="cancel">取消</el-button>
|
@click="addMultiInstanceUser"
|
||||||
|
>
|
||||||
|
加签
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="task.businessStatus === 'waiting' && task.multiInstance"
|
||||||
|
:disabled="buttonDisabled"
|
||||||
|
type="primary"
|
||||||
|
@click="deleteMultiInstanceUser"
|
||||||
|
>
|
||||||
|
减签
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="task.businessStatus === 'waiting'" :disabled="buttonDisabled" type="danger" @click="handleTerminationTask"> 终止 </el-button>
|
||||||
|
<el-button v-if="task.businessStatus === 'waiting'" :disabled="buttonDisabled" type="danger" @click="handleBackProcessOpen"> 退回 </el-button>
|
||||||
|
<el-button :disabled="buttonDisabled" @click="cancel">取消</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<!-- 抄送 -->
|
<!-- 抄送 -->
|
||||||
@ -40,19 +54,14 @@
|
|||||||
<!-- 委托 -->
|
<!-- 委托 -->
|
||||||
<UserSelect ref="delegateTaskRef" :multiple="false" @confirm-call-back="handleDelegateTask"></UserSelect>
|
<UserSelect ref="delegateTaskRef" :multiple="false" @confirm-call-back="handleDelegateTask"></UserSelect>
|
||||||
<!-- 加签组件 -->
|
<!-- 加签组件 -->
|
||||||
<multiInstanceUser ref="multiInstanceUserRef" :title="title" @submit-callback='closeDialog' />
|
<multiInstanceUser ref="multiInstanceUserRef" :title="title" @submit-callback="closeDialog" />
|
||||||
|
|
||||||
<!-- 驳回开始 -->
|
<!-- 驳回开始 -->
|
||||||
<el-dialog v-model="backVisible" draggable title="驳回" width="40%" :close-on-click-modal="false">
|
<el-dialog v-model="backVisible" draggable title="驳回" width="40%" :close-on-click-modal="false">
|
||||||
<el-form v-loading="backLoading" :model="backForm" label-width="120px" v-if="task.businessStatus === 'waiting'">
|
<el-form v-if="task.businessStatus === 'waiting'" v-loading="backLoading" :model="backForm" label-width="120px">
|
||||||
<el-form-item label="驳回节点">
|
<el-form-item label="驳回节点">
|
||||||
<el-select clearable placeholder="请选择" v-model="backForm.targetActivityId" style="width: 300px">
|
<el-select v-model="backForm.targetActivityId" clearable placeholder="请选择" style="width: 300px">
|
||||||
<el-option
|
<el-option v-for="item in taskNodeList" :key="item.nodeId" :label="item.nodeName" :value="item.nodeId" />
|
||||||
v-for="item in taskNodeList"
|
|
||||||
:key="item.nodeId"
|
|
||||||
:label="item.nodeName"
|
|
||||||
:value="item.nodeId"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="消息提醒">
|
<el-form-item label="消息提醒">
|
||||||
@ -67,9 +76,9 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer" style="float: right;padding-bottom: 20px;">
|
<div class="dialog-footer" style="float: right; padding-bottom: 20px">
|
||||||
<el-button type="primary" v-loading="backLoading" @click="handleBackProcess">确认</el-button>
|
<el-button :disabled="backButtonDisabled" type="primary" @click="handleBackProcess">确认</el-button>
|
||||||
<el-button v-loading="backLoading" @click="backVisible = false">取消</el-button>
|
<el-button :disabled="backButtonDisabled" @click="backVisible = false">取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -81,7 +90,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { ComponentInternalInstance } from 'vue';
|
import { ComponentInternalInstance } from 'vue';
|
||||||
import { ElForm } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { completeTask, backProcess, getTaskById,transferTask,terminationTask,getTaskNodeList,delegateTask } from '@/api/workflow/task';
|
import { completeTask, backProcess, getTaskById, transferTask, terminationTask, getTaskNodeList, delegateTask } from '@/api/workflow/task';
|
||||||
import UserSelect from '@/components/UserSelect';
|
import UserSelect from '@/components/UserSelect';
|
||||||
import MultiInstanceUser from '@/components/Process/multiInstanceUser.vue';
|
import MultiInstanceUser from '@/components/Process/multiInstanceUser.vue';
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
@ -91,7 +100,7 @@ const userSelectCopyRef = ref<InstanceType<typeof UserSelect>>();
|
|||||||
const transferTaskRef = ref<InstanceType<typeof UserSelect>>();
|
const transferTaskRef = ref<InstanceType<typeof UserSelect>>();
|
||||||
const delegateTaskRef = ref<InstanceType<typeof UserSelect>>();
|
const delegateTaskRef = ref<InstanceType<typeof UserSelect>>();
|
||||||
|
|
||||||
//加签组件
|
//加签组件
|
||||||
const multiInstanceUserRef = ref<InstanceType<typeof MultiInstanceUser>>();
|
const multiInstanceUserRef = ref<InstanceType<typeof MultiInstanceUser>>();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -103,7 +112,7 @@ const props = defineProps({
|
|||||||
//遮罩层
|
//遮罩层
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
//按钮
|
//按钮
|
||||||
const buttonLoading = ref(true);
|
const buttonDisabled = ref(true);
|
||||||
//任务id
|
//任务id
|
||||||
const taskId = ref<string>('');
|
const taskId = ref<string>('');
|
||||||
//抄送人
|
//抄送人
|
||||||
@ -113,6 +122,7 @@ const selectCopyUserIds = ref<string>(undefined);
|
|||||||
// 驳回是否显示
|
// 驳回是否显示
|
||||||
const backVisible = ref(false);
|
const backVisible = ref(false);
|
||||||
const backLoading = ref(true);
|
const backLoading = ref(true);
|
||||||
|
const backButtonDisabled = ref(true);
|
||||||
// 可驳回得任务节点
|
// 可驳回得任务节点
|
||||||
const taskNodeList = ref([]);
|
const taskNodeList = ref([]);
|
||||||
//任务
|
//任务
|
||||||
@ -166,23 +176,23 @@ const backForm = ref<Record<string, any>>({
|
|||||||
messageType: ['1']
|
messageType: ['1']
|
||||||
});
|
});
|
||||||
const closeDialog = () => {
|
const closeDialog = () => {
|
||||||
dialog.visible = false
|
dialog.visible = false;
|
||||||
}
|
};
|
||||||
//打开弹窗
|
//打开弹窗
|
||||||
const openDialog = (id?: string) => {
|
const openDialog = (id?: string) => {
|
||||||
selectCopyUserIds.value = undefined
|
selectCopyUserIds.value = undefined;
|
||||||
selectCopyUserList.value = []
|
selectCopyUserList.value = [];
|
||||||
form.value.fileId = undefined
|
form.value.fileId = undefined;
|
||||||
taskId.value = id;
|
taskId.value = id;
|
||||||
form.value.message = undefined;
|
form.value.message = undefined;
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
buttonLoading.value = true;
|
buttonDisabled.value = true;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
getTaskById(taskId.value).then((response) => {
|
getTaskById(taskId.value).then((response) => {
|
||||||
task.value = response.data;
|
task.value = response.data;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
buttonLoading.value = false;
|
buttonDisabled.value = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -194,58 +204,62 @@ const emits = defineEmits(['submitCallback', 'cancelCallback']);
|
|||||||
const handleCompleteTask = async () => {
|
const handleCompleteTask = async () => {
|
||||||
form.value.taskId = taskId.value;
|
form.value.taskId = taskId.value;
|
||||||
form.value.taskVariables = props.taskVariables;
|
form.value.taskVariables = props.taskVariables;
|
||||||
if(selectCopyUserList && selectCopyUserList.value.length > 0){
|
if (selectCopyUserList.value && selectCopyUserList.value.length > 0) {
|
||||||
let wfCopyList = []
|
let wfCopyList = [];
|
||||||
selectCopyUserList.value.forEach( e=> {
|
selectCopyUserList.value.forEach((e) => {
|
||||||
let copyUser = {
|
let copyUser = {
|
||||||
userId: e.userId,
|
userId: e.userId,
|
||||||
userName: e.nickName
|
userName: e.nickName
|
||||||
}
|
};
|
||||||
wfCopyList.push(copyUser)
|
wfCopyList.push(copyUser);
|
||||||
})
|
});
|
||||||
form.value.wfCopyList = wfCopyList
|
form.value.wfCopyList = wfCopyList;
|
||||||
}
|
}
|
||||||
await proxy?.$modal.confirm('是否确认提交?');
|
await proxy?.$modal.confirm('是否确认提交?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
buttonLoading.value = true;
|
buttonDisabled.value = true;
|
||||||
try {
|
try {
|
||||||
await completeTask(form.value);
|
await completeTask(form.value);
|
||||||
dialog.visible = false;
|
dialog.visible = false;
|
||||||
emits('submitCallback');
|
emits('submitCallback');
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false;
|
||||||
buttonLoading.value = false
|
buttonDisabled.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 驳回弹窗打开 */
|
/** 驳回弹窗打开 */
|
||||||
const handleBackProcessOpen = async () => {
|
const handleBackProcessOpen = async () => {
|
||||||
backForm.value = {}
|
backForm.value = {};
|
||||||
backForm.value.messageType = ['1']
|
backForm.value.messageType = ['1'];
|
||||||
backVisible.value = true
|
backVisible.value = true;
|
||||||
backLoading.value = true
|
backLoading.value = true;
|
||||||
let data = await getTaskNodeList(task.value.processInstanceId)
|
backButtonDisabled.value = true;
|
||||||
taskNodeList.value = data.data
|
let data = await getTaskNodeList(task.value.processInstanceId);
|
||||||
backLoading.value = false
|
taskNodeList.value = data.data;
|
||||||
backForm.value.targetActivityId = taskNodeList.value[0].nodeId
|
backLoading.value = false;
|
||||||
}
|
backButtonDisabled.value = false;
|
||||||
|
backForm.value.targetActivityId = taskNodeList.value[0].nodeId;
|
||||||
|
};
|
||||||
/** 驳回流程 */
|
/** 驳回流程 */
|
||||||
const handleBackProcess = async () => {
|
const handleBackProcess = async () => {
|
||||||
backForm.value.taskId = taskId.value;
|
backForm.value.taskId = taskId.value;
|
||||||
await proxy?.$modal.confirm('是否确认驳回到申请人?');
|
await proxy?.$modal.confirm('是否确认驳回到申请人?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
backLoading.value = true;
|
backLoading.value = true;
|
||||||
|
backButtonDisabled.value = true;
|
||||||
await backProcess(backForm.value).finally(() => (loading.value = false));
|
await backProcess(backForm.value).finally(() => (loading.value = false));
|
||||||
dialog.visible = false;
|
dialog.visible = false;
|
||||||
backLoading.value = false
|
backLoading.value = false;
|
||||||
|
backButtonDisabled.value = false;
|
||||||
emits('submitCallback');
|
emits('submitCallback');
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
};
|
};
|
||||||
//取消
|
//取消
|
||||||
const cancel = async () => {
|
const cancel = async () => {
|
||||||
dialog.visible = false;
|
dialog.visible = false;
|
||||||
buttonLoading.value = false;
|
buttonDisabled.value = false;
|
||||||
emits('cancelCallback');
|
emits('cancelCallback');
|
||||||
};
|
};
|
||||||
//打开抄送人员
|
//打开抄送人员
|
||||||
@ -254,11 +268,11 @@ const openUserSelectCopy = () => {
|
|||||||
};
|
};
|
||||||
//确认抄送人员
|
//确认抄送人员
|
||||||
const userSelectCopyCallBack = (data: UserVO[]) => {
|
const userSelectCopyCallBack = (data: UserVO[]) => {
|
||||||
if(data && data.length > 0){
|
if (data && data.length > 0) {
|
||||||
selectCopyUserList.value = data
|
selectCopyUserList.value = data;
|
||||||
selectCopyUserIds.value = selectCopyUserList.value.map((item) => item.userId).join(',');
|
selectCopyUserIds.value = selectCopyUserList.value.map((item) => item.userId).join(',');
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
//删除抄送人员
|
//删除抄送人员
|
||||||
const handleCopyCloseTag = (user: UserVO) => {
|
const handleCopyCloseTag = (user: UserVO) => {
|
||||||
const userId = user.userId;
|
const userId = user.userId;
|
||||||
@ -286,63 +300,62 @@ const openTransferTask = () => {
|
|||||||
transferTaskRef.value.open();
|
transferTaskRef.value.open();
|
||||||
};
|
};
|
||||||
//转办
|
//转办
|
||||||
const handleTransferTask = async (data) => {
|
const handleTransferTask = async (data) => {
|
||||||
if(data && data.length > 0){
|
if (data && data.length > 0) {
|
||||||
let params = {
|
let params = {
|
||||||
taskId: taskId.value,
|
taskId: taskId.value,
|
||||||
userId: data[0].userId,
|
userId: data[0].userId,
|
||||||
comment: form.value.message
|
comment: form.value.message
|
||||||
}
|
};
|
||||||
await proxy?.$modal.confirm('是否确认提交?');
|
await proxy?.$modal.confirm('是否确认提交?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
buttonLoading.value = true;
|
buttonDisabled.value = true;
|
||||||
await transferTask(params).finally(() => (loading.value = false));
|
await transferTask(params).finally(() => (loading.value = false));
|
||||||
dialog.visible = false;
|
dialog.visible = false;
|
||||||
emits('submitCallback');
|
emits('submitCallback');
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
}else{
|
} else {
|
||||||
proxy?.$modal.msgWarning('请选择用户!');
|
proxy?.$modal.msgWarning('请选择用户!');
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//打开委托
|
//打开委托
|
||||||
const openDelegateTask = () => {
|
const openDelegateTask = () => {
|
||||||
delegateTaskRef.value.open();
|
delegateTaskRef.value.open();
|
||||||
};
|
};
|
||||||
//委托
|
//委托
|
||||||
const handleDelegateTask = async (data) => {
|
const handleDelegateTask = async (data) => {
|
||||||
if(data && data.length > 0){
|
if (data && data.length > 0) {
|
||||||
let params = {
|
let params = {
|
||||||
taskId: taskId.value,
|
taskId: taskId.value,
|
||||||
userId: data[0].userId,
|
userId: data[0].userId,
|
||||||
nickName: data[0].nickName
|
nickName: data[0].nickName
|
||||||
}
|
};
|
||||||
await proxy?.$modal.confirm('是否确认提交?');
|
await proxy?.$modal.confirm('是否确认提交?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
buttonLoading.value = true;
|
buttonDisabled.value = true;
|
||||||
await delegateTask(params).finally(() => (loading.value = false));
|
await delegateTask(params).finally(() => (loading.value = false));
|
||||||
dialog.visible = false;
|
dialog.visible = false;
|
||||||
emits('submitCallback');
|
emits('submitCallback');
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
}else{
|
} else {
|
||||||
proxy?.$modal.msgWarning('请选择用户!');
|
proxy?.$modal.msgWarning('请选择用户!');
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
//终止任务
|
//终止任务
|
||||||
const handleTerminationTask = async (data) => {
|
const handleTerminationTask = async (data) => {
|
||||||
let params = {
|
let params = {
|
||||||
taskId: taskId.value,
|
taskId: taskId.value,
|
||||||
comment: form.value.message
|
comment: form.value.message
|
||||||
}
|
};
|
||||||
await proxy?.$modal.confirm('是否确认终止?');
|
await proxy?.$modal.confirm('是否确认终止?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
buttonLoading.value = true;
|
buttonDisabled.value = true;
|
||||||
await terminationTask(params).finally(() => (loading.value = false));
|
await terminationTask(params).finally(() => (loading.value = false));
|
||||||
dialog.visible = false;
|
dialog.visible = false;
|
||||||
emits('submitCallback');
|
emits('submitCallback');
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
};
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对外暴露子组件方法
|
* 对外暴露子组件方法
|
||||||
|
@ -164,16 +164,16 @@ export const dynamicRoutes: RouteRecordRaw[] = [
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/demo/leaveEdit',
|
path: '/workflow/leaveEdit',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
permissions: ['demo:leave:edit'],
|
permissions: ['workflow:leave:edit'],
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
component: () => import('@/views/workflow/leave/leaveEdit.vue'),
|
component: () => import('@/views/workflow/leave/leaveEdit.vue'),
|
||||||
name: 'leaveEdit',
|
name: 'leaveEdit',
|
||||||
meta: { title: '请假申请', activeMenu: '/demo/leave', noCache: true }
|
meta: { title: '请假申请', activeMenu: '/workflow/leave', noCache: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Modeler, Modeling, Canvas, ElementRegistry, Moddle, BpmnFactory } from 'bpmn';
|
import type { Modeler, Modeling, Canvas, ElementRegistry, Moddle, BpmnFactory } from 'bpmn';
|
||||||
|
|
||||||
type ModelerStore = {
|
type ModelerStore = {
|
||||||
modeler: Modeler | undefined;
|
modeler: Modeler | undefined;
|
||||||
|
2
src/types/global.d.ts
vendored
2
src/types/global.d.ts
vendored
@ -4,8 +4,6 @@ import { LanguageEnum } from '@/enums/LanguageEnum';
|
|||||||
declare global {
|
declare global {
|
||||||
/** vue Instance */
|
/** vue Instance */
|
||||||
declare type ComponentInternalInstance = ComponentInstance;
|
declare type ComponentInternalInstance = ComponentInstance;
|
||||||
/**vue */
|
|
||||||
declare type PropType<T> = VuePropType<T>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 界面字段隐藏属性
|
* 界面字段隐藏属性
|
||||||
|
@ -68,7 +68,6 @@
|
|||||||
* RPC远程调用 Apache Dubbo 原生态使用体验、高性能<br />
|
* RPC远程调用 Apache Dubbo 原生态使用体验、高性能<br />
|
||||||
* 分布式限流熔断 Alibaba Sentinel 无侵入、高扩展<br />
|
* 分布式限流熔断 Alibaba Sentinel 无侵入、高扩展<br />
|
||||||
* 分布式事务 Alibaba Seata 无侵入、高扩展 支持 四种模式<br />
|
* 分布式事务 Alibaba Seata 无侵入、高扩展 支持 四种模式<br />
|
||||||
* 分布式消息队列 Spring Cloud Stream 门面框架兼容各种MQ集成<br />
|
|
||||||
* 分布式消息队列 Apache Kafka 高性能高速度<br />
|
* 分布式消息队列 Apache Kafka 高性能高速度<br />
|
||||||
* 分布式消息队列 Apache RocketMQ 高可用功能多样<br />
|
* 分布式消息队列 Apache RocketMQ 高可用功能多样<br />
|
||||||
* 分布式消息队列 RabbitMQ 支持各种扩展插件功能多样性<br />
|
* 分布式消息队列 RabbitMQ 支持各种扩展插件功能多样性<br />
|
||||||
|
@ -304,7 +304,7 @@ const submitForm = () => {
|
|||||||
const handleDownload = (row: OssVO) => {
|
const handleDownload = (row: OssVO) => {
|
||||||
proxy?.$download.oss(row.ossId);
|
proxy?.$download.oss(row.ossId);
|
||||||
};
|
};
|
||||||
/** 用户状态修改 */
|
/** 预览开关按钮 */
|
||||||
const handlePreviewListResource = async (preview: boolean) => {
|
const handlePreviewListResource = async (preview: boolean) => {
|
||||||
let text = preview ? '启用' : '停用';
|
let text = preview ? '启用' : '停用';
|
||||||
try {
|
try {
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>表单构建(由于此功能的开源组件不支持 VUE3+TS 故暂时无法使用) <svg-icon icon-class="build" /></div>
|
|
||||||
</template>
|
|
@ -22,10 +22,10 @@
|
|||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['demo:leave:add']" type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
<el-button v-hasPermi="['workflow:leave:add']" type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['demo:leave:export']" type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
<el-button v-hasPermi="['workflow:leave:export']" type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:showSearch="showSearch" @query-table="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @query-table="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -53,18 +53,14 @@
|
|||||||
<el-table-column label="请假原因" align="center" prop="remark" />
|
<el-table-column label="请假原因" align="center" prop="remark" />
|
||||||
<el-table-column align="center" label="流程状态" min-width="70">
|
<el-table-column align="center" label="流程状态" min-width="70">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="wf_business_status" :value="scope.row.processInstanceVo.businessStatus"></dict-tag>
|
<dict-tag :options="wf_business_status" :value="scope.row.status"></dict-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="
|
v-if="scope.row.status === 'draft' || scope.row.status === 'cancel' || scope.row.status === 'back'"
|
||||||
scope.row.processInstanceVo.businessStatus === 'draft' ||
|
v-hasPermi="['workflow:leave:edit']"
|
||||||
scope.row.processInstanceVo.businessStatus === 'cancel' ||
|
|
||||||
scope.row.processInstanceVo.businessStatus === 'back'
|
|
||||||
"
|
|
||||||
v-hasPermi="['demo:leave:edit']"
|
|
||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -73,12 +69,8 @@
|
|||||||
>修改</el-button
|
>修改</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="
|
v-if="scope.row.status === 'draft' || scope.row.status === 'cancel' || scope.row.status === 'back'"
|
||||||
scope.row.processInstanceVo.businessStatus === 'draft' ||
|
v-hasPermi="['workflow:leave:remove']"
|
||||||
scope.row.processInstanceVo.businessStatus === 'cancel' ||
|
|
||||||
scope.row.processInstanceVo.businessStatus === 'back'
|
|
||||||
"
|
|
||||||
v-hasPermi="['demo:leave:remove']"
|
|
||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -88,12 +80,12 @@
|
|||||||
>
|
>
|
||||||
<el-button link type="primary" size="small" icon="View" @click="handleView(scope.row)">查看</el-button>
|
<el-button link type="primary" size="small" icon="View" @click="handleView(scope.row)">查看</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.processInstanceVo.businessStatus === 'waiting'"
|
v-if="scope.row.status === 'waiting'"
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="Notification"
|
icon="Notification"
|
||||||
@click="handleCancelProcessApply(scope.row.processInstanceVo.id)"
|
@click="handleCancelProcessApply(scope.row.id)"
|
||||||
>撤销</el-button
|
>撤销</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
@ -184,9 +176,9 @@ const handleSelectionChange = (selection: LeaveVO[]) => {
|
|||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
proxy.$tab.closePage(proxy.$route);
|
proxy.$tab.closePage(proxy.$route);
|
||||||
proxy.$router.push(`/demo/leaveEdit/index/add/add`);
|
proxy.$router.push(`/workflow/leaveEdit/index/add/add`);
|
||||||
proxy.$router.push({
|
proxy.$router.push({
|
||||||
path: `/demo/leaveEdit/index`,
|
path: `/workflow/leaveEdit/index`,
|
||||||
query: {
|
query: {
|
||||||
type: 'add'
|
type: 'add'
|
||||||
}
|
}
|
||||||
@ -197,7 +189,7 @@ const handleAdd = () => {
|
|||||||
const handleUpdate = (row?: LeaveVO) => {
|
const handleUpdate = (row?: LeaveVO) => {
|
||||||
proxy.$tab.closePage(proxy.$route);
|
proxy.$tab.closePage(proxy.$route);
|
||||||
proxy.$router.push({
|
proxy.$router.push({
|
||||||
path: `/demo/leaveEdit/index`,
|
path: `/workflow/leaveEdit/index`,
|
||||||
query: {
|
query: {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
type: 'update'
|
type: 'update'
|
||||||
@ -209,7 +201,7 @@ const handleUpdate = (row?: LeaveVO) => {
|
|||||||
const handleView = (row?: LeaveVO) => {
|
const handleView = (row?: LeaveVO) => {
|
||||||
proxy.$tab.closePage(proxy.$route);
|
proxy.$tab.closePage(proxy.$route);
|
||||||
proxy.$router.push({
|
proxy.$router.push({
|
||||||
path: `/demo/leaveEdit/index`,
|
path: `/workflow/leaveEdit/index`,
|
||||||
query: {
|
query: {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
type: 'view'
|
type: 'view'
|
||||||
@ -229,7 +221,7 @@ const handleDelete = async (row?: LeaveVO) => {
|
|||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
const handleExport = () => {
|
const handleExport = () => {
|
||||||
proxy?.download(
|
proxy?.download(
|
||||||
'demo/leave/export',
|
'workflow/leave/export',
|
||||||
{
|
{
|
||||||
...queryParams.value
|
...queryParams.value
|
||||||
},
|
},
|
||||||
|
@ -6,12 +6,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
v-if="
|
v-if="
|
||||||
routeParams.type === 'add' ||
|
routeParams.type === 'add' ||
|
||||||
(routeParams.type === 'update' &&
|
(routeParams.type === 'update' && form.status && (form.status === 'draft' || form.status === 'cancel' || form.status === 'back'))
|
||||||
form.processInstanceVo &&
|
|
||||||
form.processInstanceVo.businessStatus &&
|
|
||||||
(form.processInstanceVo.businessStatus === 'draft' ||
|
|
||||||
form.processInstanceVo.businessStatus === 'cancel' ||
|
|
||||||
form.processInstanceVo.businessStatus === 'back'))
|
|
||||||
"
|
"
|
||||||
:loading="buttonLoading"
|
:loading="buttonLoading"
|
||||||
type="info"
|
type="info"
|
||||||
@ -21,11 +16,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
v-if="
|
v-if="
|
||||||
routeParams.type === 'add' ||
|
routeParams.type === 'add' ||
|
||||||
(routeParams.type === 'update' &&
|
(routeParams.type === 'update' && form.status && (form.status === 'draft' || form.status === 'cancel' || form.status === 'back'))
|
||||||
form.processInstanceVo &&
|
|
||||||
(form.processInstanceVo.businessStatus === 'draft' ||
|
|
||||||
form.processInstanceVo.businessStatus === 'cancel' ||
|
|
||||||
form.processInstanceVo.businessStatus === 'back'))
|
|
||||||
"
|
"
|
||||||
:loading="buttonLoading"
|
:loading="buttonLoading"
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -33,13 +24,13 @@
|
|||||||
>提 交</el-button
|
>提 交</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="routeParams.type === 'approval' && form.processInstanceVo && form.processInstanceVo.businessStatus === 'waiting'"
|
v-if="routeParams.type === 'approval' && form.status && form.status === 'waiting'"
|
||||||
:loading="buttonLoading"
|
:loading="buttonLoading"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="approvalVerifyOpen"
|
@click="approvalVerifyOpen"
|
||||||
>审批</el-button
|
>审批</el-button
|
||||||
>
|
>
|
||||||
<el-button v-if="processInstanceId" type="primary" @click="handleApprovalRecord">流程进度</el-button>
|
<el-button v-if="form.status !== 'draft'" type="primary" @click="handleApprovalRecord">流程进度</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button style="float: right" @click="goBack()">返回</el-button>
|
<el-button style="float: right" @click="goBack()">返回</el-button>
|
||||||
@ -91,8 +82,6 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|||||||
const buttonLoading = ref(false);
|
const buttonLoading = ref(false);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const leaveTime = ref<Array<string>>([]);
|
const leaveTime = ref<Array<string>>([]);
|
||||||
//流程实例id
|
|
||||||
const processInstanceId = ref('');
|
|
||||||
//路由参数
|
//路由参数
|
||||||
const routeParams = ref<Record<string, any>>({});
|
const routeParams = ref<Record<string, any>>({});
|
||||||
const options = [
|
const options = [
|
||||||
@ -134,7 +123,7 @@ const initFormData: LeaveForm = {
|
|||||||
endDate: undefined,
|
endDate: undefined,
|
||||||
leaveDays: undefined,
|
leaveDays: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
processInstanceVo: {}
|
status: undefined
|
||||||
};
|
};
|
||||||
const data = reactive<PageData<LeaveForm, LeaveQuery>>({
|
const data = reactive<PageData<LeaveForm, LeaveQuery>>({
|
||||||
form: { ...initFormData },
|
form: { ...initFormData },
|
||||||
@ -177,9 +166,6 @@ const getInfo = () => {
|
|||||||
leaveTime.value = [];
|
leaveTime.value = [];
|
||||||
leaveTime.value.push(form.value.startDate);
|
leaveTime.value.push(form.value.startDate);
|
||||||
leaveTime.value.push(form.value.endDate);
|
leaveTime.value.push(form.value.endDate);
|
||||||
if (form.value.processInstanceVo) {
|
|
||||||
processInstanceId.value = form.value.processInstanceVo.id;
|
|
||||||
}
|
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
buttonLoading.value = false;
|
buttonLoading.value = false;
|
||||||
});
|
});
|
||||||
@ -243,7 +229,7 @@ const handleStartWorkFlow = async (data: LeaveVO) => {
|
|||||||
};
|
};
|
||||||
//审批记录
|
//审批记录
|
||||||
const handleApprovalRecord = () => {
|
const handleApprovalRecord = () => {
|
||||||
approvalRecordRef.value.init(processInstanceId.value);
|
approvalRecordRef.value.init(form.value.id);
|
||||||
};
|
};
|
||||||
//提交回调
|
//提交回调
|
||||||
const submitCallback = async () => {
|
const submitCallback = async () => {
|
||||||
|
@ -167,6 +167,8 @@ const categoryTreeRef = ref<ElTreeInstance>();
|
|||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
// 选中数组
|
// 选中数组
|
||||||
const ids = ref<Array<any>>([]);
|
const ids = ref<Array<any>>([]);
|
||||||
|
// 选中业务id数组
|
||||||
|
const businessKeys = ref<Array<any>>([]);
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
const single = ref(true);
|
const single = ref(true);
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
@ -257,6 +259,7 @@ const resetQuery = () => {
|
|||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
const handleSelectionChange = (selection: ProcessInstanceVO[]) => {
|
const handleSelectionChange = (selection: ProcessInstanceVO[]) => {
|
||||||
ids.value = selection.map((item: any) => item.id);
|
ids.value = selection.map((item: any) => item.id);
|
||||||
|
businessKeys.value = selection.map((item: any) => item.businessKey);
|
||||||
single.value = selection.length !== 1;
|
single.value = selection.length !== 1;
|
||||||
multiple.value = !selection.length;
|
multiple.value = !selection.length;
|
||||||
};
|
};
|
||||||
@ -281,14 +284,14 @@ const getProcessInstanceFinishList = () => {
|
|||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (row: any) => {
|
const handleDelete = async (row: any) => {
|
||||||
const id = row.id || ids.value;
|
const businessKey = row.businessKey || businessKeys.value;
|
||||||
await proxy?.$modal.confirm('是否确认删除id为【' + id + '】的数据项?');
|
await proxy?.$modal.confirm('是否确认删除业务id为【' + businessKey + '】的数据项?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
if ('running' === tab.value) {
|
if ('running' === tab.value) {
|
||||||
await deleteRunAndHisInstance(id).finally(() => (loading.value = false));
|
await deleteRunAndHisInstance(businessKey).finally(() => (loading.value = false));
|
||||||
getProcessInstanceRunningList();
|
getProcessInstanceRunningList();
|
||||||
} else {
|
} else {
|
||||||
await deleteFinishAndHisInstance(id).finally(() => (loading.value = false));
|
await deleteFinishAndHisInstance(businessKey).finally(() => (loading.value = false));
|
||||||
getProcessInstanceFinishList();
|
getProcessInstanceFinishList();
|
||||||
}
|
}
|
||||||
proxy?.$modal.msgSuccess('删除成功');
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
@ -308,7 +311,7 @@ const handleInvalid = async (row: ProcessInstanceVO) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
if ('running' === tab.value) {
|
if ('running' === tab.value) {
|
||||||
let param = {
|
let param = {
|
||||||
processInstanceId: row.id,
|
businessKey: row.businessKey,
|
||||||
deleteReason: deleteReason.value
|
deleteReason: deleteReason.value
|
||||||
};
|
};
|
||||||
await deleteRunInstance(param).finally(() => (loading.value = false));
|
await deleteRunInstance(param).finally(() => (loading.value = false));
|
||||||
|
@ -75,20 +75,20 @@
|
|||||||
content="修改"
|
content="修改"
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
<el-button v-hasPermi="['demo:leave:edit']" link type="primary" icon="Edit" @click="handleOpen(scope.row, 'update')"></el-button>
|
<el-button link type="primary" icon="Edit" @click="handleOpen(scope.row, 'update')"></el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
v-if="scope.row.businessStatus === 'draft' || scope.row.businessStatus === 'cancel' || scope.row.businessStatus === 'back'"
|
v-if="scope.row.businessStatus === 'draft' || scope.row.businessStatus === 'cancel' || scope.row.businessStatus === 'back'"
|
||||||
content="删除"
|
content="删除"
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
<el-button v-hasPermi="['demo:leave:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)"></el-button>
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"></el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip placement="top" content="查看">
|
<el-tooltip placement="top" content="查看">
|
||||||
<el-button link type="primary" icon="View" @click="handleOpen(scope.row, 'view')"></el-button>
|
<el-button link type="primary" icon="View" @click="handleOpen(scope.row, 'view')"></el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip v-if="scope.row.businessStatus === 'waiting'" content="撤销" placement="top">
|
<el-tooltip v-if="scope.row.businessStatus === 'waiting'" content="撤销" placement="top">
|
||||||
<el-button link type="primary" icon="Notification" @click="handleCancelProcessApply(scope.row.id)"></el-button>
|
<el-button link type="primary" icon="Notification" @click="handleCancelProcessApply(scope.row.businessKey)"></el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -123,7 +123,7 @@ const categoryTreeRef = ref<ElTreeInstance>();
|
|||||||
// 遮罩层
|
// 遮罩层
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
// 选中数组
|
// 选中数组
|
||||||
const ids = ref<Array<any>>([]);
|
const businessKeys = ref<Array<any>>([]);
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
const single = ref(true);
|
const single = ref(true);
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
@ -190,12 +190,6 @@ const getTreeselect = async () => {
|
|||||||
categoryOptions.value.push(data);
|
categoryOptions.value.push(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
//审批记录
|
|
||||||
const handleApprovalRecord = (processInstanceId: string) => {
|
|
||||||
if (approvalRecordRef.value) {
|
|
||||||
approvalRecordRef.value.init(processInstanceId);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
getList();
|
getList();
|
||||||
@ -210,7 +204,7 @@ const resetQuery = () => {
|
|||||||
};
|
};
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
const handleSelectionChange = (selection: ProcessInstanceVO[]) => {
|
const handleSelectionChange = (selection: ProcessInstanceVO[]) => {
|
||||||
ids.value = selection.map((item: any) => item.id);
|
businessKeys.value = selection.map((item: any) => item.businessKey);
|
||||||
single.value = selection.length !== 1;
|
single.value = selection.length !== 1;
|
||||||
multiple.value = !selection.length;
|
multiple.value = !selection.length;
|
||||||
};
|
};
|
||||||
@ -226,22 +220,22 @@ const getList = () => {
|
|||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (row: ProcessInstanceVO) => {
|
const handleDelete = async (row: ProcessInstanceVO) => {
|
||||||
const id = row.id || ids.value;
|
const businessKey = row.businessKey || businessKeys.value;
|
||||||
await proxy?.$modal.confirm('是否确认删除id为【' + id + '】的数据项?');
|
await proxy?.$modal.confirm('是否确认删除业务id为【' + businessKey + '】的数据项?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
if ('running' === tab.value) {
|
if ('running' === tab.value) {
|
||||||
await deleteRunAndHisInstance(id).finally(() => (loading.value = false));
|
await deleteRunAndHisInstance(businessKey).finally(() => (loading.value = false));
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
proxy?.$modal.msgSuccess('删除成功');
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 撤销按钮操作 */
|
/** 撤销按钮操作 */
|
||||||
const handleCancelProcessApply = async (processInstanceId: string) => {
|
const handleCancelProcessApply = async (businessKey: string) => {
|
||||||
await proxy?.$modal.confirm('是否确认撤销当前单据?');
|
await proxy?.$modal.confirm('是否确认撤销当前单据?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
if ('running' === tab.value) {
|
if ('running' === tab.value) {
|
||||||
await cancelProcessApply(processInstanceId).finally(() => (loading.value = false));
|
await cancelProcessApply(businessKey).finally(() => (loading.value = false));
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
proxy?.$modal.msgSuccess('撤销成功');
|
proxy?.$modal.msgSuccess('撤销成功');
|
||||||
|
@ -61,7 +61,6 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
|
|||||||
'pinia',
|
'pinia',
|
||||||
'axios',
|
'axios',
|
||||||
'@vueuse/core',
|
'@vueuse/core',
|
||||||
'path-to-regexp',
|
|
||||||
'echarts',
|
'echarts',
|
||||||
'vue-i18n',
|
'vue-i18n',
|
||||||
'@vueup/vue-quill',
|
'@vueup/vue-quill',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user