nitrogenHome1.vue 34 KB

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