yxk-20260519-

YHJY005-添加反馈表完成状态字典项
YHJY008-对于反馈信息中间状态不需要保留,每次只编辑不新增
This commit is contained in:
ye1023
2026-05-19 15:20:44 +08:00
parent 1cd3ab9918
commit 65ea58b9a4
3 changed files with 68 additions and 11 deletions
@@ -1,6 +1,6 @@
<template>
<JModal
title="新增反馈"
:title="modalTitle"
:width="820"
:visible="visible"
:confirmLoading="saving"
@@ -40,7 +40,7 @@
<!-- </a-col>-->
<a-col :span="12">
<a-form-item label="完成状态" name="bpmStatus">
<a-input v-model:value="formData.bpmStatus" allow-clear />
<JDictSelectTag v-model:value="formData.bpmStatus" dictCode="feedback_status" placeholder="请选择完成状态" allow-clear />
</a-form-item>
</a-col>
<a-col :span="12">
@@ -78,6 +78,7 @@
import { useUserStore } from '/@/store/modules/user';
import { buildUUID } from '/@/utils/uuid';
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
const emit = defineEmits(['success']);
const { createMessage } = useMessage();
@@ -85,6 +86,7 @@
const visible = ref(false);
const saving = ref(false);
const modalTitle = ref('新增反馈');
const formRef = ref();
const uploadFileRef = ref<InstanceType<typeof SUploadFile> | null>(null);
const uploadSecretLevel = ref(1);
@@ -121,10 +123,22 @@
nextTick(() => formRef.value?.clearValidate?.());
}
function open(mainId: string, secretLevel?: string | number, bpmProcessId = '') {
function open(mainId: string, secretLevel?: string | number, bpmProcessId = '', record?: Record<string, any>) {
resetForm(mainId, bpmProcessId);
uploadSecretLevel.value = normalizeSecretLevel(secretLevel);
void applyCurrentUserFeedbackInfo();
if (record?.id) {
modalTitle.value = '编辑反馈';
Object.keys(formData).forEach((key) => {
if (Object.prototype.hasOwnProperty.call(record, key)) {
formData[key] = record[key] ?? '';
}
});
formData.mainId = formData.mainId || mainId;
formData.bpmProcessId = formData.bpmProcessId || bpmProcessId;
} else {
modalTitle.value = '新增反馈';
void applyCurrentUserFeedbackInfo();
}
visible.value = true;
}
@@ -186,11 +200,14 @@
}
saving.value = true;
try {
await applyCurrentUserFeedbackInfo();
if (!formData.id && uploadFileRef.value?.hasPendingFiles?.()) {
const isUpdate = !!formData.id;
if (!isUpdate) {
await applyCurrentUserFeedbackInfo();
}
if (!isUpdate && uploadFileRef.value?.hasPendingFiles?.()) {
formData.id = buildUUID();
}
const res = await bgPartymatterFeedbackSaveOrUpdate({ ...formData }, false);
const res = await bgPartymatterFeedbackSaveOrUpdate({ ...formData }, isUpdate);
if (res.success) {
if (formData.id && uploadFileRef.value?.hasPendingFiles?.()) {
await uploadFileRef.value.bindBussinessId(formData.id);