|
|
|
|
@ -154,13 +154,13 @@
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import {
|
|
|
|
|
getProcessInstanceRunningByPage,
|
|
|
|
|
getProcessInstanceFinishByPage,
|
|
|
|
|
deleteRuntimeProcessAndHisInst,
|
|
|
|
|
deleteFinishProcessAndHisInst,
|
|
|
|
|
deleteRuntimeProcessInst
|
|
|
|
|
getPageByRunning,
|
|
|
|
|
getPageByFinish,
|
|
|
|
|
deleteRunAndHisInstance,
|
|
|
|
|
deleteFinishAndHisInstance,
|
|
|
|
|
deleteRunInstance
|
|
|
|
|
} from '@/api/workflow/processInstance';
|
|
|
|
|
import { getProcessDefinitionListByKey, migrationProcessDefinition } from '@/api/workflow/processDefinition';
|
|
|
|
|
import { getListByKey, migrationDefinition } from '@/api/workflow/processDefinition';
|
|
|
|
|
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
|
|
|
|
import { listCategory } from '@/api/workflow/category';
|
|
|
|
|
import { CategoryVO } from '@/api/workflow/category/types';
|
|
|
|
|
@ -282,7 +282,7 @@ const handleSelectionChange = (selection: ProcessInstanceVO[]) => {
|
|
|
|
|
//分页
|
|
|
|
|
const getProcessInstanceRunningList = () => {
|
|
|
|
|
loading.value = true;
|
|
|
|
|
getProcessInstanceRunningByPage(queryParams.value).then((resp) => {
|
|
|
|
|
getPageByRunning(queryParams.value).then((resp) => {
|
|
|
|
|
processInstanceList.value = resp.rows;
|
|
|
|
|
total.value = resp.total;
|
|
|
|
|
loading.value = false;
|
|
|
|
|
@ -291,7 +291,7 @@ const getProcessInstanceRunningList = () => {
|
|
|
|
|
//分页
|
|
|
|
|
const getProcessInstanceFinishList = () => {
|
|
|
|
|
loading.value = true;
|
|
|
|
|
getProcessInstanceFinishByPage(queryParams.value).then((resp) => {
|
|
|
|
|
getPageByFinish(queryParams.value).then((resp) => {
|
|
|
|
|
processInstanceList.value = resp.rows;
|
|
|
|
|
total.value = resp.total;
|
|
|
|
|
loading.value = false;
|
|
|
|
|
@ -304,10 +304,10 @@ const handleDelete = async (row: any) => {
|
|
|
|
|
await proxy?.$modal.confirm('是否确认删除id为【' + id + '】的数据项?');
|
|
|
|
|
loading.value = true;
|
|
|
|
|
if ('running' === tab.value) {
|
|
|
|
|
await deleteRuntimeProcessAndHisInst(id).finally(() => (loading.value = false));
|
|
|
|
|
await deleteRunAndHisInstance(id).finally(() => (loading.value = false));
|
|
|
|
|
getProcessInstanceRunningList();
|
|
|
|
|
} else {
|
|
|
|
|
await deleteFinishProcessAndHisInst(id).finally(() => (loading.value = false));
|
|
|
|
|
await deleteFinishAndHisInstance(id).finally(() => (loading.value = false));
|
|
|
|
|
getProcessInstanceFinishList();
|
|
|
|
|
}
|
|
|
|
|
proxy?.$modal.msgSuccess('删除成功');
|
|
|
|
|
@ -329,7 +329,7 @@ const handleInvalid = async (row: ProcessInstanceVO) => {
|
|
|
|
|
processInstanceId: row.id,
|
|
|
|
|
deleteReason: deleteReason.value
|
|
|
|
|
};
|
|
|
|
|
await deleteRuntimeProcessInst(param).finally(() => (loading.value = false));
|
|
|
|
|
await deleteRunInstance(param).finally(() => (loading.value = false));
|
|
|
|
|
getProcessInstanceRunningList();
|
|
|
|
|
proxy?.$modal.msgSuccess('操作成功');
|
|
|
|
|
}
|
|
|
|
|
@ -342,7 +342,7 @@ const getProcessDefinitionHitoryList = (id: string, key: string) => {
|
|
|
|
|
processDefinitionDialog.visible = true;
|
|
|
|
|
processDefinitionId.value = id;
|
|
|
|
|
loading.value = true;
|
|
|
|
|
getProcessDefinitionListByKey(key).then((resp) => {
|
|
|
|
|
getListByKey(key).then((resp) => {
|
|
|
|
|
if (resp.data && resp.data.length > 0) {
|
|
|
|
|
processDefinitionHistoryList.value = resp.data.filter((item: any) => item.id !== id);
|
|
|
|
|
}
|
|
|
|
|
@ -353,7 +353,7 @@ const getProcessDefinitionHitoryList = (id: string, key: string) => {
|
|
|
|
|
const handleChange = async (id: string) => {
|
|
|
|
|
await proxy?.$modal.confirm('是否确认切换?');
|
|
|
|
|
loading.value = true;
|
|
|
|
|
migrationProcessDefinition(processDefinitionId.value, id).then((resp) => {
|
|
|
|
|
migrationDefinition(processDefinitionId.value, id).then((resp) => {
|
|
|
|
|
proxy?.$modal.msgSuccess('操作成功');
|
|
|
|
|
getProcessInstanceRunningList();
|
|
|
|
|
processDefinitionDialog.visible = false;
|
|
|
|
|
|