index.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. <!-- eslint-disable vue/multi-word-component-names -->
  2. <template>
  3. <div class="company-home">
  4. <div class="border">
  5. <customHeader>皮带巷三级防灭火系统</customHeader>
  6. <div class="box-container">
  7. <ModuleCommon
  8. v-for="cfg in configs"
  9. :key="cfg.deviceType"
  10. :show-style="cfg.showStyle"
  11. :module-data="cfg.moduleData"
  12. :module-name="cfg.moduleName"
  13. :device-type="cfg.deviceType"
  14. :data="readData"
  15. :visible="true"
  16. :style="{ zIndex: 1 }"
  17. />
  18. </div>
  19. <!-- 巷道模型组件 -->
  20. <VentModal />
  21. </div>
  22. </div>
  23. </template>
  24. <script setup lang="ts">
  25. import { onMounted, ref } from 'vue';
  26. import customHeader from './customHeader.vue';
  27. import { useInitConfigs, useInitPage } from '../../home/configurable/hooks/useInit';
  28. import { testBeltLaneFire } from './beltFire.data';
  29. import ModuleCommon from './components/ModuleCommon.vue';
  30. import { list, systemList } from './beltFire.api';
  31. import { BDFireMock } from './mock';
  32. const { configs, fetchConfigs } = useInitConfigs();
  33. const { updateEnhancedConfigs, updateData } = useInitPage('皮带巷三级防灭火系统');
  34. const readData = {
  35. pdhzfxInfo: [
  36. {
  37. beltName: '测试1',
  38. sysList: [
  39. {
  40. beltName: '东翼胶带运输大巷皮带',
  41. warnlevel: '重大风险',
  42. },
  43. {
  44. beltName: '1102主运顺槽皮带',
  45. warnlevel: '报警',
  46. },
  47. {
  48. beltName: '1101主运顺槽皮带',
  49. warnlevel: '低分险',
  50. },
  51. {
  52. beltName: '东翼胶带运输大巷皮带',
  53. warnlevel: '一般风险',
  54. },
  55. {
  56. beltName: '东翼胶带运输大巷皮带',
  57. warnlevel: '较大风险',
  58. },
  59. ],
  60. },
  61. ],
  62. // csdata: [
  63. // {
  64. // beltName: '东翼胶带运输大巷皮带',
  65. // warnlevel: '重大风险',
  66. // },
  67. // {
  68. // beltName: '1102主运顺槽皮带',
  69. // warnlevel: '报警',
  70. // },
  71. // {
  72. // beltName: '1101主运顺槽皮带',
  73. // warnlevel: '低分险',
  74. // },
  75. // {
  76. // beltName: '东翼胶带运输大巷皮带',
  77. // warnlevel: '一般风险',
  78. // },
  79. // {
  80. // beltName: '东翼胶带运输大巷皮带',
  81. // warnlevel: '较大风险',
  82. // },
  83. // ],
  84. plmhInfo: [
  85. {
  86. beltName: '测试1',
  87. sysList: [
  88. {
  89. netstatus: '1',
  90. yxzt: '1',
  91. plsy: '1#区域 1.4MPa',
  92. kzms: '手动',
  93. },
  94. ],
  95. },
  96. {
  97. beltName: '测试2',
  98. sysList: [
  99. {
  100. netstatus: '1',
  101. yxzt: '1',
  102. plqy: '1#区域',
  103. plsy: '1.6MPa',
  104. kzms: '自动',
  105. },
  106. ],
  107. },
  108. ],
  109. fmhjcInfo: [
  110. {
  111. beltName: '测试1',
  112. sysList: [
  113. {
  114. warnLevel: '一般风险',
  115. deviceType: '微震测声传感器',
  116. },
  117. {
  118. warnLevel: '一般风险',
  119. deviceType: '光纤测温传感器',
  120. },
  121. {
  122. warnLevel: '一般风险',
  123. deviceType: 'HCI传感器',
  124. },
  125. {
  126. warnLevel: '一般风险',
  127. deviceType: '烟雾传感器',
  128. },
  129. {
  130. warnLevel: '一般风险',
  131. deviceType: 'CO传感器',
  132. },
  133. {
  134. warnLevel: '一般风险',
  135. deviceType: '火焰传感器',
  136. },
  137. {
  138. warnLevel: '一般风险',
  139. deviceType: '温度传感器',
  140. },
  141. {
  142. warnLevel: '一般风险',
  143. deviceType: '多参数传感器',
  144. },
  145. {
  146. warnLevel: '一般风险',
  147. deviceType: 'AI视频火焰分析',
  148. },
  149. ],
  150. },
  151. {
  152. beltName: '测试2',
  153. sysList: [
  154. {
  155. warnLevel: '一般风险',
  156. deviceType: '微震测声传感器',
  157. },
  158. {
  159. warnLevel: '一般风险',
  160. deviceType: '光纤测温传感器',
  161. },
  162. {
  163. warnLevel: '一般风险',
  164. deviceType: 'HCI传感器',
  165. },
  166. {
  167. warnLevel: '一般风险',
  168. deviceType: '烟雾传感器',
  169. },
  170. {
  171. warnLevel: '一般风险',
  172. deviceType: 'CO传感器',
  173. },
  174. {
  175. warnLevel: '一般风险',
  176. deviceType: '火焰传感器',
  177. },
  178. {
  179. warnLevel: '一般风险',
  180. deviceType: '温度传感器',
  181. },
  182. {
  183. warnLevel: '一般风险',
  184. deviceType: '多参数传感器',
  185. },
  186. {
  187. warnLevel: '一般风险',
  188. deviceType: 'AI视频火焰分析',
  189. },
  190. ],
  191. },
  192. ],
  193. yjkfArray: [
  194. {
  195. beltName: '测试1',
  196. aqjkData: [
  197. {
  198. deviceName: '风门1',
  199. frontDoorStatus: '关闭',
  200. backDoorStatus: '开启',
  201. netStatus: '在线',
  202. },
  203. {
  204. deviceName: '风门2',
  205. frontDoorStatus: '关闭',
  206. backDoorStatus: '开启',
  207. netStatus: '在线',
  208. },
  209. {
  210. deviceName: '风门3',
  211. frontDoorStatus: '关闭',
  212. backDoorStatus: '开启',
  213. netStatus: '在线',
  214. },
  215. {
  216. deviceName: '风门4',
  217. frontDoorStatus: '开启',
  218. backDoorStatus: '开启',
  219. netStatus: '在线',
  220. },
  221. {
  222. deviceName: '风门5',
  223. frontDoorStatus: '开启',
  224. backDoorStatus: '开启',
  225. netStatus: '在线',
  226. },
  227. {
  228. deviceName: '风门6',
  229. frontDoorStatus: '开启',
  230. backDoorStatus: '开启',
  231. netStatus: '在线',
  232. },
  233. {
  234. deviceName: '风门7',
  235. frontDoorStatus: '关闭',
  236. backDoorStatus: '关闭',
  237. netStatus: '在线',
  238. },
  239. {
  240. deviceName: '风门8',
  241. frontDoorStatus: '关闭',
  242. backDoorStatus: '关闭',
  243. netStatus: '在线',
  244. },
  245. {
  246. deviceName: '风门9',
  247. frontDoorStatus: '关闭',
  248. backDoorStatus: '关闭',
  249. netStatus: '在线',
  250. },
  251. ],
  252. },
  253. ],
  254. };
  255. // const readData = ref({});
  256. function refresh() {
  257. fetchConfigs('belt').then(() => {
  258. configs.value = testBeltLaneFire;
  259. Promise.resolve(readData).then(updateData);
  260. // updateEnhancedConfigs(configs.value);
  261. // getDataSource();
  262. });
  263. }
  264. // async function getDataSource() {
  265. // const res = await list({ devicetype: 'belt', pagetype: 'normal' });
  266. // let dataSource: any = [];
  267. // dataSource = res.msgTxt[0] && res.msgTxt[0].datalist ? res.msgTxt[0].datalist[0] : {};
  268. // if (dataSource) {
  269. // readData.value = Object.assign(dataSource, dataSource.readData);
  270. // }
  271. // }
  272. // 查询关联设备列表
  273. // async function getDeviceList() {
  274. // const res = await systemList({ devicetype: 'sys', systemID: optionValue.value });
  275. // const result = res.msgTxt;
  276. // const deviceArr = <DeviceType[]>[];
  277. // result.forEach((item) => {
  278. // const data = item['datalist'].filter((data: any) => {
  279. // const readData = data.readData;
  280. // return Object.assign(data, readData);
  281. // });
  282. // if (item.type != 'sys') {
  283. // deviceArr.unshift({ deviceType: item.type, deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'], datalist: data });
  284. // }
  285. // });
  286. // deviceList.value = deviceArr;
  287. // deviceActive.value = deviceArr[0].deviceType;
  288. // deviceChange(0);
  289. // }
  290. function initInterval() {
  291. setInterval(() => {
  292. refresh();
  293. }, 60000);
  294. }
  295. onMounted(() => {
  296. refresh();
  297. initInterval();
  298. });
  299. </script>
  300. <style lang="less" scoped>
  301. .spray-wrapper {
  302. width: 100%;
  303. height: 100%;
  304. background-image: url('/@/assets/images/beltFire/baseMap.png');
  305. background-size: cover;
  306. }
  307. #spray3D {
  308. pointer-events: all;
  309. }
  310. .spray-wrapper :deep(.list-item_L .list-item__icon_L) {
  311. background-image: url('/@/assets/images/home-container/configurable/minehome/list-icon-file.png');
  312. }
  313. .spray-wrapper :deep(.list-item_N:nth-child(1)) {
  314. background-image: url('/@/assets/images/home-container/configurable/minehome/list-bg-n5.png');
  315. }
  316. .spray-wrapper :deep(.list-item_N:nth-child(2)) {
  317. background-image: url('/@/assets/images/home-container/configurable/minehome/list-bg-n6.png');
  318. }
  319. .company-home {
  320. background: url('/@/assets/images/beltFire/baseMap.png') no-repeat center;
  321. width: 100%;
  322. height: 100%;
  323. color: @white;
  324. position: relative;
  325. .border {
  326. width: 100%;
  327. height: 94%;
  328. background: url('/@/assets/images/beltFire/mainbj.png') no-repeat;
  329. background-size: 100% 100%;
  330. }
  331. }
  332. </style>