yxk-20260429-增加/saveBpmForm接口,保存业务数据的同时更新流程的json_data

This commit is contained in:
ye1023
2026-04-29 19:55:17 +08:00
parent 20ac017020
commit dd88adab73
3 changed files with 17 additions and 8 deletions
@@ -12,6 +12,7 @@ enum Api {
deleteBatch = '/bgpartymatter/bgPartymatter/deleteBatch', deleteBatch = '/bgpartymatter/bgPartymatter/deleteBatch',
importExcel = '/bgpartymatter/bgPartymatter/importExcel', importExcel = '/bgpartymatter/bgPartymatter/importExcel',
exportXls = '/bgpartymatter/bgPartymatter/exportXls', exportXls = '/bgpartymatter/bgPartymatter/exportXls',
saveBpmForm = '/bgpartymatter/bgPartymatter/saveBpmForm',
bgPartymatterFeedbackList = '/bgpartymatter/bgPartymatter/listBgPartymatterFeedbackByMainId', bgPartymatterFeedbackList = '/bgpartymatter/bgPartymatter/listBgPartymatterFeedbackByMainId',
bgPartymatterFeedbackSave= '/bgpartymatter/bgPartymatter/addBgPartymatterFeedback', bgPartymatterFeedbackSave= '/bgpartymatter/bgPartymatter/addBgPartymatterFeedback',
bgPartymatterFeedbackEdit= '/bgpartymatter/bgPartymatter/editBgPartymatterFeedback', bgPartymatterFeedbackEdit= '/bgpartymatter/bgPartymatter/editBgPartymatterFeedback',
@@ -73,6 +74,10 @@ export const saveOrUpdate = (params, isUpdate) => {
return defHttp.post({ url: url, params },{ isTransformResponse: false }); return defHttp.post({ url: url, params },{ isTransformResponse: false });
} }
export const saveBpmForm = (params) => {
return defHttp.post({ url: Api.saveBpmForm, params }, { isTransformResponse: false });
}
/** /**
* 列表接口 * 列表接口
* @param params * @param params
@@ -44,7 +44,7 @@
import { isEmpty } from "/@/utils/is"; import { isEmpty } from "/@/utils/is";
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { downloadFile } from '/@/utils/common/renderUtils'; import { downloadFile } from '/@/utils/common/renderUtils';
const toggleSearchStatus = ref<boolean>(false); const toggleSearchStatus = ref<boolean>(false);
//接收主表id //接收主表id
const mainId = inject('mainId') || ''; const mainId = inject('mainId') || '';
@@ -94,7 +94,7 @@
xs: 24, xs: 24,
sm: 20, sm: 20,
}); });
/** /**
* 新增事件 * 新增事件
*/ */
@@ -122,7 +122,7 @@
registerModal.value.disableSubmit = true; registerModal.value.disableSubmit = true;
registerModal.value.edit(record); registerModal.value.edit(record);
} }
/** /**
* 删除事件 * 删除事件
*/ */
@@ -155,7 +155,7 @@
}, },
] ]
} }
/** /**
* 下拉操作栏 * 下拉操作栏
*/ */
@@ -174,7 +174,7 @@
}, },
]; ];
} }
/** /**
* 重置 * 重置
*/ */
@@ -184,7 +184,7 @@
//刷新数据 //刷新数据
reload(); reload();
} }
watch(mainId, () => { watch(mainId, () => {
queryParam['mainId'] = unref(mainId); queryParam['mainId'] = unref(mainId);
reload(); reload();
@@ -153,7 +153,7 @@
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue'; import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
import { bgPartymatterFeedbackList, bgPartymatterFeedbackSaveOrUpdate, saveOrUpdate } from '../BgPartymatter.api'; import { bgPartymatterFeedbackList, bgPartymatterFeedbackSaveOrUpdate, saveBpmForm } from '../BgPartymatter.api';
import { usePermission } from '/@/hooks/web/usePermission'; import { usePermission } from '/@/hooks/web/usePermission';
const { isDisabledAuth, hasPermission, initBpmFormData} = usePermission(); const { isDisabledAuth, hasPermission, initBpmFormData} = usePermission();
@@ -290,7 +290,11 @@
try { try {
const processInstanceId = processInfo.value.processInstanceId; const processInstanceId = processInfo.value.processInstanceId;
console.log('BgPartymatter BPM process info', { ...processInfo.value, processInstanceId }); console.log('BgPartymatter BPM process info', { ...processInfo.value, processInstanceId });
const res = await saveOrUpdate({ ...mainForm }, true); const res = await saveBpmForm({
processInstanceId,
varField: 'json_data',
formData: { ...mainForm },
});
if (res.success) { if (res.success) {
createMessage.success(res.message || '保存成功'); createMessage.success(res.message || '保存成功');
emit('ok'); emit('ok');