123456789101112131415161718192021222324252627282930 |
- import { http } from "@/utils/http";
- import { ref } from "vue";
- export const select = ref<any>([]);
- export const selectFrom = ref<any>([]);
- // 字典
- type QuotaPageList = {
- code: number;
- msg: string;
- data: Array<any>;
- };
- export const selectDictList = data => {
- return http.request<QuotaPageList>("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;
- }
- };
|