yxk-20260506-"部门负责人接受任务并分配"节点可以选择子流程经办人,并存入局部流程变量,供后续使用。
This commit is contained in:
@@ -148,6 +148,23 @@
|
|||||||
<template v-if="showProcessHandle">
|
<template v-if="showProcessHandle">
|
||||||
<a-divider />
|
<a-divider />
|
||||||
<div class="section-title">流程办理</div>
|
<div class="section-title">流程办理</div>
|
||||||
|
<a-form class="process-variable-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-row :gutter="16">
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="子流程经办人" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
||||||
|
<a-space class="sub-approve-user-row">
|
||||||
|
<a-input
|
||||||
|
v-model:value="subApproveUser"
|
||||||
|
placeholder="输入username,多个用英文逗号分隔"
|
||||||
|
allow-clear
|
||||||
|
:disabled="savingSubApproveUser"
|
||||||
|
/>
|
||||||
|
<a-button type="primary" :loading="savingSubApproveUser" @click="saveSubApproveUserVariable">保存经办人</a-button>
|
||||||
|
</a-space>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
<TaskHandleInnerContent
|
<TaskHandleInnerContent
|
||||||
:form-data="formData"
|
:form-data="formData"
|
||||||
:claim="claim"
|
:claim="claim"
|
||||||
@@ -164,7 +181,7 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
|
import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
|
||||||
import { bgPartymatterFeedbackList, bgPartymatterFeedbackSaveOrUpdate, saveBpmForm } from '../BgPartymatter.api';
|
import { bgPartymatterFeedbackList, bgPartymatterFeedbackSaveOrUpdate, saveBpmForm, setProcessVariable } from '../BgPartymatter.api';
|
||||||
import { usePermission } from '/@/hooks/web/usePermission';
|
import { usePermission } from '/@/hooks/web/usePermission';
|
||||||
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
||||||
const { isDisabledAuth, hasPermission, initBpmFormData} = usePermission();
|
const { isDisabledAuth, hasPermission, initBpmFormData} = usePermission();
|
||||||
@@ -192,8 +209,10 @@
|
|||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const savingMain = ref(false);
|
const savingMain = ref(false);
|
||||||
const savingFeedback = ref(false);
|
const savingFeedback = ref(false);
|
||||||
|
const savingSubApproveUser = ref(false);
|
||||||
const showFeedbackForm = ref(false);
|
const showFeedbackForm = ref(false);
|
||||||
const feedbackList = ref<any[]>([]);
|
const feedbackList = ref<any[]>([]);
|
||||||
|
const subApproveUser = ref('');
|
||||||
|
|
||||||
const mainForm = reactive<Record<string, any>>({
|
const mainForm = reactive<Record<string, any>>({
|
||||||
id: '',
|
id: '',
|
||||||
@@ -356,6 +375,45 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function saveSubApproveUserVariable() {
|
||||||
|
const processInstanceId = processInfo.value.processInstanceId;
|
||||||
|
const usernameValue = normalizeUsernameList(subApproveUser.value);
|
||||||
|
if (!processInstanceId) {
|
||||||
|
createMessage.warning('流程实例ID不能为空');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!usernameValue) {
|
||||||
|
createMessage.warning('请输入子流程经办人username');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
savingSubApproveUser.value = true;
|
||||||
|
try {
|
||||||
|
const res = await setProcessVariable({
|
||||||
|
processInstanceId,
|
||||||
|
taskId: processInfo.value.taskId,
|
||||||
|
local: true,
|
||||||
|
varField: 'subApproveUser',
|
||||||
|
varVal: usernameValue,
|
||||||
|
});
|
||||||
|
if (res.success) {
|
||||||
|
createMessage.success(res.message || '保存成功');
|
||||||
|
} else {
|
||||||
|
createMessage.warning(res.message || '保存失败');
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
savingSubApproveUser.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalizeUsernameList(value: string) {
|
||||||
|
return String(value || '')
|
||||||
|
.split(',')
|
||||||
|
.map((item) => item.trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
.join(',');
|
||||||
|
}
|
||||||
|
|
||||||
function handleProcessSuccess() {
|
function handleProcessSuccess() {
|
||||||
emit('success');
|
emit('success');
|
||||||
}
|
}
|
||||||
@@ -404,6 +462,20 @@
|
|||||||
border-top: 1px solid #f0f0f0;
|
border-top: 1px solid #f0f0f0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.process-variable-form {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub-approve-user-row {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
:deep(.ant-input-affix-wrapper),
|
||||||
|
:deep(.ant-input) {
|
||||||
|
min-width: 280px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.main-actions {
|
.main-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user