warnFire-brt.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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"
  14. :heightCanvas="heightCanvas" />
  15. </div>
  16. </div>
  17. </template>
  18. <script setup lang="ts">
  19. import { ref, reactive, watch } from 'vue';
  20. import { useGlobSetting } from '/@/hooks/setting';
  21. import warnZb from './warnZb.vue';
  22. let props = defineProps({
  23. tableList: {
  24. type: Array,
  25. default: () => {
  26. return [];
  27. },
  28. },
  29. });
  30. let widthV = ref('80%');
  31. let heightV = ref('80%');
  32. let coordDw = ref<any[]>([30, 56, 119]);
  33. let widthCanvas = ref(1240);
  34. let heightCanvas = ref(364);
  35. let tableData = ref<any[]>([]);
  36. let columns = reactive([
  37. {
  38. title: '序号',
  39. dataIndex: '',
  40. key: 'rowIndex',
  41. width: 80,
  42. align: 'center',
  43. customRender: ({ index }) => {
  44. return `${index + 1}`;
  45. },
  46. },
  47. {
  48. title: '预警等级',
  49. dataIndex: 'level',
  50. align: 'center',
  51. },
  52. {
  53. title: '煤自燃阶段',
  54. dataIndex: 'alarmName',
  55. align: 'center',
  56. },
  57. {
  58. title: '指标气体',
  59. align: 'center',
  60. dataIndex: 'alarmInfo',
  61. },
  62. {
  63. title: '指标气体浓度范围',
  64. align: 'center',
  65. dataIndex: 'alarmdes',
  66. },
  67. {
  68. title: '温度',
  69. align: 'center',
  70. dataIndex: 'temperature',
  71. },
  72. ]);
  73. watch(
  74. () => props.tableList,
  75. (newV, oldV) => {
  76. let { sysOrgCode } = useGlobSetting();
  77. if (sysOrgCode == 'A02A02') {
  78. tableData.value = [
  79. {
  80. alarmType: 'fireWarn',
  81. alarmdes: '0-13.75ppm',
  82. level: '绿色预警',
  83. temperature: '0-30℃',
  84. alarmName: '潜伏期阶段',
  85. id: '1811650465072791911',
  86. alarmInfo: 'CO',
  87. alarmcode: 'coval,coCo2,',
  88. },
  89. {
  90. alarmType: 'fireWarn',
  91. alarmdes: '13.75-67.2ppm,0.036-0.095',
  92. level: '黄色预警',
  93. temperature: '30-70℃',
  94. alarmName: '缓慢氧化升温阶段',
  95. id: '1811650534094258912',
  96. alarmInfo: 'CO,CO / CO₂‌',
  97. alarmcode: 'coval,coCo2,ch2val,',
  98. },
  99. {
  100. alarmType: 'fireWarn',
  101. alarmdes: '67.2-1606.3ppm,0.095-0.322,<2,<1.5',
  102. level: '橙色预警',
  103. temperature: '70-120℃',
  104. alarmName: '加速氧化升温阶段',
  105. id: '1811650534094258912',
  106. alarmInfo: 'CO,CO / CO₂‌,C₂H₄,CH₃CH₂CH₃ / CH₃CH₃‌‌',
  107. alarmcode: 'coval,coCo2,ch2val,',
  108. },
  109. {
  110. alarmType: 'fireWarn',
  111. alarmdes: '>1606.3ppm,>0.322,>2,>1.5,>0',
  112. level: '红色预警',
  113. temperature: '>120℃',
  114. alarmName: '剧烈氧化升温阶段',
  115. id: '1811650769583423913',
  116. alarmInfo: 'CO,CO / CO₂‌,C₂H₄,CH₃CH₂CH₃ / CH₃CH₃‌‌,C₂H₂',
  117. alarmcode: 'coval,coCo2,ch2val,chval,',
  118. },
  119. ];
  120. } else {
  121. if (newV.length != 0) {
  122. tableData.value = newV.map(el => {
  123. return {
  124. alarmType: el.alarmType,
  125. alarmdes: el.sublist[0].alarmdes,
  126. level: el.sublist[0].level,
  127. temperature: el.sublist[0].temperature,
  128. alarmName: el.alarmName,
  129. id: el.id,
  130. alarmInfo: el.sublist[0].alarmInfo,
  131. alarmcode: el.sublist[0].alarmcode,
  132. }
  133. });
  134. }
  135. }
  136. },
  137. { immediate: true, }
  138. );
  139. </script>
  140. <style lang="less" scoped>
  141. @import '/@/design/theme.less';
  142. @{theme-deepblue} {
  143. .warnTargetFire-brt {
  144. --image-bj1: url('/@/assets/images/themify/deepblue/fire/bj1.png');
  145. }
  146. }
  147. .warnTargetFire-brt {
  148. --image-bj1: url('/@/assets/images/fire/bj1.png');
  149. width: 100%;
  150. height: 100%;
  151. margin: 15px 0px 0px 0px;
  152. padding: 20px;
  153. // background: url('../../../../../assets//images/fire/border.png') no-repeat center;
  154. // background-size: 100% 100%;
  155. box-sizing: border-box;
  156. .top-area {
  157. height: 40%;
  158. margin-bottom: 15px;
  159. background: var(--image-bj1) no-repeat center;
  160. background-size: 100% 100%;
  161. }
  162. .bot-area {
  163. height: calc(60% - 15px);
  164. background: var(--image-bj1) no-repeat center;
  165. background-size: 100% 100%;
  166. }
  167. }
  168. </style>