| | |
| | | import { computed, onMounted, ref } from "vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import http from "../api/http"; |
| | | import { normalizeFormData } from "../utils/formHelper"; |
| | | |
| | | const UI_NODE_CODES = [ |
| | | "LEVEL2_DEPT_LEADER", |
| | |
| | | } |
| | | savingDept.value = true; |
| | | try { |
| | | await http.put("/config/visitor-competent-dept", { |
| | | const payload = normalizeFormData({ |
| | | deptId: competentDeptId.value ?? null, |
| | | }); |
| | | await http.put("/config/visitor-competent-dept", payload); |
| | | ElMessage.success("已保存"); |
| | | } catch (e: unknown) { |
| | | ElMessage.error(e instanceof Error ? e.message : "保存失败"); |