|
@@ -64,7 +64,7 @@
|
|
|
|
|
|
|
|
<template v-slot:action="{ row }">
|
|
<template v-slot:action="{ row }">
|
|
|
<el-button type="text" @click.stop="openView(row)">查看</el-button>
|
|
<el-button type="text" @click.stop="openView(row)">查看</el-button>
|
|
|
- <el-button type="text" @click.stop="openApprovalRecord(row)">审批记录</el-button>
|
|
|
|
|
|
|
+ <el-button v-if="canShowApprovalRecord(row)" type="text" @click.stop="openApprovalRecord(row)">审批记录</el-button>
|
|
|
<el-button v-if="canLaunch(row)" type="text" @click.stop="launchApproval(row)">提交审批</el-button>
|
|
<el-button v-if="canLaunch(row)" type="text" @click.stop="launchApproval(row)">提交审批</el-button>
|
|
|
<el-button v-if="canApprove(row)" type="text" @click.stop="openApprove(row)">通过</el-button>
|
|
<el-button v-if="canApprove(row)" type="text" @click.stop="openApprove(row)">通过</el-button>
|
|
|
<el-button v-if="canEdit(row)" type="text" @click.stop="openEdit(row)">编辑</el-button>
|
|
<el-button v-if="canEdit(row)" type="text" @click.stop="openEdit(row)">编辑</el-button>
|
|
@@ -267,6 +267,14 @@ export default {
|
|
|
["DRAFT", "REJECTED", ""].includes(row.statusCode || "DRAFT")
|
|
["DRAFT", "REJECTED", ""].includes(row.statusCode || "DRAFT")
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
|
|
|
+ /** 尚未发起审批时不展示审批记录 */
|
|
|
|
|
+ canShowApprovalRecord(row) {
|
|
|
|
|
+ return Boolean(
|
|
|
|
|
+ row?.processInstanceId ||
|
|
|
|
|
+ row?.approvalInstanceId ||
|
|
|
|
|
+ row?.processInstance,
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
canApprove() {
|
|
canApprove() {
|
|
|
// 审批走 BPM,不在本页本地通过
|
|
// 审批走 BPM,不在本页本地通过
|
|
|
return false;
|
|
return false;
|