|
@@ -155,8 +155,10 @@ const toExam = async (data: any) => {
|
|
|
// 提交保存
|
|
|
const toSave = async (data: any) => {
|
|
|
let res: IQueryResult;
|
|
|
- if (data._id) res = await commentAxios.update(data);
|
|
|
- else res = await commentAxios.create(data);
|
|
|
+ if (data._id) {
|
|
|
+ data.source = data.source._id;
|
|
|
+ res = await commentAxios.update(data);
|
|
|
+ } else res = await commentAxios.create(data);
|
|
|
if (res.errcode == 0) {
|
|
|
ElMessage({ type: `success`, message: `维护信息成功` });
|
|
|
toClose();
|