| | |
| | | import { computed, onMounted, ref } from "vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import http from "../api/http"; |
| | | import { normalizeFormData } from "../utils/formHelper"; |
| | | |
| | | const LOCKED_CODES = new Set(["respondent", "visit_start_time"]); |
| | | |
| | |
| | | } |
| | | extrasSaving.value = true; |
| | | try { |
| | | await http.put("/config/booking-settings", { |
| | | const payload = normalizeFormData({ |
| | | rangeMode: rangeMode.value, |
| | | maxConsecutiveDays: rangeMode.value === "MULTI" ? maxConsecutiveDays.value : maxConsecutiveDays.value ?? 7, |
| | | holidayDates: holidayDates.value, |
| | | vehicleBarrierEnabled: vehicleBarrierEnabled.value, |
| | | }); |
| | | await http.put("/config/booking-settings", payload); |
| | | ElMessage.success("已保存"); |
| | | await loadExtras(); |
| | | } catch (e: unknown) { |