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',
importExcel = '/bgpartymatter/bgPartymatter/importExcel',
exportXls = '/bgpartymatter/bgPartymatter/exportXls',
saveBpmForm = '/bgpartymatter/bgPartymatter/saveBpmForm',
bgPartymatterFeedbackList = '/bgpartymatter/bgPartymatter/listBgPartymatterFeedbackByMainId',
bgPartymatterFeedbackSave= '/bgpartymatter/bgPartymatter/addBgPartymatterFeedback',
bgPartymatterFeedbackEdit= '/bgpartymatter/bgPartymatter/editBgPartymatterFeedback',
@@ -73,6 +74,10 @@ export const saveOrUpdate = (params, isUpdate) => {
return defHttp.post({ url: url, params },{ isTransformResponse: false });
}
export const saveBpmForm = (params) => {
return defHttp.post({ url: Api.saveBpmForm, params }, { isTransformResponse: false });
}
/**
* 列表接口
* @param params
@@ -44,7 +44,7 @@
import { isEmpty } from "/@/utils/is";
import { useMessage } from '/@/hooks/web/useMessage';
import { downloadFile } from '/@/utils/common/renderUtils';
const toggleSearchStatus = ref<boolean>(false);
//接收主表id
const mainId = inject('mainId') || '';
@@ -94,7 +94,7 @@
xs: 24,
sm: 20,
});
/**
* 新增事件
*/
@@ -122,7 +122,7 @@
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
@@ -155,7 +155,7 @@
},
]
}
/**
* 下拉操作栏
*/
@@ -174,7 +174,7 @@
},
];
}
/**
* 重置
*/
@@ -184,7 +184,7 @@
//刷新数据
reload();
}
watch(mainId, () => {
queryParam['mainId'] = unref(mainId);
reload();
@@ -153,7 +153,7 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
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';
const { isDisabledAuth, hasPermission, initBpmFormData} = usePermission();
@@ -290,7 +290,11 @@
try {
const processInstanceId = 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) {
createMessage.success(res.message || '保存成功');
emit('ok');