index.vue 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115
  1. <template>
  2. <div class="bg" style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden">
  3. <a-spin :spinning="loading" />
  4. <div id="deviceDetail" class="device-detail">
  5. <div id="deviceCard" class="device-card" style="z-index: -1; position: absolute">
  6. <div class="title">KJ-980-F矿用本安型监控分站</div>
  7. <div class="detail-box">
  8. <div class="left-box"></div>
  9. <div class="right-box">
  10. <div><span class="detail-title">规格型号:</span> <span>KJ-980-F</span></div>
  11. <div
  12. ><span class="detail-title">技术参数:</span>
  13. <span
  14. >380V,电机功率22kW,50Hz,B级绝缘,额定电流42.2A,效率90.5%,能效等级3,接法角型,2940r/min,轴承6311/CM 6211/CM,功率因数0.89</span
  15. >
  16. </div>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. <div id="damper3D" style="width: 100%; height: 100%; position: absolute; overflow: hidden"></div>
  22. </div>
  23. <div class="scene-box">
  24. <div class="top-box">
  25. <div class="top-center row">
  26. <div v-if="hasPermission('btn:control')" class="button-box" @click="playAnimation(1)">打开前门</div>
  27. <div v-if="hasPermission('btn:control')" class="button-box" @click="playAnimation(2)">关闭前门</div>
  28. <div v-if="hasPermission('btn:control') && selectData.ndoorcount == '3'" class="button-box" @click="playAnimation(8)">打开中间门</div>
  29. <div v-if="hasPermission('btn:control') && selectData.ndoorcount == '3'" class="button-box" @click="playAnimation(9)">关闭中间门</div>
  30. <div v-if="hasPermission('btn:control')" class="button-box" @click="playAnimation(3)">打开后门</div>
  31. <div v-if="hasPermission('btn:control')" class="button-box" @click="playAnimation(4)">关闭后门</div>
  32. <div v-if="hasPermission('btn:totalControl') || selectData['isShowGatesContrl']" class="button-box" @click="playAnimation(5)">同时打开</div>
  33. <div v-if="hasPermission('btn:totalControl') || selectData['isShowGatesContrl']" class="button-box" @click="playAnimation(6)">同时关闭</div>
  34. <template v-if="selectData['gateStyle'] && selectData['gateStyle'].includes('fm_fc')">
  35. <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(10)">A窗控制</div>
  36. <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(11)">B窗控制</div>
  37. </template>
  38. </div>
  39. <!-- 控制模式 -->
  40. <div class="top-right row" v-if="hasPermission('btn:remote')">
  41. <!-- -->
  42. <div class="vent-flex-m row" v-if="selectData.contrlMod == 'loopCtrl' && modelList.length > 0">
  43. <div class="control-title">控制模式:</div>
  44. <a-radio-group v-model:value="selectData.autoRoManual">
  45. <template v-for="(item, index) in modelList" :key="index">
  46. <a-radio :value="item.value" :disabled="true">{{ item.text }}</a-radio>
  47. </template>
  48. </a-radio-group>
  49. <div class="button-box" @click="playAnimation(7)">切换模式</div>
  50. </div>
  51. <!-- 控制指令是多个,每个状态需要下发单独的指令 -->
  52. <div class="vent-flex-m row" v-else-if="selectData.contrlMod == 'codeCtrl' && modelList.length > 0">
  53. <div class="control-title">控制模式:</div>
  54. <a-radio-group v-model:value="selectData.autoRoManual">
  55. <template v-for="(item, index) in modelList" :key="index">
  56. <a-radio :value="item.value" :disabled="true">{{ item.text }}</a-radio>
  57. </template>
  58. </a-radio-group>
  59. <div class="button-box" v-for="(item, index) in modelList" @click="playAnimation(7, item.value)" :key="index">{{ item.text }}</div>
  60. </div>
  61. <!-- 济南嘉鸿远程、就地、自动控制,自动切换,点位为true就是选中状态 -->
  62. <div class="vent-flex-m row" v-else-if="selectData.contrlMod == 'jnjhCtrl' && modelList.length > 0">
  63. <div class="control-title">控制模式:</div>
  64. <a-radio v-model:checked="selectData['autoRoManual']" :disabled="true">远程</a-radio>
  65. <a-radio v-model:checked="selectData['autoRoManual1']" :disabled="true">自动</a-radio>
  66. <a-radio v-model:checked="selectData['autoRoManual2']" :disabled="true">手动</a-radio>
  67. <div class="button-box" @click="playAnimation(7)">模式切换</div>
  68. </div>
  69. <div class="vent-flex-m row" v-else-if="modelList.length > 0">
  70. <div class="control-title">控制模式:</div>
  71. <a-radio-group v-model:value="selectData.autoRoManual">
  72. <template v-for="(item, index) in modelList" :key="index">
  73. <a-radio :value="item.value" :disabled="true">{{ item.text }}</a-radio>
  74. </template>
  75. </a-radio-group>
  76. <div class="button-box" v-for="(item, index) in modelList" @click="playAnimation(7, item.value)" :key="index">{{ item.text }}</div>
  77. </div>
  78. <!-- <div class="run-type row">
  79. <div class="control-title">运行状态:</div>
  80. <a-radio-group v-model:value="selectData.runRoRecondition">
  81. <a-radio :value="`0`">检修</a-radio>
  82. <a-radio :value="`1`">运行</a-radio>
  83. </a-radio-group>
  84. </div> -->
  85. </div>
  86. </div>
  87. <div class="title-text">
  88. {{ selectData.supplyAirAddr || selectData.strinstallpos || selectData.strname }}
  89. </div>
  90. <div class="bottom-tabs-box" @mousedown="setDivHeight($event, 350, scroll)">
  91. <dv-border-box8 :dur="5" :style="`padding: 5px; height: ${scroll.y + 120}px`">
  92. <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange">
  93. <a-tab-pane v-if="!hasPermission('show:noMonitor')" key="1" tab="实时监测">
  94. <MonitorTable
  95. v-if="activeKey === '1'"
  96. ref="MonitorDataTable"
  97. class="monitor-table"
  98. :columnsType="deviceType"
  99. :isShowActionColumn="true"
  100. :dataSource="dataSource"
  101. design-scope="gate-monitor"
  102. @selectRow="getSelectRow"
  103. :scroll="{ y: scroll.y - 40 }"
  104. title="风门监测"
  105. :isShowPagination="true"
  106. >
  107. <template #filterCell="{ column, record }">
  108. <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '0' && record.frontGateClose == '0'" color="red"
  109. >正在运行</a-tag
  110. >
  111. <a-tag v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '0' && record.frontGateClose == 1" color="default"
  112. >关闭</a-tag
  113. >
  114. <a-tag v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '1' && record.frontGateClose == '0'" color="#46C66F"
  115. >打开</a-tag
  116. >
  117. <a-tag v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '1' && record.frontGateClose == '1'" color="#FF0000"
  118. >点位异常</a-tag
  119. >
  120. <a-tag v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '0' && record.rearGateClose == '0'" color="red"
  121. >正在运行</a-tag
  122. >
  123. <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '0' && record.rearGateClose == '1'" color="default"
  124. >关闭</a-tag
  125. >
  126. <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '1' && record.rearGateClose == '0'" color="#46C66F"
  127. >打开</a-tag
  128. >
  129. <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '1' && record.rearGateClose == '1'" color="#FF0000"
  130. >点位异常</a-tag
  131. >
  132. <a-tag v-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == '0'" color="red"
  133. >正在运行</a-tag
  134. >
  135. <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == 1" color="default"
  136. >关闭</a-tag
  137. >
  138. <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '0'" color="#46C66F"
  139. >打开</a-tag
  140. >
  141. <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '1'" color="#FF0000"
  142. >点位异常</a-tag
  143. >
  144. <template v-if="column.dataIndex === 'ndoortype'">
  145. <span>{{ render.renderDictText(record.ndoortype, 'ndoortype') }}</span>
  146. </template>
  147. <template v-if="column.dataIndex === 'doorUse'">
  148. <span>{{ render.renderDictText(record.doorUse, 'doorUse') }}</span>
  149. </template>
  150. <template v-else-if="column.dataIndex === 'warnLevel'">
  151. <a-tag v-if="record.warnLevel == '101'" color="green">低风险</a-tag>
  152. <a-tag v-else-if="record.warnLevel == '102'" color="#FF5812">一般风险</a-tag>
  153. <a-tag v-else-if="record.warnLevel == '103'" color="#FF5812">较大风险</a-tag>
  154. <a-tag v-else-if="record.warnLevel == '104'" color="#FF5812">重大风险</a-tag>
  155. <a-tag v-else-if="record.warnLevel == '201'" color="#FF0000">报警</a-tag>
  156. <a-tag v-else-if="record.warnLevel == '10000'" color="#FF5812">数据超限</a-tag>
  157. <a-tag v-else-if="record.warnLevel == '1001'" color="default">网络中断</a-tag>
  158. <a-tag v-else color="green">正常</a-tag>
  159. </template>
  160. <a-tag v-else-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : 'red'">{{
  161. record.warnFlag == '0' ? '正常' : '报警'
  162. }}</a-tag>
  163. <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
  164. record.netStatus == '0' ? '断开' : '连接'
  165. }}</a-tag>
  166. </template>
  167. <template #action="{ record }">
  168. <a v-if="globalConfig?.showReport" class="table-action-link" @click="deviceEdit($event, 'reportInfo', record)">报表录入</a>
  169. <a class="table-action-link" @click="deviceEdit($event, 'deviceInfo', record)">设备编辑</a>
  170. </template>
  171. </MonitorTable>
  172. </a-tab-pane>
  173. <!-- <a-tab-pane key="2" tab="实时曲线图" force-render>
  174. <div class="tab-item" v-if="activeKey === '2'">
  175. <DeviceEcharts chartsColumnsType="gate_chart" xAxisPropType="strname" :dataSource="dataSource" height="100%"
  176. :chartsColumns="chartsColumns" :device-list-api="list" device-type="gate" />
  177. </div>
  178. </a-tab-pane> -->
  179. <a-tab-pane v-if="!hasPermission('show:noHistory')" key="3" tab="历史数据">
  180. <div class="tab-item" v-if="activeKey === '3'">
  181. <HistoryTable :columnsType="deviceType" :device-type="deviceType" designScope="gate-history" :scroll="scroll">
  182. <template #filterCell="{ column, record }">
  183. <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '0' && record.frontGateClose == '0'" color="red"
  184. >正在运行</a-tag
  185. >
  186. <a-tag v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '0' && record.frontGateClose == 1" color="default"
  187. >关闭</a-tag
  188. >
  189. <a-tag
  190. v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '1' && record.frontGateClose == '0'"
  191. color="#46C66F"
  192. >打开</a-tag
  193. >
  194. <a-tag
  195. v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '1' && record.frontGateClose == '1'"
  196. color="#FF0000"
  197. >点位异常</a-tag
  198. >
  199. <a-tag v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '0' && record.rearGateClose == '0'" color="red"
  200. >正在运行</a-tag
  201. >
  202. <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '0' && record.rearGateClose == '1'" color="default"
  203. >关闭</a-tag
  204. >
  205. <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '1' && record.rearGateClose == '0'" color="#46C66F"
  206. >打开</a-tag
  207. >
  208. <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '1' && record.rearGateClose == '1'" color="#FF0000"
  209. >点位异常</a-tag
  210. >
  211. <a-tag v-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == '0'" color="red"
  212. >正在运行</a-tag
  213. >
  214. <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == 1" color="default"
  215. >关闭</a-tag
  216. >
  217. <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '0'" color="#46C66F"
  218. >打开</a-tag
  219. >
  220. <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '1'" color="#FF0000"
  221. >点位异常</a-tag
  222. >
  223. <template v-if="column.dataIndex === 'ndoortype'">
  224. <span v-if="record.ndoortype == '0'">气动风门</span>
  225. <span v-else color="default">液压风门</span>
  226. </template>
  227. <template v-if="column.dataIndex === 'doorUse'">
  228. <span v-if="record.doorUse == 1" color="default">行车风门</span>
  229. <span v-else-if="record.doorUse == 2">行人风门</span>
  230. <span v-else-if="record.doorUse == 3">短路风门</span>
  231. <span v-else-if="record.doorUse == 4">行车/短路风门</span>
  232. </template>
  233. <template v-else-if="column.dataIndex === 'warnLevel'">
  234. <a-tag v-if="record.warnLevel == '101'" color="green">低风险</a-tag>
  235. <a-tag v-else-if="record.warnLevel == '102'" color="#FF5812">一般风险</a-tag>
  236. <a-tag v-else-if="record.warnLevel == '103'" color="#FF5812">较大风险</a-tag>
  237. <a-tag v-else-if="record.warnLevel == '104'" color="#FF5812">重大风险</a-tag>
  238. <a-tag v-else-if="record.warnLevel == '201'" color="#FF0000">报警</a-tag>
  239. <a-tag v-else-if="record.warnLevel == '10000'" color="#FF5812">数据超限</a-tag>
  240. <a-tag v-else-if="record.warnLevel == '1001'" color="default">网络中断</a-tag>
  241. <a-tag v-else color="green">正常</a-tag>
  242. </template>
  243. </template>
  244. </HistoryTable>
  245. </div>
  246. </a-tab-pane>
  247. <a-tab-pane v-if="!hasPermission('show:noAlarm')" key="4" tab="报警历史">
  248. <div class="tab-item" v-if="activeKey === '4'">
  249. <template v-if="sysOrgCode != 'zmhjhzmy'">
  250. <AlarmHistoryTable
  251. columns-type="alarm"
  252. :device-type="deviceType"
  253. :device-list-api="getTableList"
  254. designScope="alarm-history"
  255. :scroll="scroll"
  256. >
  257. <template #filterCell="{ column, record }">
  258. <a-tag
  259. v-if="column.dataIndex === 'warnFlag'"
  260. :color="record.warnFlag == '0' ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'"
  261. >
  262. {{ record.warnFlag == '0' ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测' }}</a-tag
  263. >
  264. <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
  265. record.netStatus == '0' ? '断开' : '连接'
  266. }}</a-tag>
  267. </template>
  268. </AlarmHistoryTable>
  269. </template>
  270. <template v-else>
  271. <AlarmHistoryTableHj :scroll="scroll" />
  272. </template>
  273. </div>
  274. </a-tab-pane>
  275. <a-tab-pane v-if="!hasPermission('show:noHandleHistory')" key="5" tab="操作历史">
  276. <div class="tab-item" v-if="activeKey === '5'">
  277. <HandlerHistoryTable
  278. columns-type="operator_history"
  279. :device-type="deviceType"
  280. :device-list-api="getTableList"
  281. designScope="operator_history"
  282. :scroll="scroll"
  283. />
  284. </div>
  285. </a-tab-pane>
  286. </a-tabs>
  287. </dv-border-box8>
  288. </div>
  289. </div>
  290. <div ref="playerRef" style="z-index: 999; position: absolute; top: 100px; right: 15px; width: 300px; height: 280px; margin: auto"> </div>
  291. <LivePlayer
  292. id="fm-player1"
  293. style="height: 220px; width: 300px; position: absolute; top: 0px; z-index: -1"
  294. ref="player1"
  295. :videoUrl="flvURL1()"
  296. muted
  297. live
  298. loading
  299. controls
  300. />
  301. <HandleModal
  302. v-if="!globalConfig?.simulatedPassword"
  303. :modal-is-show="modalIsShow"
  304. :modal-title="modalTitle"
  305. :modal-type="modalType"
  306. @handle-ok="handleOK"
  307. @handle-cancel="handleCancel"
  308. />
  309. <DeviceBaseInfo @register="registerModal" :device-type="selectData['deviceType']" />
  310. </template>
  311. <script setup lang="ts">
  312. import { onBeforeUnmount, onUnmounted, onMounted, ref, reactive, nextTick, inject, unref } from 'vue';
  313. import MonitorTable from '../comment/MonitorTable.vue';
  314. import HistoryTable from '../comment/HistoryTable.vue';
  315. import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
  316. import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
  317. import AlarmHistoryTableHj from './components/AlarmHistoryTableHj.vue';
  318. import HandleModal from './modal.vue';
  319. import DeviceBaseInfo from '../comment/components/DeviceBaseInfo.vue';
  320. import { mountedThree, addMonitorText, play, destroy, setModelType, computePlay } from './gate.threejs';
  321. import { deviceControlApi } from '/@/api/vent/index';
  322. import { message } from 'ant-design-vue';
  323. import { list, getTableList, cameraList, cameraAddrList } from './gate.api';
  324. import lodash from 'lodash';
  325. import { setDivHeight } from '/@/utils/event';
  326. import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
  327. import { useRouter } from 'vue-router';
  328. import LivePlayer from '@liveqing/liveplayer-v3';
  329. import { useModal } from '/@/components/Modal';
  330. import { useCamera } from '/@/hooks/system/useCamera';
  331. import { usePermission } from '/@/hooks/web/usePermission';
  332. import { getDictItems } from '/@/api/common/api';
  333. import { render } from '/@/utils/common/renderUtils';
  334. import { useGlobSetting } from '/@/hooks/setting';
  335. import { getDictItemsByCode } from '/@/utils/dict';
  336. const { hasPermission } = usePermission();
  337. const { sysOrgCode } = useGlobSetting();
  338. const globalConfig = inject('globalConfig');
  339. const { currentRoute } = useRouter();
  340. const MonitorDataTable = ref();
  341. let contrlValue = '';
  342. const playerRef = ref();
  343. const deviceType = ref('gate');
  344. const activeKey = ref('1'); // tab
  345. const loading = ref(false);
  346. const scroll = reactive({
  347. y: 230,
  348. });
  349. const modelList = ref<{ text: string; value: string }[]>([]);
  350. const frontDoorIsOpen = ref(false); //前门是否开启
  351. const backDoorIsOpen = ref(false); //后门是否开启
  352. const midDoorIsOpen = ref(false); //中间门是否开启
  353. const modalIsShow = ref<boolean>(false); // 是否显示模态框
  354. const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
  355. const modalType = ref(''); // 模态框内容显示类型,设备操作类型
  356. const selectRowIndex = ref(-1); // 选中行
  357. const dataSource = ref([]);
  358. const deviceBaseList = ref([]); // 设备基本信息
  359. const [registerModal, { openModal, closeModal }] = useModal();
  360. const { getCamera, removeCamera } = useCamera();
  361. const tabChange = (activeKeyVal) => {
  362. activeKey.value = activeKeyVal;
  363. if (activeKeyVal == 1) {
  364. nextTick(() => {
  365. if (MonitorDataTable.value) MonitorDataTable.value.setSelectedRowKeys([selectData.deviceID]);
  366. });
  367. }
  368. };
  369. const initData = {
  370. deviceID: '',
  371. deviceType: '',
  372. strname: '',
  373. frontRearDP: '-', //压差
  374. // sourcePressure: '-', //气源压力
  375. runRoRecondition: null,
  376. autoRoManual: null,
  377. netStatus: '0', //通信状态
  378. frontGateOpen: '0',
  379. frontGateClose: '1',
  380. rearGateOpen: '0',
  381. rearGateClose: '1',
  382. midGateOpen: '0',
  383. midGateClose: '1',
  384. fault: '气源压力超限',
  385. masterComputer: 0,
  386. frontGateOpenCtrl: false,
  387. rearGateOpenCtrl: false,
  388. cameras: [],
  389. };
  390. // 监测数据
  391. const selectData = reactive(lodash.cloneDeep(initData));
  392. const flvURL1 = () => {
  393. // return ''
  394. return `/video/gate.mp4`;
  395. };
  396. function deviceEdit(e: Event, type: string, record) {
  397. e.stopPropagation();
  398. openModal(true, {
  399. type,
  400. deviceId: record['deviceID'],
  401. });
  402. }
  403. // 获取设备基本信息列表
  404. function getDeviceBaseList() {
  405. getTableList({ pageSize: 1000 }).then((res) => {
  406. deviceBaseList.value = res.records;
  407. });
  408. }
  409. // https获取监测数据
  410. let timer: null | NodeJS.Timeout = null;
  411. async function getMonitor(flag?) {
  412. if (Object.prototype.toString.call(timer) === '[object Null]') {
  413. timer = await setTimeout(
  414. async () => {
  415. const res = await list({ devicetype: deviceType.value, pagetype: 'normal' });
  416. if (res.msgTxt && res.msgTxt[0]) {
  417. dataSource.value = res.msgTxt[0].datalist || [];
  418. dataSource.value.forEach((data: any) => {
  419. const readData = data.readData;
  420. data = Object.assign(data, readData);
  421. });
  422. if (dataSource.value.length > 0 && selectRowIndex.value == -1 && MonitorDataTable.value) {
  423. // 初始打开页面
  424. if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) {
  425. MonitorDataTable.value.setSelectedRowKeys([currentRoute.value['query']['id']]);
  426. } else {
  427. MonitorDataTable.value.setSelectedRowKeys([dataSource.value[0]['deviceID']]);
  428. }
  429. }
  430. Object.assign(selectData, dataSource.value[selectRowIndex.value]);
  431. if (selectData.contrlMod == 'jnjhCtrl') {
  432. selectData['autoRoManual'] = selectData['autoRoManual'] == 1 ? true : false;
  433. selectData['autoRoManual1'] = selectData['autoRoManual1'] == 1 ? true : false;
  434. selectData['autoRoManual2'] = selectData['autoRoManual2'] == 1 ? true : false;
  435. }
  436. addMonitorText(selectData);
  437. monitorAnimation(selectData);
  438. if (timer) {
  439. timer = null;
  440. }
  441. getMonitor();
  442. }
  443. },
  444. flag ? 0 : 1000
  445. );
  446. }
  447. }
  448. // 切换检测数据
  449. async function getSelectRow(selectRow, index) {
  450. if (!selectRow) return;
  451. loading.value = true;
  452. selectRowIndex.value = index;
  453. const baseData: any = deviceBaseList.value.find((baseData: any) => baseData.id === selectRow.deviceID);
  454. Object.assign(selectData, initData, selectRow, baseData);
  455. isFrontOpenRunning = false; //开关门动作是否在进行
  456. isRearOpenRunning = false; //开关门动作是否在进行
  457. isMidOpenRunning = false; //开关门动作是否在进行
  458. frontDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
  459. rearDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
  460. midDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
  461. let type;
  462. const dictCodes = getDictItemsByCode('gateStyle');
  463. if (selectData && dictCodes && dictCodes.length > 0) {
  464. const gateStyle = selectData['gateStyle'];
  465. switch (gateStyle) {
  466. case 'gate_qd':
  467. type = 'fm3';
  468. break;
  469. case 'fmSs':
  470. type = 'fm3';
  471. break;
  472. case 'fmtl3':
  473. type = 'fmThreeTl';
  474. break;
  475. case 'fmSs':
  476. type = 'fmTwoSs';
  477. break;
  478. case 'fm_fc':
  479. type = 'fmWindow';
  480. break;
  481. case 'fmXr':
  482. type = 'fmXr';
  483. break;
  484. case 'fmYy':
  485. type = 'fm1';
  486. break;
  487. case 'fmSs3':
  488. type = 'fm2';
  489. break;
  490. case 'fm_fc_hjg':
  491. type = 'fmWindowHjg';
  492. break;
  493. }
  494. } else {
  495. type = selectData.nwindownum == 1 ? 'singleWindow' : 'doubleWindow';
  496. if (selectData['doorUse'] == 2) {
  497. type = 'fmXr';
  498. } else if (selectData.ndoorcount == '3' || selectData.deviceType == 'gate_nomal3') {
  499. type = 'fmThreeTl';
  500. } else {
  501. if (selectData.deviceType == 'gate_ss') {
  502. type = 'fm2';
  503. // type = 'fmWindow';
  504. } else if (selectData.deviceType == 'gate_qd' || selectData.deviceType == 'gate_normal') {
  505. type = 'fm3';
  506. } else if (selectData.deviceType == 'gate_ss_two' || selectData.deviceType == 'gate_ss_two1') {
  507. type = 'fmTwoSs';
  508. } else if (selectData.deviceType == 'gate_tj') {
  509. type = 'fmWindow';
  510. } else {
  511. type = 'fm1'; // 液压
  512. }
  513. }
  514. }
  515. debugger;
  516. setModelType(type).then(async () => {
  517. addMonitorText(selectData);
  518. loading.value = false;
  519. });
  520. await getCamera(selectRow.deviceID, playerRef.value);
  521. }
  522. // 播放动画
  523. function playAnimation(handlerState, data: any = null) {
  524. const value = data;
  525. switch (handlerState) {
  526. case 1: // 打开前门
  527. if (selectData.frontGateOpen == '0' && selectData.frontGateClose == '1') {
  528. modalTitle.value = '打开前门';
  529. modalType.value = '1';
  530. modalIsShow.value = true;
  531. } else {
  532. // message.warning('前门已经打开或正在打开,请勿重新操作');
  533. message.warning('没有监测到前门关到位,无法进行指令下发操作');
  534. }
  535. break;
  536. case 2: // 关闭前门
  537. if (selectData.frontGateOpen == '1' && selectData.frontGateClose == '0') {
  538. modalTitle.value = '关闭前门';
  539. modalType.value = '2';
  540. modalIsShow.value = true;
  541. } else {
  542. // message.warning('前门已经关闭或正在关闭,请勿重新操作');
  543. message.warning('没有监测到前门开到位,无法进行指令下发操作');
  544. }
  545. break;
  546. case 3: // 打开后门
  547. if (selectData.rearGateOpen == '0' && selectData.rearGateClose == '1') {
  548. modalTitle.value = '打开后门';
  549. modalType.value = '3';
  550. modalIsShow.value = true;
  551. } else {
  552. // message.warning('后门已经打开或正在打开,请勿重新操作');
  553. message.warning('没有监测到后门关到位,无法进行指令下发操作');
  554. }
  555. break;
  556. case 4: // 关闭后门
  557. if (selectData.rearGateOpen == '1' && selectData.rearGateClose == '0') {
  558. modalTitle.value = '关闭后门';
  559. modalType.value = '4';
  560. modalIsShow.value = true;
  561. } else {
  562. // message.warning('后门已经关闭或正在关闭,请勿重新操作');
  563. message.warning('没有监测到后门开到位,无法进行指令下发操作');
  564. }
  565. break;
  566. case 8: // 打开中间门
  567. if (selectData.midGateOpen == '0' && selectData.midGateClose == '1') {
  568. modalTitle.value = '打开中间门';
  569. modalType.value = '8';
  570. modalIsShow.value = true;
  571. } else {
  572. // message.warning('后门已经打开或正在打开,请勿重新操作');
  573. message.warning('没有监测到中间门关到位,无法进行指令下发操作');
  574. }
  575. break;
  576. case 9: // 关闭中间门
  577. if (selectData.midGateOpen == '1' && selectData.midGateClose == '0') {
  578. modalTitle.value = '关闭中间门';
  579. modalType.value = '9';
  580. modalIsShow.value = true;
  581. } else {
  582. // message.warning('后门已经关闭或正在关闭,请勿重新操作');
  583. message.warning('没有监测到中间门开到位,无法进行指令下发操作');
  584. }
  585. break;
  586. case 5: // 打开前后门
  587. if (
  588. selectData.frontGateOpen == '0' &&
  589. selectData.frontGateClose == '1' &&
  590. selectData.rearGateOpen == '0' &&
  591. selectData.rearGateClose == '1'
  592. ) {
  593. modalTitle.value = '打开前后门';
  594. modalType.value = '5';
  595. modalIsShow.value = true;
  596. } else {
  597. // message.warning('前后门已经打开或正在打开,请勿重新操作');
  598. message.warning('没有监测到前门、后门关到位,无法进行指令下发操作');
  599. }
  600. break;
  601. case 6: // 关闭前后门
  602. if (
  603. selectData.frontGateOpen == '1' &&
  604. selectData.frontGateClose == '0' &&
  605. selectData.rearGateOpen == '1' &&
  606. selectData.rearGateClose == '0'
  607. ) {
  608. modalTitle.value = '关闭前后门';
  609. modalType.value = '6';
  610. modalIsShow.value = true;
  611. } else {
  612. // message.warning('前后门已经关闭或正在关闭,请勿重新操作');
  613. message.warning('没有监测到前门、后门开到位,无法进行指令下发操作');
  614. }
  615. break;
  616. case 7: // 控制模式切换
  617. modalTitle.value = '控制模式切换';
  618. modalType.value = '7';
  619. modalIsShow.value = true;
  620. break;
  621. case 10: // 风窗控制
  622. modalTitle.value = 'A窗控制';
  623. modalType.value = '10';
  624. modalIsShow.value = true;
  625. break;
  626. case 11: // 风窗控制
  627. modalTitle.value = 'B窗控制';
  628. modalType.value = '11';
  629. modalIsShow.value = true;
  630. break;
  631. }
  632. if (globalConfig?.simulatedPassword) {
  633. handleOK('', handlerState + '');
  634. }
  635. contrlValue = value;
  636. }
  637. // 保德缺打开状态
  638. // function playAnimation(handlerState, data: any = null) {
  639. // const value = data;
  640. // switch (handlerState) {
  641. // case 1: // 打开前门
  642. // modalTitle.value = '打开前门';
  643. // modalType.value = '1';
  644. // modalIsShow.value = true;
  645. // break;
  646. // case 2: // 关闭前门
  647. // modalTitle.value = '关闭前门';
  648. // modalType.value = '2';
  649. // modalIsShow.value = true;
  650. // break;
  651. // case 3: // 打开后门
  652. // modalTitle.value = '打开后门';
  653. // modalType.value = '3';
  654. // modalIsShow.value = true;
  655. // break;
  656. // case 4: // 关闭后门
  657. // modalTitle.value = '关闭后门';
  658. // modalType.value = '4';
  659. // modalIsShow.value = true;
  660. // break;
  661. // case 8: // 打开中间门
  662. // modalTitle.value = '打开中间门';
  663. // modalType.value = '8';
  664. // modalIsShow.value = true;
  665. // break;
  666. // case 9: // 关闭中间门
  667. // modalTitle.value = '关闭中间门';
  668. // modalType.value = '9';
  669. // modalIsShow.value = true;
  670. // break;
  671. // case 5: // 打开前后门
  672. // modalTitle.value = '打开前后门';
  673. // modalType.value = '5';
  674. // modalIsShow.value = true;
  675. // break;
  676. // case 6: // 关闭前后门
  677. // modalTitle.value = '关闭前后门';
  678. // modalType.value = '6';
  679. // modalIsShow.value = true;
  680. // break;
  681. // case 7: // 控制模式切换
  682. // modalTitle.value = '控制模式切换';
  683. // modalType.value = '7';
  684. // modalIsShow.value = true;
  685. // break;
  686. // case 10: // 风窗控制
  687. // modalTitle.value = '风窗控制';
  688. // modalType.value = '10';
  689. // modalIsShow.value = true;
  690. // break;
  691. // }
  692. // if (globalConfig?.simulatedPassword) {
  693. // handleOK('', handlerState + '');
  694. // }
  695. // contrlValue = value;
  696. // }
  697. function handleOK(passWord, handlerState, value?) {
  698. if (!passWord && !globalConfig?.simulatedPassword) {
  699. message.warning('请输入密码');
  700. return;
  701. }
  702. if (isOpenRunning) {
  703. message.warning('风门正在运行。。。');
  704. modalIsShow.value = false;
  705. return;
  706. }
  707. const data = {
  708. deviceid: selectData.deviceID,
  709. devicetype: selectData.deviceType,
  710. paramcode: '',
  711. value: contrlValue,
  712. password: passWord || globalConfig?.simulatedPassword,
  713. masterComputer: selectData.masterComputer,
  714. };
  715. let handler = () => {};
  716. debugger;
  717. switch (handlerState) {
  718. case '1': // 打开前门
  719. if (selectData.frontGateOpen == '0' && selectData.frontGateClose == '1') {
  720. handler = () => {
  721. frontDoorIsOpen.value = true;
  722. };
  723. data.paramcode = 'frontGateOpen_S';
  724. } else {
  725. message.warning('前门已打开。。。');
  726. modalIsShow.value = false;
  727. }
  728. break;
  729. case '2': // 关闭前门
  730. if (selectData.frontGateOpen == '1' && selectData.frontGateClose == '0') {
  731. handler = () => {
  732. frontDoorIsOpen.value = false;
  733. };
  734. data.paramcode = 'frontGateClose_S';
  735. } else {
  736. message.warning('前门已关闭。。。');
  737. modalIsShow.value = false;
  738. }
  739. break;
  740. case '3': // 打开后门
  741. if (selectData.rearGateOpen == '0' && selectData.rearGateClose == '1') {
  742. handler = () => {
  743. backDoorIsOpen.value = true;
  744. };
  745. data.paramcode = 'rearGateOpen_S';
  746. } else {
  747. message.warning('后门已打开。。。');
  748. modalIsShow.value = false;
  749. }
  750. break;
  751. case '4': // 关闭后门
  752. if (selectData.rearGateOpen == '1' && selectData.rearGateClose == '0') {
  753. handler = () => {
  754. backDoorIsOpen.value = false;
  755. };
  756. data.paramcode = 'rearGateClose_S';
  757. } else {
  758. message.warning('后门已关闭。。。');
  759. modalIsShow.value = false;
  760. }
  761. break;
  762. case '8': // 打开中间门
  763. if (selectData.midGateOpen == '0' && selectData.midGateClose == '1') {
  764. handler = () => {
  765. midDoorIsOpen.value = true;
  766. };
  767. data.paramcode = 'midGateOpen_S';
  768. } else {
  769. message.warning('中间风门已打开。。。');
  770. modalIsShow.value = false;
  771. }
  772. break;
  773. case '9': // 关闭中间门
  774. if (selectData.midGateOpen == '1' && selectData.midGateClose == '0') {
  775. handler = () => {
  776. midDoorIsOpen.value = false;
  777. };
  778. data.paramcode = 'midGateClose_S';
  779. } else {
  780. message.warning('中间风门已关闭。。。');
  781. modalIsShow.value = false;
  782. }
  783. break;
  784. case '5': // 打开前后门
  785. if (
  786. selectData.frontGateOpen == '0' &&
  787. selectData.frontGateClose == '1' &&
  788. selectData.rearGateOpen == '0' &&
  789. selectData.rearGateClose == '1'
  790. ) {
  791. handler = () => {
  792. frontDoorIsOpen.value = true;
  793. backDoorIsOpen.value = true;
  794. };
  795. data.paramcode = 'sameTimeOpen';
  796. }
  797. break;
  798. case '6': // 关闭前后门
  799. if (
  800. selectData.frontGateOpen == '1' &&
  801. selectData.frontGateClose == '0' &&
  802. selectData.rearGateOpen == '1' &&
  803. selectData.rearGateClose == '0'
  804. ) {
  805. handler = () => {
  806. frontDoorIsOpen.value = false;
  807. backDoorIsOpen.value = false;
  808. };
  809. data.paramcode = 'sameTimeClose';
  810. }
  811. break;
  812. case '7': // 远程与就地
  813. if (selectData.contrlMod == 'codeCtrl') {
  814. if (contrlValue == '1') {
  815. data.paramcode = 'autoRoManualControl1';
  816. } else if (contrlValue == '0') {
  817. data.paramcode = 'autoRoManualControl2';
  818. } else {
  819. data.paramcode = 'autoRoManualControl0';
  820. }
  821. data.value = '';
  822. selectData.autoRoManual = null;
  823. } else if (selectData.contrlMod == 'loopCtrl' || selectData.contrlMod == 'jnjhCtrl') {
  824. data.paramcode = 'autoRoManualControl';
  825. data.value = '';
  826. selectData.autoRoManual = null;
  827. } else {
  828. data.paramcode = 'autoRoManualControl';
  829. data.value = contrlValue;
  830. selectData.autoRoManual = null;
  831. }
  832. break;
  833. case '10': // 前(A)窗控制
  834. data.paramcode = 'frontSetValue';
  835. data.value = value;
  836. break;
  837. case '11': // 后(B)窗控制
  838. data.paramcode = 'rearSetValue';
  839. data.value = value;
  840. break;
  841. }
  842. if (data.paramcode) {
  843. deviceControlApi(data).then((res) => {
  844. // 模拟时开启
  845. if (res.success) {
  846. modalIsShow.value = false;
  847. if (globalConfig.History_Type == 'remote') {
  848. message.success('指令已下发至生产管控平台成功!');
  849. } else {
  850. message.success('指令已下发成功!');
  851. }
  852. } else {
  853. message.error(res.message);
  854. }
  855. });
  856. }
  857. }
  858. let isOpenRunning = false; //开关门动作是否在进行
  859. /** 开关门动画调用 */
  860. let isFrontOpenRunning = false; //开关门动作是否在进行
  861. // let isFrontCloseRunning = false; //开关门动作是否在进行
  862. let isRearOpenRunning = false; //开关门动作是否在进行
  863. // let isRearCloseRunning = false; //开关门动作是否在进行
  864. let isMidOpenRunning = false; //中间门动作是否在进行
  865. // let isMidCloseRunning = false; //中间门动作是否在进行
  866. // 0 关闭 1 正在打开 2 打开 3正在关闭
  867. let frontDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
  868. let rearDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
  869. let midDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
  870. function monitorAnimation(selectData) {
  871. const timeScale = 0.005;
  872. // 带风窗 风窗动画
  873. if (selectData['gateStyle'] && selectData['gateStyle'].includes('fm_fc')) playWindowAnimation(selectData);
  874. if (selectData.frontGateOpen == '1' && selectData.frontGateClose == '0' && !isFrontOpenRunning) {
  875. isFrontOpenRunning = true;
  876. if (frontDeviceState != 1) {
  877. // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(1, timeScale) : play(1);
  878. play(1, timeScale);
  879. frontDeviceState = 1;
  880. frontDoorIsOpen.value = false;
  881. backDoorIsOpen.value = true;
  882. }
  883. }
  884. if (selectData.frontGateOpen == '0' && selectData.frontGateClose == '0' && !isFrontOpenRunning) {
  885. isFrontOpenRunning = true;
  886. if (frontDeviceState != 1) {
  887. // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(1, timeScale) : play(1);
  888. play(1, timeScale);
  889. frontDeviceState = 1;
  890. frontDoorIsOpen.value = false;
  891. backDoorIsOpen.value = true;
  892. }
  893. }
  894. if (selectData.frontGateClose == '1' && selectData.frontGateOpen == '0' && isFrontOpenRunning) {
  895. isFrontOpenRunning = false;
  896. if (frontDeviceState != 0) {
  897. // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(2, timeScale) : play(2);
  898. play(2, timeScale);
  899. frontDeviceState = 0;
  900. frontDoorIsOpen.value = false;
  901. // backDoorIsOpen.value = false
  902. }
  903. }
  904. if (selectData.rearGateOpen == '1' && selectData.rearGateClose == '0' && !isRearOpenRunning) {
  905. isRearOpenRunning = true;
  906. if (rearDeviceState != 1) {
  907. rearDeviceState = 1;
  908. // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(3, timeScale) : play(3);
  909. play(3, timeScale);
  910. backDoorIsOpen.value = false;
  911. frontDoorIsOpen.value = true;
  912. }
  913. }
  914. if (selectData.rearGateOpen == '0' && selectData.rearGateClose == '0' && !isRearOpenRunning) {
  915. isRearOpenRunning = true;
  916. if (rearDeviceState != 1) {
  917. rearDeviceState = 1;
  918. // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(3, timeScale) : play(3);
  919. play(3, timeScale);
  920. backDoorIsOpen.value = false;
  921. frontDoorIsOpen.value = true;
  922. }
  923. }
  924. if (selectData.rearGateClose == '1' && selectData.rearGateOpen == '0' && isRearOpenRunning) {
  925. isRearOpenRunning = false;
  926. if (rearDeviceState != 0) {
  927. rearDeviceState = 0;
  928. // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(4, timeScale) : play(4);
  929. play(4, timeScale);
  930. backDoorIsOpen.value = false;
  931. }
  932. }
  933. if (selectData.midGateOpen == '1' && selectData.midGateClose == '0' && !isMidOpenRunning) {
  934. isMidOpenRunning = true;
  935. if (midDeviceState != 1) {
  936. midDeviceState = 1;
  937. // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(3, timeScale) : play(3);
  938. play(8, timeScale);
  939. backDoorIsOpen.value = false;
  940. frontDoorIsOpen.value = true;
  941. }
  942. }
  943. if (selectData.midGateOpen == '0' && selectData.midGateClose == '0' && !isMidOpenRunning) {
  944. isMidOpenRunning = true;
  945. if (midDeviceState != 1) {
  946. midDeviceState = 1;
  947. // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(3, timeScale) : play(3);
  948. play(8, timeScale);
  949. backDoorIsOpen.value = false;
  950. frontDoorIsOpen.value = true;
  951. }
  952. }
  953. if (selectData.midGateClose == '1' && selectData.midGateOpen == '0' && isMidOpenRunning) {
  954. isMidOpenRunning = false;
  955. if (midDeviceState != 0) {
  956. midDeviceState = 0;
  957. // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(4, timeScale) : play(4);
  958. play(9, timeScale);
  959. backDoorIsOpen.value = false;
  960. }
  961. }
  962. }
  963. function playWindowAnimation(data, maxarea = 90, isFirst = false) {
  964. computePlay(data, maxarea, isFirst);
  965. }
  966. function handleCancel() {
  967. modalIsShow.value = false;
  968. modalTitle.value = '';
  969. modalType.value = '';
  970. }
  971. // // 远程、就地切换
  972. // function changeType() {
  973. // const data = {
  974. // deviceid: selectData.deviceID,
  975. // devicetype: selectData.deviceType,
  976. // paramcode: 'autoRoManualControl',
  977. // value: selectData.autoRoManual,
  978. // };
  979. // deviceControlApi(data).then(() => {
  980. // if (globalConfig.History_Type == 'remote') {
  981. // message.success('指令已下发至生产管控平台成功!');
  982. // } else {
  983. // message.success('指令已下发成功!');
  984. // }
  985. // });
  986. // }
  987. onMounted(async () => {
  988. const { query } = unref(currentRoute);
  989. if (query['deviceType']) deviceType.value = query['deviceType'] as string;
  990. modelList.value = await getDictItems('gateModel');
  991. loading.value = true;
  992. const playerDom = document.getElementById('fm-player1')?.getElementsByClassName('vjs-tech')[0];
  993. debugger;
  994. mountedThree(playerDom)
  995. .then(async () => {
  996. if (sysOrgCode != 'zmhjhzmy') {
  997. await getMonitor(true);
  998. loading.value = false;
  999. } else {
  1000. // 韩咀无风门设备,只有报警历史数据,无其他数据
  1001. setModelType('fm1').then(async () => {
  1002. loading.value = false;
  1003. dataSource.value = [];
  1004. addMonitorText(selectData);
  1005. });
  1006. }
  1007. })
  1008. .catch(() => {
  1009. debugger;
  1010. });
  1011. });
  1012. onBeforeUnmount(() => {
  1013. getDeviceBaseList();
  1014. });
  1015. onUnmounted(() => {
  1016. removeCamera();
  1017. if (timer) {
  1018. clearTimeout(timer);
  1019. timer = undefined;
  1020. }
  1021. destroy();
  1022. });
  1023. </script>
  1024. ,
  1025. <style lang="less" scoped>
  1026. @import '/@/design/theme.less';
  1027. @import '/@/design/vent/modal.less';
  1028. .scene-box {
  1029. .bottom-tabs-box {
  1030. height: 350px;
  1031. }
  1032. }
  1033. .button-box {
  1034. border: none !important;
  1035. height: 34px !important;
  1036. &:hover {
  1037. background: var(--vent-device-manager-control-btn-hover) !important;
  1038. }
  1039. &::before {
  1040. height: 27px !important;
  1041. background: var(--vent-device-manager-control-btn) !important;
  1042. }
  1043. &::after {
  1044. top: 35px !important;
  1045. }
  1046. }
  1047. :deep(.@{ventSpace}-tabs-tabpane-active) {
  1048. height: 100%;
  1049. }
  1050. ::-webkit-scrollbar-thumb {
  1051. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  1052. background: #4288a444;
  1053. }
  1054. :deep(.zxm-radio-disabled + span) {
  1055. color: var(--vent-font-color) !important;
  1056. }
  1057. :deep(.zxm-radio-disabled .zxm-radio-inner::after) {
  1058. background-color: #127cb5 !important;
  1059. }
  1060. :deep(.@{ventSpace}-picker-datetime-panel) {
  1061. height: 200px !important;
  1062. overflow-y: auto !important;
  1063. }
  1064. </style>