dictionary.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import { store } from "@/store";
  2. import { defineStore } from "pinia";
  3. import { getUserDicts } from "@/api/auth";
  4. export const useDictionaryStore = defineStore("dictionaryStore", () => {
  5. const types = [
  6. "station_type",
  7. "station_operate_type",
  8. "applicable_platforms",
  9. "material_properties",
  10. "quality_testing_plan",
  11. "material_level",
  12. "packaging_method",
  13. "quality_grade",
  14. "selection_type",
  15. "device_type",
  16. "stage",
  17. "danwei_type",
  18. "process_type",
  19. "workshop_section",
  20. "skill_requirements",
  21. "accessories_type",
  22. "trace_type",
  23. "skill_type",
  24. "drawing_type",
  25. "vehicle_level",
  26. "fault_current_state",
  27. "escalation_fault_state",
  28. "defect_mana",
  29. "disposal_measures_type",
  30. "process_check_result",
  31. "excel_type",
  32. "excel_states",
  33. "spc_operation",
  34. "spc_control_chart",
  35. ];
  36. const dicts = ref<{ [key: string]: any[] }>({});
  37. return {
  38. types,
  39. dicts,
  40. };
  41. });
  42. export function useDictionaryStoreHook() {
  43. // console.log('dicts:',useDictionaryStore(store))
  44. return useDictionaryStore(store);
  45. }