diff --git a/src/components/SecondDev/OpinionDialog.vue b/src/components/SecondDev/OpinionDialog.vue index 80a71a4..3373549 100644 --- a/src/components/SecondDev/OpinionDialog.vue +++ b/src/components/SecondDev/OpinionDialog.vue @@ -122,14 +122,16 @@ } function onClickOK() { - const isEmpty = flowNextNodes.value.find((node) => !node.assignees?.length); - if (!isEnd.value && _action.value === 'agree' && isEmpty) { - return message.error('请选择审批人'); - } const nextTaskUser = {}; - flowNextNodes.value.forEach((nNode) => { - nextTaskUser[nNode.activityId] = isEnd.value ? '' : nNode.assignees.join(','); - }); + if (_action.value === 'agree' && !isEnd.value) { + const isEmpty = flowNextNodes.value.find((node) => !node.assignees?.length); + if (isEmpty) { + return message.error('请选择审批人'); + } + flowNextNodes.value.forEach((nNode) => { + nextTaskUser[nNode.activityId] = isEnd.value ? '' : nNode.assignees.join(','); + }); + } if (_callback && typeof _callback === 'function') { loading.value = true; _callback({