AnalysisTable.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <div class="alarm-history-table">
  3. <<<<<<< HEAD
  4. <a-table :dataSource="mockData" :columns="Warncolumns" :scroll="{ y: 300 }"> </a-table>
  5. =======
  6. <a-table :dataSource="mockData" :columns="Warncolumns" :scroll="{ y: 180 }" />
  7. >>>>>>> 903e6f21078b572ce6c9a42b53bcf33197b02a1f
  8. </div>
  9. </template>
  10. <script setup lang="ts">
  11. import { ref } from 'vue';
  12. const Warncolumns = ref([
  13. {
  14. title: '序号',
  15. align: 'center',
  16. key: 'index',
  17. width: 80,
  18. customRender: ({ index }) => {
  19. return index + 1;
  20. },
  21. },
  22. {
  23. title: '设备名称',
  24. align: 'center',
  25. width: 200,
  26. customRender: () => '羊马河主通风机',
  27. },
  28. {
  29. title: '故障描述',
  30. align: 'center',
  31. customRender: ({ record }) => {
  32. const activeFaults = record.title;
  33. return activeFaults;
  34. },
  35. },
  36. {
  37. title: '故障原因',
  38. align: 'center',
  39. key: 'faultStatus',
  40. customRender: ({ record }) => {
  41. const activeFaults = record.faultStatus;
  42. return activeFaults;
  43. },
  44. },
  45. {
  46. title: '解决方案',
  47. align: 'center',
  48. key: 'netStatus',
  49. customRender: ({ record }) => {
  50. const activeFaults = record.netStatus;
  51. return activeFaults;
  52. },
  53. },
  54. {
  55. title: '时间',
  56. align: 'center',
  57. key: 'readTime',
  58. customRender: () => {
  59. const now = new Date();
  60. return now.toLocaleString(); // 格式化为本地时间字符串
  61. },
  62. },
  63. ]);
  64. const mockData = [
  65. {
  66. key: 0,
  67. title: '水平或垂直振动>6mm',
  68. faultStatus: '通风阻力增大;静压值低于正常运行值100pa',
  69. netStatus: '检查相关参数传感器、增大风机运行频率',
  70. },
  71. {
  72. key: 1,
  73. title: '前轴/后轴温度>70℃',
  74. faultStatus: '缺乏润滑脂或轴承损坏',
  75. netStatus: '检查轴承润滑脂状态、检查轴承是否损坏、检查相关参数传感器',
  76. },
  77. {
  78. key: 2,
  79. title: '前轴/后轴温度>105℃',
  80. faultStatus: '轴承损坏',
  81. netStatus: '检查轴承是否损坏',
  82. },
  83. {
  84. key: 3,
  85. title: '水平或垂直振动>8mm,且变化范围较大',
  86. faultStatus: '电机轴承发生损坏;风机扇叶发生损坏',
  87. netStatus: '检查振动传感器、检查电机轴承、检查风机扇叶',
  88. },
  89. {
  90. key: 4,
  91. title: '额定电压超过额定值的10%时',
  92. faultStatus: '电网电压出现出现异常或者通风阻力增大',
  93. netStatus: '检查相关参数传感器、检查电网电压',
  94. },
  95. ];
  96. </script>