|
@@ -147,12 +147,12 @@ const toExam = async (data) => {
|
|
|
};
|
|
|
// 提交
|
|
|
const onSubmit = async (data) => {
|
|
|
- let res: IQueryResult;
|
|
|
- if (data._id) res = await expert.update(data);
|
|
|
- else res = await expert.create(data);
|
|
|
+ let res: IQueryResult = await expert.update(data);
|
|
|
if (res.errcode == 0) {
|
|
|
ElMessage({ type: `success`, message: `审核成功` });
|
|
|
toClose();
|
|
|
+ } else {
|
|
|
+ ElMessage({ type: `error`, message: `${res.errmsg}` });
|
|
|
}
|
|
|
};
|
|
|
// 弹框关闭
|