添加已办,未办

This commit is contained in:
gssong 2024-09-16 21:16:47 +08:00
parent d81c726021
commit c296cf089f
4 changed files with 47 additions and 79 deletions

View File

@ -1,27 +1,24 @@
import { TaskVO } from '@/api/workflow/task/types';
import { FlowTaskVO } from '@/api/workflow/task/types';
export interface ProcessInstanceQuery extends PageQuery {
categoryCode?: string;
name?: string;
key?: string;
startUserId?: string;
businessKey?: string;
flowCode?: string;
createBy?: string;
businessId?: string;
}
export interface ProcessInstanceVO extends BaseEntity {
id: string;
processDefinitionId: string;
processDefinitionName: string;
processDefinitionKey: string;
processDefinitionVersion: string;
deploymentId: string;
businessKey: string;
isSuspended?: any;
definitionId: string;
flowNmae: string;
flowCode: string;
version: string;
businessId: string;
activityStatus?: any;
tenantId: string;
startTime: string;
endTime?: string;
startUserId: string;
businessStatus: string;
businessStatusName: string;
taskVoList: TaskVO[];
createTime: string;
createBy: string;
flowStatus: string;
flowStatusName: string;
flowTaskList: FlowTaskVO[];
}

View File

@ -42,40 +42,28 @@
<el-table v-loading="loading" border :data="taskList" @selection-change="handleSelectionChange">
<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 :show-overflow-tooltip="true" align="center" label="流程定义名称">
<el-table-column :show-overflow-tooltip="true" prop="flowName" align="center" label="流程定义名称"> </el-table-column>
<el-table-column align="center" prop="flowCode" label="流程定义编码"></el-table-column>
<el-table-column align="center" prop="nodeName" label="任务名称"></el-table-column>
<el-table-column align="center" label="办理人">
<template #default="scope">
<span>{{ scope.row.processDefinitionName }}v{{ scope.row.processDefinitionVersion }}.0</span>
</template>
</el-table-column>
<el-table-column align="center" prop="processDefinitionKey" label="流程定义KEY"></el-table-column>
<el-table-column align="center" prop="name" label="任务名称"></el-table-column>
<el-table-column align="center" prop="assigneeName" label="办理人">
<template v-if="tab === 'waiting'" #default="scope">
<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">
{{ item }}
</el-tag>
<template v-if="tab === 'waiting'">
<template v-if="scope.row.userDTOList && scope.row.userDTOList.length > 0">
<el-tag v-for="(item, index) in scope.row.userDTOList" :key="index" type="success">
{{ item.nickName }}
</el-tag>
</template>
<template v-else>
<el-tag type="success"> </el-tag>
</template>
</template>
<template v-else>
<el-tag type="success">
{{ scope.row.assigneeName || '无' }}
</el-tag>
<el-tag type="success"> {{ scope.row.approveName }} </el-tag>
</template>
</template>
<template v-else-if="tab === 'finish'" #default="scope">
<el-tag type="success">
{{ scope.row.assigneeName || '无' }}
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="流程状态" min-width="70">
<template #default="scope">
<dict-tag v-if="tab === 'waiting'" :options="wf_business_status" :value="scope.row.businessStatus"></dict-tag>
<el-tag v-else type="success">已完成</el-tag>
</template>
</el-table-column>
<el-table-column v-if="tab === 'waiting'" align="center" prop="createTime" label="创建时间" width="160"></el-table-column>
<el-table-column v-if="tab === 'finish'" align="center" prop="startTime" label="创建时间" width="160"></el-table-column>
<el-table-column align="center" label="流程状态" prop="flowStatusName" min-width="70"> </el-table-column>
<el-table-column align="center" prop="createTime" label="创建时间" width="160"></el-table-column>
<el-table-column label="操作" align="center" :width="tab === 'finish' ? '80' : '151'">
<template #default="scope">
<el-row :gutter="10" class="mb8">

View File

