|
|
@@ -316,9 +316,10 @@ function doSubmit() {
|
|
|
}
|
|
|
submit(form);
|
|
|
})
|
|
|
- .catch((error) => {
|
|
|
- console.error('Validation Error:', error);
|
|
|
- message.error('请完善必填项');
|
|
|
+ .catch((error: any) => {
|
|
|
+ notification.error({
|
|
|
+ message: error.message,
|
|
|
+ });
|
|
|
});
|
|
|
}
|
|
|
// 获取方案类型
|
|
|
@@ -329,15 +330,16 @@ async function getConditioningProgramType() {
|
|
|
if (res?.length > 0) {
|
|
|
typeOptions.value = res; // 直接使用返回的数据
|
|
|
}
|
|
|
- } catch (error) {
|
|
|
- // console.error('获取方案类型列表失败:', error);
|
|
|
+ } catch (error: any) {
|
|
|
+ notification.error({
|
|
|
+ message: error.message,
|
|
|
+ });
|
|
|
} finally {
|
|
|
typeOptionsLoading.value = false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
onMounted(async () => {
|
|
|
- // getHerb('');
|
|
|
const deptId = localStorage.getItem('deptId');
|
|
|
if (props.data.addType === 'system' && deptId) {
|
|
|
form.institutionId = deptId;
|