1.1.51 我的任务模块添加检索条件、优化列宽显示。

dev
yinq 3 weeks ago
parent a4b594e378
commit 5cb040b560

@ -7,6 +7,8 @@ export interface FlowInstanceQuery extends PageQuery {
flowName?: string; flowName?: string;
createByIds?: string[] | number[]; createByIds?: string[] | number[];
businessId?: string; businessId?: string;
businessCode?: string;
businessTitle?: string;
} }
export interface FlowInstanceVO extends BaseEntity { export interface FlowInstanceVO extends BaseEntity {

@ -2,6 +2,8 @@ export interface TaskQuery extends PageQuery {
nodeName?: string; nodeName?: string;
flowCode?: string; flowCode?: string;
flowName?: string; flowName?: string;
businessCode?: string;
businessTitle?: string;
createByIds?: string[] | number[]; createByIds?: string[] | number[];
} }

@ -23,14 +23,30 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]"> <div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover"> <el-card shadow="hover">
<el-form v-show="showSearch" ref="queryFormRef" :model="queryParams" :inline="true" label-width="120px"> <el-form v-show="showSearch" ref="queryFormRef" :model="queryParams" label-width="100px">
<el-form-item label="流程定义编码" prop="flowCode"> <el-row :gutter="20">
<el-input v-model="queryParams.flowCode" placeholder="请输入流程定义编码" @keyup.enter="handleQuery" /> <el-col :span="6">
</el-form-item> <el-form-item label="业务编码" prop="businessCode">
<el-form-item> <el-input v-model="queryParams.businessCode" placeholder="请输入业务编码" clearable @keyup.enter="handleQuery" />
<el-button type="primary" icon="Search" @click="handleQuery"></el-button> </el-form-item>
<el-button icon="Refresh" @click="resetQuery"></el-button> </el-col>
</el-form-item> <el-col :span="6">
<el-form-item label="业务标题" prop="businessTitle">
<el-input v-model="queryParams.businessTitle" placeholder="请输入业务标题" clearable @keyup.enter="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="流程定义名称" prop="flowName">
<el-input v-model="queryParams.flowName" placeholder="请输入流程定义名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="0">
<el-button type="primary" icon="Search" @click="handleQuery"></el-button>
<el-button icon="Refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
</el-card> </el-card>
</div> </div>
@ -38,33 +54,56 @@
<el-card shadow="hover"> <el-card shadow="hover">
<template #header> <template #header>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<right-toolbar v-model:show-search="showSearch" @query-table="handleQuery"></right-toolbar> <right-toolbar v-model:show-search="showSearch" :columns="columns" :search="true" @query-table="handleQuery"></right-toolbar>
</el-row> </el-row>
</template> </template>
<el-table v-loading="loading" border :data="processInstanceList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="processInstanceList" @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="55"></el-table-column>
<el-table-column v-if="false" align="center" prop="id" label="id"></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" prop="flowName" align="center" label="流程定义名称"> </el-table-column> <el-table-column
<el-table-column align="center" prop="flowCode" label="流程定义编码"></el-table-column> v-if="columns[0].visible"
<el-table-column align="center" prop="categoryName" label="流程分类"></el-table-column> :show-overflow-tooltip="true"
<el-table-column align="center" prop="version" label="版本号" width="90"> prop="businessCode"
align="center"
label="业务编码"
width="140"
/>
<el-table-column
v-if="columns[1].visible"
:show-overflow-tooltip="true"
prop="businessTitle"
align="center"
label="业务标题"
min-width="160"
/>
<el-table-column
v-if="columns[2].visible"
:show-overflow-tooltip="true"
prop="flowName"
align="center"
label="流程定义名称"
min-width="140"
/>
<el-table-column v-if="columns[3].visible" align="center" prop="flowCode" label="流程定义编码" width="130" show-overflow-tooltip />
<el-table-column v-if="columns[4].visible" align="center" prop="categoryName" label="流程分类" width="110" show-overflow-tooltip />
<el-table-column v-if="columns[5].visible" 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>
<el-table-column v-if="tab === 'running'" align="center" prop="isSuspended" label="状态" min-width="70"> <el-table-column v-if="tab === 'running' && columns[6].visible" align="center" prop="isSuspended" label="状态" width="80">
<template #default="scope"> <template #default="scope">
<el-tag v-if="!scope.row.isSuspended" type="success"></el-tag> <el-tag v-if="!scope.row.isSuspended" type="success"></el-tag>
<el-tag v-else type="danger">挂起</el-tag> <el-tag v-else type="danger">挂起</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="流程状态" min-width="70"> <el-table-column v-if="columns[7].visible" align="center" label="流程状态" width="100">
<template #default="scope"> <template #default="scope">
<dict-tag :options="wf_business_status" :value="scope.row.flowStatus"></dict-tag> <dict-tag :options="wf_business_status" :value="scope.row.flowStatus"></dict-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="createTime" label="启动时间" width="160"></el-table-column> <el-table-column v-if="columns[8].visible" align="center" prop="createTime" label="启动时间" width="160" />
<el-table-column label="操作" align="center" width="162"> <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5" v-if="scope.row.flowStatus === 'draft' || scope.row.flowStatus === 'cancel' || scope.row.flowStatus === 'back'"> <el-col :span="1.5" v-if="scope.row.flowStatus === 'draft' || scope.row.flowStatus === 'cancel' || scope.row.flowStatus === 'back'">
@ -79,9 +118,7 @@
<el-button type="primary" size="small" icon="View" @click="handleOpen(scope.row, 'view')">查看</el-button> <el-button type="primary" size="small" icon="View" @click="handleOpen(scope.row, 'view')">查看</el-button>
</el-col> </el-col>
<el-col :span="1.5" v-if="scope.row.flowStatus === 'waiting'"> <el-col :span="1.5" v-if="scope.row.flowStatus === 'waiting'">
<el-button type="primary" size="small" icon="Notification" @click="handleCancelProcessApply(scope.row.businessId)" <el-button type="primary" size="small" icon="Notification" @click="handleCancelProcessApply(scope.row.businessId)"></el-button>
>撤销</el-button
>
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
@ -134,11 +171,26 @@ const categoryOptions = ref<CategoryTreeVO[]>([]);
const categoryName = ref(''); const categoryName = ref('');
const tab = ref('running'); const tab = ref('running');
const columns = ref<FieldOption[]>([
{ key: 0, label: '业务编码', visible: true },
{ key: 1, label: '业务标题', visible: true },
{ key: 2, label: '流程定义名称', visible: true },
{ key: 3, label: '流程定义编码', visible: false },
{ key: 4, label: '流程分类', visible: false },
{ key: 5, label: '版本号', visible: false },
{ key: 6, label: '状态', visible: true },
{ key: 7, label: '流程状态', visible: true },
{ key: 8, label: '启动时间', visible: true }
]);
// //
const queryParams = ref<FlowInstanceQuery>({ const queryParams = ref<FlowInstanceQuery>({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
flowCode: undefined, flowName: undefined,
businessCode: undefined,
businessTitle: undefined,
category: undefined category: undefined
}); });

