update 调整按钮图标

This commit is contained in:
gssong 2023-08-25 19:58:36 +08:00
parent 02776b0566
commit 1c7bcad4d5
7 changed files with 196 additions and 233 deletions

View File

@ -101,8 +101,6 @@
import { listLeave, getLeave, delLeave, addLeave, updateLeave } from '@/api/demo/leave'; import { listLeave, getLeave, delLeave, addLeave, updateLeave } from '@/api/demo/leave';
import { cancelProcessApply } from '@/api/workflow/processInstance'; import { cancelProcessApply } from '@/api/workflow/processInstance';
import { LeaveVO, LeaveQuery, LeaveForm } from '@/api/demo/leave/types'; import { LeaveVO, LeaveQuery, LeaveForm } from '@/api/demo/leave/types';
import { ComponentInternalInstance } from 'vue';
import { ElForm } from 'element-plus';
import { startWorkFlow } from '@/api/workflow/task'; import { startWorkFlow } from '@/api/workflow/task';
import SubmitVerify from '@/components/Process/submitVerify.vue'; import SubmitVerify from '@/components/Process/submitVerify.vue';
import ApprovalRecord from '@/components/Process/approvalRecord.vue'; import ApprovalRecord from '@/components/Process/approvalRecord.vue';
@ -266,13 +264,13 @@ const handleExport = () => {
// //
const handleStartWorkFlow = async (data: any) => { const handleStartWorkFlow = async (data: any) => {
submitFormData.value.processKey = 'test'; submitFormData.value.processKey = 'test2';
submitFormData.value.businessKey = data.id; submitFormData.value.businessKey = data.id;
submitFormData.value.variables = { submitFormData.value.variables = {
leaveDays: data.leaveDays, leaveDays: data.leaveDays,
userList: [1] userList: [1]
}; };
startWorkFlow(submitFormData.value).then((response) => { startWorkFlow(submitFormData.value).then((response:any) => {
if (submitVerifyRef.value) { if (submitVerifyRef.value) {
submitVerifyRef.value.openDialog(true, response.data.taskId); submitVerifyRef.value.openDialog(true, response.data.taskId);
} }
@ -285,7 +283,7 @@ const handleApprovalRecord = (id: string) => {
} }
}; };
// //
const submitCallback = async (data: any) => { const submitCallback = async () => {
dialog.visible = false; dialog.visible = false;
handleQuery(); handleQuery();
}; };

View File

@ -5,22 +5,14 @@
<el-col :lg="4" :xs="24" style=""> <el-col :lg="4" :xs="24" style="">
<el-card shadow="hover"> <el-card shadow="hover">
<el-input placeholder="请输入流程分类名" v-model="categoryName" prefix-icon="Search" clearable /> <el-input placeholder="请输入流程分类名" v-model="categoryName" prefix-icon="Search" clearable />
<el-tree <el-tree class="mt-2" ref="categoryTreeRef" node-key="id" :data="categoryOptions"
class="mt-2" :props="{ label: 'categoryName', children: 'children' }" :expand-on-click-node="false"
ref="categoryTreeRef" :filter-node-method="filterNode" highlight-current default-expand-all @node-click="handleNodeClick"></el-tree>
node-key="id"
:data="categoryOptions"
:props="{ label: 'categoryName', children: 'children' }"
:expand-on-click-node="false"
:filter-node-method="filterNode"
highlight-current
default-expand-all
@node-click="handleNodeClick"
></el-tree>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="20" :xs="24"> <el-col :lg="20" :xs="24">
<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 class="mb-[10px]" v-show="showSearch"> <div class="mb-[10px]" v-show="showSearch">
<el-card shadow="hover"> <el-card shadow="hover">
<el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="80px"> <el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="80px">
@ -66,30 +58,29 @@
<template #default="scope"> <template #default="scope">
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button link type="primary" icon="Pointer" @click="clickDesign(scope.row.id)">设计流程</el-button> <el-button link type="primary" size="small" icon="Pointer"
@click="clickDesign(scope.row.id)">设计流程</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button link type="primary" icon="Download" @click="clickExportZip(scope.row)">导出</el-button> <el-button link type="primary" size="small" icon="Download"
@click="clickExportZip(scope.row)">导出</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button link type="primary" icon="ScaleToOriginal" @click="clickDeploy(scope.row.id, scope.row.key)"> 流程部署 </el-button> <el-button link type="primary" size="small" icon="ScaleToOriginal"
@click="clickDeploy(scope.row.id, scope.row.key)"> 流程部署 </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button> <el-button link type="primary" size="small" icon="Delete"
@click="handleDelete(scope.row)">删除</el-button>
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
v-show="total > 0" v-model:limit="queryParams.pageSize" @pagination="getList" />
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
@ -106,14 +97,9 @@
<el-input v-model="form.key" maxlength="20" show-word-limit /> <el-input v-model="form.key" maxlength="20" show-word-limit />
</el-form-item> </el-form-item>
<el-form-item label="流程分类" prop="categoryCode"> <el-form-item label="流程分类" prop="categoryCode">
<el-tree-select <el-tree-select v-model="form.categoryCode" :data="categoryOptions"
v-model="form.categoryCode" :props="{ value: 'categoryCode', label: 'categoryName', children: 'children' }" value-key="categoryCode"
:data="categoryOptions" placeholder="请选择流程分类" check-strictly />
:props="{ value: 'categoryCode', label: 'categoryName', children: 'children' }"
value-key="categoryCode"
placeholder="请选择流程分类"
check-strictly
/>
</el-form-item> </el-form-item>
<el-form-item label="备注:" prop="description"> <el-form-item label="备注:" prop="description">
<el-input type="textarea" v-model="form.description" maxlength="30" show-word-limit></el-input> <el-input type="textarea" v-model="form.description" maxlength="30" show-word-limit></el-input>
@ -197,23 +183,23 @@ onMounted(() => {
/** 节点单击事件 */ /** 节点单击事件 */
const handleNodeClick = (data: ModelForm) => { const handleNodeClick = (data: ModelForm) => {
queryParams.value.categoryCode = data.categoryCode; queryParams.value.categoryCode = data.categoryCode;
if(data.categoryCode === 'ALL'){ if (data.categoryCode === 'ALL') {
queryParams.value.categoryCode ='' queryParams.value.categoryCode = ''
} }
handleQuery() handleQuery()
} }
/** 通过条件过滤节点 */ /** 通过条件过滤节点 */
const filterNode = (value: string, data: any) => { const filterNode = (value: string, data: any) => {
if (!value) return true if (!value) return true
return data.categoryName.indexOf(value) !== -1 return data.categoryName.indexOf(value) !== -1
} }
/** 根据名称筛选部门树 */ /** 根据名称筛选部门树 */
watchEffect( watchEffect(
() => {categoryTreeRef.value.filter(categoryName.value);}, () => { categoryTreeRef.value.filter(categoryName.value); },
{ {
flush: 'post' // watchEffectDOMDOM flush: 'post' // watchEffectDOMDOM
} }
); );
/** 搜索按钮操作 */ /** 搜索按钮操作 */

View File

@ -5,22 +5,14 @@
<el-col :lg="4" :xs="24" style=""> <el-col :lg="4" :xs="24" style="">
<el-card shadow="hover"> <el-card shadow="hover">
<el-input placeholder="请输入流程分类名" v-model="categoryName" prefix-icon="Search" clearable /> <el-input placeholder="请输入流程分类名" v-model="categoryName" prefix-icon="Search" clearable />
<el-tree <el-tree class="mt-2" ref="categoryTreeRef" node-key="id" :data="categoryOptions"
class="mt-2" :props="{ label: 'categoryName', children: 'children' }" :expand-on-click-node="false"
ref="categoryTreeRef" :filter-node-method="filterNode" highlight-current default-expand-all @node-click="handleNodeClick"></el-tree>
node-key="id"
:data="categoryOptions"
:props="{ label: 'categoryName', children: 'children' }"
:expand-on-click-node="false"
:filter-node-method="filterNode"
highlight-current
default-expand-all
@node-click="handleNodeClick"
></el-tree>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="20" :xs="24"> <el-col :lg="20" :xs="24">
<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 class="mb-[10px]" v-show="showSearch"> <div class="mb-[10px]" v-show="showSearch">
<el-card shadow="hover"> <el-card shadow="hover">
<el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="120px"> <el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="120px">
@ -38,7 +30,8 @@
</el-card> </el-card>
</div> </div>
</transition> </transition>
<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 class="mb-[10px]" v-show="showSearch"> <div class="mb-[10px]" v-show="showSearch">
<el-card shadow="hover"> <el-card shadow="hover">
<el-button type="primary" icon="UploadFilled" @click="uploadDialog.visible = true">部署流程文件</el-button> <el-button type="primary" icon="UploadFilled" @click="uploadDialog.visible = true">部署流程文件</el-button>
@ -61,41 +54,50 @@
<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>
<el-table-column align="center" prop="resourceName" label="流程XML" min-width="80" :show-overflow-tooltip="true"> <el-table-column align="center" prop="resourceName" label="流程XML" min-width="80"
:show-overflow-tooltip="true">
<template #default="scope"> <template #default="scope">
<el-link type="primary" @click="clickPreviewXML(scope.row.id)">{{ scope.row.resourceName }}</el-link> <el-link type="primary" @click="clickPreviewXML(scope.row.id)">{{ scope.row.resourceName }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="diagramResourceName" label="流程图片" min-width="80" :show-overflow-tooltip="true"> <el-table-column align="center" prop="diagramResourceName" label="流程图片" min-width="80"
:show-overflow-tooltip="true">
<template #default="scope"> <template #default="scope">
<el-link type="primary" @click="clickPreviewImg(scope.row.id)">{{ scope.row.diagramResourceName }}</el-link> <el-link type="primary" @click="clickPreviewImg(scope.row.id)">{{ scope.row.diagramResourceName
}}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="suspensionState" label="状态" min-width="70"> <el-table-column align="center" prop="suspensionState" label="状态" min-width="70">
<template #default="scope"> <template #default="scope">
<el-tag type="success" v-if="scope.row.suspensionState==1">激活</el-tag> <el-tag type="success" v-if="scope.row.suspensionState == 1">激活</el-tag>
<el-tag type="danger" v-else>挂起</el-tag> <el-tag type="danger" v-else>挂起</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="deploymentTime" label="部署时间" :show-overflow-tooltip="true"></el-table-column> <el-table-column align="center" prop="deploymentTime" label="部署时间"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="200" class-name="small-padding fixed-width"> <el-table-column fixed="right" label="操作" align="center" width="200" 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"> <el-col :span="1.5">
<el-button link type="primary" :icon="scope.row.suspensionState === 1?'Lock':'Unlock'" @click="handleProcessDefState(scope.row)"> <el-button link type="primary" size="small"
{{ scope.row.suspensionState === 1?"挂起流程":"激活流程" }} :icon="scope.row.suspensionState === 1 ? 'Lock' : 'Unlock'"
@click="handleProcessDefState(scope.row)">
{{ scope.row.suspensionState === 1 ? "挂起流程" : "激活流程" }}
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button> <el-button link type="primary" size="small" icon="Delete"
@click="handleDelete(scope.row)">删除</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button link type="primary" icon="Sort" @click="handleConvertToModel(scope.row)"> 转换模型 </el-button> <el-button link type="primary" size="small" icon="Sort" @click="handleConvertToModel(scope.row)"> 转换模型
</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button link type="primary" icon="Document" @click="getProcessDefinitionHitoryList(scope.row.id,scope.row.key)"> <el-button link type="primary" size="small" icon="Document"
@click="getProcessDefinitionHitoryList(scope.row.id, scope.row.key)">
历史版本 历史版本
</el-button> </el-button>
</el-col> </el-col>
@ -103,22 +105,18 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
v-show="total > 0" v-model:limit="queryParams.pageSize" @pagination="getList" />
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<!-- 预览图片或xml --> <!-- 预览图片或xml -->
<process-preview ref="previewRef" :url="url" :type="type" /> <process-preview ref="previewRef" />
<!-- 部署文件 --> <!-- 部署文件 -->
<el-dialog v-if="uploadDialog.visible" v-model="uploadDialog.visible" :title="uploadDialog.title" width="30%"> <el-dialog v-if="uploadDialog.visible" v-model="uploadDialog.visible" :title="uploadDialog.title" width="30%">
<el-upload class="upload-demo" drag accept="application/zip,application/xml,.bpmn" :http-request="handerDeployProcessFile"> <el-upload class="upload-demo" drag accept="application/zip,application/xml,.bpmn"
:http-request="handerDeployProcessFile">
<el-icon class="UploadFilled"><upload-filled /></el-icon> <el-icon class="UploadFilled"><upload-filled /></el-icon>
<div class="el-upload__text"><em>点击上传选择BPMN流程文件</em></div> <div class="el-upload__text"><em>点击上传选择BPMN流程文件</em></div>
<div class="el-upload__text">仅支持 .zip.bpmn20.xmlbpmn 格式文件</div> <div class="el-upload__text">仅支持 .zip.bpmn20.xmlbpmn 格式文件</div>
@ -127,7 +125,8 @@
</el-dialog> </el-dialog>
<!-- 历史版本 --> <!-- 历史版本 -->
<el-dialog v-if="processDefinitionDialog.visible" v-model="processDefinitionDialog.visible" :title="processDefinitionDialog.title" width="70%"> <el-dialog v-if="processDefinitionDialog.visible" v-model="processDefinitionDialog.visible"
:title="processDefinitionDialog.title" width="70%">
<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 fixed align="center" type="index" label="序号" width="50"></el-table-column> <el-table-column fixed align="center" type="index" label="序号" width="50"></el-table-column>
@ -141,33 +140,37 @@
<el-link type="primary" @click="clickPreviewXML(scope.row.id)">{{ scope.row.resourceName }}</el-link> <el-link type="primary" @click="clickPreviewXML(scope.row.id)">{{ scope.row.resourceName }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="diagramResourceName" label="流程图片" min-width="80" :show-overflow-tooltip="true"> <el-table-column align="center" prop="diagramResourceName" label="流程图片" min-width="80"
:show-overflow-tooltip="true">
<template #default="scope"> <template #default="scope">
<el-link type="primary" @click="clickPreviewImg(scope.row.id)">{{ scope.row.diagramResourceName }}</el-link> <el-link type="primary" @click="clickPreviewImg(scope.row.id)">{{ scope.row.diagramResourceName }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="suspensionState" label="状态" min-width="70"> <el-table-column align="center" prop="suspensionState" label="状态" min-width="70">
<template #default="scope"> <template #default="scope">
<el-tag type="success" v-if="scope.row.suspensionState==1">激活</el-tag> <el-tag type="success" v-if="scope.row.suspensionState == 1">激活</el-tag>
<el-tag type="danger" v-else>挂起</el-tag> <el-tag type="danger" v-else>挂起</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="deploymentTime" label="部署时间" :show-overflow-tooltip="true"></el-table-column> <el-table-column align="center" prop="deploymentTime" label="部署时间"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="200" class-name="small-padding fixed-width"> <el-table-column fixed="right" label="操作" align="center" width="200" 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"> <el-col :span="1.5">
<el-button link type="primary" :icon="scope.row.suspensionState === 1?'Lock':'Unlock'" @click="handleProcessDefState(scope.row)"> <el-button link type="primary" size="small" :icon="scope.row.suspensionState === 1 ? 'Lock' : 'Unlock'"
{{ scope.row.suspensionState === 1?"挂起流程":"激活流程" }} @click="handleProcessDefState(scope.row)">
{{ scope.row.suspensionState === 1 ? "挂起流程" : "激活流程" }}
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button> <el-button link type="primary" icon="Delete" size="small" @click="handleDelete(scope.row)">删除</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button link type="primary" icon="Sort" @click="handleConvertToModel(scope.row)"> 转换模型 </el-button> <el-button link type="primary" icon="Sort" size="small" @click="handleConvertToModel(scope.row)"> 转换模型
</el-button>
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
@ -303,12 +306,12 @@ const getList = () => {
}); });
}; };
// //
const getProcessDefinitionHitoryList = (id:string,key:string) => { const getProcessDefinitionHitoryList = (id: string, key: string) => {
processDefinitionDialog.visible = true processDefinitionDialog.visible = true
loading.value = true; loading.value = true;
getProcessDefinitionListByKey(key).then((resp) => { getProcessDefinitionListByKey(key).then((resp) => {
if(resp.data && resp.data.length > 0){ if (resp.data && resp.data.length > 0) {
processDefinitionHistoryList.value = resp.data.filter((item:any)=>item.id !== id); processDefinitionHistoryList.value = resp.data.filter((item: any) => item.id !== id);
} }
loading.value = false; loading.value = false;
}); });
@ -316,15 +319,15 @@ const getProcessDefinitionHitoryList = (id:string,key:string) => {
// //
const clickPreviewImg = (id: string) => { const clickPreviewImg = (id: string) => {
loading.value = true; loading.value = true;
processDefinitionImage(id).then((resp) => { processDefinitionImage(id).then((resp) => {
if (previewRef.value) { if (previewRef.value) {
url.value = []; url.value = [];
url.value.push('data:image/png;base64,' + resp.data); url.value.push('data:image/png;base64,' + resp.data);
loading.value = false; loading.value = false;
previewRef.value.openDialog(url, 'png'); previewRef.value.openDialog(url, 'png');
} }
}) })
}; };
//xml //xml
@ -332,10 +335,10 @@ const clickPreviewXML = (id: string) => {
loading.value = true; loading.value = true;
processDefinitionXml(id).then((response) => { processDefinitionXml(id).then((response) => {
if (previewRef.value) { if (previewRef.value) {
url.value = []; url.value = [];
url.value = response.data.xml; url.value = response.data.xml;
loading.value = false; loading.value = false;
previewRef.value.openDialog(url, 'xml'); previewRef.value.openDialog(url, 'xml');
} }
}); });
}; };

View File

@ -5,22 +5,14 @@
<el-col :lg="4" :xs="24" style=""> <el-col :lg="4" :xs="24" style="">
<el-card shadow="hover"> <el-card shadow="hover">
<el-input placeholder="请输入流程分类名" v-model="categoryName" prefix-icon="Search" clearable /> <el-input placeholder="请输入流程分类名" v-model="categoryName" prefix-icon="Search" clearable />
<el-tree <el-tree class="mt-2" ref="categoryTreeRef" node-key="id" :data="categoryOptions"
class="mt-2" :props="{ label: 'categoryName', children: 'children' }" :expand-on-click-node="false"
ref="categoryTreeRef" :filter-node-method="filterNode" highlight-current default-expand-all @node-click="handleNodeClick"></el-tree>
node-key="id"
:data="categoryOptions"
:props="{ label: 'categoryName', children: 'children' }"
:expand-on-click-node="false"
:filter-node-method="filterNode"
highlight-current
default-expand-all
@node-click="handleNodeClick"
></el-tree>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="20" :xs="24"> <el-col :lg="20" :xs="24">
<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 class="mb-[10px]"> <div class="mb-[10px]">
<el-card shadow="hover"> <el-card shadow="hover">
<center> <center>
@ -32,7 +24,8 @@
</el-card> </el-card>
</div> </div>
</transition> </transition>
<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 class="mb-[10px]" v-show="showSearch"> <div class="mb-[10px]" v-show="showSearch">
<el-card shadow="hover"> <el-card shadow="hover">
<el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="120px"> <el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="120px">
@ -77,30 +70,27 @@
</el-table-column> </el-table-column>
<el-table-column align="center" prop="businessStatusName" label="流程状态" min-width="70"> <el-table-column align="center" prop="businessStatusName" label="流程状态" min-width="70">
<template #default="scope"> <template #default="scope">
<el-tag type="success">{{scope.row.businessStatusName}}</el-tag> <el-tag type="success">{{ scope.row.businessStatusName }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="startTime" label="启动时间" width="160"></el-table-column> <el-table-column align="center" prop="startTime" label="启动时间" width="160"></el-table-column>
<el-table-column align="center" v-if="tab === 'finish'" prop="endTime" label="结束时间" width="160"></el-table-column> <el-table-column align="center" v-if="tab === 'finish'" prop="endTime" label="结束时间"
width="160"></el-table-column>
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="160" 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"> <el-col :span="1.5">
<el-button type="text" size="small" icon="el-icon-thumb" @click="handleApprovalRecord(scope.row)">审批记录</el-button> <el-button type="text" size="small" icon="Document"
@click="handleApprovalRecord(scope.row)">审批记录</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="text" size="small" icon="el-icon-thumb" @click="handleDelete(scope.row)">删除</el-button> <el-button type="text" size="small" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10" class="mb8" v-if="tab === 'running'"> <el-row :gutter="10" class="mb8" v-if="tab === 'running'">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="text" size="small" icon="Sort"
type="text" @click="getProcessDefinitionHitoryList(scope.row.processDefinitionId, scope.row.processDefinitionKey)">切换版本</el-button>
size="small"
icon="el-icon-thumb"
@click="getProcessDefinitionHitoryList(scope.row.processDefinitionId,scope.row.processDefinitionKey)"
>切换版本</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-popover trigger="click" :ref="`popoverRef${scope.$index}`" placement="left" :width="300"> <el-popover trigger="click" :ref="`popoverRef${scope.$index}`" placement="left" :width="300">
@ -110,7 +100,7 @@
<el-button size="small" type="primary" @click="handleInvalid(scope.row)">确认</el-button> <el-button size="small" type="primary" @click="handleInvalid(scope.row)">确认</el-button>
</div> </div>
<template #reference> <template #reference>
<el-button type="text" size="small" icon="el-icon-thumb">作废</el-button> <el-button type="text" size="small" icon="CircleClose">作废</el-button>
</template> </template>
</el-popover> </el-popover>
</el-col> </el-col>
@ -118,17 +108,13 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
v-show="total > 0" v-model:limit="queryParams.pageSize" @pagination="handleQuery" />
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="handleQuery"
/>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<el-dialog v-if="processDefinitionDialog.visible" v-model="processDefinitionDialog.visible" :title="processDefinitionDialog.title" width="70%"> <el-dialog v-if="processDefinitionDialog.visible" v-model="processDefinitionDialog.visible"
:title="processDefinitionDialog.title" width="70%">
<el-table v-loading="loading" :data="processDefinitionHistoryList"> <el-table v-loading="loading" :data="processDefinitionHistoryList">
<el-table-column fixed align="center" type="index" label="序号" width="50"></el-table-column> <el-table-column fixed align="center" type="index" label="序号" width="50"></el-table-column>
<el-table-column fixed align="center" prop="name" label="流程定义名称"></el-table-column> <el-table-column fixed align="center" prop="name" label="流程定义名称"></el-table-column>
@ -138,14 +124,15 @@
</el-table-column> </el-table-column>
<el-table-column align="center" prop="suspensionState" label="状态" min-width="70"> <el-table-column align="center" prop="suspensionState" label="状态" min-width="70">
<template #default="scope"> <template #default="scope">
<el-tag type="success" v-if="scope.row.suspensionState==1">激活</el-tag> <el-tag type="success" v-if="scope.row.suspensionState == 1">激活</el-tag>
<el-tag type="danger" v-else>挂起</el-tag> <el-tag type="danger" v-else>挂起</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="deploymentTime" label="部署时间" :show-overflow-tooltip="true"></el-table-column> <el-table-column align="center" prop="deploymentTime" label="部署时间"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="200" class-name="small-padding fixed-width"> <el-table-column fixed="right" label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" icon="Sort" @click="handleChange(scope.row.id)">切换</el-button> <el-button link type="primary" size="small" icon="Sort" @click="handleChange(scope.row.id)">切换</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -230,23 +217,23 @@ onMounted(() => {
/** 节点单击事件 */ /** 节点单击事件 */
const handleNodeClick = (data: CategoryVO) => { const handleNodeClick = (data: CategoryVO) => {
queryParams.value.categoryCode = data.categoryCode; queryParams.value.categoryCode = data.categoryCode;
if(data.categoryCode === 'ALL'){ if (data.categoryCode === 'ALL') {
queryParams.value.categoryCode ='' queryParams.value.categoryCode = ''
} }
handleQuery() handleQuery()
} }
/** 通过条件过滤节点 */ /** 通过条件过滤节点 */
const filterNode = (value: string, data: any) => { const filterNode = (value: string, data: any) => {
if (!value) return true if (!value) return true
return data.categoryName.indexOf(value) !== -1 return data.categoryName.indexOf(value) !== -1
} }
/** 根据名称筛选部门树 */ /** 根据名称筛选部门树 */
watchEffect( watchEffect(
() => {categoryTreeRef.value.filter(categoryName.value);}, () => { categoryTreeRef.value.filter(categoryName.value); },
{ {
flush: 'post' // watchEffectDOMDOM flush: 'post' // watchEffectDOMDOM
} }
); );
/** 查询流程分类下拉树结构 */ /** 查询流程分类下拉树结构 */
@ -345,22 +332,22 @@ const cancelPopover = async (index: any) => {
(proxy?.$refs[`popoverRef${index}`] as any).hide(); // (proxy?.$refs[`popoverRef${index}`] as any).hide(); //
}; };
// //
const getProcessDefinitionHitoryList = (id:string,key:string) => { const getProcessDefinitionHitoryList = (id: string, key: string) => {
processDefinitionDialog.visible = true processDefinitionDialog.visible = true
processDefinitionId.value = id processDefinitionId.value = id
loading.value = true; loading.value = true;
getProcessDefinitionListByKey(key).then((resp) => { getProcessDefinitionListByKey(key).then((resp) => {
if(resp.data && resp.data.length > 0){ if (resp.data && resp.data.length > 0) {
processDefinitionHistoryList.value = resp.data.filter((item:any)=>item.id !== id); processDefinitionHistoryList.value = resp.data.filter((item: any) => item.id !== id);
} }
loading.value = false; loading.value = false;
}); });
}; };
// //
const handleChange = async (id:string) => { const handleChange = async (id: string) => {
await proxy?.$modal.confirm('是否确认切换?'); await proxy?.$modal.confirm('是否确认切换?');
loading.value = true; loading.value = true;
migrationProcessDefinition(processDefinitionId.value,id).then((resp) => { migrationProcessDefinition(processDefinitionId.value, id).then((resp) => {
proxy?.$modal.msgSuccess('操作成功'); proxy?.$modal.msgSuccess('操作成功');
getProcessInstanceRunningList(); getProcessInstanceRunningList();
processDefinitionDialog.visible = false processDefinitionDialog.visible = false

View File

@ -1,6 +1,7 @@
<template> <template>
<div class="p-2"> <div class="p-2">
<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 class="mb-[10px]"> <div class="mb-[10px]">
<el-card shadow="hover"> <el-card shadow="hover">
<center> <center>
@ -12,7 +13,8 @@
</el-card> </el-card>
</div> </div>
</transition> </transition>
<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 class="mb-[10px]" v-show="showSearch"> <div class="mb-[10px]" v-show="showSearch">
<el-card shadow="hover"> <el-card shadow="hover">
<el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="68px">
@ -20,10 +22,12 @@
<el-input v-model="queryParams.name" placeholder="请输入任务名称" clearable @keyup.enter="handleQuery" /> <el-input v-model="queryParams.name" placeholder="请输入任务名称" clearable @keyup.enter="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="流程定义名称" label-width="100" prop="name"> <el-form-item label="流程定义名称" label-width="100" prop="name">
<el-input v-model="queryParams.processDefinitionName" placeholder="请输入流程定义名称" clearable @keyup.enter="handleQuery" /> <el-input v-model="queryParams.processDefinitionName" placeholder="请输入流程定义名称" clearable
@keyup.enter="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="流程定义KEY" label-width="100" prop="name"> <el-form-item label="流程定义KEY" label-width="100" prop="name">
<el-input v-model="queryParams.processDefinitionKey" placeholder="请输入流程定义KEY" clearable @keyup.enter="handleQuery" /> <el-input v-model="queryParams.processDefinitionKey" placeholder="请输入流程定义KEY" clearable
@keyup.enter="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
@ -49,7 +53,7 @@
<el-table-column fixed align="center" prop="assigneeName" label="办理人"> <el-table-column fixed align="center" prop="assigneeName" label="办理人">
<template #default="scope" v-if="tab === 'waiting'"> <template #default="scope" v-if="tab === 'waiting'">
<template v-if="scope.row.participantVo && scope.row.assignee === null"> <template v-if="scope.row.participantVo && scope.row.assignee === null">
<el-tag type="success" v-for="(item,index) in scope.row.participantVo.candidateName" :key="index"> <el-tag type="success" v-for="(item, index) in scope.row.participantVo.candidateName" :key="index">
{{ item }} {{ item }}
</el-tag> </el-tag>
</template> </template>
@ -67,7 +71,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" prop="businessStatusName" label="流程状态" min-width="70"> <el-table-column align="center" prop="businessStatusName" label="流程状态" min-width="70">
<template #default="scope"> <template #default="scope">
<el-tag type="success" v-if="tab === 'waiting'">{{scope.row.businessStatusName}}</el-tag> <el-tag type="success" v-if="tab === 'waiting'">{{ scope.row.businessStatusName }}</el-tag>
<el-tag type="success" v-else>已完成</el-tag> <el-tag type="success" v-else>已完成</el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -76,25 +80,23 @@
<template #default="scope"> <template #default="scope">
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="text" size="small" icon="el-icon-thumb" @click="handleApprovalRecord(scope.row)">审批记录</el-button> <el-button type="text" size="small" icon="Document"
@click="handleApprovalRecord(scope.row)">审批记录</el-button>
</el-col> </el-col>
<el-col :span="1.5" v-if="scope.row.multiInstance"> <el-col :span="1.5" v-if="scope.row.multiInstance">
<el-button type="text" size="small" icon="el-icon-thumb" @click="addMultiInstanceUser(scope.row)">加签</el-button> <el-button type="text" size="small" icon="CirclePlus"
@click="addMultiInstanceUser(scope.row)">加签</el-button>
</el-col> </el-col>
<el-col :span="1.5" v-if="scope.row.multiInstance"> <el-col :span="1.5" v-if="scope.row.multiInstance">
<el-button type="text" size="small" icon="el-icon-thumb" @click="deleteMultiInstanceUser(scope.row)">减签</el-button> <el-button type="text" size="small" icon="Remove"
@click="deleteMultiInstanceUser(scope.row)">减签</el-button>
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
v-show="total > 0" v-model:limit="queryParams.pageSize" @pagination="handleQuery" />
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="handleQuery"
/>
</el-card> </el-card>
<!-- 审批记录 --> <!-- 审批记录 -->
<approvalRecord ref="approvalRecordRef" /> <approvalRecord ref="approvalRecordRef" />

View File

@ -1,6 +1,7 @@
<template> <template>
<div class="p-2"> <div class="p-2">
<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 class="mb-[10px]"> <div class="mb-[10px]">
<el-card shadow="hover"> <el-card shadow="hover">
<center> <center>
@ -12,7 +13,8 @@
</el-card> </el-card>
</div> </div>
</transition> </transition>
<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 class="mb-[10px]" v-show="showSearch"> <div class="mb-[10px]" v-show="showSearch">
<el-card shadow="hover"> <el-card shadow="hover">
<el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="68px">
@ -20,10 +22,12 @@
<el-input v-model="queryParams.name" placeholder="请输入任务名称" clearable @keyup.enter="handleQuery" /> <el-input v-model="queryParams.name" placeholder="请输入任务名称" clearable @keyup.enter="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="流程定义名称" label-width="100" prop="name"> <el-form-item label="流程定义名称" label-width="100" prop="name">
<el-input v-model="queryParams.processDefinitionName" placeholder="请输入流程定义名称" clearable @keyup.enter="handleQuery" /> <el-input v-model="queryParams.processDefinitionName" placeholder="请输入流程定义名称" clearable
@keyup.enter="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="流程定义KEY" label-width="100" prop="name"> <el-form-item label="流程定义KEY" label-width="100" prop="name">
<el-input v-model="queryParams.processDefinitionKey" placeholder="请输入流程定义KEY" clearable @keyup.enter="handleQuery" /> <el-input v-model="queryParams.processDefinitionKey" placeholder="请输入流程定义KEY" clearable
@keyup.enter="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
@ -49,7 +53,7 @@
<el-table-column fixed align="center" prop="assigneeName" label="办理人"> <el-table-column fixed align="center" prop="assigneeName" label="办理人">
<template #default="scope" v-if="tab === 'waiting'"> <template #default="scope" v-if="tab === 'waiting'">
<template v-if="scope.row.participantVo && scope.row.assignee === null"> <template v-if="scope.row.participantVo && scope.row.assignee === null">
<el-tag type="success" v-for="(item,index) in scope.row.participantVo.candidateName" :key="index"> <el-tag type="success" v-for="(item, index) in scope.row.participantVo.candidateName" :key="index">
{{ item }} {{ item }}
</el-tag> </el-tag>
</template> </template>
@ -67,7 +71,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" prop="businessStatusName" label="流程状态" min-width="70"> <el-table-column align="center" prop="businessStatusName" label="流程状态" min-width="70">
<template #default="scope"> <template #default="scope">
<el-tag type="success" v-if="tab === 'waiting'">{{scope.row.businessStatusName}}</el-tag> <el-tag type="success" v-if="tab === 'waiting'">{{ scope.row.businessStatusName }}</el-tag>
<el-tag type="success" v-else>已完成</el-tag> <el-tag type="success" v-else>已完成</el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -76,31 +80,27 @@
<template #default="scope"> <template #default="scope">
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="text" size="small" icon="el-icon-thumb" @click="handleApprovalRecord(scope.row)">审批记录</el-button> <el-button type="text" size="small" icon="Document"
@click="handleApprovalRecord(scope.row)">审批记录</el-button>
</el-col> </el-col>
<el-col <el-col :span="1.5"
:span="1.5" v-if="tab === 'waiting' && scope.row.participantVo && (scope.row.participantVo.claim === null || scope.row.participantVo.claim === true)">
v-if="tab === 'waiting' && scope.row.participantVo && (scope.row.participantVo.claim === null||scope.row.participantVo.claim === true)" <el-button type="text" size="small" icon="Edit" @click="submitVerifyOpen(scope.row.id)">办理</el-button>
>
<el-button type="text" size="small" icon="el-icon-thumb" @click="submitVerifyOpen(scope.row.id)">办理</el-button>
</el-col> </el-col>
<el-col :span="1.5" v-if="tab === 'waiting' && scope.row.participantVo && scope.row.participantVo.claim === true"> <el-col :span="1.5"
<el-button type="text" size="small" icon="el-icon-thumb" @click="handleReturnTask(scope.row.id)">归还</el-button> v-if="tab === 'waiting' && scope.row.participantVo && scope.row.participantVo.claim === true">
<el-button type="text" size="small" icon="Document" @click="handleReturnTask(scope.row.id)">归还</el-button>
</el-col> </el-col>
<el-col :span="1.5" v-if="tab === 'waiting' && scope.row.participantVo && scope.row.participantVo.claim === false"> <el-col :span="1.5"
<el-button type="text" size="small" icon="el-icon-thumb" @click="handleClaimTask(scope.row.id)">认领</el-button> v-if="tab === 'waiting' && scope.row.participantVo && scope.row.participantVo.claim === false">
<el-button type="text" size="small" icon="Document" @click="handleClaimTask(scope.row.id)">认领</el-button>
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
v-show="total > 0" v-model:limit="queryParams.pageSize" @pagination="handleQuery" />
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="handleQuery"
/>
</el-card> </el-card>
<!-- 审批记录 --> <!-- 审批记录 -->
<approvalRecord ref="approvalRecordRef" /> <approvalRecord ref="approvalRecordRef" />
@ -200,7 +200,7 @@ const getFinishList = () => {
// //
const submitVerifyOpen = async (id: string) => { const submitVerifyOpen = async (id: string) => {
if (submitVerifyRef.value) { if (submitVerifyRef.value) {
submitVerifyRef.value.openDialog(true,id); submitVerifyRef.value.openDialog(true, id);
} }
}; };

View File

@ -5,22 +5,14 @@
<el-col :lg="4" :xs="24" style=""> <el-col :lg="4" :xs="24" style="">
<el-card shadow="hover"> <el-card shadow="hover">
<el-input placeholder="请输入流程分类名" v-model="categoryName" prefix-icon="Search" clearable /> <el-input placeholder="请输入流程分类名" v-model="categoryName" prefix-icon="Search" clearable />
<el-tree <el-tree class="mt-2" ref="categoryTreeRef" node-key="id" :data="categoryOptions"
class="mt-2" :props="{ label: 'categoryName', children: 'children' }" :expand-on-click-node="false"
ref="categoryTreeRef" :filter-node-method="filterNode" highlight-current default-expand-all @node-click="handleNodeClick"></el-tree>
node-key="id"
:data="categoryOptions"
:props="{ label: 'categoryName', children: 'children' }"
:expand-on-click-node="false"
:filter-node-method="filterNode"
highlight-current
default-expand-all
@node-click="handleNodeClick"
></el-tree>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="20" :xs="24"> <el-col :lg="20" :xs="24">
<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 class="mb-[10px]" v-show="showSearch"> <div class="mb-[10px]" v-show="showSearch">
<el-card shadow="hover"> <el-card shadow="hover">
<el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="120px"> <el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="120px">
@ -59,43 +51,38 @@
</el-table-column> </el-table-column>
<el-table-column align="center" prop="businessStatusName" label="流程状态" min-width="70"> <el-table-column align="center" prop="businessStatusName" label="流程状态" min-width="70">
<template #default="scope"> <template #default="scope">
<el-tag type="success">{{scope.row.businessStatusName}}</el-tag> <el-tag type="success">{{ scope.row.businessStatusName }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="startTime" label="启动时间" width="160"></el-table-column> <el-table-column align="center" prop="startTime" label="启动时间" width="160"></el-table-column>
<el-table-column align="center" v-if="tab === 'finish'" prop="endTime" label="结束时间" width="160"></el-table-column> <el-table-column align="center" v-if="tab === 'finish'" prop="endTime" label="结束时间"
width="160"></el-table-column>
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="160" 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"> <el-col :span="1.5">
<el-button type="text" size="small" icon="el-icon-thumb" @click="handleApprovalRecord(scope.row)">审批记录</el-button> <el-button type="text" size="small" icon="Document"
@click="handleApprovalRecord(scope.row)">审批记录</el-button>
</el-col> </el-col>
<el-col <el-col :span="1.5"
:span="1.5" v-if="scope.row.businessStatus === 'draft' || scope.row.businessStatus === 'cancel' || scope.row.businessStatus === 'back'">
v-if="scope.row.businessStatus === 'draft'||scope.row.businessStatus === 'cancel'||scope.row.businessStatus === 'back'" <el-button type="text" size="small" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
>
<el-button type="text" size="small" icon="el-icon-thumb" @click="handleDelete(scope.row)">删除</el-button>
</el-col> </el-col>
<el-col :span="1.5" v-if="scope.row.businessStatus === 'waiting'"> <el-col :span="1.5" v-if="scope.row.businessStatus === 'waiting'">
<el-button type="text" size="small" icon="el-icon-thumb" @click="handleCancelProcessApply(scope.row)">撤销</el-button> <el-button type="text" size="small" icon="Notification"
@click="handleCancelProcessApply(scope.row)">撤销</el-button>
</el-col> </el-col>
<el-col <el-col :span="1.5"
:span="1.5" v-if="scope.row.businessStatus === 'draft' || scope.row.businessStatus === 'cancel' || scope.row.businessStatus === 'back'">
v-if="scope.row.businessStatus === 'draft'||scope.row.businessStatus === 'cancel'||scope.row.businessStatus === 'back'" <el-button type="text" size="small" icon="Edit"
> @click="submitVerifyOpen(scope.row.taskVoList[0].id)">提交</el-button>
<el-button type="text" size="small" icon="el-icon-thumb" @click="submitVerifyOpen(scope.row.taskVoList[0].id)">提交</el-button>
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
v-show="total > 0" v-model:limit="queryParams.pageSize" @pagination="getList" />
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
@ -252,7 +239,7 @@ const handleCancelProcessApply = async (row: any) => {
// //
const submitVerifyOpen = async (id: string) => { const submitVerifyOpen = async (id: string) => {
if (submitVerifyRef.value) { if (submitVerifyRef.value) {
submitVerifyRef.value.openDialog(true,id); submitVerifyRef.value.openDialog(true, id);
} }
}; };
</script> </script>