tables.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. * @Author: liuJie
  3. * @Date: 2026-01-28 11:03:32
  4. * @LastEditors: liuJie
  5. * @LastEditTime: 2026-04-13 17:27:42
  6. * @Describe: file describe
  7. */
  8. import type { TableColumnProps } from '@/types/basic-table';
  9. // 基础表格样式配置
  10. export const TABLE_OPTIONS = {
  11. emptyText: '暂无数据',
  12. loading: true,
  13. maxHeight: 'calc(70vh - 150px)',
  14. };
  15. // 状态选项
  16. export const WORK_PLAN_STATUS_OPTIONS = [
  17. { label: '全部', value: '' },
  18. { label: '未下发', value: 1 },
  19. { label: '进行中', value: 2 },
  20. { label: '已完成', value: 3 },
  21. { label: '已作废', value: 4 },
  22. { label: '待审核', value: 5 },
  23. ];
  24. // 状态标签映射
  25. export const WORK_PLAN_STATUS_LABEL: Record<string, string> = {
  26. '1': '未下发',
  27. '2': '进行中',
  28. '3': '已完成',
  29. '4': '已作废',
  30. '5': '待审核',
  31. };
  32. export const WORK_PLAN_TABLE_COLUMNS: TableColumnProps[] = [
  33. {
  34. label: '编号',
  35. type: 'index',
  36. align: 'center',
  37. width: '80px',
  38. },
  39. {
  40. label: '工作内容',
  41. prop: 'workContent',
  42. align: 'left',
  43. minWidth: '150px',
  44. showOverflowTooltip: true,
  45. },
  46. {
  47. label: '状态',
  48. prop: 'statusName',
  49. align: 'center',
  50. minWidth: '100px',
  51. },
  52. {
  53. label: '分类名称',
  54. prop: 'categoryName',
  55. align: 'left',
  56. minWidth: '140px',
  57. },
  58. {
  59. label: '安全体系计划名称',
  60. prop: 'trainingPlanName',
  61. align: 'left',
  62. minWidth: '220px',
  63. showOverflowTooltip: true,
  64. },
  65. {
  66. label: '责任部门',
  67. prop: 'responsibleDeptNames',
  68. align: 'left',
  69. minWidth: '120px',
  70. showOverflowTooltip: true,
  71. },
  72. {
  73. label: '配合部门',
  74. prop: 'cooperateDeptNames',
  75. align: 'left',
  76. minWidth: '120px',
  77. showOverflowTooltip: true,
  78. },
  79. {
  80. label: '计划完成时间',
  81. prop: 'plannedComplateTime',
  82. align: 'left',
  83. minWidth: '160px',
  84. },
  85. {
  86. label: '操作',
  87. prop: 'action',
  88. slot: 'action',
  89. fixed: 'right',
  90. width: '280px',
  91. align: 'left',
  92. },
  93. ];