yxk-20260519-
YHJY005-添加反馈表完成状态字典项 YHJY008-对于反馈信息中间状态不需要保留,每次只编辑不新增
This commit is contained in:
@@ -109,12 +109,13 @@
|
||||
:columns="feedbackColumns"
|
||||
:data-source="feedbackList"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 1220 }"
|
||||
:scroll="{ x: 1340 }"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'attachments'">
|
||||
<SUploadFile
|
||||
v-if="record.id"
|
||||
:key="getFeedbackAttachmentKey(record)"
|
||||
class="feedback-attachment-list"
|
||||
:bussiness-id="record.id"
|
||||
:disabled="true"
|
||||
@@ -122,6 +123,14 @@
|
||||
/>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'action'">
|
||||
<a-space>
|
||||
<a-button type="link" size="small" @click="openFeedbackEditModal(record)">编辑</a-button>
|
||||
<a-popconfirm title="是否确认删除" @confirm="handleFeedbackDelete(record)">
|
||||
<a-button type="link" size="small" danger>删除</a-button>
|
||||
</a-popconfirm>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
@@ -178,7 +187,7 @@
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import { bgPartymatterFeedbackList, saveBpmForm, setProcessVariable } from '../BgPartymatter.api';
|
||||
import { bgPartymatterFeedbackDelete, bgPartymatterFeedbackList, saveBpmForm, setProcessVariable } from '../BgPartymatter.api';
|
||||
import { usePermission } from '/@/hooks/web/usePermission';
|
||||
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
||||
import JDictSelectTag from "../../../../components/Form/src/jeecg/components/JDictSelectTag.vue";
|
||||
@@ -216,6 +225,7 @@
|
||||
const savingSubApproveUser = ref(false);
|
||||
const showBaseInfoDetail = ref(false);
|
||||
const feedbackList = ref<any[]>([]);
|
||||
const feedbackAttachmentRefreshKey = ref(0);
|
||||
const subApproveUser = ref('');
|
||||
const isEnd = ref(0);
|
||||
|
||||
@@ -250,8 +260,9 @@
|
||||
{ title: '反馈人姓名', dataIndex: 'responPersonname', align: 'center', width: 140 },
|
||||
{ title: '实际执行情况', dataIndex: 'actualExect', align: 'left', width: 280 },
|
||||
{ title: '实际完成时间', dataIndex: 'actualTime', align: 'center', width: 180 },
|
||||
{ title: '完成状态', dataIndex: 'bpmStatus', align: 'center', width: 120 },
|
||||
{ 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: 'action', key: 'action', align: 'center', width: 120, fixed: 'right' },
|
||||
];
|
||||
|
||||
const mainDisabled = computed(() => {
|
||||
@@ -323,10 +334,16 @@
|
||||
const bpmProcessId = processInfo.value.processInstanceId;
|
||||
if (!mainForm.id || !bpmProcessId) {
|
||||
feedbackList.value = [];
|
||||
feedbackAttachmentRefreshKey.value += 1;
|
||||
return;
|
||||
}
|
||||
const res = await bgPartymatterFeedbackList({ mainId: mainForm.id, bpmProcessId, pageNo: 1, pageSize: 999 });
|
||||
feedbackList.value = res?.records || res?.result?.records || [];
|
||||
feedbackAttachmentRefreshKey.value += 1;
|
||||
}
|
||||
|
||||
function getFeedbackAttachmentKey(record: Recordable) {
|
||||
return `${record?.id || ''}-${feedbackAttachmentRefreshKey.value}`;
|
||||
}
|
||||
|
||||
async function submitForm() {
|
||||
@@ -389,6 +406,28 @@
|
||||
feedbackModalRef.value?.open(mainForm.id, mainForm.secretLevel, processInstanceId);
|
||||
}
|
||||
|
||||
function openFeedbackEditModal(record: Recordable) {
|
||||
if (!record?.id) {
|
||||
createMessage.warning('反馈记录不存在,无法编辑');
|
||||
return;
|
||||
}
|
||||
feedbackModalRef.value?.open(mainForm.id, mainForm.secretLevel, processInfo.value.processInstanceId, record);
|
||||
}
|
||||
|
||||
async function handleFeedbackDelete(record: Recordable) {
|
||||
if (!record?.id) {
|
||||
createMessage.warning('反馈记录不存在,无法删除');
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await bgPartymatterFeedbackDelete({ id: record.id }, () => undefined);
|
||||
createMessage.success('删除成功');
|
||||
await loadFeedbackList();
|
||||
} catch (error) {
|
||||
createMessage.warning('删除失败');
|
||||
}
|
||||
}
|
||||
|
||||
async function saveSubApproveUserVariable(options: { showSuccessMessage?: boolean } = {}) {
|
||||
const { showSuccessMessage = true } = options;
|
||||
const processInstanceId = processInfo.value.processInstanceId;
|
||||
|
||||
Reference in New Issue
Block a user