yxk-20260521-党委会流程表单:只有办理时,才显示反馈信息的操作栏(编辑/删除)
This commit is contained in:
@@ -124,7 +124,7 @@
|
|||||||
:columns="feedbackColumns"
|
:columns="feedbackColumns"
|
||||||
:data-source="feedbackList"
|
:data-source="feedbackList"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:scroll="{ x: 1340 }"
|
:scroll="{ x: feedbackTableScrollX }"
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="column.key === 'attachments'">
|
<template v-if="column.key === 'attachments'">
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
/>
|
/>
|
||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.key === 'action'">
|
<template v-else-if="canManageFeedback && column.key === 'action'">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button type="link" size="small" @click="openFeedbackEditModal(record)">编辑</a-button>
|
<a-button type="link" size="small" @click="openFeedbackEditModal(record)">编辑</a-button>
|
||||||
<a-popconfirm title="是否确认删除" @confirm="handleFeedbackDelete(record)">
|
<a-popconfirm title="是否确认删除" @confirm="handleFeedbackDelete(record)">
|
||||||
@@ -274,15 +274,21 @@
|
|||||||
intervalStartTime: '',
|
intervalStartTime: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
const feedbackColumns = [
|
const feedbackBaseColumns = [
|
||||||
{ title: '责任部门名称', dataIndex: 'responDeptname', align: 'center', width: 160 },
|
{ title: '责任部门名称', dataIndex: 'responDeptname', align: 'center', width: 160 },
|
||||||
{ title: '反馈人姓名', dataIndex: 'responPersonname', align: 'center', width: 140 },
|
{ title: '反馈人姓名', dataIndex: 'responPersonname', align: 'center', width: 140 },
|
||||||
{ title: '实际执行情况', dataIndex: 'actualExect', align: 'left', width: 280 },
|
{ title: '实际执行情况', dataIndex: 'actualExect', align: 'left', width: 280 },
|
||||||
{ title: '实际完成时间', dataIndex: 'actualTime', align: 'center', width: 180 },
|
{ title: '实际完成时间', dataIndex: 'actualTime', align: 'center', width: 180 },
|
||||||
{ title: '完成状态', dataIndex: 'bpmStatus', align: 'center', width: 120, customRender: ({ record }) => record?.bpmStatus_dictText || record?.bpmStatus },
|
{ title: '完成状态', dataIndex: 'bpmStatus', align: 'center', width: 120, customRender: ({ record }) => record?.bpmStatus_dictText || record?.bpmStatus },
|
||||||
{ title: '附件', dataIndex: 'id', key: 'attachments', align: 'left', width: 340 },
|
{ title: '附件', dataIndex: 'id', key: 'attachments', align: 'left', width: 340 },
|
||||||
{ title: '操作', dataIndex: 'action', key: 'action', align: 'center', width: 120, fixed: 'right' },
|
|
||||||
];
|
];
|
||||||
|
const feedbackActionColumn = { title: '操作', dataIndex: 'action', key: 'action', align: 'center', width: 120, fixed: 'right' };
|
||||||
|
const feedbackColumns = computed(() => {
|
||||||
|
return canManageFeedback.value ? [...feedbackBaseColumns, feedbackActionColumn] : feedbackBaseColumns;
|
||||||
|
});
|
||||||
|
const feedbackTableScrollX = computed(() => {
|
||||||
|
return canManageFeedback.value ? 1340 : 1220;
|
||||||
|
});
|
||||||
|
|
||||||
const mainDisabled = computed(() => {
|
const mainDisabled = computed(() => {
|
||||||
if (props.formBpm) {
|
if (props.formBpm) {
|
||||||
@@ -292,6 +298,7 @@
|
|||||||
});
|
});
|
||||||
// 只有待办办理入口展示流程办理区,历史/抄送查看即使有 taskId 也只展示业务表单。
|
// 只有待办办理入口展示流程办理区,历史/抄送查看即使有 taskId 也只展示业务表单。
|
||||||
const showProcessHandle = computed(() => props.formBpm && props.formData?.PROCESS_TAB_TYPE === 'run' && !!props.formData?.taskId);
|
const showProcessHandle = computed(() => props.formBpm && props.formData?.PROCESS_TAB_TYPE === 'run' && !!props.formData?.taskId);
|
||||||
|
const canManageFeedback = computed(() => props.formBpm && props.formData?.PROCESS_TAB_TYPE === 'run' && !!props.formData?.taskId);
|
||||||
const showAddFeedback = computed(() => String(props.formData?.extendUrlParams?.addfeedback ?? '') === '1');
|
const showAddFeedback = computed(() => String(props.formData?.extendUrlParams?.addfeedback ?? '') === '1');
|
||||||
const showSubApproveUser = computed(() => String(props.formData?.extendUrlParams?.selectuser ?? '') === '1');
|
const showSubApproveUser = computed(() => String(props.formData?.extendUrlParams?.selectuser ?? '') === '1');
|
||||||
const showSubApproveUserSelector = computed(() => showSubApproveUser.value && String(isEnd.value) !== '1');
|
const showSubApproveUserSelector = computed(() => showSubApproveUser.value && String(isEnd.value) !== '1');
|
||||||
@@ -477,6 +484,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openFeedbackEditModal(record: Recordable) {
|
function openFeedbackEditModal(record: Recordable) {
|
||||||
|
if (!canManageFeedback.value) {
|
||||||
|
createMessage.warning('当前流程状态不允许编辑反馈');
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!record?.id) {
|
if (!record?.id) {
|
||||||
createMessage.warning('反馈记录不存在,无法编辑');
|
createMessage.warning('反馈记录不存在,无法编辑');
|
||||||
return;
|
return;
|
||||||
@@ -485,6 +496,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handleFeedbackDelete(record: Recordable) {
|
async function handleFeedbackDelete(record: Recordable) {
|
||||||
|
if (!canManageFeedback.value) {
|
||||||
|
createMessage.warning('当前流程状态不允许删除反馈');
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!record?.id) {
|
if (!record?.id) {
|
||||||
createMessage.warning('反馈记录不存在,无法删除');
|
createMessage.warning('反馈记录不存在,无法删除');
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user