yxk-20260730

改善提案
修复附件上传businessid存储错误的bug
This commit is contained in:
ye1023
2026-07-30 15:00:54 +08:00
parent 87bf2d945f
commit 3b3ff8228e
3 changed files with 14 additions and 9 deletions
@@ -71,7 +71,7 @@ export const columns: BasicColumn[] = [
dataIndex: 'finalAward_dictText'
},
{
title: '业务展示状态',
title: '流程状态',
align:"center",
dataIndex: 'bpmStatus_dictText'
},
@@ -313,7 +313,7 @@ export const superQuerySchema = {
problemDesc: {title: '问题描述',order: 9,view: 'textarea', type: 'string',},
improvementMethod: {title: '改善方法及措施',order: 10,view: 'textarea', type: 'string',},
finalAward: {title: '最终奖项',order: 14,view: 'text', type: 'string',},
bpmStatus: {title: '业务展示状态',order: 15,view: 'text', type: 'string',},
bpmStatus: {title: '流程状态',order: 15,view: 'text', type: 'string',},
//子表高级查询
improvementDeptScore: {
title: '部门评议评分表',
@@ -18,8 +18,8 @@
</a-col>
<a-col v-if="toggleSearchStatus" :lg="6">
<a-form-item name="bpmStatus">
<template #label><span title="业务展示状态">业务展示状态</span></template>
<JDictSelectTag v-model:value="queryParam.bpmStatus" dictCode="super_status" placeholder="请选择业务展示状态" allow-clear />
<template #label><span title="流程状态">流程状态</span></template>
<JDictSelectTag v-model:value="queryParam.bpmStatus" dictCode="super_status" placeholder="请选择流程状态" allow-clear />
</a-form-item>
</a-col>
<a-col v-if="toggleSearchStatus" :lg="6">
@@ -134,6 +134,7 @@
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
import { useUserStore } from '/@/store/modules/user';
import { useMessage } from '/@/hooks/web/useMessage';
const useForm = Form.useForm;
export default defineComponent({
@@ -154,6 +155,7 @@
},
emits:['success'],
setup(props, {emit}) {
const { createMessage } = useMessage();
const loading = ref(false);
const formRef = ref();
const beforeFileRef = ref();
@@ -417,12 +419,15 @@
const result = await saveOrUpdate(values, isUpdate);
// 新增阶段附件暂不绑定;主表生成 ID 后统一关联,保证普通表单和 BPM 使用同一查询键。
if (!isUpdate) {
const newId = typeof result === 'string' ? result : (result?.id || result);
if (newId) {
formData.id = newId;
await beforeFileRef.value?.bindBussinessId(`${formData.id}:before`);
await afterFileRef.value?.bindBussinessId(`${formData.id}:after`);
const newId = typeof result?.id === 'string' ? result.id.trim() : '';
if (!newId) {
// 阻断成功文案等非业务 ID 写入附件表,避免后续 BPM 无法按主表 ID 查询附件。
createMessage.error('新增成功但未返回提案ID,附件未关联,请刷新后重试');
return;
}
formData.id = newId;
await beforeFileRef.value?.bindBussinessId(`${formData.id}:before`);
await afterFileRef.value?.bindBussinessId(`${formData.id}:after`);
}
emit('success');
}