index.vue 78 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133
  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. modalIsShow.value = false;
  1372. };
  1373. };
  1374. // 取消
  1375. const handleCancel = () => {
  1376. if (modalType.value == 'startSmoke') {
  1377. const data = dataSource.value[selectRowIndex.value];
  1378. mainWindIsShow1.value = 'stop';
  1379. mainWindIsShow2.value = 'stop';
  1380. if (data['fanStart1'] == 1) {
  1381. mainWindIsShow1.value = 'open';
  1382. } else if (data['fanStart2'] == 1) {
  1383. mainWindIsShow2.value = 'open';
  1384. }
  1385. }
  1386. modalIsShow.value = false;
  1387. };
  1388. function deviceEdit(e: Event, type: string, record) {
  1389. e.stopPropagation();
  1390. openModalDeviceEdit(true, {
  1391. type,
  1392. deviceId: record['deviceID'],
  1393. });
  1394. }
  1395. // 保德特有
  1396. function goOutLink(type: string) {
  1397. if (type === '1') {
  1398. // 视频
  1399. if (deviceType.value == 'fanmain_zl') {
  1400. window.open('http://10.248.204.121', '_blank');
  1401. } else if (deviceType.value == 'fanmain_ljy') {
  1402. window.open('http://10.248.204.234', '_blank');
  1403. }
  1404. } else {
  1405. window.open('http://10.248.210.154/', '_blank');
  1406. }
  1407. }
  1408. onBeforeMount(() => {
  1409. // document.body.addEventListener('mousedown', addPlayVideo, true);
  1410. getDeviceBaseList();
  1411. });
  1412. onMounted(async () => {
  1413. const { query } = unref(currentRoute);
  1414. if (query['deviceType']) deviceType.value = query['deviceType'] as string;
  1415. loading.value = true;
  1416. modelList.value = await getDictItems('mainFanModel');
  1417. mountedThree(player1.value).then(async () => {
  1418. // await setModelType('mainWindRect');
  1419. getMonitor(true);
  1420. addText();
  1421. // addText();
  1422. // play('initiatePlay', 'front', frequencyVal.value, 'open', 'tubPositivePath');
  1423. });
  1424. });
  1425. onUnmounted(() => {
  1426. removeCamera();
  1427. destroy();
  1428. if (timer) {
  1429. clearTimeout(timer);
  1430. timer = undefined;
  1431. }
  1432. });
  1433. </script>
  1434. <style scoped lang="less">
  1435. @import '/@/design/vent/modal.less';
  1436. :deep(.@{ventSpace}-tabs-tabpane-active) {
  1437. height: 100%;
  1438. }
  1439. .head-line {
  1440. display: flex;
  1441. flex-direction: row;
  1442. justify-content: space-between;
  1443. .button-box {
  1444. position: relative;
  1445. padding: 5px;
  1446. border: 1px transparent solid;
  1447. border-radius: 5px;
  1448. // margin-left: 8px;
  1449. // margin-right: 8px;
  1450. width: auto;
  1451. height: 34px;
  1452. border: 1px solid #65dbea;
  1453. display: flex;
  1454. align-items: center;
  1455. justify-content: center;
  1456. color: #fff;
  1457. padding: 0 10px;
  1458. cursor: pointer;
  1459. &:hover {
  1460. background: linear-gradient(#3eb2ff55, #00c3ff55);
  1461. }
  1462. &::before {
  1463. width: calc(100% - 6px);
  1464. height: 26px;
  1465. content: '';
  1466. position: absolute;
  1467. top: 3px;
  1468. right: 0;
  1469. left: 3px;
  1470. bottom: 0;
  1471. z-index: -1;
  1472. border-radius: inherit;
  1473. /*important*/
  1474. background: linear-gradient(#014978, #3bf3fc);
  1475. }
  1476. }
  1477. }
  1478. .control-group,
  1479. .top-box {
  1480. display: flex !important;
  1481. align-items: center !important;
  1482. justify-content: space-around !important;
  1483. position: absolute !important;
  1484. width: 1015px !important;
  1485. height: 75px !important;
  1486. left: 50% !important;
  1487. top: 85px !important;
  1488. transform: translateX(-50%) !important;
  1489. background: url('/@/assets/images/vent/tab-group-bg.png') no-repeat !important;
  1490. background-size: 100% 75px !important;
  1491. padding: 0 30px !important;
  1492. .button-box {
  1493. height: 35px !important;
  1494. min-width: 100px;
  1495. padding-top: 3px !important;
  1496. border: 1px transparent solid;
  1497. border: 1px solid #65dbea;
  1498. &:hover {
  1499. background: linear-gradient(#2cd1ff55, #1eb0ff55) !important;
  1500. }
  1501. &::before {
  1502. height: 27px !important;
  1503. background: linear-gradient(#1fa6cb, #127cb5) !important;
  1504. }
  1505. &::after {
  1506. top: 35px !important;
  1507. }
  1508. }
  1509. .button-box-disable {
  1510. border: 1px solid #65dbea !important;
  1511. &:hover {
  1512. background: none !important;
  1513. }
  1514. &:before {
  1515. background: linear-gradient(#5897c299, #4a92a899) !important;
  1516. }
  1517. }
  1518. }
  1519. .top-right {
  1520. position: absolute;
  1521. display: flex;
  1522. right: 0px;
  1523. top: 55px;
  1524. align-items: center;
  1525. color: #fff;
  1526. z-index: 1;
  1527. }
  1528. .data-show-box {
  1529. position: relative;
  1530. display: flex;
  1531. flex-direction: row;
  1532. justify-content: space-between;
  1533. padding: 10px;
  1534. color: #ffffff;
  1535. z-index: 999;
  1536. top: 70px;
  1537. .data-item {
  1538. pointer-events: auto;
  1539. .item-header {
  1540. width: 374px;
  1541. background: url('/@/assets/images/vent/lr-top-bg.png') no-repeat;
  1542. background-size: cover;
  1543. height: 32px;
  1544. text-align: center;
  1545. line-height: 34px;
  1546. font-size: 15px;
  1547. font-weight: 600;
  1548. color: #fafafa;
  1549. }
  1550. .item-container {
  1551. width: 346px;
  1552. margin: 0 14px;
  1553. padding: 10px;
  1554. background: #004aac33;
  1555. backdrop-filter: blur(2px);
  1556. .tab {
  1557. width: 323px;
  1558. background: url('/@/assets/images/vent/lr-tab-bg.png') no-repeat;
  1559. background-size: cover;
  1560. display: flex;
  1561. .tab-item {
  1562. flex: 1;
  1563. text-align: center;
  1564. padding-top: 2px;
  1565. color: #ffffff99;
  1566. cursor: pointer;
  1567. height: calc(100% - 10px);
  1568. overflow-y: auto;
  1569. &:hover {
  1570. color: #ffffff;
  1571. }
  1572. }
  1573. .tab-item-active-l {
  1574. color: #aff3ff;
  1575. background-image: url('/@/assets/images/vent/l-tab-active.png');
  1576. background-repeat: no-repeat;
  1577. background-size: auto;
  1578. background-position: 6px 3px;
  1579. }
  1580. .tab-item-active-r {
  1581. color: #aff3ff;
  1582. background-image: url('/@/assets/images/vent/r-tab-active.png');
  1583. background-repeat: no-repeat;
  1584. background-position: 0 3px;
  1585. }
  1586. }
  1587. .container-group {
  1588. width: 314px;
  1589. margin: 0px 4px;
  1590. padding: 10px 0;
  1591. min-height: 472px;
  1592. background: linear-gradient(to right, #007bff22, #2081ff05);
  1593. max-height: 480px;
  1594. overflow-y: auto;
  1595. }
  1596. .container-group-l {
  1597. .container-item {
  1598. width: 100%;
  1599. height: 63px;
  1600. display: flex;
  1601. padding: 10px 0 0 20px;
  1602. margin-bottom: 5px;
  1603. position: relative;
  1604. background: url('/@/assets/images/vent/plane-bottom.png') no-repeat;
  1605. background-size: auto;
  1606. background-position: bottom;
  1607. &::before {
  1608. content: '';
  1609. display: block;
  1610. width: 100%;
  1611. height: 5px;
  1612. position: absolute;
  1613. top: 62px;
  1614. left: 0;
  1615. background-color: #73f4ff66;
  1616. backdrop-filter: blur(5px);
  1617. }
  1618. .item-icon {
  1619. width: 54px;
  1620. height: 45px;
  1621. background: url('/@/assets/images/vent/plane-icon-bg.png') no-repeat;
  1622. background-size: cover;
  1623. .icon-style {
  1624. margin: 10px 0 0 18px;
  1625. }
  1626. }
  1627. .item-name {
  1628. width: 180px;
  1629. line-height: 60px;
  1630. }
  1631. .item-value {
  1632. position: relative;
  1633. height: 26px;
  1634. line-height: 24px;
  1635. margin: 15px 0;
  1636. text-align: center;
  1637. width: 80px;
  1638. border: 1px solid #00f5fe;
  1639. border-radius: 13px;
  1640. background: linear-gradient(to right, #00f5fe44, #0090ff44);
  1641. &::before {
  1642. width: 6px;
  1643. height: 6px;
  1644. content: '';
  1645. position: absolute;
  1646. left: -3px;
  1647. top: 8px;
  1648. background: #ffa500;
  1649. border-radius: 3px;
  1650. }
  1651. }
  1652. }
  1653. }
  1654. .warning-header {
  1655. display: flex;
  1656. font-size: 14px;
  1657. .header-item {
  1658. flex: 1;
  1659. display: flex;
  1660. flex-direction: column;
  1661. margin: 2px 10px;
  1662. justify-content: space-between;
  1663. align-items: center;
  1664. .header-title {
  1665. color: #39e7fe;
  1666. }
  1667. .header-value {
  1668. // width: 26px;
  1669. position: relative;
  1670. height: 56px;
  1671. padding-left: 5px;
  1672. font-weight: 600;
  1673. font-family: 'douyuFont';
  1674. font-size: 16px;
  1675. color: #ffa500;
  1676. display: flex;
  1677. justify-content: center;
  1678. align-items: center;
  1679. // &::before {
  1680. // content: '';
  1681. // position: absolute;
  1682. // width: 26px;
  1683. // height: 56px;
  1684. // background: url('/@/assets/images/vent/count-header-bg.png') no-repeat;
  1685. // }
  1686. }
  1687. }
  1688. }
  1689. .fault-container-group {
  1690. overflow: hidden;
  1691. .fault-warning {
  1692. color: #ff7b00;
  1693. font-weight: 600px;
  1694. font-size: 16px;
  1695. }
  1696. .fault-error {
  1697. color: #ff3410;
  1698. font-weight: 600px;
  1699. font-size: 16px;
  1700. }
  1701. }
  1702. .warning-group {
  1703. padding: 0 10px;
  1704. position: relative;
  1705. &::before {
  1706. content: '';
  1707. display: block;
  1708. width: 1px;
  1709. height: 100%;
  1710. position: absolute;
  1711. left: 12px;
  1712. background-color: #00f5fe;
  1713. }
  1714. .warning-item {
  1715. display: flex;
  1716. flex-direction: row;
  1717. justify-content: space-between;
  1718. align-items: center;
  1719. height: 38px;
  1720. .item-name {
  1721. .icon {
  1722. width: 6px;
  1723. height: 6px;
  1724. display: inline-block;
  1725. background-color: #1cd5ff;
  1726. border-radius: 3px;
  1727. position: relative;
  1728. margin-right: 5px;
  1729. &::before {
  1730. content: '';
  1731. width: 10px;
  1732. height: 10px;
  1733. display: block;
  1734. border: 1px solid #34edff99;
  1735. border-radius: 5px;
  1736. position: absolute;
  1737. top: -2px;
  1738. left: -2px;
  1739. }
  1740. }
  1741. }
  1742. }
  1743. }
  1744. .electric-box {
  1745. display: flex;
  1746. .item {
  1747. text-align: center;
  1748. color: #aff3ffee;
  1749. }
  1750. }
  1751. .fault-group {
  1752. height: 425px;
  1753. margin-top: 5px;
  1754. overflow-y: auto;
  1755. .fault-item {
  1756. display: flex;
  1757. padding: 3px 0px;
  1758. border-bottom: 1px solid #ffffff22;
  1759. .item {
  1760. padding: 0 2px;
  1761. text-align: center;
  1762. }
  1763. &:nth-child(odd) {
  1764. background-color: #c3fdff05;
  1765. }
  1766. }
  1767. }
  1768. }
  1769. }
  1770. }
  1771. .fault-box {
  1772. .item-header {
  1773. width: 394px !important;
  1774. }
  1775. .item-container {
  1776. width: 366px !important;
  1777. .tab {
  1778. width: 343px !important;
  1779. }
  1780. }
  1781. .container-group {
  1782. width: 334px !important;
  1783. }
  1784. }
  1785. .scene-box .bottom-tabs-box {
  1786. height: 280px;
  1787. .tabs-box {
  1788. position: relative !important;
  1789. }
  1790. .bd-control {
  1791. position: absolute;
  1792. z-index: 9999;
  1793. display: flex;
  1794. right: 0px;
  1795. top: 10px;
  1796. }
  1797. }
  1798. // 保德在线监测和故障诊断切换组件
  1799. .monitor-tab {
  1800. display: flex;
  1801. position: absolute;
  1802. top: 600px;
  1803. left: 395px;
  1804. align-items: center;
  1805. .item {
  1806. font-size: 15px;
  1807. color: #fff;
  1808. padding: 0 5px;
  1809. cursor: pointer;
  1810. }
  1811. .item-active {
  1812. transform: skew(-15deg, 0);
  1813. color: #00f5fe;
  1814. border-bottom: 1px solid #00f5fe;
  1815. }
  1816. }
  1817. .video-icon {
  1818. width: 30px;
  1819. height: 38px;
  1820. position: absolute;
  1821. top: 600px;
  1822. right: 395px;
  1823. color: #fff;
  1824. z-index: 1;
  1825. font-size: 28px;
  1826. }
  1827. .no-play {
  1828. &::after {
  1829. position: absolute;
  1830. width: 80%;
  1831. height: 100%;
  1832. content: '';
  1833. left: 12%;
  1834. top: -5px;
  1835. background: linear-gradient(
  1836. to bottom left,
  1837. transparent 0%,
  1838. transparent calc(50% - 2px),
  1839. #ffffff 50%,
  1840. transparent calc(50% + 2px),
  1841. transparent 100%
  1842. );
  1843. }
  1844. }
  1845. .threejs-Object-CSS {
  1846. .elementTag {
  1847. .elementContent {
  1848. backdrop-filter: blur(2px);
  1849. width: 220px;
  1850. background-color: rgba(0, 0, 0, 0.6);
  1851. box-shadow: 0px 0px 40px rgb(0 90 131 / 55%) inset;
  1852. border: 2px solid rgb(153 176 195 / 55%);
  1853. padding: 15px 20px 15px 20px;
  1854. font-size: 15px;
  1855. .element-item {
  1856. line-height: 38px;
  1857. display: flex;
  1858. justify-content: space-between;
  1859. }
  1860. span {
  1861. color: #f2a500;
  1862. // color: #74e9fe;
  1863. }
  1864. .data-title {
  1865. display: inline-block;
  1866. color: #fff;
  1867. }
  1868. }
  1869. .elementContent-r {
  1870. &::before {
  1871. right: 120px;
  1872. }
  1873. &::after {
  1874. right: 270px;
  1875. border: 4px solid rgb(0, 221, 255); //rgb(0 220 255 / 75%)
  1876. background: #a7a7a766;
  1877. }
  1878. }
  1879. .fbm-box {
  1880. width: auto;
  1881. display: flex;
  1882. justify-content: space-between;
  1883. .fbm-video {
  1884. width: 240px;
  1885. margin-right: 20px;
  1886. }
  1887. .fbm-data {
  1888. width: 200px;
  1889. }
  1890. }
  1891. }
  1892. }
  1893. .btn {
  1894. padding: 4px 12px;
  1895. position: relative;
  1896. border-radius: 2px;
  1897. color: #fff;
  1898. cursor: pointer;
  1899. &::before {
  1900. position: absolute;
  1901. display: block;
  1902. content: '';
  1903. width: calc(100% - 4px);
  1904. height: calc(100% - 4px);
  1905. top: 2px;
  1906. left: 2px;
  1907. border-radius: 2px;
  1908. z-index: -1;
  1909. }
  1910. }
  1911. .btn1 {
  1912. border: 1px solid #5cfaff;
  1913. &::before {
  1914. background-image: linear-gradient(#2effee92, #0cb1d592);
  1915. }
  1916. &:hover {
  1917. border: 1px solid #5cfaffaa;
  1918. &::before {
  1919. background-image: linear-gradient(#2effee72, #0cb1d572);
  1920. }
  1921. }
  1922. }
  1923. .btn2 {
  1924. border: 1px solid #19c3e9;
  1925. margin-left: 10px;
  1926. &::before {
  1927. background-image: linear-gradient(#2584b0, #1f75a3);
  1928. }
  1929. &:hover {
  1930. &::before {
  1931. background-image: linear-gradient(#2584b0cc, #1f75a3cc);
  1932. }
  1933. }
  1934. }
  1935. :deep(.button-box) {
  1936. position: relative;
  1937. padding: 5px;
  1938. // border: 1px transparent solid;
  1939. border-radius: 5px;
  1940. margin-left: 8px;
  1941. margin-right: 8px;
  1942. width: auto;
  1943. // height: 40px;
  1944. // border: 1px solid #65dbea;
  1945. height: 35px !important;
  1946. display: flex;
  1947. align-items: center;
  1948. justify-content: center;
  1949. color: #fff;
  1950. padding: 0 15px 5px 15px;
  1951. cursor: pointer;
  1952. &:hover {
  1953. background: linear-gradient(#2cd1ff55, #1eb0ff55);
  1954. }
  1955. &::before {
  1956. width: calc(100% - 6px);
  1957. height: 27px;
  1958. content: '';
  1959. position: absolute;
  1960. top: 3px;
  1961. right: 0;
  1962. left: 3px;
  1963. bottom: 0;
  1964. z-index: -1;
  1965. border-radius: inherit;
  1966. /*important*/
  1967. background: linear-gradient(#1fa6cb, #127cb5);
  1968. }
  1969. &::after {
  1970. width: calc(100% + 32px);
  1971. height: 10px;
  1972. content: '';
  1973. position: absolute;
  1974. top: 28px;
  1975. right: 0;
  1976. left: -16px;
  1977. bottom: 0;
  1978. z-index: -1;
  1979. border-radius: inherit;
  1980. /*important*/
  1981. background-position: center;
  1982. background-size: 100%;
  1983. z-index: 999;
  1984. }
  1985. }
  1986. :deep(.zxm-radio-disabled + span) {
  1987. color: #fff !important;
  1988. }
  1989. :deep(.zxm-radio-disabled .zxm-radio-inner::after) {
  1990. background-color: #127cb5 !important;
  1991. }
  1992. ::v-deep(#LivePlayerBox) {
  1993. display: flex;
  1994. flex-direction: row;
  1995. justify-content: flex-end;
  1996. padding-right: 380px;
  1997. pointer-events: none;
  1998. .video-parent {
  1999. height: 208px;
  2000. pointer-events: auto !important;
  2001. }
  2002. }
  2003. ::v-deep(.@{ventSpace}-table-wrapper) {
  2004. height: 100% !important;
  2005. }
  2006. ::v-deep(.@{ventSpace}-spin-container) {
  2007. height: 100% !important;
  2008. overflow-y: auto;
  2009. }
  2010. .label {
  2011. max-width: 220px;
  2012. }
  2013. .@{ventSpace}-input {
  2014. width: 150px;
  2015. }
  2016. </style>