@ -24,8 +24,8 @@
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form v-show="showSearch" ref="queryFormRef" :model="queryParams" :inline="true" label-width="120px">
<el-form-item label="流程定义名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入流程定义名称" @keyup.enter="handleQuery" />
<el-form-item label="流程定义编码" prop="flowCode">
<el-input v-model="queryParams.flowCode" placeholder="请输入流程定义编码" @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
@ -46,14 +46,10 @@
<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 v-if="false" align="center" prop="id" label="id"></el-table-column>
<el-table-column :show-overflow-tooltip="true" align="center" label="流程定义名称">
<template #default="scope">
<span>{{ scope.row.processDefinitionName }}v{{ scope.row.processDefinitionVersion }}.0</span>
</template>
</el-table-column>
<el-table-column align="center" prop="processDefinitionKey" label="流程定义KEY"></el-table-column>
<el-table-column align="center" prop="processDefinitionVersion" label="版本号" width="90">
<template #default="scope"> v{{ scope.row.processDefinitionVersion }}.0</template>
<el-table-column :show-overflow-tooltip="true" prop="flowName" align="center" label="流程定义名称"> </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">
<template #default="scope"> v{{ scope.row.version }}</template>
</el-table-column>
<el-table-column v-if="tab === 'running'" align="center" prop="isSuspended" label="状态" min-width="70">
<template #default="scope">
@ -61,13 +57,8 @@
<el-tag v-else type="danger">挂起</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="流程状态" min-width="70">
<template #default="scope">
<dict-tag :options="wf_business_status" :value="scope.row.businessStatus"></dict-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="startTime" label="启动时间" width="160"></el-table-column>
<el-table-column v-if="tab === 'finish'" align="center" prop="endTime" label="结束时间" width="160"></el-table-column>
<el-table-column align="center" prop="flowStatusName" label="流程状态" min-width="70"> </el-table-column>
<el-table-column align="center" prop="createTime" label="启动时间" width="160"></el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip
@ -123,7 +114,7 @@ const categoryTreeRef = ref<ElTreeInstance>();
//
const loading = ref(true);
//
const businessKeys = ref<Array<any>>([]);
const businessIds = ref<Array<any>>([]);
//
const single = ref(true);
//
@ -149,7 +140,7 @@ const tab = ref('running');
const queryParams = ref<ProcessInstanceQuery>({
pageNum: 1,
pageSize: 10,
name: undefined,
flowCode: undefined,
categoryCode: undefined
});
@ -204,7 +195,7 @@ const resetQuery = () => {
};
//
const handleSelectionChange = (selection: ProcessInstanceVO[]) => {
businessKeys.value = selection.map((item: any) => item.businessKey);
businessIds.value = selection.map((item: any) => item.businessId);
single.value = selection.length !== 1;
multiple.value = !selection.length;
};
@ -220,7 +211,7 @@ const getList = () => {
/** 删除按钮操作 */
const handleDelete = async (row: ProcessInstanceVO) => {
const businessKey = row.businessKey || businessKeys.value;
const businessKey = row.businessId || businessIds.value;
await proxy?.$modal.confirm('是否确认删除业务id为【' + businessKey + '】的数据项?');
loading.value = true;
if ('running' === tab.value) {
@ -246,7 +237,7 @@ const handleOpen = async (row, type) => {
const routerJumpVo = reactive<RouterJumpVo>({
wfDefinitionConfigVo: row.wfDefinitionConfigVo,
wfNodeConfigVo: row.wfNodeConfigVo,
businessKey: row.businessKey,
businessKey: row.businessId,
taskId: row.id,
type: type
});

View File

@ -31,14 +31,10 @@
<el-table v-loading="loading" border :data="taskList" @selection-change="handleSelectionChange">
<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 :show-overflow-tooltip="true" align="center" label="流程定义名称">
<template #default="scope">
<span>{{ scope.row.flowName }}v{{ scope.row.version }}</span>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" prop="flowName" align="center" label="流程定义名称"> </el-table-column>
<el-table-column align="center" prop="flowCode" 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" label="办理人">
<template #default="scope">
<template v-if="scope.row.userDTOList && scope.row.userDTOList.length > 0">
<el-tag v-for="(item, index) in scope.row.userDTOList" :key="index" type="success">
@ -50,11 +46,7 @@
</template>
</template>
</el-table-column>
<el-table-column align="center" label="流程状态" min-width="70">
<template #default="scope">
<dict-tag :options="wf_business_status" :value="scope.row.flowStatus"></dict-tag>
</template>
</el-table-column>
<el-table-column align="center" label="流程状态" prop="flowStatusName" min-width="70"> </el-table-column>
<el-table-column align="center" prop="createTime" label="创建时间" width="160"></el-table-column>
<el-table-column label="操作" align="center" width="200">
<template #default="scope">