diff --git a/.env.production b/.env.production index 2700ee0..9188c63 100644 --- a/.env.production +++ b/.env.production @@ -11,7 +11,7 @@ VITE_APP_CONTEXT_PATH = '/' VITE_APP_MONITRO_ADMIN = '/admin/applications' # SnailJob 控制台地址 -VITE_APP_SNAILJOB_ADMIN = 'http://localhost:8800/snail-job' +VITE_APP_SNAILJOB_ADMIN = '/snail-job' # 生产环境 VITE_APP_BASE_API = '/prod-api' diff --git a/package.json b/package.json index 5154ed0..3557360 100644 --- a/package.json +++ b/package.json @@ -20,15 +20,12 @@ "dependencies": { "@element-plus/icons-vue": "2.3.1", "@highlightjs/vue-plugin": "2.1.0", - "@lezer/common": "1.2.1", "@vueup/vue-quill": "1.2.0", "@vueuse/core": "10.9.0", "animate.css": "4.1.1", "await-to-js": "3.0.0", "axios": "1.6.8", "bpmn-js": "16.4.0", - "camunda-bpmn-js-behaviors": "1.2.2", - "camunda-bpmn-moddle": "7.0.1", "crypto-js": "4.2.0", "diagram-js": "12.3.0", "didi": "9.0.2", @@ -40,21 +37,15 @@ "image-conversion": "^2.1.1", "js-cookie": "3.0.5", "jsencrypt": "3.3.2", - "moddle": "6.2.3", "nprogress": "0.2.0", - "path-browserify": "1.0.1", - "path-to-regexp": "6.2.1", "pinia": "2.1.7", - "preact": "10.19.7", "screenfull": "6.0.2", - "vform3-builds": "3.0.10", "vue": "3.4.25", "vue-cropper": "1.1.1", "vue-i18n": "9.10.2", "vue-router": "4.3.2", "vue-types": "5.1.1", - "vxe-table": "4.5.22", - "zeebe-bpmn-moddle": "1.0.0" + "vxe-table": "4.5.22" }, "devDependencies": { "@iconify/json": "2.2.201", @@ -64,7 +55,6 @@ "@types/js-cookie": "3.0.6", "@types/node": "18.18.2", "@types/nprogress": "0.2.3", - "@types/path-browserify": "1.0.2", "@typescript-eslint/eslint-plugin": "7.3.1", "@typescript-eslint/parser": "7.3.1", "@unocss/preset-attributify": "0.58.6", diff --git a/src/api/workflow/leave/index.ts b/src/api/workflow/leave/index.ts index 36c6fdf..4e6f363 100644 --- a/src/api/workflow/leave/index.ts +++ b/src/api/workflow/leave/index.ts @@ -10,7 +10,7 @@ import { LeaveVO, LeaveQuery, LeaveForm } from '@/api/workflow/leave/types'; export const listLeave = (query?: LeaveQuery): AxiosPromise => { return request({ - url: '/demo/leave/list', + url: '/workflow/leave/list', method: 'get', params: query }); @@ -22,7 +22,7 @@ export const listLeave = (query?: LeaveQuery): AxiosPromise => { */ export const getLeave = (id: string | number): AxiosPromise => { return request({ - url: '/demo/leave/' + id, + url: '/workflow/leave/' + id, method: 'get' }); }; @@ -33,7 +33,7 @@ export const getLeave = (id: string | number): AxiosPromise => { */ export const addLeave = (data: LeaveForm): AxiosPromise => { return request({ - url: '/demo/leave', + url: '/workflow/leave', method: 'post', data: data }); @@ -45,7 +45,7 @@ export const addLeave = (data: LeaveForm): AxiosPromise => { */ export const updateLeave = (data: LeaveForm): AxiosPromise => { return request({ - url: '/demo/leave', + url: '/workflow/leave', method: 'put', data: data }); @@ -57,7 +57,7 @@ export const updateLeave = (data: LeaveForm): AxiosPromise => { */ export const delLeave = (id: string | number | Array) => { return request({ - url: '/demo/leave/' + id, + url: '/workflow/leave/' + id, method: 'delete' }); }; diff --git a/src/api/workflow/leave/types.ts b/src/api/workflow/leave/types.ts index b093546..a44d35d 100644 --- a/src/api/workflow/leave/types.ts +++ b/src/api/workflow/leave/types.ts @@ -5,7 +5,7 @@ export interface LeaveVO { endDate: string; leaveDays: number; remark: string; - processInstanceVo: any; + status?: string; } export interface LeaveForm extends BaseEntity { @@ -15,7 +15,7 @@ export interface LeaveForm extends BaseEntity { endDate?: string; leaveDays?: number; remark?: string; - processInstanceVo?: any; + status?: string; } export interface LeaveQuery extends PageQuery { diff --git a/src/api/workflow/processInstance/index.ts b/src/api/workflow/processInstance/index.ts index 80f122f..b949b51 100644 --- a/src/api/workflow/processInstance/index.ts +++ b/src/api/workflow/processInstance/index.ts @@ -29,33 +29,33 @@ export const getPageByFinish = (query: ProcessInstanceQuery): AxiosPromise { +export const getHistoryImage = (businessKey: string) => { return request({ - url: `/workflow/processInstance/getHistoryImage/${processInstanceId}` + '?t' + Math.random(), + url: `/workflow/processInstance/getHistoryImage/${businessKey}` + '?t' + Math.random(), method: 'get' }); }; /** - * 通过流程实例id获取历史流程图运行中,历史等节点 + * 通过业务id获取历史流程图运行中,历史等节点 */ -export const getHistoryList = (instanceId: string): AxiosPromise> => { +export const getHistoryList = (businessKey: string): AxiosPromise> => { return request({ - url: `/workflow/processInstance/getHistoryList/${instanceId}` + '?t' + Math.random(), + url: `/workflow/processInstance/getHistoryList/${businessKey}` + '?t' + Math.random(), method: 'get' }); }; /** * 获取审批记录 - * @param processInstanceId 流程实例id + * @param businessKey 业务id * @returns */ -export const getHistoryRecord = (processInstanceId: string) => { +export const getHistoryRecord = (businessKey: string) => { return request({ - url: `/workflow/processInstance/getHistoryRecord/${processInstanceId}`, + url: `/workflow/processInstance/getHistoryRecord/${businessKey}`, method: 'get' }); }; @@ -75,24 +75,24 @@ export const deleteRunInstance = (data: object) => { /** * 运行中的实例 删除程实例,删除历史记录,删除业务与流程关联信息 - * @param processInstanceId 流程实例id + * @param businessKey 业务id * @returns */ -export const deleteRunAndHisInstance = (processInstanceId: string | string[]) => { +export const deleteRunAndHisInstance = (businessKey: string | string[]) => { return request({ - url: `/workflow/processInstance/deleteRunAndHisInstance/${processInstanceId}`, + url: `/workflow/processInstance/deleteRunAndHisInstance/${businessKey}`, method: 'delete' }); }; /** * 已完成的实例 删除程实例,删除历史记录,删除业务与流程关联信息 - * @param processInstanceId 流程实例id + * @param businessKey 业务id * @returns */ -export const deleteFinishAndHisInstance = (processInstanceId: string | string[]) => { +export const deleteFinishAndHisInstance = (businessKey: string | string[]) => { return request({ - url: `/workflow/processInstance/deleteFinishAndHisInstance/${processInstanceId}`, + url: `/workflow/processInstance/deleteFinishAndHisInstance/${businessKey}`, method: 'delete' }); }; @@ -112,12 +112,12 @@ export const getPageByCurrent = (query: ProcessInstanceQuery): AxiosPromise { +export const cancelProcessApply = (businessKey: string) => { return request({ - url: `/workflow/processInstance/cancelProcessApply/${processInstanceId}`, + url: `/workflow/processInstance/cancelProcessApply/${businessKey}`, method: 'post' }); }; diff --git a/src/api/workflow/workflowCommon/index.ts b/src/api/workflow/workflowCommon/index.ts index a90216a..63ce318 100644 --- a/src/api/workflow/workflowCommon/index.ts +++ b/src/api/workflow/workflowCommon/index.ts @@ -1,29 +1,29 @@ import { RouterJumpVo } from '@/api/workflow/workflowCommon/types'; export default { - routerJump(routerJumpVo: RouterJumpVo,proxy){ - if (routerJumpVo.wfNodeConfigVo && routerJumpVo.wfNodeConfigVo.formType === 'static' && 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 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('请到模型配置菜单!'); + routerJump(routerJumpVo: RouterJumpVo, proxy) { + if (routerJumpVo.wfNodeConfigVo && routerJumpVo.wfNodeConfigVo.formType === 'static' && 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 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('请到模型配置菜单!'); } -} \ No newline at end of file + } +}; diff --git a/src/bpmn/hooks/usePanel.ts b/src/bpmn/hooks/usePanel.ts index d92b7d7..ace579b 100644 --- a/src/bpmn/hooks/usePanel.ts +++ b/src/bpmn/hooks/usePanel.ts @@ -1,5 +1,5 @@ import showConfig from '../assets/showConfig'; -import { ModdleElement } from 'bpmn'; +import type { ModdleElement } from 'bpmn'; import useModelerStore from '@/store/modules/modeler'; import { MultiInstanceTypeEnum } from '@/enums/bpmn/IndexEnums'; interface Options { diff --git a/src/bpmn/hooks/useParseElement.ts b/src/bpmn/hooks/useParseElement.ts index a5a255d..e1a6054 100644 --- a/src/bpmn/hooks/useParseElement.ts +++ b/src/bpmn/hooks/useParseElement.ts @@ -1,4 +1,4 @@ -import { ModdleElement } from 'bpmn'; +import type { ModdleElement } from 'bpmn'; interface Options { element: ModdleElement; diff --git a/src/bpmn/index.vue b/src/bpmn/index.vue index 924a838..15437c8 100644 --- a/src/bpmn/index.vue +++ b/src/bpmn/index.vue @@ -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-embedded.css'; import './assets/style/index.scss'; -import { Canvas, Modeler } from 'bpmn'; +import type { Canvas, Modeler } from 'bpmn'; import PropertyPanel from './panel/index.vue'; import BpmnModeler from 'bpmn-js/lib/Modeler.js'; import defaultXML from './assets/defaultXML'; diff --git a/src/bpmn/panel/GatewayPanel.vue b/src/bpmn/panel/GatewayPanel.vue index 5931539..20cc134 100644 --- a/src/bpmn/panel/GatewayPanel.vue +++ b/src/bpmn/panel/GatewayPanel.vue @@ -41,8 +41,8 @@