[update 流程加签按钮] 改成流程页面里进行判断

This commit is contained in:
danshihao
2024-09-11 11:33:02 +08:00
parent 464154ddaf
commit 21606264aa
5 changed files with 13 additions and 5 deletions
+9 -1
View File
@@ -8,7 +8,8 @@ export const WorkCenterMixin = {
return {
personnelInfoData: [], // 需要传给PersonnelInfo的数据
switchValue: 'base',
formItemColon: false // a-form不显示冒号
formItemColon: false, // a-form不显示冒号
showCountersign: false // 加签按钮是否显示
}
},
methods: {
@@ -22,6 +23,13 @@ export const WorkCenterMixin = {
getProcessNodeList(param).then(res => {
if (res.success) {
console.log(res.result)
let curNode = res.result.find(item => item.xmlNodeId === this.$route.query.nodeId)
// 如果nodeId没有找到,再去匹配流程名
if (!curNode) {
curNode = res.result.find(item => item.nodeName === this.$route.query.taskName)
}
// 是否显示会签
this.showCountersign = curNode ? curNode.countersignFlag + '' === '1' : false
// 处理人员信息数据,判断每个节点是否能选人
this.personnelInfoData = res.result.map(item => {
return {
@@ -161,7 +161,7 @@
<!-- 操作按钮 -->
<div v-if="!isLook" class="detail-page-bottom-operate-box">
<!-- 加签 -->
<a-button v-if="$route.query.countersignFlag + '' === '1'" type="primary" ghost :loading="loading" @click="handleAddSign" icon="plus">{{ $t('countersign') }}</a-button>
<a-button v-if="showCountersign" type="primary" ghost :loading="loading" @click="handleAddSign" icon="plus">{{ $t('countersign') }}</a-button>
<!-- 发起节点 -->
<template v-if="currentNode === 1">
<!-- 保存 -->
@@ -100,7 +100,7 @@
<!-- 操作按钮 -->
<div v-if="!isLook" class="detail-page-bottom-operate-box">
<!-- 加签 -->
<a-button v-if="$route.query.countersignFlag + '' === '1'" type="primary" ghost :loading="loading" @click="handleAddSign" icon="plus">{{ $t('countersign') }}</a-button>
<a-button v-if="showCountersign" type="primary" ghost :loading="loading" @click="handleAddSign" icon="plus">{{ $t('countersign') }}</a-button>
<!-- 发起节点 -->
<template v-if="currentNode === 1">
<!-- 保存 -->
@@ -128,7 +128,7 @@
<!-- 操作按钮 -->
<div v-if="!isLook" class="detail-page-bottom-operate-box">
<!-- 加签 -->
<a-button v-if="$route.query.countersignFlag + '' === '1'" type="primary" ghost :loading="loading" @click="handleAddSign" icon="plus">{{ $t('countersign') }}</a-button>
<a-button v-if="showCountersign" type="primary" ghost :loading="loading" @click="handleAddSign" icon="plus">{{ $t('countersign') }}</a-button>
<!-- 发起节点 -->
<template v-if="currentNode === 1">
<!-- 保存 -->
@@ -112,7 +112,7 @@
<!-- 操作按钮 -->
<div class="detail-page-bottom-operate-box" v-if="!isLook">
<!-- 加签 -->
<a-button v-if="$route.query.countersignFlag + '' === '1'" type="primary" ghost :loading="loading" @click="handleCountersign" icon="plus">{{ $t('countersign') }}</a-button>
<a-button v-if="showCountersign" type="primary" ghost :loading="loading" @click="handleCountersign" icon="plus">{{ $t('countersign') }}</a-button>
<!-- 转办 -->
<a-button v-if="btn.includes('transfer') && isPartialDistribution" type="primary" ghost :loading="loading" @click="handleTurnTo" icon="arrow-up">{{ $t('turnTo') }}</a-button>
<!-- 保存 -->