warnFire-bd.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <div class="warnTargetFire-brt">
  3. <div class="top-area">
  4. <a-table :columns="columns" :data-source="tableData" bordered :pagination="false" :scroll="{ y: 250 }">
  5. <template #bodyCell="{ column, text }">
  6. <template v-if="column.dataIndex === 'alarmdes' || column.dataIndex === 'alarmInfo'">
  7. <div v-for="item in text.split(',')" :key="item">{{ item }}</div>
  8. </template>
  9. </template>
  10. </a-table>
  11. </div>
  12. <div class="bot-area">
  13. <warnZb :widthV="widthV" :heightV="heightV" :coordDw="coordDw" :widthCanvas="widthCanvas" :heightCanvas="heightCanvas" />
  14. </div>
  15. </div>
  16. </template>
  17. <script setup lang="ts">
  18. import { ref, reactive, watch } from 'vue';
  19. import warnZb from './warnZb.vue';
  20. let props = defineProps({
  21. tableList: {
  22. type: Array,
  23. default: () => {
  24. return [];
  25. },
  26. },
  27. });
  28. let widthV = ref('80%');
  29. let heightV = ref('80%');
  30. let coordDw = ref<any[]>([50, 94]);
  31. let widthCanvas = ref(1240);
  32. let heightCanvas = ref(364);
  33. let tableData = ref<any[]>([]);
  34. let columns = reactive([
  35. {
  36. title: '序号',
  37. dataIndex: '',
  38. key: 'rowIndex',
  39. width: 80,
  40. align: 'center',
  41. customRender: ({ index }) => {
  42. return `${index + 1}`;
  43. },
  44. },
  45. {
  46. title: '预警等级',
  47. dataIndex: 'level',
  48. align: 'center',
  49. },
  50. {
  51. title: '煤自燃阶段',
  52. dataIndex: 'alarmName',
  53. align: 'center',
  54. },
  55. {
  56. title: '指标气体',
  57. align: 'center',
  58. dataIndex: 'alarmInfo',
  59. },
  60. {
  61. title: '指标气体浓度范围',
  62. align: 'center',
  63. dataIndex: 'alarmdes',
  64. },
  65. {
  66. title: '温度',
  67. align: 'center',
  68. dataIndex: 'temperature',
  69. },
  70. ]);
  71. watch(
  72. () => props.tableList,
  73. (newV, oldV) => {
  74. if (newV.length != 0) {
  75. tableData.value = newV;
  76. }
  77. },
  78. { immediate: true, deep: true }
  79. );
  80. </script>
  81. <style lang="less" scoped>
  82. .warnTargetFire-brt {
  83. width: 100%;
  84. height: 100%;
  85. margin: 15px 0px 0px 0px;
  86. padding: 20px;
  87. // background: url('../../../../../assets//images/fire/border.png') no-repeat center;
  88. // background-size: 100% 100%;
  89. box-sizing: border-box;
  90. .top-area {
  91. height: 40%;
  92. margin-bottom: 15px;
  93. background: url('../../../../../assets/images/fire/bj1.png') no-repeat center;
  94. background-size: 100% 100%;
  95. }
  96. .bot-area {
  97. height: calc(60% - 15px);
  98. background: url('../../../../../assets/images/fire/bj1.png') no-repeat center;
  99. background-size: 100% 100%;
  100. }
  101. }
  102. </style>