workFace.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <template>
  2. <CustomBadges class="w-1710px ml-100px mt-50px" :badges="headerBadges" />
  3. <div class="monitor-container">
  4. <transition enter-active-class="animate__animated animate__fadeInLeft" leave-active-class="animate__animated animate__fadeOutLeft">
  5. <div class="lr left-box" v-if="loading">
  6. <ventBox1>
  7. <template #title>
  8. <div>工作面基础信息</div>
  9. </template>
  10. <template #container>
  11. <ListItem
  12. v-for="(item, index) in gasMonitor"
  13. :key="index"
  14. class="w-100% mb-5px"
  15. :value="get(workFaceData, item.code)"
  16. :label="item.title"
  17. labelWidth="200px"
  18. />
  19. </template>
  20. </ventBox1>
  21. <ventBox1 class="vent-margin-t-10">
  22. <template #title>
  23. <div>工作面基础信息</div>
  24. </template>
  25. <template #container>
  26. <CustomChart :chart-config="gasUnitBarOption" :chart-data="gasUnitDataSource" height="280px" />
  27. </template>
  28. </ventBox1>
  29. </div>
  30. </transition>
  31. <transition enter-active-class="animate__animated animate__fadeInRight" leave-active-class="animate__animated animate__fadeInRight">
  32. <div class="lr right-box" v-if="loading">
  33. <div class="item-box">
  34. <ventBox1>
  35. <template #title>
  36. <div>工作面支管抽采信息</div>
  37. </template>
  38. <template #container>
  39. <ListItem
  40. v-for="(item, index) in gasPumpValve"
  41. :key="index"
  42. class="w-100% mb-5px"
  43. :value="get(workFaceData, item.code)"
  44. :label="item.title"
  45. labelWidth="200px"
  46. />
  47. </template>
  48. </ventBox1>
  49. <ventBox1 class="vent-margin-t-10">
  50. <template #title>
  51. <div>工作面基础信息</div>
  52. </template>
  53. <template #container>
  54. <CustomChart :chart-config="gasUnitPieOption" :chart-data="gasUnitDataSource" height="280px" />
  55. </template>
  56. </ventBox1>
  57. </div>
  58. </div>
  59. </transition>
  60. </div>
  61. </template>
  62. <script setup lang="ts">
  63. import { ref, onMounted, watch } from 'vue';
  64. import ventBox1 from '/@/components/vent/ventBox1.vue';
  65. import CustomBadges from './customHeader.vue';
  66. import { gasMonitor, gasPumpValve, gasUnitBarOption, mockData, gasUnitPieOption, mockPieData } from '../gasAssessment.data';
  67. import ListItem from '@/views/vent/gas/components/list/listItem.vue';
  68. import { get } from '@/utils/ventutil';
  69. import CustomChart from '@/views/vent/home/configurable/components/detail/CustomChart.vue';
  70. type DeviceType = { deviceType: string; deviceName: string; datalist: any[] };
  71. const props = defineProps({
  72. dataSource: {
  73. type: Object,
  74. default: () => {},
  75. },
  76. });
  77. const loading = ref(false);
  78. const gasUnitDataSource = ref<DeviceType>(); // 抽采单元监测数据
  79. const workFaceData = ref<any>({}); // 工作面基础数据
  80. const headerBadges = ref([
  81. {
  82. value: get(workFaceData.value, 'gasReserves'),
  83. desc: '瓦斯总储量',
  84. code: '',
  85. },
  86. {
  87. value: get(workFaceData.value, 'totalGasVolume'),
  88. desc: '抽采达标量',
  89. code: '',
  90. },
  91. {
  92. value: get(workFaceData.value, 'cumulativeFlow'),
  93. desc: '累计抽采量',
  94. code: '',
  95. },
  96. {
  97. value: get(workFaceData.value, 'scalarRecognition'),
  98. desc: '预抽确认量',
  99. code: '',
  100. },
  101. {
  102. value: get(workFaceData.value, 'totalDate'),
  103. desc: '已抽时间',
  104. code: '',
  105. },
  106. ]);
  107. watch(
  108. () => props.dataSource,
  109. (newValue: DeviceType[]) => {
  110. if (newValue && newValue.length > 0) {
  111. gasUnitDataSource.value = newValue.find((item) => item.deviceType.startsWith('unit'));
  112. const workFaceDataSorce = newValue.find((item) => item.deviceType === 'sys');
  113. if (workFaceDataSorce) {
  114. workFaceData.value = workFaceDataSorce.datalist[0];
  115. }
  116. }
  117. }
  118. );
  119. onMounted(async () => {
  120. loading.value = true;
  121. });
  122. </script>
  123. <style lang="less" scoped>
  124. @ventSpace: zxm;
  125. @import '/@/design/vent/modal.less';
  126. @import '@/views/vent/monitorManager/comment/less/workFace.less';
  127. .monitor-container {
  128. height: 850px;
  129. pointer-events: none;
  130. }
  131. .modal-monitor {
  132. position: absolute;
  133. z-index: -1;
  134. flex-direction: row-reverse;
  135. .main-container {
  136. background-color: #00000078;
  137. }
  138. .monitor-item {
  139. width: 180px;
  140. display: flex;
  141. flex-direction: row;
  142. width: auto;
  143. margin-bottom: 3px;
  144. .monitor-title {
  145. width: 120px;
  146. color: #7af5ff;
  147. font-weight: 400;
  148. font-size: 13px;
  149. }
  150. .monitor-val {
  151. color: #ffb700;
  152. display: flex;
  153. width: auto;
  154. .val {
  155. width: 60px;
  156. font-size: 13px;
  157. text-align: center;
  158. }
  159. .unit {
  160. color: #ffffffbb;
  161. font-size: 13px;
  162. }
  163. }
  164. }
  165. .title {
  166. text-align: center;
  167. }
  168. }
  169. .left-box {
  170. width: 360px;
  171. }
  172. .gas-pump-item {
  173. padding: 3px 0;
  174. }
  175. .param-set {
  176. color: #45d3fd;
  177. cursor: pointer;
  178. &:hover {
  179. color: #38a6c8;
  180. }
  181. }
  182. .input-item {
  183. margin: 3px 0 !important;
  184. .value {
  185. width: 80px;
  186. text-align: center;
  187. }
  188. }
  189. .data-group {
  190. display: flex;
  191. flex-wrap: wrap;
  192. justify-content: space-between;
  193. padding-bottom: 8px;
  194. .data-item {
  195. width: calc(50% - 10px);
  196. display: flex;
  197. justify-content: space-between;
  198. line-height: 24px;
  199. background-image: linear-gradient(to right, #39a3ff00, #39a3ff10, #39a3ff02);
  200. margin: 4px 0;
  201. }
  202. .value {
  203. color: #00eefffe;
  204. }
  205. .data-item1 {
  206. width: 100%;
  207. line-height: 24px;
  208. background-image: linear-gradient(to right, #39a3ff00, #39a3ff10, #39a3ff02);
  209. margin: 4px 0;
  210. }
  211. }
  212. .base-title {
  213. line-height: 26px;
  214. position: relative;
  215. padding-left: 15px;
  216. color: #9bf2ff;
  217. &::after {
  218. content: '';
  219. position: absolute;
  220. display: block;
  221. width: 4px;
  222. height: 12px;
  223. top: 8px;
  224. left: 5px;
  225. background: #45d3fd;
  226. border-radius: 4px;
  227. }
  228. }
  229. .detail {
  230. border: 1px solid #9bf2ff88;
  231. padding: 0 5px;
  232. background-color: #ffffff11;
  233. margin-right: 4px;
  234. &:hover {
  235. background-color: #ffffff05;
  236. }
  237. }
  238. </style>