初始化添加warm-flow
This commit is contained in:
parent
adadfcf8cb
commit
f27b19b34b
114
src/api/workflow/definition/index.ts
Normal file
114
src/api/workflow/definition/index.ts
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { definitionQuery, definitionVO, definitionXmlVO } from '@/api/workflow/definition/types';
|
||||||
|
import { AxiosPromise } from 'axios';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流程定义列表
|
||||||
|
* @param query 流程实例id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const listDefinition = (query: definitionQuery): AxiosPromise<definitionVO[]> => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/definition/list`,
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 按照流程定义key获取流程定义
|
||||||
|
* @param processInstanceId 流程实例id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const getListByKey = (key: string) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/definition/getListByKey/${key}`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过流程定义id获取流程图
|
||||||
|
*/
|
||||||
|
export const definitionImage = (definitionId: string): AxiosPromise<any> => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/definition/definitionImage/${definitionId}` + '?t' + Math.random(),
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过流程定义id获取xml
|
||||||
|
* @param definitionId 流程定义id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const definitionXml = (definitionId: string): AxiosPromise<definitionXmlVO> => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/definition/definitionXml/${definitionId}`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流程定义
|
||||||
|
* @param deploymentId 部署id
|
||||||
|
* @param definitionId 流程定义id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const deleteDefinition = (deploymentId: string | string[], definitionId: string | string[]) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/definition/${deploymentId}/${definitionId}`,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 挂起/激活
|
||||||
|
* @param definitionId 流程定义id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const updateDefinitionState = (definitionId: string) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/definition/updateDefinitionState/${definitionId}`,
|
||||||
|
method: 'put'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程定义转换为模型
|
||||||
|
* @param definitionId 流程定义id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const convertToModel = (definitionId: string) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/definition/convertToModel/${definitionId}`,
|
||||||
|
method: 'put'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过zip或xml部署流程定义
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function deployProcessFile(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/definition/deployByFile',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
headers: {
|
||||||
|
repeatSubmit: false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 迁移流程
|
||||||
|
* @param currentdefinitionId
|
||||||
|
* @param fromdefinitionId
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const migrationDefinition = (currentdefinitionId: string, fromdefinitionId: string) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/definition/migrationDefinition/${currentdefinitionId}/${fromdefinitionId}`,
|
||||||
|
method: 'put'
|
||||||
|
});
|
||||||
|
};
|
@ -5,16 +5,14 @@ export interface ProcessDefinitionQuery extends PageQuery {
|
|||||||
categoryCode?: string;
|
categoryCode?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProcessDefinitionVO extends BaseEntity {
|
export interface FlowDefinitionVo extends BaseEntity {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
flowName: string;
|
||||||
key: string;
|
flowCode: string;
|
||||||
version: number;
|
version: string;
|
||||||
suspensionState: number;
|
isPublish: number;
|
||||||
resourceName: string;
|
createTime: Date;
|
||||||
diagramResourceName: string;
|
updateTime: Date;
|
||||||
deploymentId: string;
|
|
||||||
deploymentTime: string;
|
|
||||||
wfDefinitionConfigVo: DefinitionConfigVO;
|
wfDefinitionConfigVo: DefinitionConfigVO;
|
||||||
}
|
}
|
||||||
|
|
@ -1,114 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import { ProcessDefinitionQuery, ProcessDefinitionVO, definitionXmlVO } from '@/api/workflow/processDefinition/types';
|
|
||||||
import { AxiosPromise } from 'axios';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取流程定义列表
|
|
||||||
* @param query 流程实例id
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
export const listProcessDefinition = (query: ProcessDefinitionQuery): AxiosPromise<ProcessDefinitionVO[]> => {
|
|
||||||
return request({
|
|
||||||
url: `/workflow/processDefinition/list`,
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 按照流程定义key获取流程定义
|
|
||||||
* @param processInstanceId 流程实例id
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
export const getListByKey = (key: string) => {
|
|
||||||
return request({
|
|
||||||
url: `/workflow/processDefinition/getListByKey/${key}`,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过流程定义id获取流程图
|
|
||||||
*/
|
|
||||||
export const definitionImage = (processDefinitionId: string): AxiosPromise<any> => {
|
|
||||||
return request({
|
|
||||||
url: `/workflow/processDefinition/definitionImage/${processDefinitionId}` + '?t' + Math.random(),
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过流程定义id获取xml
|
|
||||||
* @param processDefinitionId 流程定义id
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
export const definitionXml = (processDefinitionId: string): AxiosPromise<definitionXmlVO> => {
|
|
||||||
return request({
|
|
||||||
url: `/workflow/processDefinition/definitionXml/${processDefinitionId}`,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除流程定义
|
|
||||||
* @param deploymentId 部署id
|
|
||||||
* @param processDefinitionId 流程定义id
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
export const deleteProcessDefinition = (deploymentId: string | string[], processDefinitionId: string | string[]) => {
|
|
||||||
return request({
|
|
||||||
url: `/workflow/processDefinition/${deploymentId}/${processDefinitionId}`,
|
|
||||||
method: 'delete'
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 挂起/激活
|
|
||||||
* @param processDefinitionId 流程定义id
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
export const updateDefinitionState = (processDefinitionId: string) => {
|
|
||||||
return request({
|
|
||||||
url: `/workflow/processDefinition/updateDefinitionState/${processDefinitionId}`,
|
|
||||||
method: 'put'
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程定义转换为模型
|
|
||||||
* @param processDefinitionId 流程定义id
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
export const convertToModel = (processDefinitionId: string) => {
|
|
||||||
return request({
|
|
||||||
url: `/workflow/processDefinition/convertToModel/${processDefinitionId}`,
|
|
||||||
method: 'put'
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过zip或xml部署流程定义
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
export function deployProcessFile(data: any) {
|
|
||||||
return request({
|
|
||||||
url: '/workflow/processDefinition/deployByFile',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
headers: {
|
|
||||||
repeatSubmit: false
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 迁移流程
|
|
||||||
* @param currentProcessDefinitionId
|
|
||||||
* @param fromProcessDefinitionId
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
export const migrationDefinition = (currentProcessDefinitionId: string, fromProcessDefinitionId: string) => {
|
|
||||||
return request({
|
|
||||||
url: `/workflow/processDefinition/migrationDefinition/${currentProcessDefinitionId}/${fromProcessDefinitionId}`,
|
|
||||||
method: 'put'
|
|
||||||
});
|
|
||||||
};
|
|
@ -118,7 +118,7 @@ export const getPageByCurrent = (query: ProcessInstanceQuery): AxiosPromise<Proc
|
|||||||
export const cancelProcessApply = (businessKey: string) => {
|
export const cancelProcessApply = (businessKey: string) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/processInstance/cancelProcessApply/${businessKey}`,
|
url: `/workflow/processInstance/cancelProcessApply/${businessKey}`,
|
||||||
method: 'post'
|
method: 'put'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -12,33 +12,20 @@ export interface ParticipantVo {
|
|||||||
candidateName: string[];
|
candidateName: string[];
|
||||||
claim: boolean;
|
claim: boolean;
|
||||||
}
|
}
|
||||||
|
export interface FlowTaskVO {
|
||||||
export interface TaskVO extends BaseEntity {
|
id: string | number;
|
||||||
id: string;
|
createTime?: Date;
|
||||||
name: string;
|
updateTime?: Date;
|
||||||
description?: string;
|
tenantId?: string;
|
||||||
priority: number;
|
definitionId?: string;
|
||||||
owner?: string;
|
instanceId: string;
|
||||||
assignee?: string | number;
|
flowName: string;
|
||||||
assigneeName?: string;
|
businessId: string;
|
||||||
processInstanceId: string;
|
nodeCode: string;
|
||||||
executionId: string;
|
nodeName: string;
|
||||||
taskDefinitionId?: any;
|
flowCode: string;
|
||||||
processDefinitionId: string;
|
flowStatus: string;
|
||||||
endTime?: string;
|
nodeType: number;
|
||||||
taskDefinitionKey: string;
|
|
||||||
dueDate?: string;
|
|
||||||
category?: any;
|
|
||||||
parentTaskId?: any;
|
|
||||||
tenantId: string;
|
|
||||||
claimTime?: string;
|
|
||||||
businessStatus?: string;
|
|
||||||
businessStatusName?: string;
|
|
||||||
processDefinitionName?: string;
|
|
||||||
processDefinitionKey?: string;
|
|
||||||
participantVo?: ParticipantVo;
|
|
||||||
multiInstance?: boolean;
|
|
||||||
businessKey?: string;
|
|
||||||
wfNodeConfigVo?: NodeConfigVO;
|
wfNodeConfigVo?: NodeConfigVO;
|
||||||
wfDefinitionConfigVo?: DefinitionConfigVO;
|
wfDefinitionConfigVo?: DefinitionConfigVO;
|
||||||
}
|
}
|
||||||
|
@ -2,28 +2,39 @@ 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) {
|
proxy.$tab.closePage(proxy.$route);
|
||||||
proxy.$tab.closePage(proxy.$route);
|
console.log(routerJumpVo);
|
||||||
proxy.$router.push({
|
proxy.$router.push({
|
||||||
path: `${routerJumpVo.wfNodeConfigVo.wfFormManageVo.router}`,
|
path: `/workflow/leaveEdit/index`,
|
||||||
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);
|
// if (routerJumpVo.wfNodeConfigVo && routerJumpVo.wfNodeConfigVo.formType === 'static' && routerJumpVo.wfNodeConfigVo.wfFormManageVo) {
|
||||||
proxy.$router.push({
|
// proxy.$tab.closePage(proxy.$route);
|
||||||
path: `${routerJumpVo.wfNodeConfigVo.wfFormManageVo.router}`,
|
// proxy.$router.push({
|
||||||
query: {
|
// path: `${routerJumpVo.wfNodeConfigVo.wfFormManageVo.router}`,
|
||||||
id: routerJumpVo.businessKey,
|
// query: {
|
||||||
type: routerJumpVo.type,
|
// id: routerJumpVo.businessKey,
|
||||||
taskId: routerJumpVo.taskId
|
// 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('请到模型配置菜单!');
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -5,7 +5,7 @@ export interface RouterJumpVo {
|
|||||||
wfNodeConfigVo: NodeConfigVO;
|
wfNodeConfigVo: NodeConfigVO;
|
||||||
wfDefinitionConfigVo: DefinitionConfigVO;
|
wfDefinitionConfigVo: DefinitionConfigVO;
|
||||||
businessKey: string;
|
businessKey: string;
|
||||||
taskId: string;
|
taskId: string | number;
|
||||||
type: string;
|
type: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,8 +54,8 @@
|
|||||||
<el-table v-loading="loading" border :data="processDefinitionList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" border :data="processDefinitionList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column align="center" type="index" label="序号" width="60"></el-table-column>
|
<el-table-column align="center" type="index" label="序号" width="60"></el-table-column>
|
||||||
<el-table-column align="center" prop="name" label="流程定义名称" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column align="center" prop="flowName" label="流程定义名称" :show-overflow-tooltip="true"></el-table-column>
|
||||||
<el-table-column align="center" prop="key" label="标识KEY" width="80"></el-table-column>
|
<el-table-column align="center" prop="flowCode" label="标识KEY" width="120" :show-overflow-tooltip="true"></el-table-column>
|
||||||
<el-table-column align="center" prop="version" label="版本号" width="80">
|
<el-table-column align="center" prop="version" label="版本号" width="80">
|
||||||
<template #default="scope"> v{{ scope.row.version }}.0</template>
|
<template #default="scope"> v{{ scope.row.version }}.0</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -167,8 +167,8 @@
|
|||||||
<el-table v-loading="loading" :data="processDefinitionHistoryList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="processDefinitionHistoryList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column align="center" type="index" label="序号" width="60"></el-table-column>
|
<el-table-column align="center" type="index" label="序号" width="60"></el-table-column>
|
||||||
<el-table-column align="center" prop="name" label="流程定义名称" :show-overflow-tooltip="true" min-width="80"></el-table-column>
|
<el-table-column align="center" prop="flowName" label="流程定义名称" :show-overflow-tooltip="true" min-width="80"></el-table-column>
|
||||||
<el-table-column align="center" prop="key" label="标识KEY"></el-table-column>
|
<el-table-column align="center" prop="flowCode" label="标识KEY"></el-table-column>
|
||||||
<el-table-column align="center" prop="version" label="版本号" width="90">
|
<el-table-column align="center" prop="version" label="版本号" width="90">
|
||||||
<template #default="scope"> v{{ scope.row.version }}.0</template>
|
<template #default="scope"> v{{ scope.row.version }}.0</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -252,20 +252,20 @@
|
|||||||
|
|
||||||
<script lang="ts" setup name="processDefinition">
|
<script lang="ts" setup name="processDefinition">
|
||||||
import {
|
import {
|
||||||
listProcessDefinition,
|
listDefinition,
|
||||||
definitionImage,
|
definitionImage,
|
||||||
definitionXml,
|
definitionXml,
|
||||||
deleteProcessDefinition,
|
deleteDefinition,
|
||||||
updateDefinitionState,
|
updateDefinitionState,
|
||||||
convertToModel,
|
convertToModel,
|
||||||
deployProcessFile,
|
deployProcessFile,
|
||||||
getListByKey
|
getListByKey
|
||||||
} from '@/api/workflow/processDefinition';
|
} from '@/api/workflow/definition';
|
||||||
import { getByTableNameNotDefId, getByDefId, saveOrUpdate } from '@/api/workflow/definitionConfig';
|
import { getByTableNameNotDefId, getByDefId, saveOrUpdate } from '@/api/workflow/definitionConfig';
|
||||||
import ProcessPreview from './components/processPreview.vue';
|
import ProcessPreview from './components/processPreview.vue';
|
||||||
import { listCategory } from '@/api/workflow/category';
|
import { listCategory } from '@/api/workflow/category';
|
||||||
import { CategoryVO } from '@/api/workflow/category/types';
|
import { CategoryVO } from '@/api/workflow/category/types';
|
||||||
import { ProcessDefinitionQuery, ProcessDefinitionVO } from '@/api/workflow/processDefinition/types';
|
import { ProcessDefinitionQuery, FlowDefinitionVo } from '@/api/workflow/definition/types';
|
||||||
import { DefinitionConfigForm } from '@/api/workflow/definitionConfig/types';
|
import { DefinitionConfigForm } from '@/api/workflow/definitionConfig/types';
|
||||||
import { UploadRequestOptions, ElMessage, ElMessageBox } from 'element-plus';
|
import { UploadRequestOptions, ElMessage, ElMessageBox } from 'element-plus';
|
||||||
|
|
||||||
@ -291,8 +291,8 @@ const multiple = ref(true);
|
|||||||
const showSearch = ref(true);
|
const showSearch = ref(true);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const uploadDialogLoading = ref(false);
|
const uploadDialogLoading = ref(false);
|
||||||
const processDefinitionList = ref<ProcessDefinitionVO[]>([]);
|
const processDefinitionList = ref<FlowDefinitionVo[]>([]);
|
||||||
const processDefinitionHistoryList = ref<ProcessDefinitionVO[]>([]);
|
const processDefinitionHistoryList = ref<FlowDefinitionVo[]>([]);
|
||||||
const categoryOptions = ref<CategoryOption[]>([]);
|
const categoryOptions = ref<CategoryOption[]>([]);
|
||||||
const categoryName = ref('');
|
const categoryName = ref('');
|
||||||
/** 部署文件分类选择 */
|
/** 部署文件分类选择 */
|
||||||
@ -383,7 +383,7 @@ const handleSelectionChange = (selection: any) => {
|
|||||||
//分页
|
//分页
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const resp = await listProcessDefinition(queryParams.value);
|
const resp = await listDefinition(queryParams.value);
|
||||||
processDefinitionList.value = resp.rows;
|
processDefinitionList.value = resp.rows;
|
||||||
total.value = resp.total;
|
total.value = resp.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@ -412,18 +412,18 @@ const clickPreview = async (id: string, type: PreviewType) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (row?: ProcessDefinitionVO) => {
|
const handleDelete = async (row?: FlowDefinitionVo) => {
|
||||||
const id = row?.id || ids.value;
|
const id = row?.id || ids.value;
|
||||||
const deployIds = row?.deploymentId || deploymentIds.value;
|
const deployIds = row?.deploymentId || deploymentIds.value;
|
||||||
const defKeys = row?.key || keys.value;
|
const defKeys = row?.key || keys.value;
|
||||||
await proxy?.$modal.confirm('是否确认删除流程定义KEY为【' + defKeys + '】的数据项?');
|
await proxy?.$modal.confirm('是否确认删除流程定义KEY为【' + defKeys + '】的数据项?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await deleteProcessDefinition(deployIds, id).finally(() => (loading.value = false));
|
await deleteDefinition(deployIds, id).finally(() => (loading.value = false));
|
||||||
await getList();
|
await getList();
|
||||||
proxy?.$modal.msgSuccess('删除成功');
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
};
|
};
|
||||||
/** 挂起/激活 */
|
/** 挂起/激活 */
|
||||||
const handleProcessDefState = async (row: ProcessDefinitionVO) => {
|
const handleProcessDefState = async (row: FlowDefinitionVo) => {
|
||||||
let msg: string;
|
let msg: string;
|
||||||
if (row.suspensionState === 1) {
|
if (row.suspensionState === 1) {
|
||||||
msg = `暂停后,此流程下的所有任务都不允许往后流转,您确定挂起【${row.name || row.key}】吗?`;
|
msg = `暂停后,此流程下的所有任务都不允许往后流转,您确定挂起【${row.name || row.key}】吗?`;
|
||||||
@ -437,7 +437,7 @@ const handleProcessDefState = async (row: ProcessDefinitionVO) => {
|
|||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
};
|
};
|
||||||
/** 流程定义转换为模型 */
|
/** 流程定义转换为模型 */
|
||||||
const handleConvertToModel = async (row: ProcessDefinitionVO) => {
|
const handleConvertToModel = async (row: FlowDefinitionVo) => {
|
||||||
await proxy?.$modal.confirm('是否确认转换流程定义key为【' + row.key + '】的数据项?');
|
await proxy?.$modal.confirm('是否确认转换流程定义key为【' + row.key + '】的数据项?');
|
||||||
await convertToModel(row.id).finally(() => (loading.value = false));
|
await convertToModel(row.id).finally(() => (loading.value = false));
|
||||||
getList();
|
getList();
|
||||||
@ -473,9 +473,9 @@ const handerDeployProcessFile = (data: UploadRequestOptions): XMLHttpRequest =>
|
|||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
//打开流程定义配置
|
//打开流程定义配置
|
||||||
const handleDefinitionConfigOpen = async (row: ProcessDefinitionVO) => {
|
const handleDefinitionConfigOpen = async (row: FlowDefinitionVo) => {
|
||||||
definitionConfigDialog.visible = true;
|
definitionConfigDialog.visible = true;
|
||||||
definitionConfigForm.value.processKey = row.key;
|
definitionConfigForm.value.processKey = row.flowCode;
|
||||||
definitionConfigForm.value.definitionId = row.id;
|
definitionConfigForm.value.definitionId = row.id;
|
||||||
definitionConfigForm.value.version = row.version;
|
definitionConfigForm.value.version = row.version;
|
||||||
const resp = await getByDefId(row.id);
|
const resp = await getByDefId(row.id);
|
||||||
|
@ -151,7 +151,7 @@ import {
|
|||||||
deleteFinishAndHisInstance,
|
deleteFinishAndHisInstance,
|
||||||
deleteRunInstance
|
deleteRunInstance
|
||||||
} from '@/api/workflow/processInstance';
|
} from '@/api/workflow/processInstance';
|
||||||
import { getListByKey, migrationDefinition } from '@/api/workflow/processDefinition';
|
import { getListByKey, migrationDefinition } from '@/api/workflow/definition';
|
||||||
import { listCategory } from '@/api/workflow/category';
|
import { listCategory } from '@/api/workflow/category';
|
||||||
import { CategoryVO } from '@/api/workflow/category/types';
|
import { CategoryVO } from '@/api/workflow/category/types';
|
||||||
import { ProcessInstanceQuery, ProcessInstanceVO } from '@/api/workflow/processInstance/types';
|
import { ProcessInstanceQuery, ProcessInstanceVO } from '@/api/workflow/processInstance/types';
|
||||||
|
@ -36,9 +36,9 @@
|
|||||||
<span>{{ scope.row.processDefinitionName }}v{{ scope.row.processDefinitionVersion }}.0</span>
|
<span>{{ scope.row.processDefinitionName }}v{{ scope.row.processDefinitionVersion }}.0</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="processDefinitionKey" label="流程定义KEY"></el-table-column>
|
<el-table-column align="center" prop="flowCode" label="流程定义编码"></el-table-column>
|
||||||
<el-table-column align="center" prop="name" label="任务名称"></el-table-column>
|
<el-table-column align="center" prop="nodeName" label="任务名称"></el-table-column>
|
||||||
<el-table-column align="center" prop="assigneeName" label="办理人">
|
<!-- <el-table-column align="center" prop="assigneeName" label="办理人">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<template v-if="scope.row.participantVo && scope.row.assignee === null">
|
<template v-if="scope.row.participantVo && scope.row.assignee === null">
|
||||||
<el-tag v-for="(item, index) in scope.row.participantVo.candidateName" :key="index" type="success">
|
<el-tag v-for="(item, index) in scope.row.participantVo.candidateName" :key="index" type="success">
|
||||||
@ -51,7 +51,7 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<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.businessStatus"></dict-tag>
|
<dict-tag :options="wf_business_status" :value="scope.row.businessStatus"></dict-tag>
|
||||||
@ -77,7 +77,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getPageByTaskWait } from '@/api/workflow/task';
|
import { getPageByTaskWait } from '@/api/workflow/task';
|
||||||
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
import { TaskQuery, FlowTaskVO } from '@/api/workflow/task/types';
|
||||||
import workflowCommon from '@/api/workflow/workflowCommon';
|
import workflowCommon from '@/api/workflow/workflowCommon';
|
||||||
import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
|
import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
@ -136,11 +136,11 @@ const getWaitingList = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
//办理
|
//办理
|
||||||
const handleOpen = async (row: TaskVO) => {
|
const handleOpen = async (row: FlowTaskVO) => {
|
||||||
const routerJumpVo = reactive<RouterJumpVo>({
|
const routerJumpVo = reactive<RouterJumpVo>({
|
||||||
wfDefinitionConfigVo: row.wfDefinitionConfigVo,
|
wfDefinitionConfigVo: row.wfDefinitionConfigVo,
|
||||||
wfNodeConfigVo: row.wfNodeConfigVo,
|
wfNodeConfigVo: row.wfNodeConfigVo,
|
||||||
businessKey: row.businessKey,
|
businessKey: row.businessId,
|
||||||
taskId: row.id,
|
taskId: row.id,
|
||||||
type: 'approval'
|
type: 'approval'
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user