feat(flow) add delete button, delete export button

deliver/approver-flow
bob 2 years ago
parent 94deb7399f
commit b2fa07be98

@ -0,0 +1,146 @@
import request from '@/utils/request'
// 查询流程定义列表
export function listDefinition(query) {
return request({
url: '/flowable/definition/list',
method: 'get',
params: query
})
}
// 部署流程实例
export function definitionStart(procDefId, data) {
return request({
url: '/flowable/definition/start/' + procDefId,
method: 'post',
data: data
})
}
// 获取流程变量
export function getProcessVariables(taskId) {
return request({
url: '/flowable/task/processVariables/' + taskId,
method: 'get'
})
}
// 更新流程变量提交时间
export function updateVariablesSubmitDate(data) {
return request({
url: '/flowable/task/updateVariablesSubmitDate',
method: 'post',
data: data
})
}// 更新流程变量提交时间
export function updateTaskFinishDate(data) {
return request({
url: '/flowable/task/updateTaskFinishDate',
method: 'post',
data: data
})
}
// 激活/挂起流程
export function updateState(params) {
return request({
url: '/flowable/definition/updateState',
method: 'put',
params: params
})
}
// 指定流程办理人员列表
export function userList(query) {
return request({
url: '/flowable/definition/userList',
method: 'get',
params: query
})
}
// 指定流程办理组列表
export function roleList(query) {
return request({
url: '/flowable/definition/roleList',
method: 'get',
params: query
})
}
// 读取xml文件
export function readXml(deployId) {
return request({
url: '/flowable/definition/readXml/' + deployId,
method: 'get'
})
}
// 读取image文件
export function readImage(deployId) {
return request({
url: '/flowable/definition/readImage/' + deployId,
method: 'get'
})
}
// 读取image文件
export function getFlowViewer(procInsId, executionId) {
return request({
url: '/flowable/task/flowViewer/' + procInsId + '/' + executionId,
method: 'get'
})
}
// 读取xml文件
export function saveXml(data) {
return request({
url: '/flowable/definition/save',
method: 'post',
data: data
})
}
// 获取最新流程id
export function getLatestIdByKey(procKey) {
return request({
url: '/flowable/definition/getLatestIdByKey/' + procKey,
method: 'get'
});
}
// 新增流程定义
export function addDeployment(data) {
return request({
url: '/system/deployment',
method: 'post',
data: data
})
}
// 修改流程定义
export function updateDeployment(data) {
return request({
url: '/system/deployment',
method: 'put',
data: data
})
}
// 删除流程定义
export function delProcessInstance(param) {
return request({
url: '/flowable/instance/delete/',
method: 'delete',
params: param
})
}
// 导出流程定义
export function exportDeployment(query) {
return request({
url: '/system/deployment/export',
method: 'get',
params: query
})
}

