|
|
@ -28,10 +28,10 @@ |
|
|
|
<div class="listcon"> |
|
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width:100%" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column width="60px" label="序号" type="index" :index="tableKey+1" align="center"/> |
|
|
|
<el-table-column width="150px" label="操作" align="center"> |
|
|
|
<el-table-column width="180px" label="操作" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" size="small" @click="handleCheck(scope.row)">详情</el-button> |
|
|
|
<!-- <el-button type="danger" size="small" @click="handleRevoke(scope.row)">撤回</el-button>--> |
|
|
|
<el-button type="danger" v-show="scope.row.endTime === null && scope.row.startUserSid === listQuery.params.userSid" size="small" @click="handleTerminate(scope.row)">终止</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column label="流程类别" align="center">--> |
|
|
@ -102,6 +102,26 @@ |
|
|
|
<!--流程流转记录--> |
|
|
|
<flow-records :xmlData="xmlData" :taskData="taskList" :flowRecordList="flowRecordList"></flow-records> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 发起人终止申请,填写终止原因 --> |
|
|
|
<el-dialog center :visible.sync="breakProcessVisible" width="50%"> |
|
|
|
<el-form :model="dialogList" class="formadd"> |
|
|
|
<el-row style="border-top: 1px solid #E0E3EB"> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>终止原因</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="20"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="dialogList.comment" clearable placeholder="" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" resize="none"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button size="small" type="primary" @click="handleConfirm">确定</el-button> |
|
|
|
<el-button size="small" @click="breakProcessVisible = false">取消</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
@ -109,7 +129,7 @@ import flowRecords from '@/components/flow/flowRecord' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import { getStorage } from '@/utils/auth' |
|
|
|
import { revokeTask, getList, selectUrl, readXml, getFlowViewer } from '@/api/flow/todo' |
|
|
|
import { revokeTask, getList, selectUrl, readXml, getFlowViewer, breakProcess } from '@/api/flow/todo' |
|
|
|
import { flowRecord, revokeProcess } from "@/api/workflow/finished" |
|
|
|
import { loginDetails } from '@/api/user' |
|
|
|
// import flow from "@/views/flow/flow"; |
|
|
@ -144,8 +164,15 @@ import flowRecords from '@/components/flow/flowRecord' |
|
|
|
taskId: '', |
|
|
|
userSid: '' |
|
|
|
}, |
|
|
|
breakProcessVisible: false, |
|
|
|
dialogList: { |
|
|
|
comment: '' |
|
|
|
businessSid: '', |
|
|
|
comment: '', |
|
|
|
instanceId: '', |
|
|
|
taskId: '', |
|
|
|
orgSidPath: '', |
|
|
|
taskDefKey: '', |
|
|
|
userSid: '' |
|
|
|
}, |
|
|
|
selectUrl_list: { |
|
|
|
proc_def_id: '', // 流程定义id |
|
|
@ -277,52 +304,35 @@ import flowRecords from '@/components/flow/flowRecord' |
|
|
|
this.url = '' |
|
|
|
this.centerDialogVisible = false |
|
|
|
}, |
|
|
|
/** 确认撤回任务 */ |
|
|
|
openRevoke() { |
|
|
|
this.$confirm('是否确认执行撤回操作', '提示', { |
|
|
|
handleTerminate(row) { |
|
|
|
this.breakProcessVisible = true |
|
|
|
this.dialogList.comment = '' |
|
|
|
this.dialogList.businessSid = row.processVariables.businessSid |
|
|
|
this.dialogList.instanceId = row.procInsId |
|
|
|
this.dialogList.taskId = row.taskId |
|
|
|
this.dialogList.taskDefKey = row.taskDefKey |
|
|
|
this.dialogList.userSid = window.sessionStorage.getItem('userSid') |
|
|
|
}, |
|
|
|
handleConfirm() { |
|
|
|
if (this.dialogList.comment === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请填写终止原因' }) |
|
|
|
return |
|
|
|
} |
|
|
|
const tip = '请确认是否终止该申请' |
|
|
|
this.$confirm(tip, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.handleRevoke() |
|
|
|
}).catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: 'info', |
|
|
|
message: '已取消删除' |
|
|
|
breakProcess(this.dialogList).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.breakProcessVisible = false |
|
|
|
this.$message({ showClose: true, type: 'success', message: '操作成功' }) |
|
|
|
this.getList() |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** 撤回任务 */ |
|
|
|
handleRevoke() { |
|
|
|
console.log('1111122222', this.revokeList) |
|
|
|
revokeTask(this.revokeList).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '执行成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
// this.getList(); |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '执行失败', |
|
|
|
type: 'error', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
// const params = { |
|
|
|
// instanceId: row.procInsId, |
|
|
|
// taskId: row.taskId, |
|
|
|
// userSid: window.sessionStorage.getItem('userSid') |
|
|
|
// } |
|
|
|
// revokeProcess(params).then(res => { |
|
|
|
// this.msgSuccess(res.msg); |
|
|
|
// this.handleQuery(); |
|
|
|
// }); |
|
|
|
}, |
|
|
|
/** 流程流转记录 */ |
|
|
|
handleFlowRecord(row) { |
|
|
|
this.getModelDetail(row.deployId) |
|
|
|