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