EnumConst.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import i18n from "@/i18n";
  2. export const MachineStatus = {
  3. "00": {
  4. label: "online",
  5. color: "#5cb85c",
  6. },
  7. "01": {
  8. label: "offline",
  9. color: "#a8a8a8"
  10. },
  11. "online": {
  12. label: "online",
  13. color: "#5cb85c",
  14. code: "00"
  15. },
  16. "offline": {
  17. label: "offline",
  18. color: "#a8a8a8",
  19. code: "01"
  20. }
  21. }
  22. export const NodeType = {
  23. desFile: {
  24. label: "desFile",
  25. color: "#5cb85c",
  26. code: 2
  27. }
  28. }
  29. export const PileHoleStatus = {
  30. DIC: {
  31. NotStated: {
  32. color: '#C1C1C1',
  33. name: i18n.t("screen.notStart")
  34. },
  35. InProcess: {
  36. color: '#FF5454',
  37. name: i18n.t("screen.inProcess")
  38. },
  39. Completed: {
  40. color: '#93D467',
  41. name: i18n.t("screen.completed")
  42. },
  43. Deviation: {
  44. color: '#F6E65C',
  45. name: i18n.t("screen.deviation")
  46. }
  47. },
  48. codeToStatus: function (code) {
  49. switch (code) {
  50. case "00":
  51. return this.DIC.Completed;
  52. case "01":
  53. return this.DIC.NotStated;
  54. case "02":
  55. return this.DIC.InProcess;
  56. case "03":
  57. return tthis.DIC.Deviation;
  58. default:
  59. return this.DIC.NotStated;
  60. }
  61. },
  62. }