@ -1,26 +1,26 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="名称" prop="name"> <!-- <el-form-item label="名称" prop="name">-->
<el-input <!-- <el-input-->
v-model="queryParams.name" <!-- v-model="queryParams.name"-->
placeholder="请输入名称" <!-- placeholder="请输入名称"-->
clearable <!-- clearable-->
size="small" <!-- size="small"-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="开始时间" prop="deployTime"> <!-- <el-form-item label="开始时间" prop="deployTime">-->
<el-date-picker clearable size="small" <!-- <el-date-picker clearable size="small"-->
v-model="queryParams.deployTime" <!-- v-model="queryParams.deployTime"-->
type="date" <!-- type="date"-->
value-format="yyyy-MM-dd" <!-- value-format="yyyy-MM-dd"-->
placeholder="选择时间"> <!-- placeholder="选择时间">-->
</el-date-picker> <!-- </el-date-picker>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>-->
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -43,7 +43,6 @@
<!-- size="mini"--> <!-- size="mini"-->
<!-- :disabled="multiple"--> <!-- :disabled="multiple"-->
<!-- @click="handleDelete"--> <!-- @click="handleDelete"-->
<!-- v-hasPermi="['system:deployment:remove']"-->
<!-- >删除</el-button>--> <!-- >删除</el-button>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- <el-col :span="1.5">--> <!-- <el-col :span="1.5">-->
@ -60,9 +59,9 @@
<!-- </el-row>--> <!-- </el-row>-->
<el-table v-loading="loading" :data="myProcessList" border @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="myProcessList" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="项目名称" align="center" prop="projectName" :show-overflow-tooltip="true"/> <el-table-column label="项目名称" align="center" prop="projectName" :show-overflow-tooltip="true"/>
<el-table-column label="工作问题" align="center" prop="workIssue" :show-overflow-tooltip="true"/> <el-table-column label="工作事项" align="center" prop="workIssue" :show-overflow-tooltip="true"/>
<el-table-column label="提交时间" align="center" prop="createTime" width="180"/> <el-table-column label="提交时间" align="center" prop="createTime" width="180"/>
<el-table-column label="流程状态" align="center" width="100"> <el-table-column label="流程状态" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
@ -70,30 +69,21 @@
<el-tag type="success" v-if="scope.row.finishTime != null" size="mini"></el-tag> <el-tag type="success" v-if="scope.row.finishTime != null" size="mini"></el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="耗时" align="center" prop="duration" width="180"/> <!-- <el-table-column label="当前节点" align="center" prop="taskName"/>-->
<el-table-column label="当前节点" align="center" prop="taskName"/> <!-- <el-table-column label="办理" align="center">-->
<el-table-column label="办理" align="center"> <!-- <template slot-scope="scope">-->
<template slot-scope="scope"> <!-- <label v-if="scope.row.assigneeName">{{scope.row.assigneeName}} <el-tag type="info" size="mini">{{scope.row.deptName}}</el-tag></label>-->
<label v-if="scope.row.assigneeName">{{scope.row.assigneeName}} <el-tag type="info" size="mini">{{scope.row.deptName}}</el-tag></label> <!-- <label v-if="scope.row.candidate">{{scope.row.candidate}}</label>-->
<label v-if="scope.row.candidate">{{scope.row.candidate}}</label> <!-- </template>-->
</template> <!-- </el-table-column>-->
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-dropdown> <el-dropdown>
<span class="el-dropdown-link"> <span class="el-dropdown-link">更多操作<i class="el-icon-arrow-down el-icon--right"></i></span>
更多操作<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item icon="el-icon-tickets" @click.native="handleFlowRecord(scope.row)"> <el-dropdown-item icon="el-icon-tickets" @click.native="handleFlowRecord(scope.row)">详情</el-dropdown-item>
详情 <el-dropdown-item icon="el-icon-delete" @click.native="handleDownloadAttachment(scope.row)">下载附件</el-dropdown-item>
</el-dropdown-item> <el-dropdown-item icon="el-icon-delete" @click.native="handleDelete(scope.row)">删除</el-dropdown-item>
<!-- <el-dropdown-item icon="el-icon-circle-close" @click.native="handleUpdateSubmitDate(scope.row)">-->
<!-- 更新提交时间-->
<!-- </el-dropdown-item>-->
<el-dropdown-item icon="el-icon-delete" @click.native="handleDownloadAttachment(scope.row)">
下载附件
</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>
@ -116,13 +106,13 @@
<script> <script>
import { import {
getDeployment, getDeployment,
delDeployment,
addDeployment, addDeployment,
updateDeployment, updateDeployment,
exportDeployment, exportDeployment,
flowRecord flowRecord
} from "@/api/flowable/finished"; } from "@/api/flowable/finished";
import {allProcessList, myProcessList, stopProcess} from "@/api/flowable/process"; import {allProcessList, myProcessList, stopProcess} from "@/api/flowable/process";
import { delProcessInstance } from "@/api/flowable/processInstance";
import {listDefinition, updateVariablesSubmitDate} from "@/api/flowable/definition"; import {listDefinition, updateVariablesSubmitDate} from "@/api/flowable/definition";
import {downLoadZip} from "@/utils/zipdownload"; import {downLoadZip} from "@/utils/zipdownload";
import {downloadAttachment} from "@/api/system/attachment"; import {downloadAttachment} from "@/api/system/attachment";
@ -210,6 +200,27 @@ export default {
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
/** 删除按钮操作 */
handleDelete(row) {
// const ids = row.procInsId || this.ids;//
const ids = row.procInsId;
this.$confirm('是否确认删除该申请记录?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delProcessInstance(
{
instanceId:row.procInsId,
deleteReason:"管理员删除"
}
);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
},
// //
reset() { reset() {
this.form = { this.form = {

@ -1,57 +1,55 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名称" prop="name"> <!-- <el-form-item label="名称" prop="name">-->
<el-input <!-- <el-input-->
v-model="queryParams.name" <!-- v-model="queryParams.name"-->
placeholder="请输入名称" <!-- placeholder="请输入名称"-->
clearable <!-- clearable-->
size="small" <!-- size="small"-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="开始时间" prop="deployTime"> <!-- <el-form-item label="开始时间" prop="deployTime">-->
<el-date-picker clearable size="small" <!-- <el-date-picker clearable size="small"-->
v-model="queryParams.deployTime" <!-- v-model="queryParams.deployTime"-->
type="date" <!-- type="date"-->
value-format="yyyy-MM-dd" <!-- value-format="yyyy-MM-dd"-->
placeholder="选择时间"> <!-- placeholder="选择时间">-->
</el-date-picker> <!-- </el-date-picker>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>-->
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <!-- <el-row :gutter="10" class="mb8">-->
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="danger" <!-- type="danger"-->
plain <!-- plain-->
icon="el-icon-delete" <!-- icon="el-icon-delete"-->
size="mini" <!-- size="mini"-->
:disabled="multiple" <!-- :disabled="multiple"-->
@click="handleDelete" <!-- @click="handleDelete"-->
v-hasPermi="['system:deployment:remove']" <!-- v-hasPermi="['system:deployment:remove']"-->
>删除</el-button> <!-- >删除</el-button>-->
</el-col> <!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
</el-row> <!-- </el-row>-->
<el-table v-loading="loading" :data="finishedList" border @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="finishedList" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="任务编号" align="center" prop="taskId" :show-overflow-tooltip="true"/> <el-table-column label="项目名称" align="center" prop="projectName" :show-overflow-tooltip="true"/>
<el-table-column label="流程名称" align="center" prop="procDefName" :show-overflow-tooltip="true"/> <el-table-column label="工作问题" align="center" prop="workIssue" :show-overflow-tooltip="true"/>
<el-table-column label="任务节点" align="center" prop="taskName" /> <el-table-column label="任务节点" align="center" prop="taskName"/>
<el-table-column label="流程发起人" align="center"> <el-table-column label="流程发起人" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<label>{{scope.row.startUserName}} <el-tag type="info" size="mini">{{scope.row.startDeptName}}</el-tag></label> <label>{{scope.row.startUserName}} <el-tag type="info" size="mini">{{scope.row.startDeptName}}</el-tag></label>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="接收时间" align="center" prop="createTime" width="180"/> <el-table-column label="接收时间" align="center" prop="createTime" width="180"/>
<el-table-column label="审批时间" align="center" prop="finishTime" width="180"/>
<el-table-column label="耗时" align="center" prop="duration" width="180"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button

@ -1,32 +1,32 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名称" prop="name"> <!-- <el-form-item label="名称" prop="name">-->
<el-input <!-- <el-input-->
v-model="queryParams.name" <!-- v-model="queryParams.name"-->
placeholder="请输入名称" <!-- placeholder="请输入名称"-->
clearable <!-- clearable-->
size="small" <!-- size="small"-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="开始时间" prop="deployTime"> <!-- <el-form-item label="开始时间" prop="deployTime">-->
<el-date-picker clearable size="small" <!-- <el-date-picker clearable size="small"-->
v-model="queryParams.deployTime" <!-- v-model="queryParams.deployTime"-->
type="date" <!-- type="date"-->
value-format="yyyy-MM-dd" <!-- value-format="yyyy-MM-dd"-->
placeholder="选择时间"> <!-- placeholder="选择时间">-->
</el-date-picker> <!-- </el-date-picker>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>-->
<!-- <el-button type="primary" @click="handleAddOaProject"></el-button>--> <!-- <el-button type="primary" @click="handleAddOaProject"></el-button>-->
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">--> <!-- <el-col :span="1.5">-->
<!-- <el-button--> <!-- <el-button-->
@ -39,18 +39,18 @@
<!-- v-hasPermi="['system:deployment:remove']"--> <!-- v-hasPermi="['system:deployment:remove']"-->
<!-- >删除</el-button>--> <!-- >删除</el-button>-->
<!-- </el-col>--> <!-- </el-col>-->
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="warning" <!-- type="warning"-->
plain <!-- plain-->
icon="el-icon-download" <!-- icon="el-icon-download"-->
size="mini" <!-- size="mini"-->
@click="handleExport" <!-- @click="handleExport"-->
v-hasPermi="['system:deployment:export']" <!-- v-hasPermi="['system:deployment:export']"-->
>导出</el-button> <!-- >导出</el-button>-->
</el-col> <!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
</el-row> <!-- </el-row>-->
<el-table v-loading="loading" :data="myProcessList" border @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="myProcessList" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />

@ -1,26 +1,26 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名称" prop="name"> <!-- <el-form-item label="名称" prop="name">-->
<el-input <!-- <el-input-->
v-model="queryParams.name" <!-- v-model="queryParams.name"-->
placeholder="请输入名称" <!-- placeholder="请输入名称"-->
clearable <!-- clearable-->
size="small" <!-- size="small"-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="开始时间" prop="deployTime"> <!-- <el-form-item label="开始时间" prop="deployTime">-->
<el-date-picker clearable size="small" <!-- <el-date-picker clearable size="small"-->
v-model="queryParams.deployTime" <!-- v-model="queryParams.deployTime"-->
type="date" <!-- type="date"-->
value-format="yyyy-MM-dd" <!-- value-format="yyyy-MM-dd"-->
placeholder="选择时间"> <!-- placeholder="选择时间">-->
</el-date-picker> <!-- </el-date-picker>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>-->
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -45,11 +45,6 @@
<el-table-column label="项目名称" align="center" prop="projectName" :show-overflow-tooltip="true"/> <el-table-column label="项目名称" align="center" prop="projectName" :show-overflow-tooltip="true"/>
<el-table-column label="工作问题" align="center" prop="workIssue" :show-overflow-tooltip="true"/> <el-table-column label="工作问题" align="center" prop="workIssue" :show-overflow-tooltip="true"/>
<el-table-column label="任务节点" align="center" prop="taskName"/> <el-table-column label="任务节点" align="center" prop="taskName"/>
<el-table-column label="流程版本" align="center">
<template slot-scope="scope">
<el-tag size="medium" >v{{scope.row.procDefVersion}}</el-tag>
</template>
</el-table-column>
<el-table-column label="流程发起人" align="center"> <el-table-column label="流程发起人" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<label>{{scope.row.startUserName}} <el-tag type="info" size="mini">{{scope.row.startDeptName}}</el-tag></label> <label>{{scope.row.startUserName}} <el-tag type="info" size="mini">{{scope.row.startDeptName}}</el-tag></label>

Loading…
Cancel
Save