@ -3,20 +3,37 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]"> <div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover"> <el-card shadow="hover">
<el-form v-show="showSearch" ref="queryFormRef" :model="queryParams" :inline="true"> <el-form v-show="showSearch" ref="queryFormRef" :model="queryParams" label-width="100px">
<el-form-item label="任务名称" prop="nodeName"> <el-row :gutter="20">
<el-input v-model="queryParams.nodeName" placeholder="请输入任务名称" @keyup.enter="handleQuery" /> <el-col :span="6">
</el-form-item> <el-form-item label="业务编码" prop="businessCode">
<el-form-item label="流程定义名称" label-width="100" prop="flowName"> <el-input v-model="queryParams.businessCode" placeholder="请输入业务编码" clearable @keyup.enter="handleQuery" />
<el-input v-model="queryParams.flowName" placeholder="请输入流程定义名称" @keyup.enter="handleQuery" /> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="流程定义编码" label-width="100" prop="flowCode"> <el-col :span="6">
<el-input v-model="queryParams.flowCode" placeholder="请输入流程定义编码" @keyup.enter="handleQuery" /> <el-form-item label="业务标题" prop="businessTitle">
</el-form-item> <el-input v-model="queryParams.businessTitle" placeholder="请输入业务标题" clearable @keyup.enter="handleQuery" />
<el-form-item> </el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery"></el-button> </el-col>
<el-button icon="Refresh" @click="resetQuery"></el-button> <el-col :span="6">
</el-form-item> <el-form-item label="流程定义名称" prop="flowName">
<el-input v-model="queryParams.flowName" placeholder="请输入流程定义名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="任务名称" prop="nodeName">
<el-input v-model="queryParams.nodeName" placeholder="请输入任务名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label-width="0">
<el-button type="primary" icon="Search" @click="handleQuery"></el-button>
<el-button icon="Refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
</el-card> </el-card>
</div> </div>
@ -24,28 +41,48 @@
<el-card shadow="hover"> <el-card shadow="hover">
<template #header> <template #header>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<right-toolbar v-model:show-search="showSearch" @query-table="handleQuery"></right-toolbar> <right-toolbar v-model:show-search="showSearch" :columns="columns" :search="true" @query-table="handleQuery"></right-toolbar>
</el-row> </el-row>
</template> </template>
<el-table v-loading="loading" border :data="taskList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="taskList" @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 :show-overflow-tooltip="true" prop="businessCode" align="center" label="业务编码"></el-table-column> <el-table-column
<el-table-column :show-overflow-tooltip="true" prop="businessTitle" align="center" label="业务标题"></el-table-column> v-if="columns[0].visible"
<el-table-column :show-overflow-tooltip="true" prop="flowName" align="center" label="流程定义名称"></el-table-column> :show-overflow-tooltip="true"
<el-table-column align="center" prop="flowCode" label="流程定义编码"></el-table-column> prop="businessCode"
<el-table-column align="center" prop="categoryName" label="流程分类"></el-table-column> align="center"
<el-table-column align="center" prop="version" label="版本号" width="90"> label="业务编码"
width="140"
/>
<el-table-column
v-if="columns[1].visible"
prop="businessTitle"
align="center"
label="业务标题"
min-width="160"
/>
<el-table-column
v-if="columns[2].visible"
:show-overflow-tooltip="true"
prop="flowName"
align="center"
label="流程定义名称"
min-width="140"
/>
<el-table-column v-if="columns[3].visible" align="center" prop="flowCode" label="流程定义编码" width="130" show-overflow-tooltip />
<el-table-column v-if="columns[4].visible" align="center" prop="categoryName" label="流程分类" width="110" show-overflow-tooltip />
<el-table-column v-if="columns[5].visible" 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>
<el-table-column align="center" prop="nodeName" label="任务名称"></el-table-column> <el-table-column v-if="columns[6].visible" align="center" prop="nodeName" label="任务名称" min-width="140" show-overflow-tooltip />
<el-table-column align="center" label="流程状态" min-width="70"> <el-table-column v-if="columns[7].visible" align="center" label="流程状态" width="100">
<template #default="scope"> <template #default="scope">
<dict-tag :options="wf_business_status" :value="scope.row.flowStatus"></dict-tag> <dict-tag :options="wf_business_status" :value="scope.row.flowStatus"></dict-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="200"> <el-table-column label="操作" align="center" fixed="right" width="88" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button type="primary" size="small" icon="View" @click="handleView(scope.row)"></el-button> <el-button type="primary" size="small" icon="View" @click="handleView(scope.row)"></el-button>
</template> </template>
@ -64,7 +101,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { pageByTaskCopy } from '@/api/workflow/task'; import { pageByTaskCopy } from '@/api/workflow/task';
import { TaskQuery } 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';
// //
@ -85,13 +122,27 @@ const showSearch = ref(true);
const total = ref(0); const total = ref(0);
// //
const taskList = ref([]); const taskList = ref([]);
const columns = ref<FieldOption[]>([
{ key: 0, label: '业务编码', visible: true },
{ key: 1, label: '业务标题', visible: true },
{ key: 2, label: '流程定义名称', visible: true },
{ key: 3, label: '流程定义编码', visible: false },
{ key: 4, label: '流程分类', visible: false },
{ key: 5, label: '版本号', visible: false },
{ key: 6, label: '任务名称', visible: true },
{ key: 7, label: '流程状态', visible: true }
]);
// //
const queryParams = ref<TaskQuery>({ const queryParams = ref<TaskQuery>({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
nodeName: undefined, nodeName: undefined,
flowName: undefined, flowName: undefined,
flowCode: undefined flowCode: undefined,
businessCode: undefined,
businessTitle: undefined
}); });
/** 搜索按钮操作 */ /** 搜索按钮操作 */
const handleQuery = () => { const handleQuery = () => {
@ -121,7 +172,7 @@ const getTaskCopyList = () => {
}; };
/** 查看按钮操作 */ /** 查看按钮操作 */
const handleView = (row) => { const handleView = (row: FlowTaskVO) => {
const routerJumpVo = reactive<RouterJumpVo>({ const routerJumpVo = reactive<RouterJumpVo>({
businessId: row.businessId, businessId: row.businessId,
taskId: row.id, taskId: row.id,

@ -3,25 +3,49 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]"> <div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover"> <el-card shadow="hover">
<el-form v-show="showSearch" ref="queryFormRef" :model="queryParams" :inline="true"> <el-form v-show="showSearch" ref="queryFormRef" :model="queryParams" label-width="100px">
<el-form-item> <el-row :gutter="20">
<el-badge :value="userSelectCount" :max="10" class="item"> <el-col :span="6">
<el-button type="primary" @click="openUserSelect"></el-button> <el-form-item label="业务编码" prop="businessCode">
</el-badge> <el-input v-model="queryParams.businessCode" placeholder="请输入业务编码" clearable @keyup.enter="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="任务名称" prop="nodeName"> </el-col>
<el-input v-model="queryParams.nodeName" placeholder="请输入任务名称" @keyup.enter="handleQuery" /> <el-col :span="6">
</el-form-item> <el-form-item label="业务标题" prop="businessTitle">
<el-form-item label="流程定义名称" label-width="100" prop="flowName"> <el-input v-model="queryParams.businessTitle" placeholder="请输入业务标题" clearable @keyup.enter="handleQuery" />
<el-input v-model="queryParams.flowName" placeholder="请输入流程定义名称" @keyup.enter="handleQuery" /> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="流程定义编码" label-width="100" prop="flowCode"> <el-col :span="6">
<el-input v-model="queryParams.flowCode" placeholder="请输入流程定义编码" @keyup.enter="handleQuery" /> <el-form-item label="流程定义名称" prop="flowName">
</el-form-item> <el-input v-model="queryParams.flowName" placeholder="请输入流程定义名称" clearable @keyup.enter="handleQuery" />
<el-form-item> </el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery"></el-button> </el-col>
<el-button icon="Refresh" @click="resetQuery"></el-button> <el-col :span="6">
</el-form-item> <el-form-item>
<el-badge :value="userSelectCount" :max="10" class="item">
<el-button type="primary" @click="openUserSelect"></el-button>
</el-badge>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="任务名称" prop="nodeName">
<el-input v-model="queryParams.nodeName" placeholder="请输入任务名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="流程定义编码" prop="flowCode">
<el-input v-model="queryParams.flowCode" placeholder="请输入流程定义编码" clearable @keyup.enter="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="0">
<el-button type="primary" icon="Search" @click="handleQuery"></el-button>
<el-button icon="Refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
</el-card> </el-card>
</div> </div>
@ -29,42 +53,62 @@
<el-card shadow="hover"> <el-card shadow="hover">
<template #header> <template #header>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<right-toolbar v-model:show-search="showSearch" @query-table="handleQuery"></right-toolbar> <right-toolbar v-model:show-search="showSearch" :columns="columns" :search="true" @query-table="handleQuery"></right-toolbar>
</el-row> </el-row>
</template> </template>
<el-table v-loading="loading" border :data="taskList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="taskList" @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 :show-overflow-tooltip="true" prop="businessCode" align="center" label="业务编码"></el-table-column> <el-table-column
<el-table-column :show-overflow-tooltip="true" prop="businessTitle" align="center" label="业务标题"></el-table-column> v-if="columns[0].visible"
<el-table-column align="center" prop="flowName" width="120" label="流程定义名称"></el-table-column> :show-overflow-tooltip="true"
<el-table-column align="center" prop="flowCode" width="120" label="流程定义编码"></el-table-column> prop="businessCode"
<el-table-column align="center" prop="categoryName" label="流程分类"></el-table-column> align="center"
<el-table-column align="center" prop="version" label="版本号" width="90"> label="业务编码"
width="140"
/>
<el-table-column
v-if="columns[1].visible"
prop="businessTitle"
align="center"
label="业务标题"
min-width="160"
/>
<el-table-column
v-if="columns[2].visible"
:show-overflow-tooltip="true"
prop="flowName"
align="center"
label="流程定义名称"
min-width="140"
/>
<el-table-column v-if="columns[3].visible" align="center" prop="flowCode" label="流程定义编码" width="130" show-overflow-tooltip />
<el-table-column v-if="columns[4].visible" align="center" prop="categoryName" label="流程分类" width="110" show-overflow-tooltip />
<el-table-column v-if="columns[5].visible" 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>
<el-table-column align="center" prop="nodeName" :show-overflow-tooltip="true" label="任务名称"></el-table-column> <el-table-column v-if="columns[6].visible" align="center" prop="nodeName" label="任务名称" width="120" show-overflow-tooltip />
<el-table-column align="center" prop="createByName" :show-overflow-tooltip="true" label="申请人"></el-table-column> <el-table-column v-if="columns[7].visible" align="center" prop="createByName" label="申请人" width="100" show-overflow-tooltip />
<el-table-column align="center" prop="approverName" label="办理人"> <el-table-column v-if="columns[8].visible" align="center" label="办理人" min-width="100">
<template #default="scope"> <template #default="scope">
<el-tag type="success"> <el-tag type="success">
{{ scope.row.approveName || '无' }} {{ scope.row.approveName || '无' }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="流程状态" prop="flowStatus" min-width="80"> <el-table-column v-if="columns[9].visible" align="center" label="流程状态" width="100">
<template #default="scope"> <template #default="scope">
<dict-tag :options="wf_business_status" :value="scope.row.flowStatus"></dict-tag> <dict-tag :options="wf_business_status" :value="scope.row.flowStatus"></dict-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="任务状态" prop="flowTaskStatus" min-width="80"> <el-table-column v-if="columns[10].visible" align="center" label="任务状态" width="100">
<template #default="scope"> <template #default="scope">
<dict-tag :options="wf_task_status" :value="scope.row.flowTaskStatus"></dict-tag> <dict-tag :options="wf_task_status" :value="scope.row.flowTaskStatus"></dict-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="createTime" label="创建时间" :show-overflow-tooltip="true" width="150"></el-table-column> <el-table-column v-if="columns[11].visible" align="center" prop="createTime" label="创建时间" width="160" show-overflow-tooltip />
<el-table-column label="操作" align="center" width="200"> <el-table-column label="操作" align="center" fixed="right" width="88" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button type="primary" size="small" icon="View" @click="handleView(scope.row)"></el-button> <el-button type="primary" size="small" icon="View" @click="handleView(scope.row)"></el-button>
</template> </template>
@ -112,6 +156,22 @@ const showSearch = ref(true);
const total = ref(0); const total = ref(0);
// //
const taskList = ref([]); const taskList = ref([]);
const columns = ref<FieldOption[]>([
{ key: 0, label: '业务编码', visible: true },
{ key: 1, label: '业务标题', visible: true },
{ key: 2, label: '流程定义名称', visible: true },
{ key: 3, label: '流程定义编码', visible: false },
{ key: 4, label: '流程分类', visible: false },
{ key: 5, label: '版本号', visible: false },
{ key: 6, label: '任务名称', visible: true },
{ key: 7, label: '申请人', visible: true },
{ key: 8, label: '办理人', visible: true },
{ key: 9, label: '流程状态', visible: true },
{ key: 10, label: '任务状态', visible: true },
{ key: 11, label: '创建时间', visible: true }
]);
// //
const queryParams = ref<TaskQuery>({ const queryParams = ref<TaskQuery>({
pageNum: 1, pageNum: 1,
@ -119,6 +179,8 @@ const queryParams = ref<TaskQuery>({
nodeName: undefined, nodeName: undefined,
flowName: undefined, flowName: undefined,
flowCode: undefined, flowCode: undefined,
businessCode: undefined,
businessTitle: undefined,
createByIds: [] createByIds: []
}); });
//id //id

@ -3,25 +3,44 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]"> <div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover"> <el-card shadow="hover">
<el-form v-show="showSearch" ref="queryFormRef" :model="queryParams" :inline="true"> <el-form v-show="showSearch" ref="queryFormRef" :model="queryParams" label-width="100px">
<el-form-item> <el-row :gutter="20">
<el-badge :value="userSelectCount" :max="10" class="item"> <el-col :span="6">
<el-button type="primary" @click="openUserSelect"></el-button> <el-form-item label="业务编码" prop="businessCode">
</el-badge> <el-input v-model="queryParams.businessCode" placeholder="请输入业务编码" clearable @keyup.enter="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="任务名称" prop="nodeName"> </el-col>
<el-input v-model="queryParams.nodeName" placeholder="请输入任务名称" @keyup.enter="handleQuery" /> <el-col :span="6">
</el-form-item> <el-form-item label="业务标题" prop="businessTitle">
<el-form-item label="流程定义名称" label-width="100" prop="flowName"> <el-input v-model="queryParams.businessTitle" placeholder="请输入业务标题" clearable @keyup.enter="handleQuery" />
<el-input v-model="queryParams.flowName" placeholder="请输入流程定义名称" @keyup.enter="handleQuery" /> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="流程定义编码" label-width="100" prop="flowCode"> <el-col :span="6">
<el-input v-model="queryParams.flowCode" placeholder="请输入流程定义编码" @keyup.enter="handleQuery" /> <el-form-item label="流程定义名称" prop="flowName">
</el-form-item> <el-input v-model="queryParams.flowName" placeholder="请输入流程定义名称" clearable @keyup.enter="handleQuery" />
<el-form-item> </el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery"></el-button> </el-col>
<el-button icon="Refresh" @click="resetQuery"></el-button> <el-col :span="6">
</el-form-item> <el-form-item>
<el-badge :value="userSelectCount" :max="10" class="item">
<el-button type="primary" @click="openUserSelect"></el-button>
</el-badge>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="任务名称" prop="nodeName">
<el-input v-model="queryParams.nodeName" placeholder="请输入任务名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="0">
<el-button type="primary" icon="Search" @click="handleQuery"></el-button>
<el-button icon="Refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
</el-card> </el-card>
</div> </div>
@ -29,21 +48,41 @@
<el-card shadow="hover"> <el-card shadow="hover">
<template #header> <template #header>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<right-toolbar v-model:show-search="showSearch" @query-table="handleQuery"></right-toolbar> <right-toolbar v-model:show-search="showSearch" :columns="columns" :search="true" @query-table="handleQuery"></right-toolbar>
</el-row> </el-row>
</template> </template>
<el-table v-loading="loading" border :data="taskList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="taskList" @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 :show-overflow-tooltip="true" prop="businessCode" align="center" label="业务编码"></el-table-column> <el-table-column
<el-table-column :show-overflow-tooltip="true" prop="businessTitle" align="center" label="业务标题"></el-table-column> v-if="columns[0].visible"
<el-table-column :show-overflow-tooltip="true" prop="flowName" align="center" label="流程定义名称"></el-table-column> :show-overflow-tooltip="true"
<el-table-column align="center" prop="flowCode" label="流程定义编码"></el-table-column> prop="businessCode"
<el-table-column align="center" prop="categoryName" label="流程分类"></el-table-column> align="center"
<el-table-column align="center" prop="nodeName" label="任务名称"></el-table-column> label="业务编码"
<el-table-column align="center" prop="createByName" label="申请人"></el-table-column> width="140"
<el-table-column align="center" label="办理人"> />
<el-table-column
v-if="columns[1].visible"
prop="businessTitle"
align="center"
label="业务标题"
min-width="160"
/>
<el-table-column
v-if="columns[2].visible"
:show-overflow-tooltip="true"
prop="flowName"
align="center"
label="流程定义名称"
min-width="140"
/>
<el-table-column v-if="columns[3].visible" align="center" prop="flowCode" label="流程定义编码" width="130" show-overflow-tooltip />
<el-table-column v-if="columns[4].visible" align="center" prop="categoryName" label="流程分类" width="110" show-overflow-tooltip />
<el-table-column v-if="columns[5].visible" align="center" prop="nodeName" label="任务名称" width="140" show-overflow-tooltip />
<el-table-column v-if="columns[6].visible" align="center" prop="createByName" label="申请人" width="100" show-overflow-tooltip />
<el-table-column v-if="columns[7].visible" align="center" label="办理人" min-width="80">
<template #default="scope"> <template #default="scope">
<template v-if="scope.row.assigneeNames"> <template v-if="scope.row.assigneeNames">
<el-tag v-for="(name, index) in scope.row.assigneeNames.split(',')" :key="index" type="success"> <el-tag v-for="(name, index) in scope.row.assigneeNames.split(',')" :key="index" type="success">
@ -55,13 +94,13 @@
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="流程状态" prop="flowStatusName" min-width="70"> <el-table-column v-if="columns[8].visible" align="center" label="流程状态" width="100">
<template #default="scope"> <template #default="scope">
<dict-tag :options="wf_business_status" :value="scope.row.flowStatus"></dict-tag> <dict-tag :options="wf_business_status" :value="scope.row.flowStatus"></dict-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="createTime" label="创建时间" width="160"></el-table-column> <el-table-column v-if="columns[9].visible" align="center" prop="createTime" label="创建时间" width="160" />
<el-table-column label="操作" align="center" width="200"> <el-table-column label="操作" align="center" fixed="right" width="88" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button type="primary" size="small" icon="Edit" @click="handleOpen(scope.row)"></el-button> <el-button type="primary" size="small" icon="Edit" @click="handleOpen(scope.row)"></el-button>
</template> </template>
@ -110,6 +149,19 @@ const total = ref(0);
// //
const taskList = ref([]); const taskList = ref([]);
const columns = ref<FieldOption[]>([
{ key: 0, label: '业务编码', visible: true },
{ key: 1, label: '业务标题', visible: true },
{ key: 2, label: '流程定义名称', visible: true },
{ key: 3, label: '流程定义编码', visible: false },
{ key: 4, label: '流程分类', visible: false },
{ key: 5, label: '任务名称', visible: true },
{ key: 6, label: '申请人', visible: true },
{ key: 7, label: '办理人', visible: true },
{ key: 8, label: '流程状态', visible: true },
{ key: 9, label: '创建时间', visible: true }
]);
//id //id
const selectUserIds = ref<Array<number | string>>([]); const selectUserIds = ref<Array<number | string>>([]);
// //
@ -121,6 +173,8 @@ const queryParams = ref<TaskQuery>({
nodeName: undefined, nodeName: undefined,
flowName: undefined, flowName: undefined,
flowCode: undefined, flowCode: undefined,
businessCode: undefined,
businessTitle: undefined,
createByIds: [] createByIds: []
}); });
onMounted(() => { onMounted(() => {

Loading…
Cancel
Save