import { http } from "@/utils/http"; import { ref } from "vue"; export const select = ref([]); export const selectFrom = ref([]); // 字典 type QuotaPageList = { code: number; msg: string; data: Array; }; export const selectDictList = data => { return http.request("get", "/commonDict/selectDictList", { data }); }; export const getSelectDictListtApi = async () => { const { code, data } = await selectDictList({ dictType: "1" }); if (code == 200) { select.value = data; return data; } }; export const getFromSelectDictListtApi = async () => { const { code, data } = await selectDictList({ dictType: "2" }); if (code == 200) { selectFrom.value = data; console.log("11111", data); return data; } };