chore: save work before switching to dev

This commit is contained in:
2026-04-24 09:36:56 +08:00
parent 9e45acf60b
commit 415ba67d01
14 changed files with 587 additions and 583 deletions

View File

@@ -153,7 +153,8 @@ const openDialog = async (row?: { id?: string }) => {
await loadOptions();
if (row?.id) {
const res = await getScheduleDetail({ id: String(row.id) });
// 详情请求失败时,这个弹窗希望给出更明确的页面语义提示。
const res = await getScheduleDetail({ id: String(row.id) }, { errorMode: 'page' });
const detail = res?.data;
if (detail) {
formData.id = String(detail.id);
@@ -195,11 +196,12 @@ const handleSubmit = async () => {
remark: formData.remark,
};
// 提交失败文案由弹窗自己控制,避免接口层和弹窗层重复报错。
if (isEdit.value) {
await updateSchedule(payload);
await updateSchedule(payload, { errorMode: 'page' });
ElMessage.success('修改排班成功');
} else {
await createSchedule(payload);
await createSchedule(payload, { errorMode: 'page' });
ElMessage.success('新增排班成功');
}