columns.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. import CONFIG from "@/config";
  2. export default function useColumns() {
  3. const TableColumns = [
  4. {
  5. item: { key: "year", title: "年度" },
  6. attr: {},
  7. },
  8. {
  9. item: { key: "name", title: "模板名称" },
  10. attr: {},
  11. },
  12. {
  13. item: { key: "startTime", title: "开始日期" },
  14. attr: {},
  15. },
  16. {
  17. item: { key: "deadlineTime", title: "结束日期" },
  18. attr: {},
  19. },
  20. {
  21. item: { key: "cycle", title: "周期" },
  22. attr: {
  23. is: "el-dict-tag",
  24. dictName: "mk_periodic_unit",
  25. },
  26. },
  27. {
  28. item: { key: "unfold", title: "按列展开" },
  29. attr: {
  30. is: "el-dict-tag",
  31. dictName: "mk_expansion_mode",
  32. },
  33. },
  34. ];
  35. const TabColumns = [
  36. {
  37. item: {
  38. title: "指标",
  39. key: "indexs",
  40. },
  41. attr: {
  42. value: [],
  43. },
  44. TableColumns: [
  45. {
  46. item: { key: "target", title: "指标" },
  47. attr: {
  48. is: "el-dict-tag",
  49. dictName: "mk_index_type",
  50. },
  51. },
  52. ],
  53. },
  54. {
  55. item: {
  56. title: "维度",
  57. key: "dimensionalitys",
  58. },
  59. attr: {
  60. value: [],
  61. },
  62. TableColumns: [
  63. {
  64. item: { key: "dimensionality", title: "维度" },
  65. attr: {
  66. is: "el-dict-tag",
  67. dictName: "mk_dimensionality",
  68. },
  69. },
  70. ],
  71. },
  72. {
  73. item: {
  74. title: "周期",
  75. key: "cycles",
  76. },
  77. attr: {
  78. value: [],
  79. },
  80. TableColumns: [
  81. {
  82. item: { key: "name", title: "周期名称", require: true },
  83. attr: {},
  84. },
  85. {
  86. item: {
  87. key: "startTime",
  88. title: "周期开始日期",
  89. require: true,
  90. },
  91. attr: {},
  92. },
  93. {
  94. item: {
  95. key: "deadlineTime",
  96. title: "周期结束日期",
  97. require: true,
  98. },
  99. attr: {},
  100. },
  101. ],
  102. },
  103. ];
  104. return { TableColumns, TabColumns };
  105. }