index.vue 71 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973
  1. <template>
  2. <div class="bg" style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden">
  3. <a-spin :spinning="loading" />
  4. <div id="fanLocal3D" style="width: 100%; height: 100%; position: absolute; overflow: hidden"> </div>
  5. <div id="fanLocal3DCSS" class="threejs-Object-CSS" style="width: 100%; height: 100%; position: absolute; overflow: hidden; pointer-events: none">
  6. <div style="z-index: -1; position: relative" v-if="hasPermission('show:sensorMonitor')">
  7. <div class="elementTag" id="inputBox0">
  8. <div class="elementContent" v-if="selectData.windInputSpeed1 || selectData.windInputSpeed_merge">
  9. <p v-if="selectData.windInputSpeed1 || selectData.windInputSpeed_merge"
  10. >局扇工作面风速:<span class="value">{{
  11. selectData.windInputSpeed1 ? selectData.windInputSpeed1 : selectData.windInputSpeed_merge ? selectData.windInputSpeed_merge : '-'
  12. }}</span>
  13. <span class="unit"> m/s</span>
  14. </p>
  15. <p v-if="selectData.windQuantity1 || selectData.inletAirVolume_merge"
  16. >风筒入口风量:<span class="value">{{
  17. selectData.windQuantity1 ? selectData.windQuantity1 : selectData.inletAirVolume_merge ? selectData.inletAirVolume_merge : '-'
  18. }}</span>
  19. <span class="unit"> m³/min</span>
  20. </p>
  21. </div>
  22. </div>
  23. <div class="elementTag" id="inputBox1">
  24. <div class="elementContent" v-if="selectData.windSpeed1 || selectData.gas3 || selectData.windQuantity1 || selectData.inletAirVolume_merge">
  25. <p v-if="selectData.windSpeed1"
  26. >风筒入口风速:<span class="value">{{ selectData.windSpeed1 ? selectData.windSpeed1 : '-' }}</span> <span class="unit"> m/s</span></p
  27. >
  28. <p v-if="selectData.windQuantity1 || selectData.inletAirVolume_merge"
  29. >风筒入口风量:<span class="value">{{
  30. selectData.windQuantity1 ? selectData.windQuantity1 : selectData.inletAirVolume_merge ? selectData.inletAirVolume_merge : '-'
  31. }}</span>
  32. <span class="unit"> m³/min</span>
  33. </p>
  34. <p v-if="selectData.gas3"
  35. >风筒入口瓦斯浓度: <span class="value">{{ selectData.gas3 ? selectData.gas3 : '-' }}</span> <span class="unit"> %</span></p
  36. >
  37. </div>
  38. </div>
  39. <div class="elementTag" id="outBox">
  40. <div
  41. class="elementContent elementContent-r"
  42. v-if="
  43. selectData.windQuantity2 ||
  44. selectData.gas1 ||
  45. (selectData.windOutSpeed1 && selectData.windOutSpeed_merge) ||
  46. selectData.ductOutletAirVolume_merge
  47. "
  48. >
  49. <p v-if="selectData.windQuantity2 || selectData.m3 || selectData.ductOutletAirVolume_merge || selectData.windOutSpeed_merge">
  50. 迎头供风量:<span class="value">{{
  51. selectData.windQuantity2
  52. ? selectData.windQuantity2
  53. : selectData.m3
  54. ? selectData.m3
  55. : selectData.ductOutletAirVolume_merge
  56. ? selectData.ductOutletAirVolume_merge
  57. : '-'
  58. }}</span>
  59. <span class="unit"> m³/min</span>
  60. </p>
  61. <p v-if="selectData.gas1"
  62. >迎头瓦斯浓度:<span class="value">{{ selectData.gas1 ? selectData.gas1 : '-' }}</span> <span class="unit"> %</span></p
  63. >
  64. <p v-if="selectData.windOutSpeed1 || selectData.windOutSpeed_merge"
  65. >风筒出口风速<span class="value">{{
  66. selectData.windOutSpeed1 ? selectData.windOutSpeed1 : selectData.windOutSpeed_merge ? selectData.windOutSpeed_merge : '-'
  67. }}</span>
  68. <span class="unit"> %</span>
  69. </p>
  70. </div>
  71. </div>
  72. <div class="elementTag" id="returnBox">
  73. <div class="elementContent elementContent-r" v-if="selectData.gas2">
  74. <p v-if="selectData.gas2"
  75. >回风流瓦斯浓度:<span class="value">{{ selectData.gas2 ? selectData.gas2 : '-' }}</span> <span class="unit"> %</span></p
  76. >
  77. </div>
  78. </div>
  79. <div class="elementTag" id="gateBox" v-if="modalType == 'fm'">
  80. <div class="elementContent">
  81. <p>风门状态:关</p>
  82. <p>风门过风面积:{{ selectData.gas1 ? selectData.gas1 : '-' }}</p>
  83. </div>
  84. </div>
  85. <div class="elementTag" id="windownBox">
  86. <div class="elementContent" v-if="modalType == 'fc'">
  87. <p style="pointer-events: auto"
  88. ><a class="action-link" @click="goDetailDevice('window_fWindowM3')">风窗详情</a>
  89. <ArrowRightOutlined :style="{ color: '#157DC8' }" />
  90. </p>
  91. <p v-if="selectData.windSpeed"
  92. >风窗风流风速:<span class="value">{{ selectData.windSpeed ? selectData.windSpeed : '-' }}</span> <span class="unit"> m/s</span></p
  93. >
  94. <p v-if="selectData.fWindowM3"
  95. >风窗过风量:<span class="value">{{ selectData.fWindowM3 ? selectData.fWindowM3 : '-' }}</span> <span class="unit"> m³/min</span></p
  96. >
  97. <p v-if="selectData.OpenDegree"
  98. >风窗开度值:<span class="value">{{ selectData.OpenDegree ? selectData.OpenDegree : '-' }}</span> <span class="unit"> %</span></p
  99. >
  100. <p v-if="selectData.OpenDegree"
  101. >风窗过风面积:<span class="value">{{ selectData.forntArea ? selectData.forntArea : '-' }}</span> <span class="unit"> ㎡</span></p
  102. >
  103. </div>
  104. </div>
  105. <div class="elementTag" id="gasBox3">
  106. <div class="elementContent" v-if="selectData.gasT3">
  107. <!-- <div class="elementContent"> -->
  108. <p v-if="selectData.gasT3"
  109. >掘进工作面进风流处甲烷传感器T₃:<span class="value">{{ selectData.gasT3 ? selectData.gasT3 : '-' }}</span>
  110. <span class="unit">(%)</span></p
  111. >
  112. </div>
  113. </div>
  114. <div class="elementTag" id="gasBox2">
  115. <div class="elementContent" v-if="selectData.gasT2">
  116. <!-- <div class="elementContent"> -->
  117. <p v-if="selectData.gasT2"
  118. >掘进工作面回风流处甲烷传感器T₂:<span class="value">{{ selectData.gasT2 ? selectData.gasT2 : '-' }}</span>
  119. <span class="unit">(%)</span></p
  120. >
  121. </div>
  122. </div>
  123. <div class="elementTag" id="gasBox1">
  124. <div class="elementContent" v-if="selectData.gasT1">
  125. <!-- <div class="elementContent"> -->
  126. <p v-if="selectData.gasT1"
  127. >掘进工作面混合风流处甲烷传感器T₁:<span class="value">{{ selectData.gasT1 ? selectData.gasT1 : '-' }}</span>
  128. <span class="unit">(%)</span></p
  129. >
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. <div class="scene-box">
  136. <div class="top-box" v-if="!loading">
  137. <div class="top-center row">
  138. <div class="vent-flex-row" id="fanLocalSelectDom" v-if="!globalConfig?.simulatedPassword && getDictItemsByCode('fanlocaltype')">
  139. <span style="color: var(--vent-font-color); margin-left: 5px">风机类型:</span>
  140. <JDictSelectTag
  141. style="width: 180px"
  142. v-model:value="devicekide"
  143. dictCode="fanlocaltype"
  144. :showChooseOption="false"
  145. :getPopupContainer="getPopupContainer"
  146. @change="changeDeviceKind"
  147. />
  148. </div>
  149. <!-- fanlocal_systeml_zj 模拟局部风机,不显示操作按钮 -->
  150. <template v-for="(item, index) in modalTypeArr.leftBtnArr" :key="index">
  151. <template v-if="hasPermission(item.permission)">
  152. <template v-if="item.permission === 'btn:frequency' || item.permission === 'btn:frequencyMerge'">
  153. <div
  154. v-if="devicekide == 'fanlocal' && item.permission === 'btn:frequency'"
  155. :class="{ 'button-box': btnClick, 'button-disable': !btnClick }"
  156. @click="showModal(item)"
  157. >{{ item.value }}
  158. </div>
  159. <div
  160. v-else-if="devicekide == 'fanlocaldp' && item.permission === 'btn:frequencyMerge'"
  161. :class="{ 'button-box': btnClick, 'button-disable': !btnClick }"
  162. @click="showModal(item)"
  163. >{{ item.value }}
  164. </div>
  165. </template>
  166. <template v-else>
  167. <div :class="{ 'button-box': btnClick, 'button-disable': !btnClick }" @click="showModal(item)">{{ item.value }} </div>
  168. </template>
  169. </template>
  170. </template>
  171. </div>
  172. <div class="top-right row">
  173. <template v-for="(item, index) in modalTypeArr.rightBtnArr" :key="index">
  174. <div
  175. v-if="(item.permission === 'fanLocal:gasAlarmSet' || item.permission === 'fanLocal:kkjc') && hasPermission(item.permission)"
  176. :class="{ 'button-box': btnClick, 'button-disable': !btnClick }"
  177. @click="showModal(item)"
  178. >{{ item.value }}</div
  179. >
  180. </template>
  181. </div>
  182. </div>
  183. <div class="title-text">
  184. {{ selectData.supplyAirAddr || selectData.strinstallpos || selectData.stationname }}
  185. </div>
  186. <div class="data-show-box" v-if="!loading">
  187. <div class="data-item" v-if="leftColumns.length > 0">
  188. <div class="item-header">环境监测</div>
  189. <div class="item-container">
  190. <div class="tab">
  191. <div class="tab-item" :class="{ 'tab-item-active-r': warningMonitorRowIndex === 0 }" @click="selectDevice('warningMonitorRowIndex', 0)"
  192. >主机</div
  193. >
  194. <div class="tab-item" :class="{ 'tab-item-active-r': warningMonitorRowIndex === 1 }" @click="selectDevice('warningMonitorRowIndex', 1)"
  195. >备机</div
  196. >
  197. </div>
  198. <div class="container-group container-group-l">
  199. <div class="warning-group" style="max-height: 200px; overflow-y: auto">
  200. <template v-if="selectData.deviceType">
  201. <div class="container-item" v-for="(data, index) in leftColumns" :key="index">
  202. <div class="item-icon">
  203. <!-- <SvgIcon class="icon-style" size="18" name="temperature" /> -->
  204. <CaretRightOutlined class="icon-style" />
  205. </div>
  206. <div class="item-name">{{ data.title }}</div>
  207. <div v-if="data.dataIndex.startsWith('Fan')">
  208. <div class="item-value" v-if="warningMonitorRowIndex == 0">{{
  209. selectData[data.dataIndex.replace('Fan', 'Fan1')] ? selectData[data.dataIndex.replace('Fan', 'Fan1')] : '-'
  210. }}</div>
  211. <div class="item-value" v-if="warningMonitorRowIndex == 1">{{
  212. selectData[data.dataIndex.replace('Fan', 'Fan2')] ? selectData[data.dataIndex.replace('Fan', 'Fan2')] : '-'
  213. }}</div>
  214. </div>
  215. <div v-else>
  216. <div class="item-value">{{ selectData[data.dataIndex] ? selectData[data.dataIndex] : '-' }}</div>
  217. </div>
  218. </div>
  219. </template>
  220. </div>
  221. </div>
  222. <div class="container-group" style="max-height: 250px; overflow-y: auto">
  223. <div class="warning-header">
  224. <div class="header-item">
  225. <div class="header-title">回风流甲烷监测</div>
  226. </div>
  227. </div>
  228. <template v-if="selectData.deviceType">
  229. <div class="container-item" v-for="(data, index) in leftColumns1" :key="index">
  230. <div class="item-icon">
  231. <!-- <SvgIcon class="icon-style" size="18" name="temperature" /> -->
  232. <CaretRightOutlined class="icon-style" />
  233. </div>
  234. <div class="item-name">{{ data.title }}</div>
  235. <div class="item-value">{{ data.value ? data.value : '-' }}</div>
  236. </div>
  237. </template>
  238. </div>
  239. </div>
  240. </div>
  241. <div>
  242. <div class="data-item" v-if="rightColumns.length > 0">
  243. <div class="item-header">设备故障诊断与分析预警</div>
  244. <div class="item-container">
  245. <div class="tab">
  246. <div class="tab-item" :class="{ 'tab-item-active-r': dataMonitorRowIndex == 0 }" @click="selectDevice('dataMonitorRowIndex', 0)"
  247. >主机</div
  248. >
  249. <div class="tab-item" :class="{ 'tab-item-active-r': dataMonitorRowIndex == 1 }" @click="selectDevice('dataMonitorRowIndex', 1)"
  250. >备机</div
  251. >
  252. </div>
  253. <div class="container-group container-group-l">
  254. <div class="warning-group" style="max-height: 200px; overflow-y: auto">
  255. <template v-if="deviceType">
  256. <div v-for="(state, index) in rightColumns" :key="index">
  257. <template v-if="!state.dataIndex.endsWith('_w')">
  258. <div class="container-item">
  259. <div class="item-icon">
  260. <CaretRightOutlined class="icon-style" />
  261. </div>
  262. <div class="item-name">{{ state.title }}</div>
  263. <div v-if="state.dataIndex.startsWith('Fan')">
  264. <div class="item-value" v-if="dataMonitorRowIndex == 0">{{
  265. selectData[state.dataIndex.replace('Fan', 'Fan1')] ? selectData[state.dataIndex.replace('Fan', 'Fan1')] : '-'
  266. }}</div>
  267. <div class="item-value" v-if="dataMonitorRowIndex == 1">{{
  268. selectData[state.dataIndex.replace('Fan', 'Fan2')] ? selectData[state.dataIndex.replace('Fan', 'Fan2')] : '-'
  269. }}</div>
  270. </div>
  271. <div v-else>
  272. <div class="item-value">{{ selectData[state.dataIndex] ? selectData[state.dataIndex] : '-' }} </div>
  273. </div>
  274. </div>
  275. </template>
  276. </div>
  277. </template>
  278. </div>
  279. <div class="warning-group" style="max-height: 200px; overflow-y: auto">
  280. <div class="warning-header">
  281. <div class="header-item">
  282. <div class="header-title">设备报警</div>
  283. <!-- <div class="header-value">{{ selectData['warnLogNotOkCount'] }} </div> -->
  284. </div>
  285. </div>
  286. <template v-if="deviceType">
  287. <div v-for="(state, index) in rightColumns" :key="index">
  288. <template v-if="state.dataIndex.endsWith('_w')">
  289. <div class="warning-item">
  290. <div class="item-name"> <div class="icon"></div> {{ state.title }} </div>
  291. <div v-if="state.dataIndex.startsWith('Fan')">
  292. <div class="signal-item" v-if="warningMonitorRowIndex == 0">
  293. <div
  294. class="signal-round"
  295. :class="{
  296. 'signal-round-run': selectData[state.dataIndex.replace('Fan', 'Fan1')] == '0',
  297. 'signal-round-warning':
  298. selectData[state.dataIndex.replace('Fan', 'Fan1')] !== undefined &&
  299. selectData[state.dataIndex.replace('Fan', 'Fan1')] == '1',
  300. 'signal-round-gry': selectData[state.dataIndex.replace('Fan', 'Fan1')] === undefined,
  301. }"
  302. ></div>
  303. <div class="vent-margin-l-8">{{
  304. selectData[state.dataIndex.replace('Fan', 'Fan1')] === undefined
  305. ? '无状态'
  306. : selectData[state.dataIndex.replace('Fan', 'Fan1')] == '0'
  307. ? '正常'
  308. : '异常'
  309. }}</div>
  310. </div>
  311. <div class="signal-item" v-if="warningMonitorRowIndex == 1">
  312. <div
  313. class="signal-round"
  314. :class="{
  315. 'signal-round-run': selectData[state.dataIndex.replace('Fan', 'Fan2')] == '0',
  316. 'signal-round-warning':
  317. selectData[state.dataIndex.replace('Fan', 'Fan2')] != undefined &&
  318. selectData[state.dataIndex.replace('Fan', 'Fan2')] == '1',
  319. 'signal-round-gry': selectData[state.dataIndex.replace('Fan', 'Fan2')] == undefined,
  320. }"
  321. ></div>
  322. <div class="vent-margin-l-8">{{
  323. selectData[state.dataIndex.replace('Fan', 'Fan2')] == undefined
  324. ? '无状态'
  325. : selectData[state.dataIndex.replace('Fan', 'Fan2')] == '0'
  326. ? '正常'
  327. : '异常'
  328. }}</div>
  329. </div>
  330. </div>
  331. <div v-else>
  332. <div class="signal-item">
  333. <div
  334. class="signal-round vent-margin-l-8"
  335. :class="{
  336. 'signal-round-run': selectData[state.dataIndex] == '0',
  337. 'signal-round-warning': selectData[state.dataIndex] !== undefined && selectData[state.dataIndex] == '1',
  338. 'signal-round-gry': selectData[state.dataIndex] === undefined,
  339. }"
  340. ></div>
  341. <div class="vent-margin-l-8">{{
  342. selectData[state.dataIndex] === undefined ? '无状态' : selectData[state.dataIndex] == '0' ? '正常' : '异常'
  343. }}</div>
  344. </div>
  345. </div>
  346. </div>
  347. </template>
  348. </div>
  349. </template>
  350. </div>
  351. </div>
  352. </div>
  353. </div>
  354. </div>
  355. </div>
  356. <div class="bottom-tabs-box" @mousedown="setDivHeight($event, 175, scroll, 0)">
  357. <dv-border-box8 :dur="5" class="dv_border_8" :style="`bottom: 20px; padding: 5px; height: ${scroll.y + 140}px`">
  358. <!-- <div class="enter-detail" @click="goDetail()">
  359. <send-outlined class=""/>风机运行详情
  360. </div> -->
  361. <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange">
  362. <a-tab-pane key="1" tab="实时监测">
  363. <GroupMonitorTable
  364. v-if="activeKey === '1'"
  365. ref="MonitorDataTable"
  366. :dataSource="dataSource"
  367. :columnsType="`${selectData.deviceType}_monitor`"
  368. @selectRow="getSelectRow"
  369. :scroll="scroll"
  370. :is-action="true"
  371. >
  372. <template #action="{ record }">
  373. <a v-if="globalConfig?.showReport" class="table-action-link" @click="deviceEdit($event, 'reportInfo', record)">报表录入</a>
  374. <a class="table-action-link" @click="deviceEdit($event, 'deviceInfo', record)">设备编辑</a>
  375. </template>
  376. </GroupMonitorTable>
  377. </a-tab-pane>
  378. <a-tab-pane key="3" tab="历史数据">
  379. <div class="tab-item" v-if="activeKey === '3'">
  380. <template v-if="globalConfig.History_Type == 'remote'">
  381. <HistoryTable
  382. :columns-type="`${selectData.deviceType}`"
  383. :device-type="`${devicekide}`"
  384. designScope="fanlocal-history"
  385. :scroll="scroll"
  386. />
  387. </template>
  388. <template v-else>
  389. <HistoryTable class="w-100% h-100%" :device-code="`${devicekide}`" :scroll="scroll" dict-code="fanlocal_dict" />
  390. </template>
  391. </div>
  392. </a-tab-pane>
  393. <a-tab-pane key="7" v-if="hasPermission('show:deviceEcharts')" tab="监测曲线图" force-render>
  394. <div class="tab-item" v-if="activeKey === '7'">
  395. <FanDeviceEcharts
  396. chartsColumnsType="fanlocal_chart"
  397. xAxisPropType="strname"
  398. :dataSource="dataSource"
  399. height="100%"
  400. width="100%"
  401. :fan1ChartsColumns="chartsColumnsFan1"
  402. :fan2ChartsColumns="chartsColumnsFan2"
  403. :device-list-api="list.bind(null, { devicetype: 'fanlocal', pagetype: 'normal' })"
  404. device-type="fanlocal"
  405. />
  406. </div>
  407. </a-tab-pane>
  408. <a-tab-pane key="4" tab="报警历史">
  409. <div class="tab-item" v-if="activeKey === '4'">
  410. <AlarmHistoryTable columns-type="alarm" :device-type="`${devicekide}`" designScope="alarm-history" :scroll="scroll" />
  411. </div>
  412. </a-tab-pane>
  413. <a-tab-pane key="5" tab="操作历史">
  414. <div class="tab-item" v-if="activeKey === '5'">
  415. <HandlerHistoryTable
  416. columns-type="operator_history"
  417. :device-type="`${devicekide}`"
  418. :device-list-api="baseList"
  419. designScope="alarm-history"
  420. :scroll="scroll"
  421. />
  422. </div>
  423. </a-tab-pane>
  424. <a-tab-pane key="6" tab="风机曲线" v-if="hasPermission('show:fanEcharts')">
  425. <div v-if="activeKey == '6'" class="tab-item" style="display: flex">
  426. <div style="width: calc(50% - 20px); height: 100%">
  427. <div style="color: var(--vent-font-color); width: 100%; text-align: center; margin: 5px 0px">主机</div>
  428. <BarAndLine
  429. class="echarts-line"
  430. xAxisPropType="readTime"
  431. :dataSource="echartsDataList"
  432. height="90%"
  433. width="100%"
  434. :chartsColumns="chartsColumnsFan1"
  435. :option="echatsOption"
  436. chartsType="detail"
  437. />
  438. </div>
  439. <div style="width: calc(50% - 20px); height: 100%">
  440. <div style="color: var(--vent-font-color); width: 100%; text-align: center; margin: 5px 0px">备机</div>
  441. <BarAndLine
  442. class="echarts-line"
  443. xAxisPropType="readTime"
  444. :dataSource="echartsDataList"
  445. height="90%"
  446. width="100%"
  447. :chartsColumns="chartsColumnsFan2"
  448. :option="echatsOption"
  449. chartsType="detail"
  450. />
  451. </div>
  452. </div>
  453. </a-tab-pane>
  454. <a-tab-pane key="2" tab="风量实时曲线图" force-render v-if="hasPermission('echart:show')">
  455. <div class="tab-item" style="height: 100%; padding-top: 15px">
  456. <BarAndLine
  457. v-if="activeKey == '2'"
  458. class="echarts-line"
  459. xAxisPropType="time"
  460. :dataSource="historyList"
  461. height="100%"
  462. width="100%"
  463. :chartsColumns="chartsColumnsZDKZ"
  464. :option="echatsOption"
  465. />
  466. </div>
  467. </a-tab-pane>
  468. </a-tabs>
  469. <a-button
  470. v-if="hasPermission('btn:reportDown')"
  471. type="primary"
  472. size="small"
  473. preIcon="ant-design:download-outlined"
  474. style="position: absolute; right: 15px; top: 10px"
  475. @click="reportDown"
  476. >
  477. 报表导出
  478. </a-button>
  479. </dv-border-box8>
  480. </div>
  481. </div>
  482. <div
  483. v-show="showPlay"
  484. ref="playerRef"
  485. :class="{ 'to-right': rightColumns.length < 1 || leftColumns.length < 1, 'to-no-right': rightColumns.length > 0 && leftColumns.length > 0 }"
  486. style="z-index: 999; position: absolute; top: 100px; right: 15px; width: 100%; height: 100%; margin: auto; pointer-events: none"
  487. >
  488. </div>
  489. <a-modal v-model:visible="modalIsShow" :title="modalTitle" :maskStyle="{ backgroundColor: '#000000aa', backdropFilter: 'blur(3px)' }">
  490. <template #footer>
  491. <div v-if="controlType != 'startFan'">
  492. <a-button key="back" @click="cancel">返回</a-button>
  493. <a-button key="submit" type="primary" :loading="loading" @click="handleOk">确定</a-button>
  494. </div>
  495. </template>
  496. <div class="modal-container">
  497. <div class="vent-flex-row">
  498. <ExclamationCircleFilled style="color: #ffb700; font-size: 30px" />
  499. <div class="warning-text">您是否要进行{{ modalTitle }}操作?</div>
  500. </div>
  501. <div class="" v-if="controlType == 'startSmoke'">
  502. <!-- 互斥控制 -->
  503. <div class="startSmoke-select">
  504. <div class="label">主机:</div>
  505. <a-radio-group v-model:value="mainWindIsShow1" @change="changeMotor" name="localWind1">
  506. <a-radio value="open">开启</a-radio>
  507. <a-radio value="stop">停止</a-radio>
  508. </a-radio-group>
  509. </div>
  510. <div class="startSmoke-select">
  511. <div class="label">备机:</div>
  512. <a-radio-group v-model:value="mainWindIsShow2" @change="changeMotor" name="localWind2">
  513. <a-radio value="open">开启</a-radio>
  514. <a-radio value="stop">停止</a-radio>
  515. </a-radio-group>
  516. </div>
  517. </div>
  518. <div class="" v-if="controlType == 'startFan'">
  519. <!-- 不互斥控制 -->
  520. <div class="startSmoke-select">
  521. <div class="label">主机:</div>
  522. <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Open')">开启</div>
  523. <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Stop')">停止</div>
  524. <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Reset')">复位</div>
  525. </div>
  526. <div class="startSmoke-select">
  527. <div class="label">备机:</div>
  528. <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Open')">开启</div>
  529. <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Stop')">停止</div>
  530. <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Reset')">复位</div>
  531. </div>
  532. </div>
  533. <!-- 调频 -->
  534. <div class="vent-flex-row input-box" v-if="controlType == 'Fan1Frequency'">
  535. <div class="label">主风机运行频率(Hz):</div>
  536. <a-input-number size="small" v-model:value="fan1FrequencyVal" :min="20" :max="50" :step="0.1" />
  537. </div>
  538. <div class="vent-flex-row input-box" v-if="controlType == 'Fan2Frequency'">
  539. <div class="label">备风机运行频率(Hz):</div>
  540. <a-input-number size="small" v-model:value="fan2FrequencyVal" :min="20" :max="50" :step="0.1" />
  541. </div>
  542. <div class="vent-flex-row input-box" v-if="controlType == 'FanFrequency'">
  543. <div class="label">风机运行频率(Hz):</div>
  544. <a-input-number size="small" v-model:value="fan1FrequencyVal" :min="20" :max="50" :step="0.1" />
  545. </div>
  546. <div class="vent-flex-row input-box" v-if="controlType == 'disAirAlarm'">
  547. <div class="label">漏风率(%):</div>
  548. <a-input-number size="small" v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
  549. </div>
  550. <div class="vent-flex-row input-box" v-if="controlType == 'diameter'">
  551. <div class="label">风筒直径(m):</div>
  552. <a-input-number size="small" v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
  553. </div>
  554. <div class="vent-flex-row input-box" v-if="controlType == 'len'">
  555. <div class="label">风筒长度(m):</div>
  556. <a-input-number size="small" v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
  557. </div>
  558. <div class="vent-flex-row input-box" v-if="controlType == 'windPowerLimit'">
  559. <div class="label">风电闭锁限值(m³/min):</div>
  560. <a-input-number size="small" v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
  561. </div>
  562. <div class="vent-flex-row input-box" v-if="controlType == 'gasPowerLimit'">
  563. <div class="label">瓦斯电闭锁限值(m³/min):</div>
  564. <a-input-number size="small" v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
  565. </div>
  566. <div v-if="controlType == 'gasAlarmSet'">
  567. <div class="vent-flex-row input-box">
  568. <div class="label">设置瓦斯超限浓度:</div>
  569. <a-input-number size="small" v-model:value="gasWarningVal" :min="0" :max="1" :step="0.01" />
  570. </div>
  571. </div>
  572. <div v-if="controlType == 'gasAlarm'">
  573. <div class="vent-flex-row input-box">
  574. <div class="label">传感器名称:</div>
  575. <a-select placeholder="传感器" @change="handleChangeSensor" :options="sensorList" v-model:value="modalSensor" />
  576. </div>
  577. <div class="vent-flex-row input-box">
  578. <div class="label">传感器值:</div>
  579. <a-input-number size="small" v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
  580. </div>
  581. </div>
  582. <div v-if="controlType == 'airVolumeAlarm'">
  583. <div class="vent-flex-row input-box">
  584. <div class="label">风量上限(m³/min):</div>
  585. <a-input-number size="small" v-model:value="modalTypeArr.rightBtnArr[3].min" :min="0" :max="50" :step="0.1" />
  586. </div>
  587. <div class="vent-flex-row input-box">
  588. <div class="label">风量下限(m³/min):</div>
  589. <a-input-number size="small" v-model:value="modalTypeArr.rightBtnArr[3].max" :min="0" :max="50" :step="0.1" />
  590. </div>
  591. </div>
  592. <div class="vent-flex-row input-box" v-if="controlType == 'zhlk'">
  593. <div class="label">目标风量(m³/min):</div>
  594. <a-input-number size="small" v-model:value="targetVolume" />
  595. </div>
  596. <div v-if="controlType == 'gasOverSet'">
  597. <div class="vent-flex-row input-box">
  598. <div class="label">设置瓦斯超限浓度:</div>
  599. <a-input-number size="small" v-model:value="gasWarningVal" :min="0" :max="1" :step="0.01" />
  600. </div>
  601. </div>
  602. <!-- 启动或停止 -->
  603. <div class="" v-if="controlType == 'startSmoke'"> </div>
  604. <div v-if="!globalConfig?.simulatedPassword" class="vent-flex-row input-box">
  605. <div class="label">操作密码:</div>
  606. <a-input size="small" type="password" v-model:value="passWord" />
  607. </div>
  608. </div>
  609. </a-modal>
  610. <!-- 摄像头显示隐藏图标 -->
  611. <VideoCameraOutlined class="video-icon" :class="{ 'no-play': !showPlay }" @click="changePlay" />
  612. <ConditionAssistance @register="registerModalAssistance" :dataSource="historySource" />
  613. <DeviceBaseInfo @register="registerModal" :device-type="selectData['deviceType']" />
  614. <reportInfo @register="registerModal1" :editID="editID" :fileType="fileType" />
  615. </template>
  616. <script setup lang="ts">
  617. import { ExclamationCircleFilled, ArrowRightOutlined, VideoCameraOutlined } from '@ant-design/icons-vue';
  618. import { onBeforeMount, ref, watch, onMounted, nextTick, defineAsyncComponent, reactive, onUnmounted, inject, unref } from 'vue';
  619. // import BarSingle from '../../../../components/chart/BarSingle.vue';
  620. import FanDeviceEcharts from '../comment/FanDeviceEcharts.vue';
  621. import BarAndLine from '../../../../components/chart/BarAndLine.vue';
  622. import GroupMonitorTable from '../comment/GroupMonitorTable.vue';
  623. import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
  624. import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
  625. import DeviceBaseInfo from '../comment/components/DeviceBaseInfo.vue';
  626. import { mountedThree, setModelType, destroy, addCssText, addText, playSmoke } from './fanLocal.three';
  627. import lodash from 'lodash';
  628. import { getTableList, list, autoAdjust } from '/@/views/vent/monitorManager/fanLocalMonitor/fanLocal.api';
  629. import { list as baseList } from '../../deviceManager/fanTabel/fan.api';
  630. import { echatsOption, chartsColumnsZDKZ } from './fanLocal.data';
  631. import { deviceControlApi } from '/@/api/vent/index';
  632. import { setDivHeight } from '/@/utils/event';
  633. import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
  634. import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
  635. import { useRouter } from 'vue-router';
  636. import { useModal } from '/@/components/Modal';
  637. import type { BasicColumn } from '/@/components/Table/src/types/table';
  638. import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
  639. import { getPopupContainer } from '/@/utils';
  640. import { getDictItemsByCode } from '/@/utils/dict';
  641. import { message } from 'ant-design-vue';
  642. import { useCamera } from '/@/hooks/system/useCamera';
  643. import { CaretRightOutlined } from '@ant-design/icons-vue';
  644. import ConditionAssistance from './components/conditionAssistance.vue';
  645. import reportInfo from '../comment/components/reportInfo.vue';
  646. import { save, reportList } from '../../reportManager/reportManager.api';
  647. import { usePermission } from '/@/hooks/web/usePermission';
  648. import { useGlobSetting } from '/@/hooks/setting';
  649. import { useMessage } from '/@/hooks/web/useMessage';
  650. import { cloneDeep } from 'lodash-es';
  651. const globalConfig = inject('globalConfig');
  652. const HistoryTable =
  653. globalConfig.History_Type == 'remote'
  654. ? defineAsyncComponent(() => import('../comment/HistoryTable.vue'))
  655. : defineAsyncComponent(() => import('../../../vent/comment/history/HistoryTable.vue'));
  656. const { hasPermission } = usePermission();
  657. const [registerModal, { openModal, closeModal }] = useModal();
  658. const [registerModal1, { openModal: openModal1, closeModal: closeModal1 }] = useModal();
  659. const [registerModalAssistance, { openModal: openAssistance, closeModal: closeAssistance }] = useModal();
  660. const { currentRoute } = useRouter();
  661. const router = useRouter();
  662. const { createConfirm } = useMessage();
  663. const globSetting = useGlobSetting();
  664. const showPlay = ref(hasPermission('fanlocal:showCamera') ? true : false);
  665. const modalTypeArr = reactive({
  666. leftBtnArr: [
  667. {
  668. key: 'startSmoke',
  669. value: '启停风机',
  670. permission: 'btn:openclose',
  671. },
  672. {
  673. key: 'startFan',
  674. value: '启停风机',
  675. permission: 'btn:openclose1',
  676. },
  677. {
  678. key: 'changeSmoke', // 主备两个点位
  679. value: '一键倒机',
  680. permission: 'btn:change',
  681. },
  682. {
  683. key: 'changeFan', // 主备一个点位
  684. value: '一键倒机',
  685. permission: 'btn:CtrlFanChange',
  686. },
  687. {
  688. key: 'fan1ToFan2',
  689. value: '主机倒备机',
  690. permission: 'btn:ctrlFan1ToFan2',
  691. },
  692. {
  693. key: 'fan2ToFan1',
  694. value: '备机倒主机',
  695. permission: 'btn:ctrlFan2ToFan1',
  696. },
  697. {
  698. key: 'Fan1Frequency',
  699. value: '主机调频',
  700. permission: 'btn:frequency',
  701. },
  702. {
  703. key: 'Fan2Frequency',
  704. value: '备机调频',
  705. permission: 'btn:frequency',
  706. },
  707. {
  708. key: 'FanFrequency',
  709. value: '风机调频',
  710. permission: 'btn:frequencyMerge',
  711. },
  712. {
  713. key: 'windPower',
  714. value: '风电闭锁',
  715. permission: 'fanLocal:fdbs',
  716. },
  717. {
  718. key: 'gasPower',
  719. value: '瓦斯电闭锁',
  720. permission: 'fanLocal:wsdbs',
  721. },
  722. {
  723. key: 'needAir',
  724. value: '需风量',
  725. permission: 'fanLocal:control',
  726. },
  727. ],
  728. rightBtnArr: [
  729. {
  730. key: 'gasAlarmSet',
  731. value: '瓦斯限值设定',
  732. permission: 'fanLocal:gasAlarmSet',
  733. },
  734. {
  735. key: 'gasOverSet', //
  736. value: '瓦斯限值设定',
  737. permission: 'fanLocal:gasOverSet',
  738. },
  739. {
  740. key: 'kkjc',
  741. value: '工况辅助决策',
  742. permission: 'fanLocal:kkjc',
  743. },
  744. {
  745. key: 'zhlk',
  746. value: '自主联控',
  747. permission: 'fanLocal:zhlk',
  748. },
  749. {
  750. key: 'diameter',
  751. value: '风筒直径',
  752. permission: 'fanLocal:control',
  753. },
  754. {
  755. key: 'diameter',
  756. value: '风筒直径',
  757. permission: 'fanLocal:control',
  758. },
  759. {
  760. key: 'len',
  761. value: '风筒长度',
  762. permission: 'fanLocal:control',
  763. },
  764. // {
  765. // key: 'frequency',
  766. // value: '调频',
  767. // permission: 'fanLocal:control',
  768. // },
  769. {
  770. key: 'windPowerLimit',
  771. value: '风电闭锁限值',
  772. permission: 'fanLocal:control',
  773. },
  774. {
  775. key: 'gasPowerLimit',
  776. value: '瓦斯电闭锁限值',
  777. permission: 'fanLocal:control',
  778. },
  779. {
  780. key: 'airVolumeAlarm',
  781. value: '风量报警',
  782. permission: 'fanLocal:control',
  783. min: 0,
  784. max: 100,
  785. },
  786. {
  787. key: 'disAirAlarm',
  788. value: '漏风率报警',
  789. permission: 'fanLocal:control',
  790. },
  791. // {
  792. // key: 'gasAlarm',
  793. // value: '瓦斯报警',
  794. // permission: 'fanLocal:control',
  795. // },
  796. ],
  797. });
  798. const sensorList = ref<any[]>([
  799. {
  800. value: '1',
  801. label: 'T1',
  802. },
  803. {
  804. value: '2',
  805. label: 'T2',
  806. },
  807. {
  808. value: '3',
  809. label: 'T3',
  810. },
  811. ]);
  812. const scroll = reactive({
  813. y: 180,
  814. });
  815. const deviceTypeDicts = getDictItemsByCode('fanlocaltype');
  816. const gasWarningVal = ref(0.6); // 瓦斯最大报警值
  817. const playerRef = ref();
  818. const MonitorDataTable = ref();
  819. const modalSensor = ref(null);
  820. const loading = ref(false);
  821. const activeKey = ref('1');
  822. const player1 = ref();
  823. const modalIsShow = ref<boolean>(false); // 是否显示模态框
  824. const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
  825. const fan1FrequencyVal = ref(40); //主机频率
  826. const fan2FrequencyVal = ref(40); //备机频率
  827. const mainWindIsShow1 = ref('open'); // 主机默认启动leftColumns
  828. const mainWindIsShow2 = ref('stop'); // 备机默认不启动
  829. const fanControl = ref('');
  830. const targetVolume = ref(600);
  831. const historyList = ref([]);
  832. const passWord = ref('');
  833. // 默认初始是第一行
  834. const selectRowIndex = ref(-1);
  835. const dataMonitorRowIndex = ref(0);
  836. // 默认数据右边监测的是主机
  837. const warningMonitorRowIndex = ref(0);
  838. const xAxisDataGas = ref([]);
  839. // 设备数据
  840. const controlType = ref('');
  841. const modalType = ref('');
  842. // 监测数据
  843. const initData = {
  844. deviceID: '',
  845. deviceType: '',
  846. strname: '',
  847. dataDh: '-', //压差
  848. dataDtestq: '-', //测试风量
  849. sourcePressure: '-', //气源压力
  850. dataDequivalarea: '-',
  851. netStatus: '0', //通信状态
  852. warnLevel_str: '',
  853. stationname: '',
  854. fanFrequencyType: '',
  855. };
  856. const frequencyVal = ref(0);
  857. const dataSource = ref([]);
  858. const historySource = ref([]);
  859. // 关联设备信息
  860. const linkDeviceInfo = ref({});
  861. // 监测数据
  862. let selectData = reactive(lodash.cloneDeep(initData));
  863. const rightColumns = ref<BasicColumn[]>([]);
  864. const leftColumns = ref<BasicColumn[]>([]);
  865. const leftColumns1 = ref<any[]>([
  866. { title: '供风充足评价', value: '' },
  867. { title: '回风流超限评价', value: '' },
  868. { title: '漏风率评价', value: '' },
  869. ]);
  870. const devicekide = ref(deviceTypeDicts && deviceTypeDicts.length > 0 ? deviceTypeDicts[0]['value'] : 'fanlocal');
  871. const deviceType = ref(selectData.deviceType);
  872. const headElHeight = ref(0);
  873. let btnClick = ref(true); // 判断按钮是否可点
  874. //报表导出
  875. let editID = ref<any>('');
  876. let fileType = ref('');
  877. const { getCamera, removeCamera } = useCamera();
  878. const echartsDataList = ref<any[]>([]);
  879. const remoteChartsColumns = getTableHeaderColumns('fanlocal_chart');
  880. const chartsColumns = remoteChartsColumns && remoteChartsColumns.length > 0 ? remoteChartsColumns : [];
  881. let chartsColumnsFan1 = [],
  882. chartsColumnsFan2 = [];
  883. // 这里需要处理主备echartColumns
  884. if (chartsColumns.length > 0) {
  885. console.log(chartsColumns);
  886. for (let i = 0; i < chartsColumns.length; i++) {
  887. let itemColumn = chartsColumns[i];
  888. let dataIndexFan1, dataIndexFan2;
  889. if (itemColumn['dataIndex']) {
  890. const dataIndex = itemColumn['dataIndex'] as string;
  891. dataIndexFan1 = dataIndex.startsWith('Fan') ? dataIndex.replace('Fan', 'Fan1') : dataIndex.replace('fan', 'fan1');
  892. dataIndexFan2 = dataIndex.startsWith('Fan') ? dataIndex.replace('Fan', 'Fan2') : dataIndex.replace('fan', 'fan2');
  893. chartsColumnsFan1.push({ ...itemColumn, dataIndex: dataIndexFan1, legend: '主机' + itemColumn['legend'] });
  894. chartsColumnsFan2.push({ ...itemColumn, dataIndex: dataIndexFan2, legend: '备机' + itemColumn['legend'] });
  895. }
  896. }
  897. }
  898. watch(deviceType, (type) => {
  899. rightColumns.value = getTableHeaderColumns(type + '_monitor_right') as [];
  900. if (rightColumns.value && rightColumns.value.length < 1) {
  901. rightColumns.value = getTableHeaderColumns(type.split('_')[0] + '_monitor_right') as [];
  902. }
  903. leftColumns.value = getTableHeaderColumns(type + '_monitor_left') as [];
  904. if (leftColumns.value && leftColumns.value.length < 1) {
  905. leftColumns.value = getTableHeaderColumns(type.split('_')[0] + '_monitor_left') as [];
  906. }
  907. });
  908. const flvURL1 = () => {
  909. // return `https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv`;
  910. return '';
  911. };
  912. const changeDeviceKind = (e) => {
  913. devicekide.value = e;
  914. loading.value = true;
  915. selectRowIndex.value = -1;
  916. nextTick(() => {
  917. selectData = lodash.cloneDeep(initData);
  918. loading.value = false;
  919. if (selectData.deviceID) MonitorDataTable.value.setSelectedRowKeys([selectData.deviceID]);
  920. const headEl = document.querySelector(`.zxm-table-thead`);
  921. if (headEl) {
  922. headElHeight.value = headEl.clientHeight;
  923. }
  924. });
  925. };
  926. const changePlay = () => {
  927. showPlay.value = !showPlay.value;
  928. };
  929. const tabChange = (activeKeyVal) => {
  930. activeKey.value = activeKeyVal;
  931. if (activeKeyVal == 1) {
  932. nextTick(() => {
  933. MonitorDataTable.value.setSelectedRowKeys([selectData.deviceID]);
  934. });
  935. }
  936. };
  937. const selectDevice = (key, val) => {
  938. if (key === 'dataMonitorRowIndex') {
  939. dataMonitorRowIndex.value = val;
  940. } else {
  941. warningMonitorRowIndex.value = val;
  942. }
  943. };
  944. //报表导出点击
  945. async function reportDown() {
  946. openModal1();
  947. let res = await save({ reportType: 'fanlocal' });
  948. console.log(res, 'res-----------');
  949. let list = await reportList({ id: res.id });
  950. console.log(list, 'list-----------');
  951. let index = list.records[0].fileName.indexOf('.');
  952. fileType.value = list.records[0].fileName.substring(index + 1);
  953. editID.value = list.records[0].id;
  954. openModal1();
  955. }
  956. //详情
  957. function goDetail() {
  958. openModal();
  959. }
  960. function goDetailDevice(link需风量DeviceCode) {
  961. let linkDeviceId = '';
  962. if (linkDeviceCode.startsWith('window')) {
  963. linkDeviceId = linkDeviceInfo.value[linkDeviceCode] ? linkDeviceInfo.value[linkDeviceCode]['id'] : '';
  964. router.push({ path: '/monitorChannel/monitor-window', query: { id: linkDeviceId } });
  965. }
  966. }
  967. //
  968. async function getDataSource() {
  969. if (devicekide.value) {
  970. const res = await list({ devicetype: devicekide.value, pagetype: 'normal' });
  971. // const res = await list({ devicetype: 'fanlocal', pagetype: 'normal' });
  972. if (res.msgTxt && res.msgTxt[0] && res.msgTxt[0].datalist && res.msgTxt[0].datalist.length > 0) {
  973. const dataArr = res.msgTxt[0].datalist || [];
  974. dataSource.value = [];
  975. dataArr.forEach((data) => {
  976. const readData = data.readData;
  977. data = Object.assign(data, readData);
  978. if (data['Fan1StartStatus'] && data['Fan1StartStatus'] === '1.0') data['Fan1StartStatus'] = '1';
  979. if (data['Fan2StartStatus'] && data['Fan2StartStatus'] === '1.0') data['Fan2StartStatus'] = '1';
  980. if (data['Fan1StartStatus'] && data['Fan1StartStatus'] === '0.0') data['Fan1StartStatus'] = '0';
  981. if (data['Fan2StartStatus'] && data['Fan2StartStatus'] === '0.0') data['Fan2StartStatus'] = '0';
  982. data['windQuantity2'] =
  983. data['windQuantity2'] ||
  984. data['m3'] ||
  985. data['ductOutletAirVolume_merge'] ||
  986. data['windOutSpeed_merge'] ||
  987. data['windOutSpeed1'] ||
  988. data['windOutSpeed2'] ||
  989. data['windOutSpeed_merge'];
  990. // if (globSetting.sysOrgCode === 'sdmtjtbetmk') {
  991. // if (data['m3']) data['ductOutletAirVolume_merge'] = data['m3'];
  992. // if (data['m3']) data['inletAirVolume_merge'] = (Number(data['m3']) * 1.08).toFixed(2);
  993. // }
  994. const m3 = data.windSpeed_merge;
  995. const fsectarea = data.windSectionArea_merge;
  996. const needq = data.needq;
  997. const airLeakageRatePerHundred = data.airLeakageRatePerHundred_merge;
  998. const airVolume = m3 * fsectarea; // 计算风量
  999. // 更新供风充足评价
  1000. leftColumns1.value[0].value = airVolume >= needq ? '充足' : '不充足';
  1001. if (data.tunnelType === 'coalTunnel') {
  1002. leftColumns1.value[1].value = m3 >= 0.25 ? '超限' : '不超限';
  1003. } else if (data.tunnelType === 'rockTunnel' || data.tunnelType === 'coalRockTunnel') {
  1004. leftColumns1.value[1].value = m3 >= 0.15 ? '超限' : '不超限';
  1005. }
  1006. if (data.airLeakageRatePerHundredX === '' || data.airLeakageRatePerHundred_merge === '') {
  1007. leftColumns1.value[2].value = '-';
  1008. } else {
  1009. leftColumns1.value[2].value = airLeakageRatePerHundred <= data.airLeakageRatePerHundredX ? '满足' : '不满足';
  1010. }
  1011. dataSource.value.push(data);
  1012. });
  1013. if (selectRowIndex.value > -1) {
  1014. const data = dataArr[selectRowIndex.value];
  1015. // 存放echarts数据
  1016. if (data && data['readTime']) {
  1017. const dataList = cloneDeep(echartsDataList.value);
  1018. if (dataList.length == 0 || dataList[dataList.length - 1]['readTime'] !== data['readTime']) {
  1019. if (dataList.length < 15) {
  1020. dataList.push({ ...data });
  1021. } else {
  1022. dataList.shift();
  1023. dataList.push({ ...data });
  1024. }
  1025. echartsDataList.value = dataList;
  1026. }
  1027. }
  1028. // 制动控制echarts数据获取
  1029. let echartsData = dataArr[selectRowIndex.value]['history'] || [];
  1030. echartsData = echartsData.filter((item) => {
  1031. item['FanfHz'] = data['Fan1StartStatus'] == '1' ? item['Fan1fHz'] : data['Fan2StartStatus'] == '1' ? item['Fan2fHz'] : 0;
  1032. item['windQuantity2'] =
  1033. item['windQuantity2'] ||
  1034. item['m3'] ||
  1035. item['ductOutletAirVolume_merge'] ||
  1036. item['windOutSpeed_merge'] ||
  1037. item['windOutSpeed1'] ||
  1038. item['windOutSpeed2'] ||
  1039. item['windOutSpeed_merge'];
  1040. return true;
  1041. });
  1042. historyList.value = echartsData;
  1043. }
  1044. } else {
  1045. return (dataSource.value = []);
  1046. }
  1047. } else {
  1048. dataSource.value = [];
  1049. }
  1050. }
  1051. // https获取监测数据
  1052. let timer: null | NodeJS.Timeout = null;
  1053. async function getMonitor(flag?) {
  1054. if (Object.prototype.toString.call(timer) === '[object Null]') {
  1055. timer = await setTimeout(
  1056. async () => {
  1057. // debugger;
  1058. await getDataSource();
  1059. if (dataSource.value.length > 0 && selectRowIndex.value == -1 && MonitorDataTable.value) {
  1060. // 初始打开页面
  1061. if (flag && currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) {
  1062. MonitorDataTable.value.setSelectedRowKeys(currentRoute.value['query']['id']);
  1063. } else {
  1064. MonitorDataTable.value.setSelectedRowKeys(dataSource.value[0]['deviceID']);
  1065. }
  1066. }
  1067. for (const key in selectData) {
  1068. selectData[key] = '';
  1069. }
  1070. if (dataSource.value.length > 0 && dataSource.value[selectRowIndex.value]) {
  1071. deviceType.value = dataSource.value[selectRowIndex.value]['deviceType'];
  1072. if (dataSource.value.length > 0 && dataSource.value[selectRowIndex.value]) {
  1073. Object.assign(selectData, dataSource.value[selectRowIndex.value]);
  1074. }
  1075. playSmoke(selectData);
  1076. addText(selectData);
  1077. }
  1078. historySource.value = selectData.history;
  1079. if (timer) {
  1080. timer = null;
  1081. }
  1082. getMonitor();
  1083. },
  1084. flag ? 0 : 1000
  1085. );
  1086. }
  1087. }
  1088. // 获取设备基本信息列表
  1089. const deviceBaseList = ref([]);
  1090. function getDeviceBaseList() {
  1091. getTableList({ pageSize: 1000 }).then((res) => {
  1092. deviceBaseList.value = res.records;
  1093. });
  1094. }
  1095. // 切换检测数据
  1096. async function getSelectRow(id) {
  1097. console.log('选中的设备id------->', id);
  1098. if (!id || id == selectData['deviceID']) return;
  1099. // loading.value = true;
  1100. const selectIndex: any = dataSource.value.findIndex((baseData: any) => baseData.deviceID == id);
  1101. selectRowIndex.value = selectIndex;
  1102. nextTick(() => {
  1103. const headEl = document.querySelector(`.zxm-table-thead`);
  1104. if (headEl) {
  1105. headElHeight.value = headEl.clientHeight;
  1106. }
  1107. const data = dataSource.value[selectIndex];
  1108. if (data) {
  1109. if (selectData['linkInfo']) linkDeviceInfo.value = JSON.parse(selectData['linkInfo']);
  1110. if (linkDeviceInfo.value['window_fWindowM3']) {
  1111. modalType.value = 'fc';
  1112. }
  1113. // 主备互斥控制
  1114. if (data['Fan1StartStatus'] == '1') {
  1115. mainWindIsShow1.value = 'open';
  1116. mainWindIsShow2.value = 'stop';
  1117. selectDevice('warningMonitorRowIndex', 0);
  1118. selectDevice('dataMonitorRowIndex', 0);
  1119. } else if (data['Fan2StartStatus'] == '1') {
  1120. mainWindIsShow2.value = 'open';
  1121. mainWindIsShow1.value = 'stop';
  1122. selectDevice('warningMonitorRowIndex', 1);
  1123. selectDevice('dataMonitorRowIndex', 1);
  1124. }
  1125. const xAxisDataGasArr = [];
  1126. for (const key in selectData) {
  1127. if (key.startsWith('gas') && key.length < 5) {
  1128. xAxisDataGasArr.push({ key: 'T' + key.substring(3), valueKey: key });
  1129. }
  1130. }
  1131. xAxisDataGas.value = xAxisDataGasArr;
  1132. }
  1133. setModelType(modalType.value);
  1134. });
  1135. await getCamera(id, playerRef.value);
  1136. return;
  1137. }
  1138. // 打开并设置modal的标题
  1139. function showModal(obj) {
  1140. if (!btnClick.value) return;
  1141. if (obj.key == 'kkjc') {
  1142. gasWarningVal.value = 0.6;
  1143. // 工况辅助决策
  1144. openAssistance(true, {});
  1145. return;
  1146. }
  1147. controlType.value = obj.key;
  1148. modalTitle.value = obj.value;
  1149. passWord.value = '';
  1150. modalIsShow.value = true;
  1151. }
  1152. function changeMotor(e) {
  1153. const target = e.target;
  1154. if (target.name === 'localWind1') {
  1155. if (target.value === 'open') {
  1156. mainWindIsShow2.value = 'stop';
  1157. }
  1158. } else if (target.name === 'localWind2') {
  1159. if (target.value === 'open') {
  1160. mainWindIsShow1.value = 'stop';
  1161. }
  1162. }
  1163. }
  1164. function handleOk(control?) {
  1165. if (passWord.value == '') {
  1166. message.warning('请输入密码!');
  1167. return;
  1168. }
  1169. createConfirm({
  1170. iconType: 'warning',
  1171. title: '控制',
  1172. content: '您确定要控制吗?',
  1173. onOk: () => handerFn(),
  1174. });
  1175. const handerFn = () => {
  1176. const handType = controlType.value;
  1177. const data = {
  1178. deviceid: selectData.deviceID,
  1179. devicetype: selectData.deviceType,
  1180. paramcode: '',
  1181. password: passWord.value || globalConfig?.simulatedPassword,
  1182. value: null,
  1183. };
  1184. if (handType === 'startSmoke') {
  1185. // 启动风机
  1186. // 以下是互斥
  1187. if (mainWindIsShow1.value === 'open' && mainWindIsShow2.value === 'stop') {
  1188. // playSmoke(handType, 'top', frequency, 'open');
  1189. data.paramcode = 'CtrlFan1Start';
  1190. deviceControlApi(data)
  1191. .then((res) => {
  1192. if (res.success) {
  1193. if (globalConfig.History_Type == 'remote') {
  1194. message.success('指令已下发至生产管控平台成功!');
  1195. } else {
  1196. message.success('指令已下发成功!');
  1197. }
  1198. modalTitle.value = '';
  1199. modalIsShow.value = false;
  1200. } else {
  1201. message.error(res.message);
  1202. }
  1203. })
  1204. .catch((err) => {
  1205. // modalIsShow.value = true;
  1206. });
  1207. } else if (mainWindIsShow2.value === 'open' && mainWindIsShow1.value === 'stop') {
  1208. // playSmoke(handType, 'down', frequency, 'open');
  1209. data.paramcode = 'CtrlFan2Start';
  1210. deviceControlApi(data)
  1211. .then(() => {
  1212. if (res.success) {
  1213. if (globalConfig.History_Type == 'remote') {
  1214. message.success('指令已下发至生产管控平台成功!');
  1215. } else {
  1216. message.success('指令已下发成功!');
  1217. }
  1218. modalTitle.value = '';
  1219. modalIsShow.value = false;
  1220. } else {
  1221. message.error(res.message);
  1222. }
  1223. })
  1224. .catch((err) => {});
  1225. } else if (mainWindIsShow1.value === 'stop' && mainWindIsShow2.value === 'stop') {
  1226. // playSmoke(handType, '', frequency, 'stop');
  1227. }
  1228. } else if (handType === 'startFan') {
  1229. if (control === 'Fan1Open') {
  1230. data.paramcode = 'CtrlFan1Start';
  1231. } else if (control === 'Fan2Open') {
  1232. data.paramcode = 'CtrlFan2Start';
  1233. } else if (control === 'Fan1Stop') {
  1234. data.paramcode = 'CtrlFan1Stop';
  1235. } else if (control === 'Fan2Stop') {
  1236. data.paramcode = 'CtrlFan2Stop';
  1237. } else if (control === 'Fan1Reset') {
  1238. data.paramcode = 'CtrlFan1Reset';
  1239. } else if (control === 'Fan2Reset') {
  1240. data.paramcode = 'CtrlFan2Reset';
  1241. }
  1242. deviceControlApi(data)
  1243. .then((res) => {
  1244. if (res.success) {
  1245. if (globalConfig.History_Type == 'remote') {
  1246. message.success('指令已下发至生产管控平台成功!');
  1247. } else {
  1248. message.success('指令已下发成功!');
  1249. }
  1250. modalTitle.value = '';
  1251. modalIsShow.value = false;
  1252. } else {
  1253. message.error(res.message);
  1254. }
  1255. })
  1256. .catch((err) => {
  1257. btnClick.value = true;
  1258. });
  1259. } else if (handType === 'Fan1Frequency' || handType === 'Fan2Frequency' || handType === 'FanFrequency') {
  1260. // 调频
  1261. if (handType === 'Fan1Frequency') {
  1262. data.paramcode = 'Fan1FreqHz';
  1263. data.value = fan1FrequencyVal.value;
  1264. } else if (handType === 'Fan2Frequency') {
  1265. data.paramcode = 'Fan2FreqHz';
  1266. data.value = fan2FrequencyVal.value;
  1267. } else if (handType === 'FanFrequency') {
  1268. data.paramcode = 'FreqHz_merge';
  1269. data.value = fan1FrequencyVal.value;
  1270. }
  1271. deviceControlApi(data)
  1272. .then((res) => {
  1273. if (res.success) {
  1274. if (globalConfig.History_Type == 'remote') {
  1275. message.success('指令已下发至生产管控平台成功!');
  1276. } else {
  1277. message.success('指令已下发成功!');
  1278. }
  1279. modalTitle.value = '';
  1280. modalIsShow.value = false;
  1281. } else {
  1282. message.error(res.message);
  1283. }
  1284. })
  1285. .catch((err) => {});
  1286. } else if (handType === 'changeSmoke') {
  1287. if (selectData['Fan1StartStatus'] == '0' || !selectData['Fan1StartStatus']) {
  1288. data.paramcode = 'CtrlFan1Start';
  1289. deviceControlApi(data)
  1290. .then((res) => {
  1291. if (res.success) {
  1292. if (globalConfig.History_Type == 'remote') {
  1293. message.success('指令已下发至生产管控平台成功!');
  1294. } else {
  1295. message.success('指令已下发成功!');
  1296. }
  1297. modalTitle.value = '';
  1298. modalIsShow.value = false;
  1299. } else {
  1300. message.error(res.message);
  1301. }
  1302. mainWindIsShow1.value = 'stop';
  1303. mainWindIsShow2.value = 'open';
  1304. })
  1305. .catch((err) => {});
  1306. } else if (selectData['Fan2StartStatus'] == '0' || !selectData['Fan2StartStatus']) {
  1307. data.paramcode = 'CtrlFan2Start';
  1308. deviceControlApi(data)
  1309. .then((res) => {
  1310. if (res.success) {
  1311. if (globalConfig.History_Type == 'remote') {
  1312. message.success('指令已下发至生产管控平台成功!');
  1313. } else {
  1314. message.success('指令已下发成功!');
  1315. }
  1316. modalTitle.value = '';
  1317. modalIsShow.value = false;
  1318. } else {
  1319. message.error(res.message);
  1320. }
  1321. mainWindIsShow1.value = 'open';
  1322. mainWindIsShow2.value = 'stop';
  1323. })
  1324. .catch((err) => {});
  1325. }
  1326. // // 一键倒机
  1327. // if (mainWindIsShow1.value === 'open' && mainWindIsShow2.value === 'stop') {
  1328. // // playSmoke('startSmoke', 'down', frequency, 'open');
  1329. // data.paramcode = 'CtrlFan2Start';
  1330. // deviceControlApi(data).then((res) => {
  1331. // console.log('设备操作结果', res);
  1332. // modalTitle.value = '';
  1333. // modalIsShow.value = false;
  1334. // }).catch((err) => {
  1335. // });
  1336. // mainWindIsShow1.value = 'stop';
  1337. // mainWindIsShow2.value = 'open';
  1338. // } else if (mainWindIsShow2.value === 'open' && mainWindIsShow1.value === 'stop') {
  1339. // // playSmoke('startSmoke', 'top', frequency, 'open');
  1340. // data.paramcode = 'CtrlFan1Start';
  1341. // deviceControlApi(data).then((res) => {
  1342. // console.log('设备操作结果', res);
  1343. // modalTitle.value = '';
  1344. // modalIsShow.value = false;
  1345. // }).catch((err) => {
  1346. // });
  1347. // mainWindIsShow1.value = 'open';
  1348. // mainWindIsShow2.value = 'stop';
  1349. // } else if (mainWindIsShow1.value === 'stop' && mainWindIsShow2.value === 'stop') {
  1350. // // playSmoke(handType, '', frequency, 'stop');
  1351. // }
  1352. } else if (handType === 'changeFan') {
  1353. data.paramcode = 'CtrlFanStart';
  1354. deviceControlApi(data)
  1355. .then((res) => {
  1356. if (res.success) {
  1357. if (globalConfig.History_Type == 'remote') {
  1358. message.success('指令已下发至生产管控平台成功!');
  1359. } else {
  1360. message.success('指令已下发成功!');
  1361. }
  1362. } else {
  1363. message.error(res.message);
  1364. }
  1365. modalTitle.value = '';
  1366. modalIsShow.value = false;
  1367. })
  1368. .catch((err) => {});
  1369. } else if (handType === 'fan1ToFan2') {
  1370. data.paramcode = 'CtrlFan1ToFan2';
  1371. deviceControlApi(data).then((res) => {
  1372. if (res.success) {
  1373. if (globalConfig.History_Type == 'remote') {
  1374. message.success('指令已下发至生产管控平台成功!');
  1375. } else {
  1376. message.success('指令已下发成功!');
  1377. }
  1378. modalTitle.value = '';
  1379. modalIsShow.value = false;
  1380. } else {
  1381. message.error(res.message);
  1382. }
  1383. });
  1384. } else if (handType === 'fan2ToFan1') {
  1385. data.paramcode = 'CtrlFan2ToFan1';
  1386. deviceControlApi(data).then((res) => {
  1387. if (res.success) {
  1388. if (globalConfig.History_Type == 'remote') {
  1389. message.success('指令已下发至生产管控平台成功!');
  1390. } else {
  1391. message.success('指令已下发成功!');
  1392. }
  1393. modalTitle.value = '';
  1394. modalIsShow.value = false;
  1395. } else {
  1396. message.error(res.message);
  1397. }
  1398. });
  1399. } else if (handType === 'gasAlarmSet') {
  1400. if (passWord.value != '123456') {
  1401. message.error('密码错误,请重新输入!');
  1402. return;
  1403. }
  1404. if (gasWarningVal.value) {
  1405. modalTitle.value = '';
  1406. modalIsShow.value = false;
  1407. setTimeout(() => {
  1408. passWord.value = '';
  1409. modalIsShow.value = true;
  1410. controlType.value = 'toGkjc';
  1411. modalTitle.value = '工况决策辅助';
  1412. }, 500);
  1413. } else {
  1414. message.error('请核对瓦斯超限浓度值!');
  1415. }
  1416. } else if (handType === 'toGkjc') {
  1417. if (passWord.value != '123456') {
  1418. message.error('密码错误,请重新输入!');
  1419. return;
  1420. }
  1421. //进行工况决策
  1422. if (selectData.Fan1StartStatus == '1') {
  1423. openAssistance(true, {
  1424. // m3: selectData.m3 || 675.87,
  1425. m3: 675.87,
  1426. frequency: 30,
  1427. // m3: 525.87, //5.0测试数据
  1428. // frequency: 35,
  1429. // frequency: selectData.Fan1fHz || selectData.Fan1FreqHz || selectData.Fan1Loop_Frequency,
  1430. gasWarningVal: gasWarningVal.value,
  1431. isCompute: false,
  1432. });
  1433. } else if (selectData.Fan2StartStatus == '1') {
  1434. openAssistance(true, {
  1435. // m3: selectData.m3 || 675.87,
  1436. m3: 675.87,
  1437. frequency: 30,
  1438. // frequency: selectData.Fan2fHz || selectData.Fan2FreqHz || selectData.Fan2Loop_Frequency,
  1439. gasWarningVal: gasWarningVal.value,
  1440. isCompute: false,
  1441. });
  1442. } else {
  1443. // openAssistance(true, { m3: 635.04, dataDh: 5748 });
  1444. openAssistance(true);
  1445. }
  1446. modalTitle.value = '';
  1447. modalIsShow.value = false;
  1448. } else if (handType === 'zhlk' || handType === 'gasOverSet') {
  1449. modalIsShow.value = false;
  1450. if (targetVolume.value) {
  1451. const params =
  1452. handType === 'zhlk'
  1453. ? { auto: 1, fanlocalId: selectData.deviceID, xufengliang: targetVolume.value }
  1454. : { auto: 1, fanlocalId: selectData.deviceID, gasMax: gasWarningVal.value };
  1455. autoAdjust(params)
  1456. .then(() => {
  1457. if (hasPermission('echart:show')) activeKey.value = '2';
  1458. if (globalConfig.History_Type == 'remote') {
  1459. message.success('指令已下发至生产管控平台成功!');
  1460. } else {
  1461. message.success('指令已下发成功!');
  1462. }
  1463. modalTitle.value = '';
  1464. })
  1465. .catch(() => {
  1466. message.error('指令下发失败');
  1467. });
  1468. }
  1469. }
  1470. };
  1471. }
  1472. function cancel() {
  1473. modalTitle.value = '';
  1474. modalIsShow.value = false;
  1475. gasWarningVal.value = 0;
  1476. }
  1477. function handleChangeSensor(value: string) {
  1478. console.log(value);
  1479. }
  1480. function addPlayVideo() {
  1481. if (player1.value && player1.value.play) {
  1482. if (!player1.value.paused()) player1.value.play();
  1483. document.body.removeEventListener('mousedown', addPlayVideo);
  1484. }
  1485. }
  1486. function deviceEdit(e: Event, type: string, record) {
  1487. e.stopPropagation();
  1488. openModal(true, {
  1489. type,
  1490. deviceId: record['deviceID'],
  1491. });
  1492. }
  1493. onBeforeMount(() => {
  1494. getDeviceBaseList();
  1495. });
  1496. onMounted(() => {
  1497. const { query } = unref(currentRoute);
  1498. if (query['deviceType']) devicekide.value = query['deviceType'] as string;
  1499. mountedThree(player1.value).then(async () => {
  1500. await getMonitor(true);
  1501. nextTick(async () => {
  1502. addCssText();
  1503. });
  1504. });
  1505. document.body.addEventListener('mousedown', addPlayVideo, false);
  1506. });
  1507. onUnmounted(() => {
  1508. destroy();
  1509. removeCamera();
  1510. if (timer) {
  1511. clearTimeout(timer);
  1512. timer = undefined;
  1513. }
  1514. });
  1515. </script>
  1516. <style scoped lang="less">
  1517. @import '/@/design/theme.less';
  1518. @import '/@/design/vent/modal.less';
  1519. :deep(.@{ventSpace}-tabs-tabpane-active) {
  1520. height: 100%;
  1521. }
  1522. :deep(.zxm-tabs-content) {
  1523. height: 100%;
  1524. }
  1525. @{theme-deepblue} {
  1526. .scene-box {
  1527. --image-lr-top-bg: url('/@/assets/images/themify/deepblue/vent/lr-top-bg.png');
  1528. --image-lr-tab-bg: url('/@/assets/images/themify/deepblue/vent/lr-tab-bg.png');
  1529. --image-l-tab-active: url('/@/assets/images/themify/deepblue/vent/l-tab-active.png');
  1530. --image-r-tab-active: url('/@/assets/images/themify/deepblue/vent/r-tab-active.png');
  1531. --image-plane-bottom: url('/@/assets/images/themify/deepblue/vent/plane-bottom.png');
  1532. --image-plane-icon-bg: url('/@/assets/images/themify/deepblue/vent/plane-icon-bg.png');
  1533. --container-group-bg: linear-gradient(to right, #ffffff22, #53576305);
  1534. }
  1535. }
  1536. .scene-box {
  1537. --image-lr-top-bg: url('/@/assets/images/vent/lr-top-bg.png');
  1538. --image-lr-tab-bg: url('/@/assets/images/vent/lr-tab-bg.png');
  1539. --image-l-tab-active: url('/@/assets/images/vent/l-tab-active.png');
  1540. --image-r-tab-active: url('/@/assets/images/vent/r-tab-active.png');
  1541. --image-plane-bottom: url('/@/assets/images/vent/plane-bottom.png');
  1542. --image-plane-icon-bg: url('/@/assets/images/vent/plane-icon-bg.png');
  1543. --container-group-bg: linear-gradient(to right, #00deff22, #2081ff05);
  1544. .title-text {
  1545. height: 32px;
  1546. }
  1547. .bottom-tabs-box {
  1548. height: 280px;
  1549. .tabs-box {
  1550. position: relative !important;
  1551. }
  1552. }
  1553. }
  1554. .data-show-box {
  1555. position: relative;
  1556. display: flex;
  1557. flex-direction: row;
  1558. justify-content: space-between;
  1559. padding: 10px 5px;
  1560. color: var(--vent-font-color);
  1561. z-index: 999;
  1562. top: 60px;
  1563. .data-item {
  1564. pointer-events: auto;
  1565. .item-header {
  1566. width: 374px;
  1567. background: var(--image-lr-top-bg) no-repeat;
  1568. background-size: auto;
  1569. height: 32px;
  1570. text-align: center;
  1571. line-height: 34px;
  1572. font-size: 15px;
  1573. font-weight: 600;
  1574. color: #fafafa;
  1575. }
  1576. .item-container {
  1577. width: 346px;
  1578. margin: 0 14px;
  1579. padding: 10px;
  1580. background: #00377c33;
  1581. backdrop-filter: blur(2px);
  1582. .tab {
  1583. width: 323px;
  1584. background: var(--image-lr-tab-bg) no-repeat;
  1585. display: flex;
  1586. .tab-item {
  1587. flex: 1;
  1588. text-align: center;
  1589. padding-top: 2px;
  1590. color: #ffffff99;
  1591. cursor: pointer;
  1592. }
  1593. .tab-item-active-l {
  1594. color: var(--vent-font-action-link);
  1595. background-image: var(--image-l-tab-active);
  1596. background-repeat: no-repeat;
  1597. background-size: auto;
  1598. background-position: 6px 3px;
  1599. }
  1600. .tab-item-active-r {
  1601. color: var(--vent-font-action-link);
  1602. background-image: var(--image-r-tab-active);
  1603. background-repeat: no-repeat;
  1604. background-position: 0 3px;
  1605. }
  1606. }
  1607. .container-group {
  1608. width: 314px;
  1609. margin: 0px 4px;
  1610. padding: 10px 0;
  1611. background: var(--container-group-bg);
  1612. max-height: 440px;
  1613. overflow-y: auto;
  1614. }
  1615. .container-item {
  1616. width: 100%;
  1617. height: 60px;
  1618. display: flex;
  1619. padding: 10px 0 0 20px;
  1620. margin-bottom: 5px;
  1621. position: relative;
  1622. background: var(--image-plane-bottom) no-repeat;
  1623. background-size: auto;
  1624. background-position: bottom;
  1625. &::before {
  1626. content: '';
  1627. display: block;
  1628. width: 100%;
  1629. height: 5px;
  1630. position: absolute;
  1631. top: 62px;
  1632. left: 0;
  1633. background-color: #73f4ff66;
  1634. backdrop-filter: blur(5px);
  1635. }
  1636. .item-icon {
  1637. width: 54px;
  1638. height: 45px;
  1639. background: var(--image-plane-icon-bg) no-repeat;
  1640. background-size: cover;
  1641. .icon-style {
  1642. font-size: 18px;
  1643. margin: 10px 0 0 20px;
  1644. color: #ffc800;
  1645. }
  1646. }
  1647. .item-name {
  1648. width: 180px;
  1649. line-height: 60px;
  1650. }
  1651. .item-value {
  1652. position: relative;
  1653. height: 26px;
  1654. line-height: 24px;
  1655. margin: 15px 0;
  1656. text-align: center;
  1657. width: 80px;
  1658. border: 1px solid var(--vent-base-border);
  1659. border-radius: 13px;
  1660. background: linear-gradient(to right, #00f5fe44, #0090ff44);
  1661. &::before {
  1662. width: 6px;
  1663. height: 6px;
  1664. content: '';
  1665. position: absolute;
  1666. left: -3px;
  1667. top: 8px;
  1668. background: #ffa500;
  1669. border-radius: 3px;
  1670. }
  1671. }
  1672. }
  1673. .warning-header {
  1674. display: flex;
  1675. font-size: 14px;
  1676. .header-item {
  1677. flex: 1;
  1678. display: flex;
  1679. justify-content: center;
  1680. align-items: center;
  1681. .header-title {
  1682. width: 100%;
  1683. text-align: center;
  1684. padding: 1px 0;
  1685. color: var(--vent-font-action-link);
  1686. margin-top: 10px;
  1687. background: #1eb0ff22;
  1688. }
  1689. .header-value {
  1690. // width: 133px;
  1691. height: 36px;
  1692. font-weight: 600;
  1693. font-family: 'douyuFont';
  1694. font-size: 16px;
  1695. color: #ffa500;
  1696. display: flex;
  1697. justify-content: center;
  1698. align-items: center;
  1699. margin-top: 15px;
  1700. margin-left: 8px;
  1701. }
  1702. }
  1703. }
  1704. .warning-group {
  1705. padding: 0 10px;
  1706. position: relative;
  1707. .warning-item {
  1708. display: flex;
  1709. flex-direction: row;
  1710. justify-content: space-between;
  1711. align-items: center;
  1712. height: 38px;
  1713. .item-name {
  1714. display: flex;
  1715. align-items: center;
  1716. // padding-left: 5px;
  1717. .icon {
  1718. width: 6px;
  1719. height: 6px;
  1720. display: inline-block;
  1721. background-color: var(--vent-base-light-bg);
  1722. border-radius: 3px;
  1723. position: relative;
  1724. margin-right: 8px;
  1725. &::before {
  1726. content: '';
  1727. width: 10px;
  1728. height: 10px;
  1729. display: block;
  1730. border: 1px solid #34edff99;
  1731. border-radius: 5px;
  1732. position: absolute;
  1733. top: -2px;
  1734. left: -2px;
  1735. }
  1736. }
  1737. &::before {
  1738. content: '';
  1739. display: block;
  1740. width: 1px;
  1741. height: 38px;
  1742. position: absolute;
  1743. left: 12px;
  1744. background-color: var(--vent-base-light-bg);
  1745. }
  1746. }
  1747. }
  1748. }
  1749. .warning-group-r {
  1750. &::before {
  1751. content: '';
  1752. display: block;
  1753. width: 1px;
  1754. height: 100%;
  1755. position: absolute;
  1756. left: 12px;
  1757. background-color: var(--vent-base-light-bg);
  1758. }
  1759. }
  1760. }
  1761. }
  1762. }
  1763. .input-box {
  1764. display: flex;
  1765. align-items: center;
  1766. .input-title {
  1767. color: #73e8fe;
  1768. width: auto;
  1769. }
  1770. margin-right: 10px;
  1771. }
  1772. .label {
  1773. max-width: 220px;
  1774. }
  1775. #fanLocalSelectDom {
  1776. :deep(.@{ventSpace}-select-dropdown) {
  1777. left: 0px !important;
  1778. top: 35px !important;
  1779. }
  1780. }
  1781. .@{ventSpace}-input {
  1782. width: 150px;
  1783. }
  1784. :deep(#LivePlayerBox) {
  1785. display: flex;
  1786. flex-direction: row;
  1787. justify-content: flex-end;
  1788. padding-right: 380px;
  1789. pointer-events: none;
  1790. .video-parent {
  1791. height: 208px;
  1792. pointer-events: auto !important;
  1793. }
  1794. }
  1795. .to-right {
  1796. :deep(#LivePlayerBox) {
  1797. padding-right: 0px;
  1798. }
  1799. }
  1800. :deep(.button-box) {
  1801. position: relative;
  1802. padding: 5px;
  1803. // border: 1px transparent solid;
  1804. border-radius: 5px;
  1805. margin-left: 8px;
  1806. margin-right: 8px;
  1807. width: auto;
  1808. // height: 40px;
  1809. // border: 1px solid #65dbea;
  1810. height: 35px !important;
  1811. display: flex;
  1812. align-items: center;
  1813. justify-content: center;
  1814. color: var(--vent-font-color);
  1815. padding: 0 15px 5px 15px;
  1816. cursor: pointer;
  1817. &:hover {
  1818. background: var(--vent-device-manager-control-btn-hover);
  1819. }
  1820. &::before {
  1821. width: calc(100% - 6px);
  1822. height: 27px;
  1823. content: '';
  1824. position: absolute;
  1825. top: 3px;
  1826. right: 0;
  1827. left: 3px;
  1828. bottom: 0;
  1829. z-index: -1;
  1830. border-radius: inherit;
  1831. /*important*/
  1832. background: var(--vent-device-manager-control-btn);
  1833. }
  1834. &::after {
  1835. width: calc(100% + 32px);
  1836. height: 10px;
  1837. content: '';
  1838. position: absolute;
  1839. top: 28px;
  1840. right: 0;
  1841. left: -16px;
  1842. bottom: 0;
  1843. z-index: -1;
  1844. border-radius: inherit;
  1845. /*important*/
  1846. background-position: center;
  1847. background-size: 100%;
  1848. z-index: 999;
  1849. }
  1850. }
  1851. .video-icon {
  1852. width: 30px;
  1853. height: 38px;
  1854. position: absolute;
  1855. top: 580px;
  1856. right: 395px;
  1857. color: var(--vent-font-color);
  1858. z-index: 1;
  1859. font-size: 28px;
  1860. }
  1861. .no-play {
  1862. &::after {
  1863. position: absolute;
  1864. width: 80%;
  1865. height: 100%;
  1866. content: '';
  1867. left: 12%;
  1868. top: -5px;
  1869. background: linear-gradient(
  1870. to bottom left,
  1871. transparent 0%,
  1872. transparent calc(50% - 2px),
  1873. #ffffff 50%,
  1874. transparent calc(50% + 2px),
  1875. transparent 100%
  1876. );
  1877. }
  1878. }
  1879. </style>