架构化审批表单控制权限,添加xispeak审批节点的控制权限说明,修改反馈表单查看格式,修改树形表单实现正确的折叠效果,实现反馈表单的必填字段校验
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
<template>
|
||||
<a-spin :spinning="loading">
|
||||
<div class="bg-xispeak-bpm-form">
|
||||
<a-form class="main-form" :class="{ 'main-form-readonly': mainDisabled }" labelAlign="left" :labelCol="labelCol" :wrapperCol="wrapperCol" :model="mainForm">
|
||||
<a-form
|
||||
class="main-form"
|
||||
:class="{ 'main-form-readonly': mainDisabled }"
|
||||
labelAlign="left"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:model="mainForm"
|
||||
>
|
||||
<div class="base-info-header section-toolbar">
|
||||
<div class="section-title">基础信息</div>
|
||||
<a-space class="section-actions">
|
||||
@@ -9,7 +16,12 @@
|
||||
<Icon icon="ant-design:save-outlined" />
|
||||
保存
|
||||
</a-button>
|
||||
<a-button class="section-action-button" :type="showBaseInfoDetail ? 'default' : 'link'" size="small" @click="showBaseInfoDetail = !showBaseInfoDetail">
|
||||
<a-button
|
||||
class="section-action-button"
|
||||
:type="showBaseInfoDetail ? 'default' : 'link'"
|
||||
size="small"
|
||||
@click="showBaseInfoDetail = !showBaseInfoDetail"
|
||||
>
|
||||
<Icon :icon="showBaseInfoDetail ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
|
||||
{{ showBaseInfoDetail ? '收起基础信息' : '展开全部信息' }}
|
||||
</a-button>
|
||||
@@ -32,6 +44,17 @@
|
||||
<a-date-picker v-model:value="mainForm.time" value-format="YYYY-MM-DD" :disabled="mainDisabled" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="密级" name="secretLevel">
|
||||
<j-dict-select-tag
|
||||
v-model:value="mainForm.secretLevel"
|
||||
dictCode="secret_level"
|
||||
placeholder="请选择密级"
|
||||
:disabled="mainDisabled"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="责任人" name="responsiblePerson">
|
||||
<j-select-user v-model:value="mainForm.responsiblePerson" :disabled="mainDisabled" allow-clear />
|
||||
@@ -74,12 +97,25 @@
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="完成状态" name="completionStatus">
|
||||
<JDictSelectTag v-model:value="mainForm.completionStatus" dictCode="db_status" placeholder="请选择完成状态" type="radio" :disabled="mainDisabled" />
|
||||
<JDictSelectTag
|
||||
v-model:value="mainForm.completionStatus"
|
||||
dictCode="db_status"
|
||||
placeholder="请选择完成状态"
|
||||
type="radio"
|
||||
:disabled="mainDisabled"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="截止日期" name="deadline">
|
||||
<a-date-picker v-model:value="mainForm.deadline" value-format="YYYY-MM-DD HH:mm:ss" :show-time="true" :disabled="mainDisabled" style="width: 100%" allow-clear />
|
||||
<a-date-picker
|
||||
v-model:value="mainForm.deadline"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
:show-time="true"
|
||||
:disabled="mainDisabled"
|
||||
style="width: 100%"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
@@ -120,7 +156,15 @@
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="父级节点" name="pid">
|
||||
<j-tree-select v-model:value="mainForm.pid" dict="bg_xi_speak,impl_status,id" pidField="pid" pidValue="0" hasChildField="has_child" :disabled="mainDisabled" allow-clear />
|
||||
<j-tree-select
|
||||
v-model:value="mainForm.pid"
|
||||
dict="bg_xi_speak,impl_status,id"
|
||||
pidField="pid"
|
||||
pidValue="0"
|
||||
hasChildField="has_child"
|
||||
:disabled="mainDisabled"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
@@ -134,14 +178,26 @@
|
||||
|
||||
<a-divider />
|
||||
|
||||
<div class="feedback-header section-toolbar">
|
||||
<div class="feedback-header section-toolbar" v-if="showFeedbackInfo">
|
||||
<div class="section-title">反馈信息</div>
|
||||
<a-button v-if="showAddFeedback" class="section-action-button feedback-add-button" type="primary" @click="openFeedbackModal">
|
||||
<Icon icon="ant-design:plus-outlined" />
|
||||
新增反馈
|
||||
</a-button>
|
||||
<a-space class="section-actions">
|
||||
<a-button v-if="showAddFeedback" class="section-action-button feedback-add-button" type="primary" @click="openFeedbackModal">
|
||||
<Icon icon="ant-design:plus-outlined" />
|
||||
新增反馈
|
||||
</a-button>
|
||||
<a-button
|
||||
class="section-action-button"
|
||||
:type="showFeedbackDetail ? 'default' : 'link'"
|
||||
size="small"
|
||||
@click="showFeedbackDetail = !showFeedbackDetail"
|
||||
>
|
||||
<Icon :icon="showFeedbackDetail ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
|
||||
{{ showFeedbackDetail ? '收起反馈信息' : '展开反馈信息' }}
|
||||
</a-button>
|
||||
</a-space>
|
||||
</div>
|
||||
<a-table
|
||||
v-if="showFeedbackInfo"
|
||||
rowKey="id"
|
||||
size="small"
|
||||
bordered
|
||||
@@ -152,13 +208,7 @@
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'attachments'">
|
||||
<SUploadFile
|
||||
v-if="record.id"
|
||||
class="feedback-attachment-list"
|
||||
:bussiness-id="record.id"
|
||||
:disabled="true"
|
||||
:multiple="true"
|
||||
/>
|
||||
<SUploadFile v-if="record.id" class="feedback-attachment-list" :bussiness-id="record.id" :disabled="true" :multiple="true" />
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
<template v-if="column.key === 'feedbackAction'">
|
||||
@@ -170,7 +220,7 @@
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
<BgXiSpeakBPMFeedbackModal ref="feedbackModalRef" @success="loadFeedbackList" />
|
||||
<BgXiSpeakBPMFeedbackModal ref="feedbackModalRef" :showJiJianFields="showJiJianFields" @success="loadFeedbackList" />
|
||||
|
||||
<template v-if="showProcessHandle">
|
||||
<a-divider />
|
||||
@@ -187,13 +237,9 @@
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col v-if="showSubApproveUserSelector" :span="12">
|
||||
<a-col v-if="showSubApproveUser" :span="12">
|
||||
<a-form-item label="部门经办人" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
||||
<j-select-user
|
||||
v-model:value="subApproveUser"
|
||||
:disabled="savingSubApproveUser"
|
||||
allow-clear
|
||||
/>
|
||||
<j-select-user v-model:value="subApproveUser" :disabled="savingSubApproveUser" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -219,7 +265,14 @@
|
||||
import JTreeSelect from '/@/components/Form/src/jeecg/components/JTreeSelect.vue';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import { bgXiSpeakFeedbackList, bgXiSpeakFeedbackListWithDept, bgXiSpeakFeedbackDelete, saveBpmForm, setProcessVariable } from '../BgXiSpeak.api';
|
||||
import {
|
||||
bgXiSpeakFeedbackList,
|
||||
bgXiSpeakFeedbackListWithDept,
|
||||
bgXiSpeakFeedbackDelete,
|
||||
saveBpmForm,
|
||||
setProcessVariable,
|
||||
updateDeptHandlerName,
|
||||
} from '../BgXiSpeak.api';
|
||||
import { usePermission } from '/@/hooks/web/usePermission';
|
||||
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
||||
import BgXiSpeakBPMFeedbackModal from './BgXiSpeakBPMFeedbackModal.vue';
|
||||
@@ -235,8 +288,8 @@
|
||||
});
|
||||
|
||||
initBpmFormData(props.formData);
|
||||
console.log("@props.formData", props.formData);
|
||||
console.log("@props", props);
|
||||
console.log('@props.formData', props.formData);
|
||||
console.log('@props', props);
|
||||
|
||||
const emit = defineEmits(['ok', 'success', 'claimSuccess']);
|
||||
const { createMessage } = useMessage();
|
||||
@@ -254,6 +307,7 @@
|
||||
const savingMain = ref(false);
|
||||
const savingSubApproveUser = ref(false);
|
||||
const showBaseInfoDetail = ref(true);
|
||||
const showFeedbackDetail = ref(true);
|
||||
const feedbackList = ref<any[]>([]);
|
||||
const subApproveUser = ref('');
|
||||
const isEnd = ref(0);
|
||||
@@ -265,6 +319,7 @@
|
||||
time: '',
|
||||
elmComment: '',
|
||||
status: '',
|
||||
secretLevel: '',
|
||||
responsiblePerson: '',
|
||||
needSdwApproval: 0,
|
||||
sdwLeaderList: '',
|
||||
@@ -296,11 +351,15 @@
|
||||
{ title: '是否有报送上级报告', dataIndex: 'isReportedToHigher_dictText', align: 'center', width: 140 },
|
||||
{ title: '进展情况', dataIndex: 'progress', align: 'left', width: 200 },
|
||||
{ title: '落实情况', dataIndex: 'implStatus', align: 'left', width: 200 },
|
||||
{ title: '检查情况(纪检)', dataIndex: 'checkStatus', align: 'left', width: 160 },
|
||||
{ title: '监督意见(纪检)', dataIndex: 'inspectionAdvice', align: 'left', width: 160 },
|
||||
{ title: '措施数量(纪检)', dataIndex: 'measureNum', align: 'center', width: 100 },
|
||||
{ title: '附件', dataIndex: 'id', key: 'attachments', align: 'left', width: 340 },
|
||||
];
|
||||
if (showJiJianFields.value) {
|
||||
cols.push(
|
||||
{ title: '检查情况(纪检)', dataIndex: 'checkStatus', align: 'left', width: 160 },
|
||||
{ title: '监督意见(纪检)', dataIndex: 'inspectionAdvice', align: 'left', width: 160 },
|
||||
{ title: '措施数量(纪检)', dataIndex: 'measureNum', align: 'center', width: 100 }
|
||||
);
|
||||
}
|
||||
if (showEditFeedback.value) {
|
||||
cols.push({ title: '操作', dataIndex: 'id', key: 'feedbackAction', align: 'center', width: 120, fixed: 'right' });
|
||||
}
|
||||
@@ -313,11 +372,36 @@
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
const showProcessHandle = computed(() => props.formBpm && !!props.formData?.taskId);
|
||||
const showAddFeedback = computed(() => String(props.formData?.extendUrlParams?.addfeedback ?? '') === '1');
|
||||
const showEditFeedback = computed(() => String(props.formData?.extendUrlParams?.editfeedback ?? '') === '1');
|
||||
const showDeptFeedback = computed(() => String(props.formData?.extendUrlParams?.deptfeedback ?? '') === '1');
|
||||
const showSubApproveUser = computed(() => String(props.formData?.extendUrlParams?.selectuser ?? '') === '1');
|
||||
const showProcessHandle = computed(() => {
|
||||
const explicit = props.formData?.extendUrlParams?.showProcessHandle;
|
||||
if (explicit === '0') return false;
|
||||
if (explicit === '1') return true;
|
||||
return props.formBpm && !!props.formData?.taskId;
|
||||
});
|
||||
const showAddFeedback = computed(
|
||||
() => String(props.formData?.extendUrlParams?.showAddFeedback ?? props.formData?.extendUrlParams?.addfeedback ?? '') === '1'
|
||||
);
|
||||
const showFeedbackInfo = computed(() => {
|
||||
const p = props.formData?.extendUrlParams;
|
||||
const explicit = p?.showFeedbackInfo ?? p?.showApproveInfo;
|
||||
if (explicit === '0') return false;
|
||||
if (explicit === '1') return true;
|
||||
// 未显式设置时,任一子属性开启则自动显示反馈区域
|
||||
return String(p?.showAddFeedback ?? p?.addfeedback ?? '') === '1'
|
||||
|| String(p?.showEditFeedback ?? p?.editfeedback ?? '') === '1'
|
||||
|| String(p?.showDeptFeedback ?? p?.deptfeedback ?? '') === '1';
|
||||
});
|
||||
const showEditFeedback = computed(
|
||||
() => String(props.formData?.extendUrlParams?.showEditFeedback ?? props.formData?.extendUrlParams?.editfeedback ?? '') === '1'
|
||||
);
|
||||
const showDeptFeedback = computed(
|
||||
() => String(props.formData?.extendUrlParams?.showDeptFeedback ?? props.formData?.extendUrlParams?.deptfeedback ?? '') === '1'
|
||||
);
|
||||
const showJiJianFields = computed(() => String(props.formData?.extendUrlParams?.showJiJianFields ?? '') === '1');
|
||||
const showDeptFields = computed(() => String(props.formData?.extendUrlParams?.deptfields ?? '') === '1');
|
||||
const showSubApproveUser = computed(
|
||||
() => String(props.formData?.extendUrlParams?.showSubApproveUser ?? props.formData?.extendUrlParams?.selectuser ?? '') === '1'
|
||||
);
|
||||
const showSubApproveUserSelector = computed(() => showSubApproveUser.value && String(isEnd.value) !== '1');
|
||||
|
||||
const processInfo = computed(() => ({
|
||||
@@ -339,10 +423,7 @@
|
||||
initFormData();
|
||||
});
|
||||
|
||||
watch(
|
||||
[() => props.formData?.dataId, () => processInfo.value.processInstanceId],
|
||||
() => initFormData()
|
||||
);
|
||||
watch([() => props.formData?.dataId, () => processInfo.value.processInstanceId], () => initFormData());
|
||||
|
||||
watch(
|
||||
() => props.formData?.vars?.isEnd,
|
||||
@@ -442,7 +523,7 @@
|
||||
createMessage.warning('流程实例ID不能为空,无法新增反馈');
|
||||
return;
|
||||
}
|
||||
feedbackModalRef.value?.open(mainForm.id, undefined, processInstanceId);
|
||||
feedbackModalRef.value?.open(mainForm.id, mainForm.secretLevel, processInstanceId);
|
||||
}
|
||||
|
||||
function handleEditFeedback(record) {
|
||||
@@ -485,6 +566,8 @@
|
||||
createMessage.warning(subApproveUserResult.message || '保存失败');
|
||||
return false;
|
||||
}
|
||||
// 同步更新 task_task 表的 deptHandlerName,供 XiSpeakFeedbackFlow.getImplDeptWorker 使用
|
||||
updateDeptHandlerName({ processInstanceId, deptHandlerName: usernameValue }).catch(() => {});
|
||||
}
|
||||
if (showSuccessMessage) {
|
||||
createMessage.success('保存成功');
|
||||
|
||||
Reference in New Issue
Block a user