index.vue 78 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132
  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
  5. id="main3DCSS"
  6. class="threejs-Object-CSS"
  7. style="width: 100%; height: 100%; position: absolute; pointer-events: none; overflow: hidden; z-index: 1; top: 0"
  8. >
  9. <div style="position: relative" v-if="selectData['modalTyoe']">
  10. <div class="elementTag" id="inputBox1">
  11. <div class="elementContent elementContent-r" v-if="selectData.DataPa && backMonitorIsShow">
  12. <!-- <div class="element-item"><span class="data-title">风机气压(Pa):</span><span>{{ selectData.DataPa ? selectData.DataPa : '-' }}</span></div> -->
  13. <div class="element-item"
  14. ><span class="data-title">风机负压(Pa):</span><span>{{ selectData.Fan2FanPre ? selectData.Fan2FanPre : '-' }}</span></div
  15. >
  16. <div class="element-item"
  17. ><span class="data-title">风机风量(m³/s):</span><span>{{ selectData.Fan2m3 ? selectData.Fan2m3 : '-' }}</span></div
  18. >
  19. </div>
  20. </div>
  21. <div class="elementTag" id="inputBox">
  22. <div class="elementContent elementContent-r" v-if="selectData.DataPa && frontMonitorIsShow">
  23. <!-- <div class="element-item"><span class="data-title">风机全压(Pa):</span><span>{{ selectData.DataPa ? selectData.DataPa : '-' }}</span></div> -->
  24. <div class="element-item"
  25. ><span class="data-title">风机负压(Pa):</span><span>{{ selectData.Fan1FanPre ? selectData.Fan1FanPre : '-' }}</span></div
  26. >
  27. <div class="element-item"
  28. ><span class="data-title">风机风量(m³/s):</span><span>{{ selectData.Fan1m3 ? selectData.Fan1m3 : '-' }}</span></div
  29. >
  30. </div>
  31. </div>
  32. <div v-if="globalConfig?.simulatedPassword" class="elementTag" id="fbm">
  33. <div class="elementContent elementContent-r fbm-box">
  34. <div class="fbm-video">
  35. <LivePlayer id="main-player2" ref="player2" :videoUrl="flvURL2()" muted live />
  36. <div class="vent-flex-row-between vent-margin-t-20">
  37. <span class="data-title">风门开启状态:</span>
  38. <template v-if="selectData['ExplosionVentOpen'] == 1 && selectData['ExplosionVentClose'] == 0">
  39. <span class="data-title"><span class="signal-round signal-round-blue vent-margin-r-8"></span>开启</span>
  40. </template>
  41. <template v-else-if="selectData['ExplosionVentOpen'] == 0 && selectData['ExplosionVentClose'] == 1">
  42. <span class="data-title"><span class="signal-round signal-round-gry vent-margin-r-8"></span>关闭</span>
  43. </template>
  44. <template v-else>
  45. <div class="vent-margin-l-10"
  46. ><span class="signal-round signal-round-warning vent-margin-r-8"></span>防爆门正在运行 或 数据异常</div
  47. >
  48. </template>
  49. </div>
  50. <div class="vent-flex-row-between vent-margin-t-10">
  51. <span class="data-title">反风锁紧状态:</span>
  52. <template
  53. v-if="
  54. selectData['Lock1Open'] == 1 && selectData['Lock1Close'] == 0 && selectData['Lock2Open'] == 1 && selectData['Lock2Close'] == '0'
  55. "
  56. >
  57. <span class="data-title"><span class="signal-round signal-round-blue vent-margin-r-8"></span>锁1开</span>
  58. <span class="data-title"><span class="signal-round signal-round-blue vent-margin-r-8"></span>锁2开</span>
  59. </template>
  60. <template
  61. v-else-if="
  62. selectData['Lock1Open'] == '0' && selectData['Lock1Close'] == 1 && selectData['Lock2Open'] == '0' && selectData['Lock2Close'] == 1
  63. "
  64. >
  65. <span class="data-title"><span class="signal-round signal-round-gry vent-margin-r-8"></span>锁1关</span>
  66. <span class="data-title"><span class="signal-round signal-round-gry vent-margin-r-8"></span>锁2关</span>
  67. </template>
  68. <template v-else>
  69. <div class="vent-margin-l-10"
  70. ><span class="signal-round signal-round-warning vent-margin-r-8"></span>反风锁紧正在运行 或 数据异常</div
  71. >
  72. </template>
  73. </div>
  74. </div>
  75. <div class="fbm-data">
  76. <div class="element-item"
  77. ><span class="data-title">井口负压(kPa):</span
  78. ><span>{{ selectData.Fan1FanPre ? selectData.Fan1FanPre : selectData.Fan2FanPre ? selectData.Fan2FanPre : '-' }}</span></div
  79. >
  80. <div class="element-item"><span class="data-title">井口正压(kPa):</span><span>0</span></div>
  81. <div class="element-item"><span class="data-title">井口温度(℃):</span><span>19.132</span></div>
  82. <div class="element-item"><span class="data-title">甲烷浓度(%):</span><span>0.36</span></div>
  83. <div class="element-item"><span class="data-title">CO浓度(%):</span><span>0</span></div>
  84. <div class="vent-flex-row-between">
  85. <span class="data-title">操作方式:</span>
  86. <span class="data-title"><span class="signal-round signal-round-blue vent-margin-r-8"></span>远程</span>
  87. <span class="data-title"><span class="signal-round signal-round-gry vent-margin-r-8"></span>就地</span>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. <div id="main3D" style="width: 100%; height: 100%; position: absolute; overflow: hidden"> </div>
  95. <FanEchrats id="fan-echarts" :chartData="selectData" style="position: absolute; z-index: -1" />
  96. </div>
  97. <!-- 控制模式 -->
  98. <div v-if="hasPermission('fan:remote')" class="top-right">
  99. <div class="control-title">控制模式:</div>
  100. <a-radio-group v-model:value="selectData.autoRoManual">
  101. <template v-for="(item, index) in modelList" :key="index">
  102. <a-radio :value="item.value" :disabled="true">{{ item.text }}</a-radio>
  103. </template>
  104. </a-radio-group>
  105. <div
  106. class="button-box"
  107. v-for="(item, index) in modelList"
  108. @click="showModal({ key: 'remote', value: '控制模式', ctrlValue: item.value })"
  109. :key="index"
  110. >{{ item.text }}</div
  111. >
  112. </div>
  113. <div class="scene-box" style="z-index: 999">
  114. <div class="title-text" style="position: absolute; z-index: 9999; width: 100%; text-align: center">{{
  115. selectData.supplyAirAddr || selectData.strinstallpos || selectData.stationname
  116. }}</div>
  117. <div v-if="hasPermission('btn:show')" class="top-box control-group">
  118. <template v-for="(item, index) in modalTypeArr.centerBtnArr" :key="index">
  119. <div v-if="hasPermission(item.permission)" class="button-box" @click="showModal(item)">{{ item.value }}</div>
  120. </template>
  121. <!-- <div class="button-box" v-for="(item, index) in modalTypeArr.centerBtnArr" :key="index" @click="showModal(item)">{{ item.value }}</div> -->
  122. </div>
  123. <div v-if="!faultShow" class="data-show-box">
  124. <div class="data-item">
  125. <div class="item-header">设备监测</div>
  126. <div class="item-container">
  127. <div class="tab">
  128. <div class="tab-item" :class="{ 'tab-item-active-r': dataMonitorRowIndex == 0 }" @click="selectDevice('dataMonitorRowIndex', 0)"
  129. >1#风机</div
  130. >
  131. <div class="tab-item" :class="{ 'tab-item-active-r': dataMonitorRowIndex == 1 }" @click="selectDevice('dataMonitorRowIndex', 1)"
  132. >2#风机</div
  133. >
  134. </div>
  135. <div class="container-group container-group-l">
  136. <template v-if="deviceType">
  137. <div class="container-item" v-for="(data, index) in leftColumns" :key="index">
  138. <div class="item-icon">
  139. <SvgIcon class="icon-style" size="18" name="temperature" />
  140. </div>
  141. <div class="item-name">{{ data.title }}</div>
  142. <div v-if="data.dataIndex.startsWith('Fan')">
  143. <div class="item-value" v-if="dataMonitorRowIndex == 0">{{
  144. selectData['Fan1StartStatus'] == '0' && globalConfig?.simulatedPassword
  145. ? '-'
  146. : selectData[data.dataIndex.replace('Fan', 'Fan1')]
  147. ? selectData[data.dataIndex.replace('Fan', 'Fan1')]
  148. : '-'
  149. }}</div>
  150. <div class="item-value" v-if="dataMonitorRowIndex == 1">{{
  151. selectData['Fan2StartStatus'] == '0' && globalConfig?.simulatedPassword
  152. ? '-'
  153. : selectData[data.dataIndex.replace('Fan', 'Fan2')]
  154. ? selectData[data.dataIndex.replace('Fan', 'Fan2')]
  155. : '-'
  156. }}</div>
  157. </div>
  158. <div v-else>
  159. <div class="item-value">{{ selectData[data.dataIndex] ? selectData[data.dataIndex] : '-' }}</div>
  160. </div>
  161. </div>
  162. </template>
  163. </div>
  164. </div>
  165. </div>
  166. <div class="data-item" style="margin-top: 8px">
  167. <div class="item-header">设备报警</div>
  168. <div class="item-container">
  169. <div class="tab">
  170. <div class="tab-item" :class="{ 'tab-item-active-r': warningMonitorRowIndex === 0 }" @click="selectDevice('warningMonitorRowIndex', 0)"
  171. >1#风机</div
  172. >
  173. <div class="tab-item" :class="{ 'tab-item-active-r': warningMonitorRowIndex === 1 }" @click="selectDevice('warningMonitorRowIndex', 1)"
  174. >2#风机</div
  175. >
  176. </div>
  177. <div class="container-group">
  178. <div class="warning-group">
  179. <template v-if="deviceType">
  180. <div class="warning-item" v-for="(state, index) in rightColumns" :key="index">
  181. <div class="item-name"> <div class="icon"></div> {{ state.title }} </div>
  182. <div v-if="state.dataIndex.startsWith('Fan')">
  183. <div class="signal-item" v-if="warningMonitorRowIndex == 0">
  184. <template v-if="selectData['Fan1StartStatus'] == '0' && globalConfig?.simulatedPassword">
  185. <div class="signal-round signal-round-gry"></div>
  186. <div class="vent-margin-l-8">无状态</div>
  187. </template>
  188. <template v-else>
  189. <div
  190. class="signal-round"
  191. :class="{
  192. 'signal-round-run': selectData[state.dataIndex.replace('Fan', 'Fan1')] == '0',
  193. 'signal-round-warning':
  194. selectData[state.dataIndex.replace('Fan', 'Fan1')] !== undefined &&
  195. selectData[state.dataIndex.replace('Fan', 'Fan1')] == '1',
  196. 'signal-round-gry': selectData[state.dataIndex.replace('Fan', 'Fan1')] === undefined,
  197. }"
  198. ></div>
  199. <div class="vent-margin-l-8">{{
  200. selectData[state.dataIndex.replace('Fan', 'Fan1')] === undefined
  201. ? '无状态'
  202. : selectData[state.dataIndex.replace('Fan', 'Fan1')] == '0'
  203. ? '正常'
  204. : '异常'
  205. }}</div>
  206. </template>
  207. </div>
  208. <div class="signal-item" v-if="warningMonitorRowIndex == 1">
  209. <template v-if="selectData['Fan2StartStatus'] == '0' && globalConfig?.simulatedPassword">
  210. <div class="signal-round signal-round-gry"></div>
  211. <div class="vent-margin-l-8">无状态</div>
  212. </template>
  213. <template v-else>
  214. <div
  215. class="signal-round"
  216. :class="{
  217. 'signal-round-run': selectData[state.dataIndex.replace('Fan', 'Fan2')] == '0',
  218. 'signal-round-warning':
  219. selectData[state.dataIndex.replace('Fan', 'Fan2')] != undefined &&
  220. selectData[state.dataIndex.replace('Fan', 'Fan2')] == '1',
  221. 'signal-round-gry': selectData[state.dataIndex.replace('Fan', 'Fan2')] == undefined,
  222. }"
  223. ></div>
  224. <div class="vent-margin-l-8">{{
  225. selectData[state.dataIndex.replace('Fan', 'Fan2')] == undefined
  226. ? '无状态'
  227. : selectData[state.dataIndex.replace('Fan', 'Fan2')] == '0'
  228. ? '正常'
  229. : '异常'
  230. }}</div>
  231. </template>
  232. </div>
  233. </div>
  234. <div v-else>
  235. <div class="signal-item">
  236. <div
  237. class="signal-round vent-margin-l-8"
  238. :class="{
  239. 'signal-round-run': selectData[state.dataIndex] == '0',
  240. 'signal-round-warning': selectData[state.dataIndex] !== undefined && selectData[state.dataIndex] == '1',
  241. 'signal-round-gry': selectData[state.dataIndex] === undefined,
  242. }"
  243. ></div>
  244. <div class="vent-margin-l-8">{{
  245. selectData[state.dataIndex] === undefined ? '无状态' : selectData[state.dataIndex] == '0' ? '正常' : '异常'
  246. }}</div>
  247. </div>
  248. </div>
  249. </div>
  250. </template>
  251. </div>
  252. </div>
  253. </div>
  254. </div>
  255. </div>
  256. <div v-else class="data-show-box fault-box">
  257. <div class="data-item">
  258. <div class="item-header">一级电机监测</div>
  259. <div class="item-container">
  260. <div class="tab">
  261. <div class="tab-item" :class="{ 'tab-item-active-r': dataMonitorRowIndex == 0 }" @click="selectDevice('dataMonitorRowIndex', 0)"
  262. >1#风机</div
  263. >
  264. <div class="tab-item" :class="{ 'tab-item-active-r': dataMonitorRowIndex == 1 }" @click="selectDevice('dataMonitorRowIndex', 1)"
  265. >2#风机</div
  266. >
  267. </div>
  268. <div class="container-group fault-container-group">
  269. <div class="electric-box">
  270. <div class="item" v-for="(item, index) in faultDeviceHeader" :key="index" :style="{ width: item.width }">{{ item.title }}</div>
  271. </div>
  272. <div class="fault-group">
  273. <template v-if="deviceType">
  274. <template v-for="(faultItem, faultIndex) in faultData" :key="faultIndex">
  275. <div
  276. class="fault-item"
  277. v-if="faultItem['valueCode'].startsWith(dataMonitorRowIndex === 0 ? 'faultEqu1_electric1' : 'faultEqu2_electric1')"
  278. :class="{ 'fault-warning': faultItem['warnLevel'] == 104, 'fault-error': faultItem['warnLevel'] == 201 }"
  279. >
  280. <div class="item" v-for="(item, index) in faultDeviceHeader" :key="index" :style="{ width: item.width }">{{
  281. faultItem[item.code]
  282. }}</div>
  283. </div>
  284. </template>
  285. </template>
  286. </div>
  287. </div>
  288. </div>
  289. </div>
  290. <div class="data-item" style="margin-top: 8px">
  291. <div class="item-header">二级电机监测</div>
  292. <div class="item-container">
  293. <div class="tab">
  294. <div class="tab-item" :class="{ 'tab-item-active-r': warningMonitorRowIndex === 0 }" @click="selectDevice('warningMonitorRowIndex', 0)"
  295. >1#风机</div
  296. >
  297. <div class="tab-item" :class="{ 'tab-item-active-r': warningMonitorRowIndex === 1 }" @click="selectDevice('warningMonitorRowIndex', 1)"
  298. >2#风机</div
  299. >
  300. </div>
  301. <div class="container-group fault-container-group">
  302. <div class="electric-box">
  303. <div class="item" v-for="(item, index) in faultDeviceHeader" :key="index" :style="{ width: item.width }">{{ item.title }}</div>
  304. </div>
  305. <div class="fault-group">
  306. <template v-if="deviceType">
  307. <template v-for="(faultItem, faultIndex) in faultData" :key="faultIndex">
  308. <div
  309. class="fault-item"
  310. v-if="faultItem['valueCode'].startsWith(warningMonitorRowIndex === 0 ? 'faultEqu1_electric2' : 'faultEqu2_electric2')"
  311. :class="{ 'fault-warning': faultItem['warnLevel'] == 104, 'fault-error': faultItem['warnLevel'] == 201 }"
  312. >
  313. <div class="item" v-for="(item, index) in faultDeviceHeader" :key="index" :style="{ width: item.width }">{{
  314. faultItem[item.code]
  315. }}</div>
  316. </div>
  317. </template>
  318. </template>
  319. </div>
  320. </div>
  321. </div>
  322. </div>
  323. </div>
  324. <div class="bottom-tabs-box" @mousedown="setDivHeight($event, 250, scroll, 0)">
  325. <!-- 保德视频及系统外界,保德特有 -->
  326. <div v-if="sysOrgCode === 'sdmtjtbdmk'" class="bd-control">
  327. <div class="button-box" @click="goOutLink('1')">视频查看</div>
  328. <div class="button-box" @click="goOutLink('2')">主风机故障智能诊断预警系统</div>
  329. </div>
  330. <dv-border-box8 :dur="5" :style="`padding: 5px; height: ${scroll.y + 128}px`">
  331. <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange">
  332. <a-tab-pane key="1" tab="实时监测">
  333. <GroupMonitorTable
  334. ref="MonitorDataTable"
  335. :dataSource="dataSource"
  336. columnsType="fanmain_monitor"
  337. @selectRow="getSelectRow"
  338. :scroll="{ y: scroll.y - (headElHeight - 56) }"
  339. :is-action="true"
  340. >
  341. <template #bodyCell="{ column, record }">
  342. <!-- <a-tag :color="record.netStatus == '0' ? '#f00' : 'green'">{{ record.netStatus == '1' ? '报警' : '正常' }}</a-tag> -->
  343. </template>
  344. <template #action="{ record }">
  345. <a
  346. v-if="globalConfig?.showReport || (!globalConfig?.showReport && hasPermission('fan:kkjc'))"
  347. class="table-action-link"
  348. @click="deviceEdit($event, 'reportInfo', record)"
  349. >报表录入</a
  350. >
  351. <a class="table-action-link" @click="deviceEdit($event, 'deviceInfo', record)">设备编辑</a>
  352. </template>
  353. </GroupMonitorTable>
  354. </a-tab-pane>
  355. <!-- <a-tab-pane key="2" tab="实时曲线图" force-render>
  356. <div class="tab-item" v-if="activeKey === '2'">
  357. <Bar :chartData="dataSource" xAxisPropType="strname" :propTypeArr="propTypeArr" height="40vh" width="100%" />
  358. </div>
  359. </a-tab-pane> -->
  360. <a-tab-pane key="3" tab="历史数据">
  361. <div class="tab-item" v-if="activeKey === '3'">
  362. <template v-if="globalConfig?.History_Type == 'remote'">
  363. <HistoryTable device-type="fanmain" designScope="fanmain-history" :scroll="scroll" />
  364. </template>
  365. <template v-else>
  366. <HistoryTable :device-code="deviceType" :scroll="{ y: scroll.y - 70 }" dict-code="fan_dict" />
  367. </template>
  368. </div>
  369. </a-tab-pane>
  370. <a-tab-pane key="7" v-if="hasPermission('show:deviceEcharts')" tab="监测曲线图" force-render>
  371. <div class="tab-item" v-if="activeKey === '7'" style="padding-bottom: 20px">
  372. <FanDeviceEcharts
  373. chartsColumnsType="fanmain_chart"
  374. xAxisPropType="strname"
  375. :dataSource="dataSource"
  376. height="100%"
  377. width="100%"
  378. :fan1ChartsColumns="chartsColumnsFan1"
  379. :fan2ChartsColumns="chartsColumnsFan2"
  380. :device-list-api="list.bind(null, { devicetype: 'fanmain', pagetype: 'normal' })"
  381. device-type="fanmain"
  382. />
  383. </div>
  384. </a-tab-pane>
  385. <a-tab-pane key="4" tab="报警历史">
  386. <div class="tab-item" v-if="activeKey === '4'">
  387. <AlarmHistoryTable columns-type="alarm" :device-type="deviceType" designScope="alarm-history" :scroll="scroll" />
  388. </div>
  389. </a-tab-pane>
  390. <a-tab-pane key="5" tab="曲线配置" v-if="hasPermission('show:fanEcharts')">
  391. <div v-if="activeKey == '5'" class="tab-item" style="display: flex">
  392. <div style="width: 50%; height: 100%">
  393. <div style="color: #fff; width: 100%; text-align: center; margin: 5px 0px">主机</div>
  394. <BarAndLine
  395. class="echarts-line"
  396. xAxisPropType="readTime"
  397. :dataSource="echartsDataList"
  398. height="90%"
  399. width="100%"
  400. :chartsColumns="chartsColumnsFan1"
  401. :option="echatsOption"
  402. chartsType="detail"
  403. />
  404. </div>
  405. <div style="width: 50%; height: 100%">
  406. <div style="color: #fff; width: 100%; text-align: center; margin: 5px 0px">备机</div>
  407. <BarAndLine
  408. class="echarts-line"
  409. xAxisPropType="readTime"
  410. :dataSource="echartsDataList"
  411. height="90%"
  412. width="100%"
  413. :chartsColumns="chartsColumnsFan2"
  414. :option="echatsOption"
  415. chartsType="detail"
  416. />
  417. </div>
  418. </div>
  419. </a-tab-pane>
  420. <a-tab-pane key="6" tab="操作历史">
  421. <div v-if="hasPermission('show:handlerHistory') && activeKey == '6'" class="tab-item">
  422. <HandlerHistoryTable
  423. columns-type="operator_history"
  424. device-type="fanmain"
  425. :device-list-api="baseList"
  426. designScope="alarm-history"
  427. :scroll="scroll"
  428. />
  429. </div>
  430. </a-tab-pane>
  431. </a-tabs>
  432. </dv-border-box8>
  433. </div>
  434. </div>
  435. <div style="z-index: -1; position: absolute; top: -100px; right: 10px; width: 300px; height: 280px; margin: auto" class="palyer">
  436. <LivePlayer id="main-player1" ref="player1" :videoUrl="flvURL1()" muted loop loading controls />
  437. </div>
  438. <div
  439. v-show="showPlay"
  440. ref="playerRef"
  441. style="z-index: 999; position: absolute; right: 15px; width: 100%; height: 100%; margin: auto; pointer-events: none"
  442. :style="{ top: hasPermission('btn:show') ? '155px' : '100px' }"
  443. >
  444. </div>
  445. <a-modal
  446. v-model:visible="modalIsShow"
  447. :centered="true"
  448. :maskClosable="false"
  449. :title="modalTitle"
  450. @ok="handleOk"
  451. @cancel="handleCancel"
  452. :destroyOnClose="true"
  453. >
  454. <template #footer v-if="modalType == 'fbm'">
  455. <a-button key="back" @click="handleCancel">取消</a-button>
  456. </template>
  457. <div class="modal-container">
  458. <div class="vent-flex-row">
  459. <ExclamationCircleFilled style="color: #ffb700; font-size: 30px" />
  460. <div class="warning-text">您是否要进行{{ modalTitle }}操作?</div>
  461. </div>
  462. <div class="vent-flex-row input-box" v-if="!globalConfig?.simulatedPassword">
  463. <div class="label">操作密码:</div>
  464. <a-input size="small" type="password" v-model:value="passWord" />
  465. </div>
  466. <!-- 调频 -->
  467. <div class="vent-flex-row input-box" v-if="modalType == 'frequency'">
  468. <div class="label">运行频率(Hz):</div>
  469. <a-input-number v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
  470. </div>
  471. <!-- 启动或停止 -->
  472. <div class="" v-if="modalType == 'startSmoke'">
  473. <div class="startSmoke-select">
  474. <div class="label">1#风机:</div>
  475. <a-radio-group v-model:value="mainWindIsShow1" @change="changeMotor" name="mainWind1">
  476. <a-radio value="open">开启</a-radio>
  477. <a-radio value="stop">停止</a-radio>
  478. </a-radio-group>
  479. </div>
  480. <div class="startSmoke-select">
  481. <div class="label">2#风机:</div>
  482. <a-radio-group v-model:value="mainWindIsShow2" @change="changeMotor" name="mainWind2">
  483. <a-radio value="open">开启</a-radio>
  484. <a-radio value="stop">停止</a-radio>
  485. </a-radio-group>
  486. </div>
  487. </div>
  488. <div class="" v-if="modalType == 'startFan' && hasPermission('fan:startAndResetFan')">
  489. <!-- 不互斥控制 -->
  490. <div class="startSmoke-select">
  491. <div class="label">主机:</div>
  492. <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Open')">开启</div>
  493. <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Stop')">停止</div>
  494. <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Reset')">复位</div>
  495. </div>
  496. <div class="startSmoke-select">
  497. <div class="label">备机:</div>
  498. <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Open')">开启</div>
  499. <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Stop')">停止</div>
  500. <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Reset')">复位</div>
  501. </div>
  502. </div>
  503. <div class="" v-if="modalType == 'startFan' && hasPermission('fan:startFan')">
  504. <!-- 不互斥控制 -->
  505. <div class="startSmoke-select">
  506. <div class="label">主机:</div>
  507. <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Open')">开启</div>
  508. <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Stop')">停止</div>
  509. </div>
  510. <div class="startSmoke-select">
  511. <div class="label">备机:</div>
  512. <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Open')">开启</div>
  513. <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Stop')">停止</div>
  514. </div>
  515. </div>
  516. <!-- 防爆门控制 -->
  517. <div class="" v-if="modalType == 'fbm'">
  518. <div class="vent-margin-t-20">
  519. <span class="data-title vent-margin-r-8">反风锁紧状态:</span>
  520. <template
  521. v-if="selectData['Lock1Open'] == 1 && selectData['Lock1Close'] == 0 && selectData['Lock2Open'] == 1 && selectData['Lock2Close'] == 0"
  522. >
  523. <span class="data-title vent-margin-l-10"><span class="signal-round signal-round-blue vent-margin-r-8"></span>锁1开到位</span>
  524. <span class="data-title vent-margin-l-20"><span class="signal-round signal-round-blue vent-margin-r-8"></span>锁2开到位</span>
  525. </template>
  526. <template
  527. v-else-if="selectData['Lock1Open'] == 0 && selectData['Lock1Close'] == 1 && selectData['Lock2Open'] == 0 && selectData[' '] == 1"
  528. >
  529. <span class="data-title vent-margin-l-10"><span class="signal-round signal-round-gry vent-margin-r-8"></span>锁1关到位</span>
  530. <span class="data-title vent-margin-l-20"><span class="signal-round signal-round-gry vent-margin-r-8"></span>锁2关到位</span>
  531. </template>
  532. <template v-else>
  533. <span class="data-title vent-margin-l-10"><span class="signal-round signal-round-gry vent-margin-r-8"></span>锁1-</span>
  534. <span class="data-title vent-margin-l-20"><span class="signal-round signal-round-gry vent-margin-r-8"></span>锁2-</span>
  535. </template>
  536. </div>
  537. <div class="vent-flex-row btn-box vent-margin-t-20">
  538. <span class="data-title vent-margin-r-8">反风锁紧控制:</span>
  539. <div v-if="fbmControlData.CtrlLockOpen !== undefined">
  540. <span class="btn btn1" @click="handleOk('openLock')">开锁</span>
  541. <span class="btn btn2" @click="handleOk('closeLock')">关锁</span>
  542. </div>
  543. <!-- <a-switch v-if="fbmControlData.CtrlLockOpen !== undefined" style="margin-left: 5px;" v-model:checked="fbmControlData.CtrlLockOpen" checked-children="开锁" un-checked-children="关锁" /> -->
  544. <div v-else class="vent-margin-l-10"
  545. ><span class="signal-round signal-round-warning vent-margin-r-8"></span>反风锁紧正在运行 或 数据异常</div
  546. >
  547. </div>
  548. <div class="vent-flex-row btn-box vent-margin-t-20">
  549. <span class="data-title vent-margin-r-8">防爆门扇控制:</span>
  550. <div v-if="fbmControlData.CtrlExplosionVentOpen !== undefined">
  551. <span class="btn btn1" @click="handleOk('openGate')">开门</span>
  552. <span class="btn btn2" @click="handleOk('closeGate')">关门</span>
  553. </div>
  554. <!-- <a-switch v-if="fbmControlData.CtrlExplosionVentOpen !== undefined" style="margin-left: 5px;" v-model:checked="fbmControlData.CtrlExplosionVentOpen" checked-children="开门" un-checked-children="关门" /> -->
  555. <div class="vent-margin-l-10" v-else><span class="signal-round signal-round-warning vent-margin-r-8"></span>防爆门正在运行 或 数据异常</div>
  556. </div>
  557. </div>
  558. </div>
  559. </a-modal>
  560. <!-- 保德在线监测和故障诊断 -->
  561. <div v-if="sysOrgCode === 'sdmtjtbdmk' && faultData.length > 0" class="monitor-tab" @click="showFault">
  562. <div class="item" :class="{ 'item-active': !faultShow }">风机监测</div>
  563. <div class="item" :class="{ 'item-active': faultShow }">在线故障诊断监测</div>
  564. </div>
  565. <!-- 摄像头显示隐藏图标 -->
  566. <VideoCameraOutlined class="video-icon" :class="{ 'no-play': !showPlay }" @click="changePlay" />
  567. <!-- 工况辅助决策 -->
  568. <ConditionAssistance @register="registerModal" :deviceType="deviceType" :selectData="selectData" />
  569. <DeviceBaseInfo @register="registerModalDeviceEdit" :device-type="selectData['deviceType']" />
  570. </template>
  571. <script setup lang="ts">
  572. import { ExclamationCircleFilled, VideoCameraOutlined } from '@ant-design/icons-vue';
  573. import FanDeviceEcharts from '../comment/FanDeviceEcharts.vue';
  574. import BarAndLine from '../../../../components/chart/BarAndLine.vue';
  575. import FanEchrats from '/@/views/vent/monitorManager/mainFanMonitor/fanEchrats.vue';
  576. import { onBeforeMount, unref, ref, onMounted, inject, onUnmounted, reactive, toRaw, watch, nextTick, defineAsyncComponent } from 'vue';
  577. import GroupMonitorTable from '../comment/GroupMonitorTable.vue';
  578. // // import HistoryTable from '../comment/HistoryTable.vue';
  579. // import HistoryTable from '../../../vent/comment/history/HistoryTable.vue';
  580. import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
  581. import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
  582. import { modalTypeArr, fbmControlData, faultDeviceHeader, PointMonitorType } from './main.data';
  583. import { deviceControlApi } from '/@/api/vent/index';
  584. import { mountedThree, destroy, addText, setModelType, playAnimate, resetEcharts } from './main.threejs';
  585. import LivePlayer from '@liveqing/liveplayer-v3';
  586. import { SvgIcon } from '/@/components/Icon';
  587. import { list, pointMonitor } from './main.api';
  588. import { list as baseList } from '../../deviceManager/fanTabel/fan.api';
  589. import { getTableList } from '/@/views/vent/monitorManager/fanLocalMonitor/fanLocal.api';
  590. import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
  591. import { setDivHeight } from '/@/utils/event';
  592. import { useMessage } from '/@/hooks/web/useMessage';
  593. import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
  594. import { useRouter } from 'vue-router';
  595. import ConditionAssistance from './components/conditionAssistance.vue';
  596. import { useModal } from '/@/components/Modal';
  597. import type { BasicColumn } from '/@/components/Table/src/types/table';
  598. import { useCamera } from '/@/hooks/system/useCamera';
  599. import DeviceBaseInfo from '../comment/components/DeviceBaseInfo.vue';
  600. import { useGlobSetting } from '/@/hooks/setting';
  601. import { usePermission } from '/@/hooks/web/usePermission';
  602. import { cloneDeep } from 'lodash-es';
  603. import { getDictItems } from '/@/api/common/api';
  604. const globalConfig = inject('globalConfig');
  605. const HistoryTable =
  606. globalConfig.History_Type == 'remote'
  607. ? defineAsyncComponent(() => import('../comment/HistoryTable.vue'))
  608. : defineAsyncComponent(() => import('../../../vent/comment/history/HistoryTable.vue'));
  609. // const HistoryTable = defineAsyncComponent(() => import('../comment/HistoryTable.vue'))
  610. const { hasPermission } = usePermission();
  611. const [registerModal, { openModal, closeModal }] = useModal();
  612. const [registerModalDeviceEdit, { openModal: openModalDeviceEdit }] = useModal();
  613. const { currentRoute } = useRouter();
  614. const { createMessage, createConfirm } = useMessage();
  615. const { sysOrgCode } = useGlobSetting();
  616. // const sysOrgCode = 'sdmtjtbdmk';
  617. const scroll = reactive({
  618. y: 180,
  619. });
  620. const modelList = ref<{ text: string; value: string }[]>([]);
  621. let modeValue: null | string | number = null;
  622. const playerRef = ref();
  623. const isSimulation = true; // 是否模拟状态
  624. const MonitorDataTable = ref();
  625. const showPlay = ref(false);
  626. const player1 = ref(null);
  627. const player2 = ref(null);
  628. const activeKey = ref('1');
  629. const loading = ref(false);
  630. const modalIsShow = ref<boolean>(false); // 是否显示模态框
  631. const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
  632. const modalType = ref(''); // 模态框内容显示类型,设备操作类型
  633. const frequencyVal = ref(40); //频率
  634. const mainWindIsShow1 = ref('stop'); // 1#风机默认启动
  635. const mainWindIsShow2 = ref('stop'); // 2#风机默认不启动
  636. const frontMonitorIsShow = ref(false); // 存放1#风机临时状态,保存模态框取消时,还需要返回之前的值
  637. const backMonitorIsShow = ref(false); // 存放2#风机临时状态,保存模态框取消时,还需要返回之前的值
  638. const passWord = ref('');
  639. // 默认初始是第一行 (默认n%2==0时是主机,n%2==1时是备机)
  640. const selectRowIndex = ref(-1);
  641. // 默认数据左边监测的是1#风机
  642. const dataMonitorRowIndex = ref(0);
  643. // 默认数据右边监测的是1#风机
  644. const warningMonitorRowIndex = ref(0);
  645. const faultData = ref<PointMonitorType[]>([]); // 存放故障点位监测数据(查的点表)
  646. const explosionDoorData = ref<PointMonitorType[]>([]); // 存放防爆门点位监测数据(查的点表)
  647. const faultShow = ref(false);
  648. let headElHeight = ref(0);
  649. // 监测数据
  650. const selectData = reactive({
  651. deviceID: '',
  652. Fan1Negative: '-', // 静压
  653. Fan2Negative: '-', // 静压
  654. DataPa: '-', //全压
  655. Fan1m3: '-', //电机流量
  656. Fan2m3: '-', //电机流量
  657. deviceType: '',
  658. Fan2FanPre: '-',
  659. Fan1FanPre: '-',
  660. otherInfo: '',
  661. autoRoManual: null,
  662. });
  663. const deviceType = ref(selectData.deviceType);
  664. const rightColumns = ref<BasicColumn[]>([]);
  665. const leftColumns = ref<BasicColumn[]>([]);
  666. const echartsDataList = ref<any[]>([]);
  667. const remoteChartsColumns = getTableHeaderColumns('fanmain_chart');
  668. const chartsColumns = remoteChartsColumns && remoteChartsColumns.length > 0 ? remoteChartsColumns : [];
  669. let chartsColumnsFan1 = [],
  670. chartsColumnsFan2 = [];
  671. // 这里需要处理主备
  672. if (chartsColumns.length > 0) {
  673. for (let i = 0; i < chartsColumns.length; i++) {
  674. let itemColumn = chartsColumns[i];
  675. let dataIndexFan1, dataIndexFan2;
  676. if (itemColumn['dataIndex']) {
  677. const dataIndex = itemColumn['dataIndex'] as string;
  678. dataIndexFan1 = dataIndex.startsWith('Fan') ? dataIndex.replace('Fan', 'Fan1') : dataIndex.replace('fan', 'fan1');
  679. dataIndexFan2 = dataIndex.startsWith('Fan') ? dataIndex.replace('Fan', 'Fan2') : dataIndex.replace('fan', 'fan2');
  680. chartsColumnsFan1.push({ ...itemColumn, dataIndex: dataIndexFan1, legend: '主机' + itemColumn['legend'] });
  681. chartsColumnsFan2.push({ ...itemColumn, dataIndex: dataIndexFan2, legend: '备机' + itemColumn['legend'] });
  682. }
  683. }
  684. }
  685. const echatsOption = {
  686. legend: {
  687. top: -10,
  688. },
  689. grid: {
  690. top: '13%',
  691. left: '20',
  692. right: '25',
  693. bottom: '10%',
  694. containLabel: true,
  695. },
  696. toolbox: {
  697. feature: {
  698. saveAsImage: {
  699. show: false,
  700. },
  701. },
  702. },
  703. xAxis: {
  704. type: 'category',
  705. axisLabel: {
  706. margin: 10,
  707. color: '#f1f1f199',
  708. },
  709. name: '',
  710. },
  711. yAxis: {
  712. axisLabel: {
  713. color: '#0071A5',
  714. },
  715. },
  716. };
  717. watch(deviceType, (type) => {
  718. rightColumns.value = getTableHeaderColumns(type + '_monitor_right') as [];
  719. if (rightColumns.value && rightColumns.value.length < 1) {
  720. rightColumns.value = getTableHeaderColumns(type.split('_')[0] + '_monitor_right') as [];
  721. }
  722. leftColumns.value = getTableHeaderColumns(type + '_monitor_left') as [];
  723. if (leftColumns.value && leftColumns.value.length < 1) {
  724. leftColumns.value = getTableHeaderColumns(type.split('_')[0] + '_monitor_left') as [];
  725. }
  726. });
  727. const flvURL1 = () => {
  728. // return `https://muiplayer.js.org/media/media.m3u8`;
  729. return `/video/mainWind.mp4`;
  730. };
  731. const flvURL2 = () => {
  732. return `/video/mainWind.mp4`;
  733. // return `https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv`;
  734. };
  735. const dataSource = ref([]);
  736. const propTypeArr = new Map([
  737. ['incipientWindSpeed1', 'V1风速'],
  738. ['incipientWindSpeed2', 'V2风速'],
  739. ['incipientWindSpeed3', 'V3风速'],
  740. ['sourcePressure', '气源压力'],
  741. ]);
  742. const { getCamera, removeCamera } = useCamera();
  743. const showFault = () => {
  744. faultShow.value = !faultShow.value;
  745. };
  746. const tabChange = (activeKeyVal) => {
  747. activeKey.value = activeKeyVal;
  748. // MonitorDataTable.value.setSelectedRowKeys(selectData.deviceID);
  749. };
  750. // 设备数据
  751. const controlType = ref(1);
  752. const getDataSource = async () => {
  753. const res = await list({ devicetype: 'fanmain', pagetype: 'normal' });
  754. const dataArr = res.msgTxt[0].datalist || [];
  755. dataSource.value = [];
  756. dataArr.forEach((data) => {
  757. const readData = data.readData;
  758. data = Object.assign(data, readData);
  759. dataSource.value.push(data);
  760. });
  761. const data: any = toRaw(dataSource.value[selectRowIndex.value]); //maxarea
  762. Object.assign(selectData, data);
  763. // 存放echarts数据
  764. if (data && data['readTime']) {
  765. const dataList = cloneDeep(echartsDataList.value);
  766. if (dataList.length == 0 || dataList[dataList.length - 1]['readTime'] !== data['readTime']) {
  767. if (dataList.length < 15) {
  768. dataList.push({ ...data });
  769. } else {
  770. dataList.shift();
  771. dataList.push({ ...data });
  772. }
  773. echartsDataList.value = dataList;
  774. }
  775. }
  776. await getPointData();
  777. return selectData;
  778. };
  779. const getPointData = async () => {
  780. const otherInfo = selectData.otherInfo;
  781. let faultDevice, doorDevice;
  782. if (otherInfo) {
  783. const linkDevices: { deviceType: string; deviceId: string }[] = JSON.parse(otherInfo);
  784. if (linkDevices instanceof Array) {
  785. linkDevices.filter((item) => {
  786. if (item.deviceType == 'faultEqu') {
  787. faultDevice = item;
  788. } else if (item.deviceType == 'explosionproof') {
  789. doorDevice = item;
  790. }
  791. });
  792. // const result = await pointMonitor({ ids: '1657545388451663006' });
  793. // faultData.value = result['valueList'] || [];
  794. if (faultDevice) {
  795. const result = await pointMonitor({ ids: faultDevice.deviceId });
  796. faultData.value = result['valueList'] || [];
  797. }
  798. if (doorDevice) {
  799. const result = await pointMonitor({ ids: doorDevice.deviceId });
  800. explosionDoorData.value = result['valueList'] || [];
  801. }
  802. } else {
  803. // 这里处理绑定单设备id
  804. }
  805. }
  806. };
  807. // https获取监测数据
  808. let timer: null | NodeJS.Timeout = null;
  809. const getMonitor = (flag?) => {
  810. if (Object.prototype.toString.call(timer) === '[object Null]') {
  811. timer = setTimeout(
  812. async () => {
  813. await getDataSource();
  814. if (dataSource.value.length > 0 && selectRowIndex.value == -1) {
  815. // 初始打开页面
  816. if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) {
  817. MonitorDataTable.value.setSelectedRowKeys(currentRoute.value['query']['id']);
  818. } else {
  819. MonitorDataTable.value.setSelectedRowKeys(dataSource.value[0]['deviceID']);
  820. }
  821. }
  822. if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
  823. frontMonitorIsShow.value = true;
  824. backMonitorIsShow.value = false;
  825. } else if (selectData['Fan2StartStatus'] == 1 && selectData['Fan1StartStatus'] == 0) {
  826. backMonitorIsShow.value = true;
  827. frontMonitorIsShow.value = false;
  828. }
  829. if (dataSource.value.length > 0 && dataSource.value[selectRowIndex.value]) {
  830. deviceType.value = dataSource.value[selectRowIndex.value]['deviceType'];
  831. if (dataSource.value.length > 0 && dataSource.value[selectRowIndex.value]) {
  832. Object.assign(selectData, dataSource.value[selectRowIndex.value]);
  833. }
  834. addText();
  835. playAnimate(selectData);
  836. }
  837. if (timer) {
  838. timer = null;
  839. }
  840. getMonitor();
  841. },
  842. flag ? 0 : 1000
  843. );
  844. }
  845. };
  846. // const getMonitor = () => {
  847. // if (Object.prototype.toString.call(timer) === '[object Null]') {
  848. // timer = setTimeout(() => {
  849. // if (timer) {
  850. // timer = null;
  851. // }
  852. // dataSource.value = getData();
  853. // // 默认前两行(主、备)是正在监测的主通风机, 实际中需要手动选中
  854. // const monitorData = getMonitorData();
  855. // Object.assign(dataSource.value[selectRowIndex.value], monitorData);
  856. // const data: any = toRaw(dataSource.value[selectRowIndex.value]);
  857. // Object.assign(selectData, data);
  858. // resetEcharts('mainWindRect');
  859. // getMonitor();
  860. // }, 1000);
  861. // }
  862. // };
  863. const deviceBaseList = ref([]);
  864. const getDeviceBaseList = () => {
  865. getTableList({ pageSize: 1000 }).then((res) => {
  866. deviceBaseList.value = res.records;
  867. });
  868. };
  869. // 切换检测数据
  870. const getSelectRow = async (id) => {
  871. removeCamera();
  872. if (!id) return;
  873. loading.value = true;
  874. const baseDataIndex: any = dataSource.value.findIndex((baseData: any) => baseData.deviceID === id);
  875. selectRowIndex.value = baseDataIndex;
  876. for (const key in selectData) {
  877. selectData[key] = '';
  878. }
  879. nextTick(async () => {
  880. loading.value = false;
  881. if (!headElHeight.value) {
  882. const headEl = document.querySelector(`.zxm-table-thead`);
  883. if (headEl) {
  884. headElHeight.value = headEl.clientHeight;
  885. }
  886. }
  887. const data = dataSource.value[selectRowIndex.value];
  888. if (data['Fan1StartStatus'] == 1) {
  889. selectDevice('warningMonitorRowIndex', 0);
  890. selectDevice('dataMonitorRowIndex', 0);
  891. } else if (data['Fan2StartStatus'] == 1) {
  892. selectDevice('warningMonitorRowIndex', 1);
  893. selectDevice('dataMonitorRowIndex', 1);
  894. }
  895. Object.assign(selectData, data);
  896. const type = selectData['modalTyoe'] === 'xiejing' ? 'mainXjWindRect' : 'mainWindRect';
  897. await setModelType(type);
  898. });
  899. await getCamera(id, playerRef.value);
  900. return;
  901. };
  902. const start = (paramcode, value?, isTest?) => {
  903. return new Promise((reolve, reject) => {
  904. let data;
  905. if (isTest) {
  906. data = {
  907. deviceid: selectData.deviceID,
  908. devicetype: selectData.deviceType,
  909. paramcode: paramcode,
  910. password: passWord.value || globalConfig?.simulatedPassword,
  911. testvalue: value,
  912. };
  913. } else {
  914. data = {
  915. deviceid: selectData.deviceID,
  916. devicetype: selectData.deviceType,
  917. paramcode: paramcode,
  918. password: passWord.value || globalConfig?.simulatedPassword,
  919. value: value,
  920. };
  921. }
  922. deviceControlApi(data)
  923. .then((res) => {
  924. if (res.success) {
  925. reolve(res);
  926. } else {
  927. reject(res);
  928. }
  929. })
  930. .catch(() => {
  931. reject(res);
  932. });
  933. });
  934. };
  935. // 切换左右两边1#、2#风机的监测数据
  936. const selectDevice = (key, val) => {
  937. if (key === 'dataMonitorRowIndex') {
  938. dataMonitorRowIndex.value = val;
  939. } else {
  940. warningMonitorRowIndex.value = val;
  941. }
  942. };
  943. const changePlay = () => {
  944. showPlay.value = !showPlay.value;
  945. };
  946. // 打开并设置modal的标题
  947. const showModal = (obj) => {
  948. if (obj.key == 'kkjc') {
  949. // 工况辅助决策
  950. openModal(true, {});
  951. return;
  952. }
  953. modalType.value = obj.key;
  954. modalTitle.value = obj.value;
  955. modalIsShow.value = true;
  956. if (modalType.value == 'startSmoke') {
  957. if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
  958. mainWindIsShow1.value = 'open';
  959. mainWindIsShow2.value = 'stop';
  960. frontMonitorIsShow.value = true;
  961. backMonitorIsShow.value = false;
  962. } else if (selectData['Fan2StartStatus'] == 1 && selectData['Fan1StartStatus'] == 0) {
  963. mainWindIsShow2.value = 'open';
  964. mainWindIsShow1.value = 'stop';
  965. backMonitorIsShow.value = true;
  966. frontMonitorIsShow.value = false;
  967. }
  968. } else if (modalType.value == 'frequency') {
  969. if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
  970. frequencyVal.value = selectData['Fan1FreqHz'];
  971. }
  972. if (selectData['Fan2StartStatus'] == 1 && selectData['Fan1StartStatus'] == 0) {
  973. frequencyVal.value = selectData['Fan2FreqHz'];
  974. }
  975. } else if (modalType.value == 'remote') {
  976. // 控制模式
  977. if (obj['ctrlValue']) {
  978. modeValue = obj['ctrlValue'];
  979. }
  980. }
  981. };
  982. const changeMotor = (e) => {
  983. const target = e.target;
  984. if (target.name === 'mainWind1') {
  985. if (target.value === 'open') {
  986. mainWindIsShow2.value = 'stop';
  987. }
  988. } else if (target.name === 'mainWind2') {
  989. if (target.value === 'open') {
  990. mainWindIsShow1.value = 'stop';
  991. }
  992. }
  993. };
  994. const handleOk = (flag?) => {
  995. if (passWord.value == '') {
  996. createMessage.warning('请输入密码!');
  997. return;
  998. }
  999. createConfirm({
  1000. iconType: 'warning',
  1001. title: '控制',
  1002. content: '您确定要控制吗?',
  1003. onOk: () => handerFn(flag),
  1004. });
  1005. const handerFn = (flag?) => {
  1006. if (modalType.value == 'startSmoke') {
  1007. if (
  1008. selectData['Fan1StartStatus'] == 1 &&
  1009. selectData['Fan2StartStatus'] == 0 &&
  1010. (selectData['Fan2OneStartCon'] === undefined || (selectData['Fan2OneStartCon'] !== undefined && selectData['Fan2OneStartCon'] == 1))
  1011. ) {
  1012. start('CtrlFan2Start')
  1013. .then(() => {
  1014. frontMonitorIsShow.value = false;
  1015. backMonitorIsShow.value = true;
  1016. })
  1017. .catch((err) => {
  1018. createMessage.error(err.message);
  1019. });
  1020. } else if (
  1021. selectData['Fan1StartStatus'] == 0 &&
  1022. selectData['Fan2StartStatus'] == 1 &&
  1023. (selectData['Fan1OneStartCon'] === undefined || (selectData['Fan1OneStartCon'] !== undefined && selectData['Fan1OneStartCon'] == 1))
  1024. ) {
  1025. start('CtrlFan1Start')
  1026. .then(() => {
  1027. frontMonitorIsShow.value = true;
  1028. backMonitorIsShow.value = false;
  1029. })
  1030. .catch((err) => {
  1031. createMessage.error(err.message);
  1032. });
  1033. } else if (mainWindIsShow1.value === 'stop' && mainWindIsShow2.value === 'stop') {
  1034. frontMonitorIsShow.value = false;
  1035. backMonitorIsShow.value = false;
  1036. }
  1037. } else if (modalType.value == 'changeDirection') {
  1038. // 红柳林矿一键反风操作是倒机+反风,如主机运行,一件反风后,备机启动并风向与原来相反
  1039. // 先判断启动风机的风流方向
  1040. if (selectData['Fan1Reversal'] !== undefined) {
  1041. if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
  1042. //1号风机机正在运行
  1043. // 判断2号风机是否具备反风条件
  1044. if (selectData['Fan2OneFfCon'] == 1) {
  1045. // 2号风机下发反风指令
  1046. start('CtrlFan2Reverse').catch((err) => {
  1047. createMessage.error(err.message);
  1048. });
  1049. } else {
  1050. createMessage.error('2号风机不具备一键反风条件!');
  1051. }
  1052. } else if (selectData['Fan2StartStatus'] == 1 && selectData['Fan1StartStatus'] == 0) {
  1053. // 备机正在运行
  1054. if (selectData['Fan1OneFfCon'] == 1) {
  1055. // 备风机反转,主机即将正转启动
  1056. start('CtrlFan1Reverse')
  1057. .then(() => {
  1058. frontMonitorIsShow.value = true;
  1059. backMonitorIsShow.value = false;
  1060. })
  1061. .catch((err) => {
  1062. createMessage.error(err.message);
  1063. });
  1064. } else {
  1065. createMessage.error('1号风机不具备一键反风条件!');
  1066. }
  1067. }
  1068. } else {
  1069. if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
  1070. // 主机一键反风
  1071. if (isSimulation) {
  1072. const fan1Forward = selectData['Fan1FreqForwardRun'] == 1 ? 0 : 1;
  1073. const fan1Reverse = fan1Forward == 0 ? 1 : 0;
  1074. // 模拟
  1075. start('CtrlFan1Reverse', { Fan1FreqForwardRun: fan1Forward, Fan1FreqReverseRun: fan1Reverse }, true).catch((err) => {
  1076. createMessage.error(err.message);
  1077. });
  1078. } else {
  1079. // 实际
  1080. start('CtrlFan1Reverse').catch((err) => {
  1081. createMessage.error(err.message);
  1082. });
  1083. }
  1084. } else if (selectData['Fan2StartStatus'] == 1 && selectData['Fan1StartStatus'] == 0) {
  1085. if (isSimulation) {
  1086. const fan2Forward = selectData['Fan2FreqForwardRun'] == 1 ? 0 : 1;
  1087. const fan2Reverse = fan2Forward == 0 ? 1 : 0;
  1088. // 模拟
  1089. start('CtrlFan2Reverse', { Fan2FreqForwardRun: fan2Forward, Fan2FreqReverseRun: fan2Reverse }, true).catch((err) => {
  1090. createMessage.error(err.message);
  1091. });
  1092. } else {
  1093. // 实际
  1094. start('CtrlFan2Reverse').catch((err) => {
  1095. createMessage.error(err.message);
  1096. });
  1097. }
  1098. }
  1099. }
  1100. } else if (modalType.value == 'changeSmoke') {
  1101. //182模拟
  1102. // 红柳林实际在倒机时有倒机条件,只有倒机条件具备时才可以倒机
  1103. // 不听风倒机
  1104. if (selectData['Fan1OneDjCon'] === undefined && selectData['Fan2OneDjCon'] === undefined) {
  1105. if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
  1106. // 由主到备
  1107. // 正启动
  1108. if (selectData['Fan1FreqForwardRun'] && selectData['Fan1FreqForwardRun'] == 1) {
  1109. console.log('一键1倒2正启动控制 ');
  1110. start('CtrlFan1ToFan2Forward')
  1111. .then(() => {
  1112. frontMonitorIsShow.value = false;
  1113. backMonitorIsShow.value = true;
  1114. })
  1115. .catch((err) => {
  1116. createMessage.error(err.message);
  1117. });
  1118. }
  1119. // 反启动
  1120. if (selectData['Fan1FreqReverseRun'] && selectData['Fan1FreqReverseRun'] == 1) {
  1121. console.log('一键1倒2反启动控制');
  1122. start('CtrlFan1ToFan2Reverse')
  1123. .then(() => {
  1124. frontMonitorIsShow.value = false;
  1125. backMonitorIsShow.value = true;
  1126. })
  1127. .catch((err) => {
  1128. createMessage.error(err.message);
  1129. });
  1130. }
  1131. } else if (selectData['Fan2StartStatus'] == 1 && selectData['Fan1StartStatus'] == 0) {
  1132. // 由备到主
  1133. // 正启动
  1134. if (selectData['Fan2FreqForwardRun'] && selectData['Fan2FreqForwardRun'] == 1) {
  1135. console.log('一键2倒1正启动控制');
  1136. start('CtrlFan2ToFan1Forward')
  1137. .then(() => {
  1138. frontMonitorIsShow.value = true;
  1139. backMonitorIsShow.value = false;
  1140. })
  1141. .catch((err) => {
  1142. createMessage.error(err.message);
  1143. });
  1144. }
  1145. // 反启动
  1146. if (selectData['Fan2FreqReverseRun'] && selectData['Fan2FreqReverseRun'] == 1) {
  1147. console.log('一键2倒1反启动控制');
  1148. start('CtrlFan2ToFan1Reverse')
  1149. .then(() => {
  1150. frontMonitorIsShow.value = true;
  1151. backMonitorIsShow.value = false;
  1152. })
  1153. .catch((err) => {
  1154. createMessage.error(err.message);
  1155. });
  1156. }
  1157. }
  1158. } else {
  1159. // 红柳林倒机
  1160. if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
  1161. if (selectData['Fan1OneDjCon'] == 1) {
  1162. start('CtrlFan1ToFan2')
  1163. .then(() => {
  1164. if (globalConfig.History_Type == 'remote') {
  1165. createMessage.success('指令已下发至生产管控平台成功!');
  1166. } else {
  1167. createMessage.success('指令已下发成功!');
  1168. }
  1169. })
  1170. .catch((err) => {
  1171. createMessage.error(err.message);
  1172. });
  1173. } else {
  1174. createMessage.error('1号风机不具备倒机条件!');
  1175. }
  1176. } else if (selectData['Fan1StartStatus'] == 0 && selectData['Fan2StartStatus'] == 1) {
  1177. if (selectData['Fan2OneDjCon'] == 1) {
  1178. start('CtrlFan2ToFan1')
  1179. .then(() => {
  1180. if (globalConfig.History_Type == 'remote') {
  1181. createMessage.success('指令已下发至生产管控平台成功!');
  1182. } else {
  1183. createMessage.success('指令已下发成功!');
  1184. }
  1185. })
  1186. .catch((err) => {
  1187. createMessage.error(err.message);
  1188. });
  1189. } else {
  1190. createMessage.error('1号风机不具备倒机条件!');
  1191. }
  1192. }
  1193. }
  1194. } else if (modalType.value == 'changeSmoke1') {
  1195. // 矿上实际
  1196. if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
  1197. // 由主到备
  1198. // 正启动
  1199. if (selectData['Fan1FreqForwardRun'] && selectData['Fan1FreqForwardRun'] == 1) {
  1200. console.log('一键1倒2正启动控制 ');
  1201. start('CtrlFan1ToFan2')
  1202. .then(() => {
  1203. frontMonitorIsShow.value = false;
  1204. backMonitorIsShow.value = true;
  1205. })
  1206. .catch((err) => {
  1207. createMessage.error(err.message);
  1208. });
  1209. }
  1210. // 反启动
  1211. if (selectData['Fan1FreqReverseRun'] && selectData['Fan1FreqReverseRun'] == 1) {
  1212. console.log('一键1倒2反启动控制');
  1213. start('CtrlFan1ToFan2')
  1214. .then(() => {
  1215. frontMonitorIsShow.value = false;
  1216. backMonitorIsShow.value = true;
  1217. })
  1218. .catch((err) => {
  1219. createMessage.error(err.message);
  1220. });
  1221. }
  1222. } else if (selectData['Fan2StartStatus'] == 1 && selectData['Fan1StartStatus'] == 0) {
  1223. // 由备到主
  1224. // 正启动
  1225. if (selectData['Fan2FreqForwardRun'] && selectData['Fan2FreqForwardRun'] == 1) {
  1226. console.log('一键2倒1正启动控制');
  1227. start('CtrlFan2ToFan1')
  1228. .then(() => {
  1229. frontMonitorIsShow.value = true;
  1230. backMonitorIsShow.value = false;
  1231. })
  1232. .catch((err) => {
  1233. createMessage.error(err.message);
  1234. });
  1235. }
  1236. // 反启动
  1237. if (selectData['Fan2FreqReverseRun'] && selectData['Fan2FreqReverseRun'] == 1) {
  1238. console.log('一键2倒1反启动控制');
  1239. start('CtrlFan2ToFan1')
  1240. .then(() => {
  1241. frontMonitorIsShow.value = true;
  1242. backMonitorIsShow.value = false;
  1243. })
  1244. .catch((err) => {
  1245. createMessage.error(err.message);
  1246. });
  1247. }
  1248. }
  1249. } else if (modalType.value == 'frequency') {
  1250. if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
  1251. start('CtrlFan1FreqSet', frequencyVal.value).catch((err) => {
  1252. createMessage.error(err.message);
  1253. });
  1254. } else if (selectData['Fan2StartStatus'] == 1 && selectData['Fan1StartStatus'] == 0) {
  1255. start('CtrlFan2FreqSet', frequencyVal.value).catch((err) => {
  1256. createMessage.error(err.message);
  1257. });
  1258. }
  1259. } else if (modalType.value == 'fbm') {
  1260. // 门扇处于打开状态时,反风锁紧装置无法操作
  1261. if (selectData['ExplosionVentOpen'] == 1 && (flag === 'openLock' || flag === 'closeLock')) {
  1262. createMessage.warning('门扇处于打开状态时,反风锁紧装置无法操作');
  1263. return;
  1264. }
  1265. // 当反风装置关锁时,无法控制门体打开或关闭
  1266. if ((selectData['Lock1Close'] == 1 || selectData['Lock2Close'] == 1) && (flag === 'openGate' || flag === 'closeGate')) {
  1267. createMessage.warning('当反风装置关锁时,无法控制门体打开或关闭');
  1268. return;
  1269. }
  1270. // 开锁 // 关锁
  1271. if (flag === 'openLock') {
  1272. start('CtrlLockOpen').then(() => {
  1273. createMessage.success('开锁成功');
  1274. });
  1275. } else if (flag === 'closeLock') {
  1276. start('CtrlLockClose').then(() => {
  1277. createMessage.success('关锁成功');
  1278. });
  1279. }
  1280. // 开门 关门
  1281. if (flag === 'openGate') {
  1282. start('CtrlExplosionVentOpen').then(() => {
  1283. createMessage.success('开门成功');
  1284. });
  1285. } else if (flag === 'closeGate') {
  1286. start('CtrlExplosionVentClose').then(() => {
  1287. createMessage.success('关门成功');
  1288. });
  1289. }
  1290. } else if (modalType.value === 'startFan') {
  1291. let paramcode = '';
  1292. if (flag === 'Fan1Open') {
  1293. if (selectData['Fan1OneStartCon'] === undefined) {
  1294. paramcode = 'CtrlFan1Start';
  1295. } else {
  1296. // 风机有控制条件时
  1297. if (selectData['Fan1OneStartCon'] == 1) {
  1298. paramcode = 'CtrlFan1Start';
  1299. } else {
  1300. createMessage.error('1号风机不具备启动条件!');
  1301. return;
  1302. }
  1303. }
  1304. } else if (flag === 'Fan2Open') {
  1305. if (selectData['Fan2OneStartCon'] === undefined) {
  1306. paramcode = 'CtrlFan2Start';
  1307. } else {
  1308. // 风机有控制条件时
  1309. if (selectData['Fan2OneStartCon'] == 1) {
  1310. paramcode = 'CtrlFan2Start';
  1311. } else {
  1312. createMessage.error('2号风机不具备启动条件!');
  1313. return;
  1314. }
  1315. }
  1316. } else if (flag === 'Fan1Stop') {
  1317. if (selectData['Fan1OneShutdownCon'] === undefined) {
  1318. paramcode = 'CtrlFan1Stop';
  1319. } else {
  1320. // 风机有控制条件时
  1321. if (selectData['Fan1OneShutdownCon'] == 1) {
  1322. paramcode = 'CtrlFan1Stop';
  1323. } else {
  1324. createMessage.error('1号风机不具备停机条件!');
  1325. return;
  1326. }
  1327. }
  1328. } else if (flag === 'Fan2Stop') {
  1329. if (selectData['Fan2OneShutdownCon'] === undefined) {
  1330. paramcode = 'CtrlFan2Stop';
  1331. } else {
  1332. // 风机有控制条件时
  1333. if (selectData['Fan2OneShutdownCon'] == 1) {
  1334. paramcode = 'CtrlFan2Stop';
  1335. } else {
  1336. createMessage.error('2号风机不具备停机条件!');
  1337. return;
  1338. }
  1339. }
  1340. } else if (flag === 'Fan1Reset') {
  1341. paramcode = 'CtrlFan1Reset';
  1342. } else if (flag === 'Fan2Reset') {
  1343. paramcode = 'CtrlFan2Reset';
  1344. }
  1345. start(paramcode)
  1346. .then(() => {
  1347. if (globalConfig.History_Type == 'remote') {
  1348. createMessage.success('指令已下发至生产管控平台成功!');
  1349. } else {
  1350. createMessage.success('指令已下发成功!');
  1351. }
  1352. })
  1353. .catch((err) => {
  1354. createMessage.error(err.message);
  1355. });
  1356. } else if (modalType.value == 'resetFan') {
  1357. // 一键复位
  1358. start('CtrlFanReset').catch((err) => {
  1359. createMessage.error(err.message);
  1360. });
  1361. } else if (modalType.value == 'remote') {
  1362. // 远程就地控制
  1363. start('autoRoManualControl', modeValue)
  1364. .then(() => {
  1365. createMessage.success('指令下发成功');
  1366. })
  1367. .catch((err) => {
  1368. createMessage.error(err.message);
  1369. });
  1370. }
  1371. };
  1372. };
  1373. // 取消
  1374. const handleCancel = () => {
  1375. if (modalType.value == 'startSmoke') {
  1376. const data = dataSource.value[selectRowIndex.value];
  1377. mainWindIsShow1.value = 'stop';
  1378. mainWindIsShow2.value = 'stop';
  1379. if (data['fanStart1'] == 1) {
  1380. mainWindIsShow1.value = 'open';
  1381. } else if (data['fanStart2'] == 1) {
  1382. mainWindIsShow2.value = 'open';
  1383. }
  1384. }
  1385. modalIsShow.value = false;
  1386. };
  1387. function deviceEdit(e: Event, type: string, record) {
  1388. e.stopPropagation();
  1389. openModalDeviceEdit(true, {
  1390. type,
  1391. deviceId: record['deviceID'],
  1392. });
  1393. }
  1394. // 保德特有
  1395. function goOutLink(type: string) {
  1396. if (type === '1') {
  1397. // 视频
  1398. if (deviceType.value == 'fanmain_zl') {
  1399. window.open('http://10.248.204.121', '_blank');
  1400. } else if (deviceType.value == 'fanmain_ljy') {
  1401. window.open('http://10.248.204.234', '_blank');
  1402. }
  1403. } else {
  1404. window.open('http://10.248.210.154/', '_blank');
  1405. }
  1406. }
  1407. onBeforeMount(() => {
  1408. // document.body.addEventListener('mousedown', addPlayVideo, true);
  1409. getDeviceBaseList();
  1410. });
  1411. onMounted(async () => {
  1412. const { query } = unref(currentRoute);
  1413. if (query['deviceType']) deviceType.value = query['deviceType'] as string;
  1414. loading.value = true;
  1415. modelList.value = await getDictItems('mainFanModel');
  1416. mountedThree(player1.value).then(async () => {
  1417. // await setModelType('mainWindRect');
  1418. getMonitor(true);
  1419. addText();
  1420. // addText();
  1421. // play('initiatePlay', 'front', frequencyVal.value, 'open', 'tubPositivePath');
  1422. });
  1423. });
  1424. onUnmounted(() => {
  1425. destroy();
  1426. removeCamera();
  1427. if (timer) {
  1428. clearTimeout(timer);
  1429. timer = undefined;
  1430. }
  1431. });
  1432. </script>
  1433. <style scoped lang="less">
  1434. @import '/@/design/vent/modal.less';
  1435. :deep(.@{ventSpace}-tabs-tabpane-active) {
  1436. height: 100%;
  1437. }
  1438. .head-line {
  1439. display: flex;
  1440. flex-direction: row;
  1441. justify-content: space-between;
  1442. .button-box {
  1443. position: relative;
  1444. padding: 5px;
  1445. border: 1px transparent solid;
  1446. border-radius: 5px;
  1447. // margin-left: 8px;
  1448. // margin-right: 8px;
  1449. width: auto;
  1450. height: 34px;
  1451. border: 1px solid #65dbea;
  1452. display: flex;
  1453. align-items: center;
  1454. justify-content: center;
  1455. color: #fff;
  1456. padding: 0 10px;
  1457. cursor: pointer;
  1458. &:hover {
  1459. background: linear-gradient(#3eb2ff55, #00c3ff55);
  1460. }
  1461. &::before {
  1462. width: calc(100% - 6px);
  1463. height: 26px;
  1464. content: '';
  1465. position: absolute;
  1466. top: 3px;
  1467. right: 0;
  1468. left: 3px;
  1469. bottom: 0;
  1470. z-index: -1;
  1471. border-radius: inherit;
  1472. /*important*/
  1473. background: linear-gradient(#014978, #3bf3fc);
  1474. }
  1475. }
  1476. }
  1477. .control-group,
  1478. .top-box {
  1479. display: flex !important;
  1480. align-items: center !important;
  1481. justify-content: space-around !important;
  1482. position: absolute !important;
  1483. width: 1015px !important;
  1484. height: 75px !important;
  1485. left: 50% !important;
  1486. top: 85px !important;
  1487. transform: translateX(-50%) !important;
  1488. background: url('/@/assets/images/vent/tab-group-bg.png') no-repeat !important;
  1489. background-size: 100% 75px !important;
  1490. padding: 0 30px !important;
  1491. .button-box {
  1492. height: 35px !important;
  1493. min-width: 100px;
  1494. padding-top: 3px !important;
  1495. border: 1px transparent solid;
  1496. border: 1px solid #65dbea;
  1497. &:hover {
  1498. background: linear-gradient(#2cd1ff55, #1eb0ff55) !important;
  1499. }
  1500. &::before {
  1501. height: 27px !important;
  1502. background: linear-gradient(#1fa6cb, #127cb5) !important;
  1503. }
  1504. &::after {
  1505. top: 35px !important;
  1506. }
  1507. }
  1508. .button-box-disable {
  1509. border: 1px solid #65dbea !important;
  1510. &:hover {
  1511. background: none !important;
  1512. }
  1513. &:before {
  1514. background: linear-gradient(#5897c299, #4a92a899) !important;
  1515. }
  1516. }
  1517. }
  1518. .top-right {
  1519. position: absolute;
  1520. display: flex;
  1521. right: 0px;
  1522. top: 55px;
  1523. align-items: center;
  1524. color: #fff;
  1525. z-index: 1;
  1526. }
  1527. .data-show-box {
  1528. position: relative;
  1529. display: flex;
  1530. flex-direction: row;
  1531. justify-content: space-between;
  1532. padding: 10px;
  1533. color: #ffffff;
  1534. z-index: 999;
  1535. top: 70px;
  1536. .data-item {
  1537. pointer-events: auto;
  1538. .item-header {
  1539. width: 374px;
  1540. background: url('/@/assets/images/vent/lr-top-bg.png') no-repeat;
  1541. background-size: cover;
  1542. height: 32px;
  1543. text-align: center;
  1544. line-height: 34px;
  1545. font-size: 15px;
  1546. font-weight: 600;
  1547. color: #fafafa;
  1548. }
  1549. .item-container {
  1550. width: 346px;
  1551. margin: 0 14px;
  1552. padding: 10px;
  1553. background: #004aac33;
  1554. backdrop-filter: blur(2px);
  1555. .tab {
  1556. width: 323px;
  1557. background: url('/@/assets/images/vent/lr-tab-bg.png') no-repeat;
  1558. background-size: cover;
  1559. display: flex;
  1560. .tab-item {
  1561. flex: 1;
  1562. text-align: center;
  1563. padding-top: 2px;
  1564. color: #ffffff99;
  1565. cursor: pointer;
  1566. height: calc(100% - 10px);
  1567. overflow-y: auto;
  1568. &:hover {
  1569. color: #ffffff;
  1570. }
  1571. }
  1572. .tab-item-active-l {
  1573. color: #aff3ff;
  1574. background-image: url('/@/assets/images/vent/l-tab-active.png');
  1575. background-repeat: no-repeat;
  1576. background-size: auto;
  1577. background-position: 6px 3px;
  1578. }
  1579. .tab-item-active-r {
  1580. color: #aff3ff;
  1581. background-image: url('/@/assets/images/vent/r-tab-active.png');
  1582. background-repeat: no-repeat;
  1583. background-position: 0 3px;
  1584. }
  1585. }
  1586. .container-group {
  1587. width: 314px;
  1588. margin: 0px 4px;
  1589. padding: 10px 0;
  1590. min-height: 472px;
  1591. background: linear-gradient(to right, #007bff22, #2081ff05);
  1592. max-height: 480px;
  1593. overflow-y: auto;
  1594. }
  1595. .container-group-l {
  1596. .container-item {
  1597. width: 100%;
  1598. height: 63px;
  1599. display: flex;
  1600. padding: 10px 0 0 20px;
  1601. margin-bottom: 5px;
  1602. position: relative;
  1603. background: url('/@/assets/images/vent/plane-bottom.png') no-repeat;
  1604. background-size: auto;
  1605. background-position: bottom;
  1606. &::before {
  1607. content: '';
  1608. display: block;
  1609. width: 100%;
  1610. height: 5px;
  1611. position: absolute;
  1612. top: 62px;
  1613. left: 0;
  1614. background-color: #73f4ff66;
  1615. backdrop-filter: blur(5px);
  1616. }
  1617. .item-icon {
  1618. width: 54px;
  1619. height: 45px;
  1620. background: url('/@/assets/images/vent/plane-icon-bg.png') no-repeat;
  1621. background-size: cover;
  1622. .icon-style {
  1623. margin: 10px 0 0 18px;
  1624. }
  1625. }
  1626. .item-name {
  1627. width: 180px;
  1628. line-height: 60px;
  1629. }
  1630. .item-value {
  1631. position: relative;
  1632. height: 26px;
  1633. line-height: 24px;
  1634. margin: 15px 0;
  1635. text-align: center;
  1636. width: 80px;
  1637. border: 1px solid #00f5fe;
  1638. border-radius: 13px;
  1639. background: linear-gradient(to right, #00f5fe44, #0090ff44);
  1640. &::before {
  1641. width: 6px;
  1642. height: 6px;
  1643. content: '';
  1644. position: absolute;
  1645. left: -3px;
  1646. top: 8px;
  1647. background: #ffa500;
  1648. border-radius: 3px;
  1649. }
  1650. }
  1651. }
  1652. }
  1653. .warning-header {
  1654. display: flex;
  1655. font-size: 14px;
  1656. .header-item {
  1657. flex: 1;
  1658. display: flex;
  1659. flex-direction: column;
  1660. margin: 2px 10px;
  1661. justify-content: space-between;
  1662. align-items: center;
  1663. .header-title {
  1664. color: #39e7fe;
  1665. }
  1666. .header-value {
  1667. // width: 26px;
  1668. position: relative;
  1669. height: 56px;
  1670. padding-left: 5px;
  1671. font-weight: 600;
  1672. font-family: 'douyuFont';
  1673. font-size: 16px;
  1674. color: #ffa500;
  1675. display: flex;
  1676. justify-content: center;
  1677. align-items: center;
  1678. // &::before {
  1679. // content: '';
  1680. // position: absolute;
  1681. // width: 26px;
  1682. // height: 56px;
  1683. // background: url('/@/assets/images/vent/count-header-bg.png') no-repeat;
  1684. // }
  1685. }
  1686. }
  1687. }
  1688. .fault-container-group {
  1689. overflow: hidden;
  1690. .fault-warning {
  1691. color: #ff7b00;
  1692. font-weight: 600px;
  1693. font-size: 16px;
  1694. }
  1695. .fault-error {
  1696. color: #ff3410;
  1697. font-weight: 600px;
  1698. font-size: 16px;
  1699. }
  1700. }
  1701. .warning-group {
  1702. padding: 0 10px;
  1703. position: relative;
  1704. &::before {
  1705. content: '';
  1706. display: block;
  1707. width: 1px;
  1708. height: 100%;
  1709. position: absolute;
  1710. left: 12px;
  1711. background-color: #00f5fe;
  1712. }
  1713. .warning-item {
  1714. display: flex;
  1715. flex-direction: row;
  1716. justify-content: space-between;
  1717. align-items: center;
  1718. height: 38px;
  1719. .item-name {
  1720. .icon {
  1721. width: 6px;
  1722. height: 6px;
  1723. display: inline-block;
  1724. background-color: #1cd5ff;
  1725. border-radius: 3px;
  1726. position: relative;
  1727. margin-right: 5px;
  1728. &::before {
  1729. content: '';
  1730. width: 10px;
  1731. height: 10px;
  1732. display: block;
  1733. border: 1px solid #34edff99;
  1734. border-radius: 5px;
  1735. position: absolute;
  1736. top: -2px;
  1737. left: -2px;
  1738. }
  1739. }
  1740. }
  1741. }
  1742. }
  1743. .electric-box {
  1744. display: flex;
  1745. .item {
  1746. text-align: center;
  1747. color: #aff3ffee;
  1748. }
  1749. }
  1750. .fault-group {
  1751. height: 425px;
  1752. margin-top: 5px;
  1753. overflow-y: auto;
  1754. .fault-item {
  1755. display: flex;
  1756. padding: 3px 0px;
  1757. border-bottom: 1px solid #ffffff22;
  1758. .item {
  1759. padding: 0 2px;
  1760. text-align: center;
  1761. }
  1762. &:nth-child(odd) {
  1763. background-color: #c3fdff05;
  1764. }
  1765. }
  1766. }
  1767. }
  1768. }
  1769. }
  1770. .fault-box {
  1771. .item-header {
  1772. width: 394px !important;
  1773. }
  1774. .item-container {
  1775. width: 366px !important;
  1776. .tab {
  1777. width: 343px !important;
  1778. }
  1779. }
  1780. .container-group {
  1781. width: 334px !important;
  1782. }
  1783. }
  1784. .scene-box .bottom-tabs-box {
  1785. height: 280px;
  1786. .tabs-box {
  1787. position: relative !important;
  1788. }
  1789. .bd-control {
  1790. position: absolute;
  1791. z-index: 9999;
  1792. display: flex;
  1793. right: 0px;
  1794. top: 10px;
  1795. }
  1796. }
  1797. // 保德在线监测和故障诊断切换组件
  1798. .monitor-tab {
  1799. display: flex;
  1800. position: absolute;
  1801. top: 600px;
  1802. left: 395px;
  1803. align-items: center;
  1804. .item {
  1805. font-size: 15px;
  1806. color: #fff;
  1807. padding: 0 5px;
  1808. cursor: pointer;
  1809. }
  1810. .item-active {
  1811. transform: skew(-15deg, 0);
  1812. color: #00f5fe;
  1813. border-bottom: 1px solid #00f5fe;
  1814. }
  1815. }
  1816. .video-icon {
  1817. width: 30px;
  1818. height: 38px;
  1819. position: absolute;
  1820. top: 600px;
  1821. right: 395px;
  1822. color: #fff;
  1823. z-index: 1;
  1824. font-size: 28px;
  1825. }
  1826. .no-play {
  1827. &::after {
  1828. position: absolute;
  1829. width: 80%;
  1830. height: 100%;
  1831. content: '';
  1832. left: 12%;
  1833. top: -5px;
  1834. background: linear-gradient(
  1835. to bottom left,
  1836. transparent 0%,
  1837. transparent calc(50% - 2px),
  1838. #ffffff 50%,
  1839. transparent calc(50% + 2px),
  1840. transparent 100%
  1841. );
  1842. }
  1843. }
  1844. .threejs-Object-CSS {
  1845. .elementTag {
  1846. .elementContent {
  1847. backdrop-filter: blur(2px);
  1848. width: 220px;
  1849. background-color: rgba(0, 0, 0, 0.6);
  1850. box-shadow: 0px 0px 40px rgb(0 90 131 / 55%) inset;
  1851. border: 2px solid rgb(153 176 195 / 55%);
  1852. padding: 15px 20px 15px 20px;
  1853. font-size: 15px;
  1854. .element-item {
  1855. line-height: 38px;
  1856. display: flex;
  1857. justify-content: space-between;
  1858. }
  1859. span {
  1860. color: #f2a500;
  1861. // color: #74e9fe;
  1862. }
  1863. .data-title {
  1864. display: inline-block;
  1865. color: #fff;
  1866. }
  1867. }
  1868. .elementContent-r {
  1869. &::before {
  1870. right: 120px;
  1871. }
  1872. &::after {
  1873. right: 270px;
  1874. border: 4px solid rgb(0, 221, 255); //rgb(0 220 255 / 75%)
  1875. background: #a7a7a766;
  1876. }
  1877. }
  1878. .fbm-box {
  1879. width: auto;
  1880. display: flex;
  1881. justify-content: space-between;
  1882. .fbm-video {
  1883. width: 240px;
  1884. margin-right: 20px;
  1885. }
  1886. .fbm-data {
  1887. width: 200px;
  1888. }
  1889. }
  1890. }
  1891. }
  1892. .btn {
  1893. padding: 4px 12px;
  1894. position: relative;
  1895. border-radius: 2px;
  1896. color: #fff;
  1897. cursor: pointer;
  1898. &::before {
  1899. position: absolute;
  1900. display: block;
  1901. content: '';
  1902. width: calc(100% - 4px);
  1903. height: calc(100% - 4px);
  1904. top: 2px;
  1905. left: 2px;
  1906. border-radius: 2px;
  1907. z-index: -1;
  1908. }
  1909. }
  1910. .btn1 {
  1911. border: 1px solid #5cfaff;
  1912. &::before {
  1913. background-image: linear-gradient(#2effee92, #0cb1d592);
  1914. }
  1915. &:hover {
  1916. border: 1px solid #5cfaffaa;
  1917. &::before {
  1918. background-image: linear-gradient(#2effee72, #0cb1d572);
  1919. }
  1920. }
  1921. }
  1922. .btn2 {
  1923. border: 1px solid #19c3e9;
  1924. margin-left: 10px;
  1925. &::before {
  1926. background-image: linear-gradient(#2584b0, #1f75a3);
  1927. }
  1928. &:hover {
  1929. &::before {
  1930. background-image: linear-gradient(#2584b0cc, #1f75a3cc);
  1931. }
  1932. }
  1933. }
  1934. :deep(.button-box) {
  1935. position: relative;
  1936. padding: 5px;
  1937. // border: 1px transparent solid;
  1938. border-radius: 5px;
  1939. margin-left: 8px;
  1940. margin-right: 8px;
  1941. width: auto;
  1942. // height: 40px;
  1943. // border: 1px solid #65dbea;
  1944. height: 35px !important;
  1945. display: flex;
  1946. align-items: center;
  1947. justify-content: center;
  1948. color: #fff;
  1949. padding: 0 15px 5px 15px;
  1950. cursor: pointer;
  1951. &:hover {
  1952. background: linear-gradient(#2cd1ff55, #1eb0ff55);
  1953. }
  1954. &::before {
  1955. width: calc(100% - 6px);
  1956. height: 27px;
  1957. content: '';
  1958. position: absolute;
  1959. top: 3px;
  1960. right: 0;
  1961. left: 3px;
  1962. bottom: 0;
  1963. z-index: -1;
  1964. border-radius: inherit;
  1965. /*important*/
  1966. background: linear-gradient(#1fa6cb, #127cb5);
  1967. }
  1968. &::after {
  1969. width: calc(100% + 32px);
  1970. height: 10px;
  1971. content: '';
  1972. position: absolute;
  1973. top: 28px;
  1974. right: 0;
  1975. left: -16px;
  1976. bottom: 0;
  1977. z-index: -1;
  1978. border-radius: inherit;
  1979. /*important*/
  1980. background-position: center;
  1981. background-size: 100%;
  1982. z-index: 999;
  1983. }
  1984. }
  1985. :deep(.zxm-radio-disabled + span) {
  1986. color: #fff !important;
  1987. }
  1988. :deep(.zxm-radio-disabled .zxm-radio-inner::after) {
  1989. background-color: #127cb5 !important;
  1990. }
  1991. ::v-deep(#LivePlayerBox) {
  1992. display: flex;
  1993. flex-direction: row;
  1994. justify-content: flex-end;
  1995. padding-right: 380px;
  1996. pointer-events: none;
  1997. .video-parent {
  1998. height: 208px;
  1999. pointer-events: auto !important;
  2000. }
  2001. }
  2002. ::v-deep(.@{ventSpace}-table-wrapper) {
  2003. height: 100% !important;
  2004. }
  2005. ::v-deep(.@{ventSpace}-spin-container) {
  2006. height: 100% !important;
  2007. overflow-y: auto;
  2008. }
  2009. .label {
  2010. max-width: 220px;
  2011. }
  2012. .@{ventSpace}-input {
  2013. width: 150px;
  2014. }
  2015. </style>