dictionary.ts 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. "process_state",
  34. ];
  35. const dicts = ref<{ [key: string]: any[] }>({});
  36. return {
  37. types,
  38. dicts,
  39. };
  40. });
  41. export function useDictionaryStoreHook() {
  42. // console.log('dicts:',useDictionaryStore(store))
  43. return useDictionaryStore(store);
  44. }