nitrogenHome.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021
  1. <template>
  2. <div id="compressor3D" style="width: 100%; height: 100%; position: absolute; overflow: hidden"></div>
  3. <div v-show="monitorDataGroupFlag == 1" id="compressorCss3D" class="threejs-Object-CSS compressorCss3D-box"
  4. style="width: 100%; height: 100%; position: absolute; pointer-events: none; overflow: hidden; z-index: 2; top: 0px; left: 0px">
  5. <!-- <a-spin :spinning="loading" /> -->
  6. <div v-for="(groupNum, index) in monitorDataGroupNum1" :key="index" class="modal-monitor">
  7. <fourBorderBg :class="`kyj${groupNum}`" :id="`nitrogenMonitor${groupNum}`">
  8. <div class="title">{{ groupNum }}号空压机 </div>
  9. <div class="monitor-item">
  10. <span class="monitor-title">机头温度:</span>
  11. <span class="monitor-val"><span class="val">{{ monitorData[`PRE${groupNum}_CPR_HeadTemp`] ?
  12. monitorData[`PRE${groupNum}_CPR_HeadTemp`] : '-' }}</span><span class="unit"></span>℃</span>
  13. </div>
  14. <div class="monitor-item">
  15. <span class="monitor-title">冷却温度:</span>
  16. <span class="monitor-val"><span class="val">{{ monitorData[`PRE${groupNum}_CPR_CoolantTemp`] ?
  17. monitorData[`PRE${groupNum}_CPR_CoolantTemp`] : '-' }}</span><span class="unit">℃</span></span>
  18. </div>
  19. <div class="monitor-item">
  20. <span class="monitor-title">排气温度:</span>
  21. <span class="monitor-val"><span class="val">{{ monitorData[`PRE${groupNum}_CPR_ExhaustTemp`] ? monitorData[`PRE${groupNum}_CPR_ExhaustTemp`] : '-' }}</span><span class="unit">℃</span></span>
  22. </div>
  23. <div class="signal-item">
  24. <div class="signal"><span class="monitor-title">运行信号</span><span
  25. :class="{ 'signal-round': true, 'signal-round-run': monitorData[`PRE${groupNum}_MOT_Running`] == '1', 'signal-round-gry': monitorData[`PRE${groupNum}_MOT_Running`] != '1' }"></span>
  26. </div>
  27. <div class="signal"><span class="monitor-title">故障信号</span><span
  28. :class="{ 'signal-round': true, 'signal-round-warning': monitorData[`PRE${groupNum}_MOT_Fault`] == '1', 'signal-round-gry': monitorData[`PRE${groupNum}_MOT_Fault`] != '1' }"></span>
  29. </div>
  30. </div>
  31. </fourBorderBg>
  32. <fourBorderBg :class="`cqg${groupNum}`" :id="`cqgMonitor${groupNum}`">
  33. <div class="title">{{ groupNum }}号储气罐 </div>
  34. <div class="monitor-item">
  35. <span class="monitor-title">气囊温度:</span>
  36. <span class="monitor-val"><span class="val">{{ monitorData[`PRE${groupNum}_VLS_Temp`] ?
  37. monitorData[`PRE${groupNum}_VLS_Temp`] : '-' }}</span><span class="unit">℃</span></span>
  38. </div>
  39. <!-- <div class="monitor-item">
  40. <span class="monitor-title">气囊压力<span class="unit"></span>:</span>
  41. <span class="monitor-val"><span class="val">{{ monitorData[groupNum - 1] && monitorData[groupNum - 1]['airReceiverPress'] ?
  42. monitorData[groupNum - 1]['airReceiverPress'] : '-' }}</span><span class="unit">Mpa</span></span>
  43. </div>
  44. <div class="monitor-item">
  45. <span class="monitor-title">气囊流量<span class="unit"></span>:</span>
  46. <span class="monitor-val"><span class="val">{{ monitorData[groupNum - 1] && monitorData[groupNum - 1]['airReceiverFlow'] ?
  47. monitorData[groupNum - 1]['airReceiverFlow'] : '-' }}</span><span class="unit">m³/k</span></span>
  48. </div> -->
  49. </fourBorderBg>
  50. </div>
  51. </div>
  52. <div v-show="monitorDataGroupFlag == 2" id="compressorCss3D1" class="threejs-Object-CSS compressorCss3D-box"
  53. style="width: 100%; height: 100%; position: absolute; pointer-events: none; overflow: hidden; z-index: 3; top: 0px; left: 0px">
  54. <div v-for="(groupNum, index) in monitorDataGroupNum2" :key="index" class="modal-monitor">
  55. <fourBorderBg :class="`kyj${groupNum}`" :id="`nitrogenMonitor${groupNum}`">
  56. <div class="title">{{ groupNum }}号空压机 </div>
  57. <div class="monitor-item">
  58. <span class="monitor-title">机头温度:</span>
  59. <span class="monitor-val"><span class="val">{{ monitorData[`PRE${groupNum}_CPR_HeadTemp`] ?
  60. monitorData[`PRE${groupNum}_CPR_HeadTemp`] : '-' }}</span><span class="unit"></span>℃</span>
  61. </div>
  62. <div class="monitor-item">
  63. <span class="monitor-title">冷却温度:</span>
  64. <span class="monitor-val"><span class="val">{{ monitorData[`PRE${groupNum}_CPR_CoolantTemp`] ?
  65. monitorData[`PRE${groupNum}_CPR_CoolantTemp`] : '-' }}</span><span class="unit">℃</span></span>
  66. </div>
  67. <div class="monitor-item">
  68. <span class="monitor-title">排气温度:</span>
  69. <span class="monitor-val"><span class="val">{{ monitorData[`PRE${groupNum}_CPR_ExhaustTemp`] ? monitorData[`PRE${groupNum}_CPR_ExhaustTemp`] : '-' }}</span><span class="unit">℃</span></span>
  70. </div>
  71. <div class="signal-item">
  72. <div class="signal"><span class="monitor-title">运行信号</span><span
  73. :class="{ 'signal-round': true, 'signal-round-run': monitorData[`PRE${groupNum}_MOT_Running`] == '1', 'signal-round-gry': monitorData[`PRE${groupNum}_MOT_Running`] != '1' }"></span>
  74. </div>
  75. <div class="signal"><span class="monitor-title">故障信号</span><span
  76. :class="{ 'signal-round': true, 'signal-round-warning': monitorData[`PRE${groupNum}_MOT_Fault`] == '1', 'signal-round-gry': monitorData[`PRE${groupNum}_MOT_Fault`] != '1' }"></span>
  77. </div>
  78. </div>
  79. </fourBorderBg>
  80. <fourBorderBg :class="`cqg${groupNum}`" :id="`cqgMonitor${groupNum}`">
  81. <div class="title">{{ groupNum }}号储气罐 </div>
  82. <div class="monitor-item">
  83. <span class="monitor-title">气囊温度:</span>
  84. <span class="monitor-val"><span class="val">{{ monitorData[`PRE${groupNum}_VLS_Temp`] ?
  85. monitorData[`PRE${groupNum}_VLS_Temp`] : '-' }}</span><span class="unit">℃</span></span>
  86. </div>
  87. <!-- <div class="monitor-item">
  88. <span class="monitor-title">气囊压力<span class="unit"></span>:</span>
  89. <span class="monitor-val"><span class="val">{{ monitorData[groupNum - 1] && monitorData[groupNum - 1]['airReceiverPress'] ?
  90. monitorData[groupNum - 1]['airReceiverPress'] : '-' }}</span><span class="unit">Mpa</span></span>
  91. </div>
  92. <div class="monitor-item">
  93. <span class="monitor-title">气囊流量<span class="unit"></span>:</span>
  94. <span class="monitor-val"><span class="val">{{ monitorData[groupNum - 1] && monitorData[groupNum - 1]['airReceiverFlow'] ?
  95. monitorData[groupNum - 1]['airReceiverFlow'] : '-' }}</span><span class="unit">m³/k</span></span>
  96. </div> -->
  97. </fourBorderBg>
  98. </div>
  99. </div>
  100. <div class="nitrogen-home">
  101. <div style="position: absolute; color: #fff; top: 30px; pointer-events: auto; display: flex;">
  102. <span class="tab-button-box" :class="{'tab-button-box-active': monitorDataGroupFlag == 1}" @click="setMonitorGroupNum(monitorDataGroupNum1, 1)">压风系统1</span>
  103. <span class="tab-button-box" :class="{ 'tab-button-box-active': monitorDataGroupFlag == 2 }" @click="setMonitorGroupNum(monitorDataGroupNum2, 2)">压风系统2</span>
  104. </div>
  105. <div class="total-data">
  106. <div class="item">总流量(m³/min):<span class="val">{{ monitorData[`PreSys_TotalOutPipeFlow${monitorDataGroupFlag}`] ? monitorData[`PreSys_TotalOutPipeFlow${monitorDataGroupFlag}`] : '-' }}</span></div>
  107. <div class="item">总压力(bar):<span class="val">{{ monitorData[`PreSys_TotalOutPipePre${monitorDataGroupFlag}`] ? monitorData[`PreSys_TotalOutPipePre${monitorDataGroupFlag}`] : '-' }}</span></div>
  108. </div>
  109. <div class="nitrogen-container">
  110. <div class="top-box">
  111. <!-- 左边监测数据 -->
  112. <div class="lr-box left-box">
  113. <div class="left-container">
  114. <div class="item item-l" v-for="(groupNum, index) in monitorDataGroupNum" :key="index">
  115. <div class="monitor-box">
  116. <ventBox1>
  117. <template #title>
  118. <div>{{ groupNum }}号空压机组</div>
  119. </template>
  120. <template #container>
  121. <div class="state-item" v-for="(data, index) in showMonitorData" :key="index">
  122. <div class="item-col">
  123. <span class="state-title">{{ Object.values(data)[0] }} :</span>
  124. <span class="state-val">{{ (monitorData[Object.keys(data)[0].replace('PRE', 'PRE'+ groupNum)])
  125. >= 0 ? Number(monitorData[Object.keys(data)[0].replace('PRE', 'PRE' + groupNum)]) : '-' }}</span>
  126. </div>
  127. <div class="item-col">
  128. <span class="state-title">{{ Object.values(data)[1] }} :</span>
  129. <span class="state-val">{{ (monitorData[Object.keys(data)[0].replace('PRE', 'PRE' + groupNum)])
  130. >= 0 ? Number(monitorData[Object.keys(data)[0].replace('PRE', 'PRE' + groupNum)]) : '-' }}</span>
  131. </div>
  132. </div>
  133. </template>
  134. </ventBox1>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. <!-- 右边控制状态 -->
  140. <div class="lr-box right-box" style="display: none;">
  141. <ventBox1>
  142. <template #title>
  143. <div>远程控制</div>
  144. </template>
  145. <template #container>
  146. <div class="control-group">
  147. <div class="control-item" v-for="groupNum in monitorDataGroupNum" :key="groupNum">
  148. <div class="control-item-title">{{ kyjs[groupNum - 1] }}</div>
  149. <div class="control-item-state">
  150. <a-switch v-model="airCompressorState[groupNum - 1][`compressRunSigF1`]" size="small" checked-children="开启"
  151. un-checked-children="关闭" :disabled="airCompressorState[groupNum - 1][`controlModel`]"
  152. @change="handlerDevice(airCompressorState[groupNum - 1])">
  153. </a-switch>
  154. </div>
  155. </div>
  156. <div class="control-item" v-for="groupNum in monitorDataGroupNum" :key="groupNum">
  157. <div class="control-item-title">{{ cqgs[groupNum - 1] }}</div>
  158. <div class="control-item-state">
  159. <a-switch v-model="airCompressorState[groupNum - 1][`compressRunSigF1`]" size="small" checked-children="开启"
  160. un-checked-children="关闭" :disabled="airCompressorState[groupNum - 1][`controlModel`]"
  161. @change="handlerDevice(airCompressorState[groupNum - 1])">
  162. </a-switch>
  163. </div>
  164. </div>
  165. <a-divider style="height: 1px; background-color: #d7d7d755" />
  166. <div class="control-btn-group vent-margin-b-20">
  167. <div class="control-left-box">
  168. <div class="btn-box">
  169. <span @click="handlerDevice({ remote: true })">远程</span>
  170. <span @click="handlerDevice({ remote: false })">就地</span>
  171. </div>
  172. <div class="icon-box" :class="{ 'remote-icon-box': true }">
  173. <div class="icon"></div>
  174. </div>
  175. </div>
  176. <div class="control-right-box">
  177. <div class="control-item-title">是否开启联动</div>
  178. <div class="item-data-box" >
  179. <div :class="{ 'state-icon': true, 'open': monitorData[0] && monitorData[0].linkState, 'close': monitorData[0] && !monitorData[0].linkState }">
  180. </div>
  181. <div >{{ monitorData[0] && !monitorData[0].linkState ? '不联动' : '联动' }}</div>
  182. </div>
  183. </div>
  184. </div>
  185. </div>
  186. </template>
  187. </ventBox1>
  188. <!-- <div class="control-item">
  189. <div class="control-item-l">
  190. <span class="round"></span>
  191. <span>控制模式</span>
  192. </div>
  193. <div>
  194. <a-switch v-model="airCompressorState[0][`controlModel`]" checked-children="就地" un-checked-children="远程"
  195. @change="handlerControlModel(airCompressorState[0])">
  196. </a-switch>
  197. </div>
  198. </div> -->
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. </template>
  204. <script lang="ts" setup name="nitrogenHome">
  205. import { onMounted, onUnmounted, ref, watch } from 'vue'
  206. import fourBorderBg from '../../../comment/components/fourBorderBg.vue'
  207. import { mountedThree, destroy, setModelType, clearCssText } from '../nitrogen.threejs'
  208. import { list } from '../nitrogen.api'
  209. import ventBox1 from '/@/components/vent/ventBox1.vue'
  210. import { monitorDataGroupNum1, monitorDataGroupNum2, airCompressorState, showMonitorData, monitorData } from '../nitrogen.data'
  211. const loading = ref(true)
  212. const monitorDataGroupNum = ref(monitorDataGroupNum1)
  213. const monitorDataGroupFlag = ref(1)
  214. const kyjs = ['1号空压机', '2号空压机', '3号空压机', '4号空压机'];
  215. const cqgs = ['1号储气罐', '2号储气罐', '3号储气罐', '4号储气罐'];
  216. // https获取监测数据
  217. let timer: null | NodeJS.Timeout = null;
  218. async function getMonitor(flag?) {
  219. if (Object.prototype.toString.call(timer) === '[object Null]') {
  220. timer = await setTimeout(async () => {
  221. await getDataSource();
  222. if (timer) {
  223. timer = null;
  224. }
  225. await getMonitor();
  226. }, flag ? 0 : 1000);
  227. }
  228. };
  229. async function getDataSource() {
  230. const res = await list({ devicetype: 'forcFan', pagetype: 'normal' });
  231. let dataSource = res.msgTxt[0].datalist[0];
  232. // dataSource =
  233. // {
  234. // "msgType": null,
  235. // "deviceID": "1705212847586627592",
  236. // "strname": "压风机系统",
  237. // "strinstallpos": "压风机系统",
  238. // "fsectarea": "null",
  239. // "stationname": "压风机系统分站",
  240. // "deviceType": "forcFan",
  241. // "typeName": null,
  242. // "netStatus": 1,
  243. // "warnFlag": 0,
  244. // "warnLevel": null,
  245. // "warnLevel_str": null,
  246. // "warnTime": null,
  247. // "readTime": "2023-10-24 08:47:27",
  248. // "warnDes": "",
  249. // "frontGateOpenCtrl": null,
  250. // "rearGateOpenCtrl": null,
  251. // "readData": {
  252. // "PRE1_MOT_PhaseATemp": "526",
  253. // "PRE3_CPR_CoolantTemp": "12",
  254. // "PRE4_CPR_HeadTemp": "13",
  255. // "PRE2_MOT_PhaseATempAlarm": "0",
  256. // "PRE5_MOT_Fault": "0",
  257. // "PRE4_MOT_PhaseATempStop": "0",
  258. // "PRE4_CPR_LoadPre": "65",
  259. // "PRE5_CPR_LoadPre": "62",
  260. // "PRE4_MOT_CtrlMode": "1",
  261. // "PRE2_CPR_LoadorUnload": "1",
  262. // "PRE3_MOT_PhaseBTemp": "133",
  263. // "PRE1_CPR_ExhaustPre": "66",
  264. // "PRE1_MOT_PhaseATempAlarm": "0",
  265. // "PRE5_CPR_UnLoadPre": "69",
  266. // "PRE4_MOT_PhaseATemp": "129",
  267. // "PRE5_MOT_PhaseCTemp": "685",
  268. // "PRE5_MOT_PhaseATemp": "681",
  269. // "PRE5_VLS_Temp": "590",
  270. // "PRE1_CPR_LoadTime": "8344",
  271. // "PRE2_CPR_LoadTime": "5553",
  272. // "PRE4_CPR_LoadorUnload": "0",
  273. // "PRE5_MOT_PhaseATempAlarm": "0",
  274. // "PRE3_CPR_LoadTime": "4511",
  275. // "PRE5_CPR_LoadTime": "6032",
  276. // "PRE1_MOT_PhaseATempStop": "0",
  277. // "PRE2_MOT_CompProtFault": "0",
  278. // "PRE5_MOT_PhaseATempStop": "0",
  279. // "PRE3_MOT_PhaseATempStop": "0",
  280. // "PRE1_VLS_Temp": "436",
  281. // "PRE2_CPR_ExhaustPre": "71",
  282. // "PRE5_MOT_CtrlMode": "1",
  283. // "PRE3_CPR_ExhaustTemp": "10",
  284. // "PRE3_MOT_TotalRunTime": "5342",
  285. // "P RE2_MOT_PhaseATemp": "541",
  286. // "PRE4_MOT_PhaseCTemp": "130",
  287. // "PRE4_MOT_PhaseATempAlarm": "0",
  288. // "timestamp": "1698108447720",
  289. // "PRE3_VLS_Temp": "219",
  290. // "PRE1_HostorLoc": "0",
  291. // "PRE2_MOT_Running": "1",
  292. // "PRE1_CPR_LoadPre": "65",
  293. // "PRE1_MOT_Running": "1",
  294. // "PRE4_MOT_Fault": "0",
  295. // "PRE2_CPR_LoadPre": "65",
  296. // "PRE3_MOT_Running": "0",
  297. // "PRE4_MOT_Running": "0",
  298. // "PRE3_CPR_LoadPre": "65",
  299. // "PRE1_MOT_CtrlMode": "1",
  300. // "PRE3_MOT_CtrlMode": "1",
  301. // "PRE3_CPR_LoadorUnload": "0",
  302. // "PRE2_MOT_PhaseCTemp": "550",
  303. // "PRE1_CPR_CoolantTemp": "71",
  304. // "PRE1_MOT_PhaseBTemp": "539",
  305. // "PRE3_MOT_PhaseATempAlarm": "0",
  306. // "PRE5_MOT_Running": "1",
  307. // "PRE1_MOT_Fault": "0",
  308. // "PRE4_CPR_ExhaustPre": "66",
  309. // "PRE4_CPR_CoolantTemp": "12",
  310. // "PRE5_CPR_ExhaustTemp": "76",
  311. // "PRE2_CPR_HeadTemp": "89",
  312. // "PRE3_MOT_PhaseCTemp": "135",
  313. // "PRE4_CPR_LoadTime": "5084",
  314. // "sign": "0",
  315. // "PRE1_CPR_UnLoadPre": "72",
  316. // "PRE4_HostorLoc": "0",
  317. // "PRE4_MOT_CompProtFault": "0",
  318. // "PRE1_CPR_LoadorUnload": "1",
  319. // "PRE3_CPR_ExhaustPre": "68",
  320. // "PRE2_CPR_ExhaustTemp": "77",
  321. // "PRE2_MOT_PhaseATempStop": "0",
  322. // "PRE5_MOT_CompProtFault": "0",
  323. // "PRE2_MOT_Fault": "0",
  324. // "PRE5_MOT_PhaseBTemp": "676",
  325. // "PRE3_MOT_PhaseATemp": "134",
  326. // "PRE4_MOT_PhaseBTemp": "130",
  327. // "PRE2_CPR_CoolantTemp": "66",
  328. // "PRE3_HostorLoc": "0",
  329. // "PRE4_MOT_TotalRunTime": "5104",
  330. // "PRE1_MOT_TotalRunTime": "8416",
  331. // "PRE3_MOT_CompProtFault": "0",
  332. // "PRE3_MOT_Fault": "0",
  333. // "PRE4_CPR_UnLoadPre": "72",
  334. // "PRE1_CPR_HeadTemp": "97",
  335. // "PRE2_HostorLoc": "0",
  336. // "PRE2_MOT_PhaseBTemp": "562",
  337. // "PRE3_CPR_HeadTemp": "13",
  338. // "PRE2_MOT_TotalRunTime": "5586",
  339. // "PRE5_CPR_HeadTemp": "95",
  340. // "PRE3_CPR_UnLoadPre": "72",
  341. // "PRE4_VLS_Temp": "166",
  342. // "PRE5_CPR_CoolantTemp": "70",
  343. // "PRE1_MOT_CompProtFault": "0",
  344. // "PRE5_MOT_TotalRunTime": "7825",
  345. // "PRE2_MOT_CtrlMode": "1",
  346. // "PRE5_CPR_ExhaustPre": "68",
  347. // "PRE1_MOT_PhaseCTemp": "544",
  348. // "PRE5_CPR_LoadorUnload": "1",
  349. // "PRE2_CPR_UnLoadPre": "72",
  350. // "PRE4_CPR_ExhaustTemp": "11",
  351. // "PRE2_VLS_Temp": "445",
  352. // "isRun": "-2",
  353. // "PRE5_HostorLoc": "0",
  354. // "PRE1_CPR_ExhaustTemp": "68"
  355. // },
  356. // "readDataDes": null,
  357. // "summaryHour": [],
  358. // "summaryDay": [],
  359. // "history": [],
  360. // "totalInfo": null,
  361. // "sign": null,
  362. // "cameras": [],
  363. // "links": [],
  364. // "other1": null,
  365. // "other2": null,
  366. // "other3": null
  367. // }
  368. if(dataSource){
  369. monitorData.value = Object.assign(dataSource, dataSource.readData);
  370. }
  371. // dataSource.forEach((data, index) => {
  372. // const item = data.readData;
  373. // Object.assign(item, data);
  374. // item.compressRunSigF1 = item.compressRunSigF1 ? true : false
  375. // airCompressorState.value[index].id = item.id
  376. // airCompressorState.value[index].compressRunSigF1 = item.compressRunSigF1
  377. // airCompressorState.value[index].controlModel = item.controlModel === 'LOC' ? true : false
  378. // monitorData.value[index] = item
  379. // });
  380. // monitorDataGroupNum.value = monitorData.value.length
  381. loading.value = false
  382. };
  383. function setMonitorGroupNum(num, flag){
  384. monitorDataGroupNum.value = num
  385. monitorDataGroupFlag.value = flag
  386. }
  387. function handlerDevice(data) {
  388. // if (data.length < 1) return
  389. // handleAirCompressor({ id: data.id, compressRunF1: data.compressRunSigF1 }).then(res => {
  390. // if (res.success) {
  391. // message.success('操作成功')
  392. // } else {
  393. // message.warning(data.msg)
  394. // }
  395. // })
  396. };
  397. function resetDevice(data) {
  398. }
  399. function handlerControlModel(data) {
  400. }
  401. watch(monitorDataGroupFlag, (newVal) => {
  402. if(newVal == 1){
  403. setModelType('compressor1')
  404. }
  405. if (newVal == 2) {
  406. setModelType('compressor2')
  407. }
  408. })
  409. onMounted(async () => {
  410. mountedThree(monitorDataGroupNum1, monitorDataGroupNum2).then(async() => {
  411. await getMonitor(true)
  412. setModelType('compressor1')
  413. })
  414. })
  415. onUnmounted(() => {
  416. destroy();
  417. if (timer) {
  418. clearTimeout(timer);
  419. timer = undefined;
  420. }
  421. });
  422. </script>
  423. <style lang="less" scoped>
  424. @ventSpace: zxm;
  425. .nitrogen-home {
  426. width: 100%;
  427. height: 100%;
  428. display: flex;
  429. justify-content: center;
  430. position: relative;
  431. .total-data{
  432. position: absolute;
  433. color: #e4cd00;
  434. z-index: 9;
  435. top: 50px;
  436. right: 30px;
  437. display: flex;
  438. font-size: 18px;
  439. .item{
  440. margin-left: 30px;
  441. .val{
  442. color: #00d8ff;
  443. }
  444. }
  445. }
  446. }
  447. .compressorCss3D-box {
  448. .modal-monitor {
  449. position: absolute;
  450. left: 0px;
  451. top: 0px;
  452. }
  453. &:deep(.win) {
  454. margin: 0 !important;
  455. background: #00000044;
  456. }
  457. &:deep(.main) {
  458. .title {
  459. height: 34px;
  460. text-align: center;
  461. font-weight: 600;
  462. color: #7AF5FF;
  463. // background-image: url('../../../assets/img/yfj/light.png');
  464. background-repeat: no-repeat;
  465. background-position-x: center;
  466. background-position-y: 100%;
  467. background-size: 80%;
  468. font-size: 16px;
  469. }
  470. .monitor-item {
  471. display: flex;
  472. flex-direction: row;
  473. width: auto;
  474. margin-bottom: 3px;
  475. .monitor-val {
  476. color: #ffb700;
  477. display: flex;
  478. width: auto;
  479. .val {
  480. width: 80px;
  481. font-size: 14px;
  482. }
  483. .unit {
  484. color: #ffffffbb;
  485. font-size: 14px;
  486. }
  487. }
  488. }
  489. .monitor-title {
  490. width: 100px;
  491. color: #7AF5FF;
  492. font-weight: 400;
  493. font-size: 14px;
  494. }
  495. .signal-item {
  496. display: flex;
  497. justify-content: space-between;
  498. // margin-bottom: 5px;
  499. .signal-round {
  500. display: inline-block;
  501. width: 8px;
  502. height: 8px;
  503. border-radius: 50%;
  504. margin: 0 10px;
  505. position: relative;
  506. &::after {
  507. display: block;
  508. content: '';
  509. position: absolute;
  510. width: 12px;
  511. height: 12px;
  512. top: -2px;
  513. left: -2px;
  514. border-radius: 50%;
  515. }
  516. }
  517. .signal-round-gry {
  518. background-color: #858585;
  519. &::after {
  520. background-color: #85858544;
  521. box-shadow: 0 0 1px 1px #85858599;
  522. }
  523. }
  524. .signal-round-run {
  525. background-color: #67FC00;
  526. &::after {
  527. background-color: #67FC0044;
  528. box-shadow: 0 0 1px 1px #c6ff77;
  529. }
  530. }
  531. .signal-round-warning {
  532. background-color: #E9170B;
  533. &::after {
  534. background-color: #E9170B44;
  535. box-shadow: 0 0 1px 1px #E9170B;
  536. }
  537. }
  538. }
  539. }
  540. }
  541. .nitrogen-home {
  542. width: 100%;
  543. height: calc(100% - 100px);
  544. position: fixed;
  545. z-index: 99;
  546. display: flex;
  547. flex-direction: column;
  548. justify-content: center;
  549. align-items: center;
  550. pointer-events: none;
  551. top: 60px;
  552. .nitrogen-container {
  553. width: 100%;
  554. height: calc(100%);
  555. display: flex;
  556. justify-content: space-between;
  557. margin-bottom: 100px;
  558. .top-box {
  559. width: 100%;
  560. padding: 10px;
  561. overflow: hidden;
  562. display: flex;
  563. justify-content: space-between;
  564. .lr-box {
  565. display: flex;
  566. flex-direction: column;
  567. position: relative;
  568. z-index: 9999;
  569. pointer-events: auto;
  570. }
  571. .item {
  572. width: 285px;
  573. height: auto;
  574. position: relative;
  575. border-radius: 5px;
  576. margin-top: 10px;
  577. margin-bottom: 0px;
  578. pointer-events: auto;
  579. color: #fff;
  580. overflow: hidden;
  581. .control-item {
  582. height: auto;
  583. min-height: 35px;
  584. display: flex;
  585. flex-direction: row;
  586. justify-content: space-between;
  587. align-items: center;
  588. padding: 5px;
  589. margin: 0 10px 0 3px;
  590. pointer-events: auto;
  591. background: linear-gradient(to right, #0063CD22, #0063CD04);
  592. margin-bottom: 5px;
  593. border-width: 1px;
  594. border-style: dashed;
  595. border-image: linear-gradient(to right, #008ccd66, #0063CD04)1 1;
  596. border-radius: 5px;
  597. &:last-child {
  598. margin-bottom: 0
  599. }
  600. .control-item-l {
  601. display: flex;
  602. align-items: center;
  603. font-size: 14px;
  604. .round {
  605. display: inline-block;
  606. width: 3px;
  607. height: 3px;
  608. padding: 1px;
  609. border-radius: 50%;
  610. background-color: #3DF6FF;
  611. margin-right: 5px;
  612. box-shadow: 0 0 1px 1px #64f7ff;
  613. }
  614. }
  615. .control-item-r {
  616. text-align: right;
  617. }
  618. .button-box {
  619. position: relative;
  620. padding: 5px;
  621. border: 1px transparent solid;
  622. background-clip: border-box;
  623. border-radius: 5px;
  624. margin-left: 8px;
  625. }
  626. .a-button {
  627. pointer-events: auto;
  628. }
  629. &::v-deep .a-button--mini {
  630. padding: 6px 10px;
  631. }
  632. &::v-deep .a-button--mini.is-round {
  633. padding: 6px 10px;
  634. }
  635. }
  636. .base-title {
  637. width: calc(100% - 60px);
  638. text-align: center;
  639. color: #00d8ff;
  640. }
  641. .state-item {
  642. display: flex;
  643. flex-direction: row;
  644. padding: 5px;
  645. .item-col {
  646. width: 50%;
  647. display: flex;
  648. justify-content: center;
  649. align-items: center;
  650. padding-right: 4px;
  651. .state-title {
  652. color: #ffffffcc;
  653. flex: 9;
  654. font-size: 14px;
  655. .unit {
  656. // color: #ffffffbb;
  657. }
  658. }
  659. .state-val {
  660. flex: 1;
  661. color: #e4a300;
  662. margin-right: 5px;
  663. text-align: right;
  664. font-size: 14px;
  665. }
  666. }
  667. }
  668. .signal-box {
  669. margin: 5px 0;
  670. display: flex;
  671. align-items: center;
  672. .signal-title {
  673. color: #7AF5FF;
  674. margin: 0 5px;
  675. }
  676. &:last-child {
  677. margin-right: 0px;
  678. }
  679. }
  680. .list-item {
  681. padding: 0 10px;
  682. display: flex;
  683. justify-content: space-between;
  684. align-items: center;
  685. .item-data-key {
  686. color: #ffffff99;
  687. }
  688. }
  689. .item-data-box {
  690. color: #fff;
  691. .state-icon {
  692. display: inline-block;
  693. width: 12px;
  694. height: 12px;
  695. border-radius: 12px;
  696. }
  697. .open {
  698. border: 5px solid #133a56;
  699. background: #4ecb73;
  700. }
  701. .close {
  702. border: 5px solid #192961;
  703. background: #6d7898;
  704. }
  705. }
  706. }
  707. .item-l {
  708. width: 335px;
  709. .monitor-box {
  710. // width: 335px;
  711. background-color: #ffffff05;
  712. // margin-left: 2px;
  713. // border-radius: 5px;
  714. // backdrop-filter: blur(10px);
  715. }
  716. }
  717. .right-box {
  718. width: 330px;
  719. .control-group{
  720. display: flex;
  721. // justify-content: space-around;
  722. flex-wrap: wrap;
  723. .control-item {
  724. display: flex;
  725. flex-direction: column;
  726. justify-content: center;
  727. align-items: center;
  728. padding: 0 4px;
  729. .control-item-title{
  730. color: #A6DCE9;
  731. position: relative;
  732. top: 5px;
  733. }
  734. .control-item-state{
  735. width: 94px;
  736. height: 47px;
  737. background: url('/@/assets/images/vent/control-switch-bg.png');
  738. display: flex;
  739. justify-content: center;
  740. align-items: center;
  741. color: #fff;
  742. }
  743. .button-box {
  744. position: relative;
  745. padding: 5px;
  746. border: 1px transparent solid;
  747. background-clip: border-box;
  748. border-radius: 5px;
  749. margin-left: 8px;
  750. }
  751. .a-button {
  752. pointer-events: auto;
  753. }
  754. &::v-deep .a-button--mini {
  755. padding: 6px 10px;
  756. }
  757. &::v-deep .a-button--mini.is-round {
  758. padding: 6px 10px;
  759. }
  760. }
  761. }
  762. .control-btn-group{
  763. width: 100%;
  764. display: flex;
  765. flex-direction: row;
  766. justify-content: space-between;
  767. align-items: center;
  768. .control-left-box{
  769. display: flex;
  770. flex-direction: column;
  771. justify-content: center;
  772. align-items: center;
  773. padding: 0 20px;
  774. .btn-box{
  775. width: 100px;
  776. color: #fff;
  777. display: flex;
  778. justify-content: space-between;
  779. span{
  780. display: inline-block;
  781. padding: 2px 8px;
  782. background: #007099;
  783. border-radius: 4px;
  784. border: 1px solid rgb(125, 230, 249);
  785. cursor: pointer;
  786. &:hover{
  787. background: #005574;
  788. }
  789. }
  790. }
  791. .icon-box{
  792. width: 60px;
  793. height: 60px;
  794. border-radius: 30px;
  795. border: 2px solid #00bcdd;
  796. box-shadow: 0 0 20px #ffffff88;
  797. display: flex;
  798. justify-content: center;
  799. align-items: center;
  800. margin-top: 20px;
  801. .icon{
  802. width: 18px;
  803. height: 18px;
  804. border-radius: 9px;
  805. border: 3px solid #d7f9ff;
  806. position: relative;
  807. background: #00bcdd;
  808. &::before{
  809. position: absolute;
  810. content: '';
  811. width: 2px;
  812. height: 12px;
  813. background-color: #00bcdd;
  814. left: 6px;
  815. top: -16px;
  816. }
  817. &::after{
  818. position: absolute;
  819. content: '';
  820. width: 2px;
  821. height: 12px;
  822. left: 6px;
  823. top: 17px;
  824. background-color: #00d9ff;
  825. }
  826. }
  827. }
  828. .remote-icon-box{
  829. transform: rotate(30deg);
  830. animation: iconRotate 1s linear;
  831. }
  832. .remote-icon-box1{
  833. transform: rotate(-30deg);
  834. animation: iconRotate1 1s linear;
  835. }
  836. @keyframes iconRotate{
  837. from{
  838. transform: rotate(-30deg);
  839. }
  840. to {
  841. transform: rotate(30deg);
  842. }
  843. }
  844. @keyframes iconRotate1{
  845. from {
  846. transform: rotate(30deg);
  847. }
  848. to {
  849. transform: rotate(-30deg);
  850. }
  851. }
  852. }
  853. .control-right-box{
  854. width: 100px;
  855. color: #fff;
  856. height: 80px;
  857. justify-content: space-between;
  858. align-items: center;
  859. .btn{
  860. margin-bottom: 30px;
  861. }
  862. }
  863. }
  864. }
  865. .left-box {
  866. height: calc(100% );
  867. overflow-x: hidden;
  868. overflow-y: auto;
  869. pointer-events: auto;
  870. direction: rtl;
  871. .left-container{
  872. direction: ltr;
  873. }
  874. .control-item {
  875. height: 36px;
  876. }
  877. }
  878. }
  879. }
  880. }
  881. .tab-button-box{
  882. display: inline-block;
  883. position: relative;
  884. padding: 5px;
  885. // border: 1px transparent solid;
  886. border-radius: 5px;
  887. margin-left: 8px;
  888. margin-right: 8px;
  889. width: auto;
  890. // height: 40px;
  891. // border: 1px solid #65dbea;
  892. height: 35px !important;
  893. display: flex;
  894. align-items: center;
  895. justify-content: center;
  896. color: #fff;
  897. padding: 0 15px 5px 15px;
  898. cursor: pointer;
  899. &:hover {
  900. background: linear-gradient(#2cd1ff55, #1eb0ff55);
  901. }
  902. &::before {
  903. width: calc(100% - 6px);
  904. height: 27px;
  905. content: '';
  906. position: absolute;
  907. top: 3px;
  908. right: 0;
  909. left: 3px;
  910. bottom: 0;
  911. z-index: -1;
  912. border-radius: inherit; /*important*/
  913. background: linear-gradient(#1fa6cb, #127cb5);
  914. }
  915. &::after {
  916. width: calc(100% + 32px);
  917. height: 10px;
  918. content: '';
  919. position: absolute;
  920. top: 28px;
  921. right: 0;
  922. left: -16px;
  923. bottom: 0;
  924. z-index: -1;
  925. border-radius: inherit; /*important*/
  926. background: url('/@/assets/images/vent/short-light.png') no-repeat;
  927. background-position: center;
  928. background-size: 100%;
  929. z-index: 999;
  930. }
  931. }
  932. .tab-button-box-active {
  933. border: 1px solid #66989e !important;
  934. &:hover {
  935. background: none !important;
  936. }
  937. &::before {
  938. background: linear-gradient(#1fa6cbcc, #127cb5cc) !important;
  939. }
  940. }
  941. </style>