index.vue 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517
  1. <template>
  2. <div class="scene-box">
  3. <div class="top-box">
  4. <div class="top-center row">
  5. <template v-if="deviceType == 'gate'">
  6. <div v-if="hasPermission('btn:control')" class="button-box" @click="playAnimation('打开前门', 'frontGateOpen_S')">打开前门</div>
  7. <div v-if="hasPermission('btn:control')" class="button-box" @click="playAnimation('关闭前门', 'frontGateClose_S')">关闭前门</div>
  8. <div
  9. v-if="hasPermission('btn:control') && selectData.ndoorcount == '3'"
  10. class="button-box"
  11. @click="playAnimation('打开中间门', 'midGateOpen_S')"
  12. >打开中间门</div
  13. >
  14. <div
  15. v-if="hasPermission('btn:control') && selectData.ndoorcount == '3'"
  16. class="button-box"
  17. @click="playAnimation('关闭中间门', 'midGateClose_S')"
  18. >关闭中间门</div
  19. >
  20. <div v-if="hasPermission('btn:control')" class="button-box" @click="playAnimation('打开后门', 'rearGateOpen_S')">打开后门</div>
  21. <div v-if="hasPermission('btn:control')" class="button-box" @click="playAnimation('关闭后门', 'rearGateClose_S')">关闭后门</div>
  22. <div v-if="selectData['isShowGatesContrl']" class="button-box" @click="playAnimation('同时打开', 'sameTimeOpen')">同时打开</div>
  23. <div v-if="selectData['isShowGatesContrl']" class="button-box" @click="playAnimation('同时关闭', 'sameTimeClose')">同时关闭</div>
  24. </template>
  25. <template v-if="deviceType == 'window'">
  26. <div class="row" v-if="Number(selectData.nwindownum) == 2">
  27. <div v-if="hasPermission('window:AreaControl')" class="button-box" @click="playAnimation('设定前窗面积', 'frontSetValue')"
  28. >设定前窗面积</div
  29. >
  30. <div v-if="hasPermission('window:AreaControl')" class="button-box" @click="playAnimation('设定后窗面积', 'rearSetValue')"
  31. >设定后窗面积</div
  32. >
  33. <div v-if="hasPermission('window:showAngle')" class="button-box" @click="playAnimation('设定前窗角度', 'frontSetValue')"
  34. >设定前窗角度</div
  35. >
  36. <div v-if="hasPermission('window:showAngle')" class="button-box" @click="playAnimation('设定后窗角度', 'frontSetValue')"
  37. >设定后窗角度</div
  38. >
  39. </div>
  40. <div class="row" v-if="hasPermission('window:fourAreaControl') && Number(selectData.nwindownum) == 4">
  41. <div class="button-box" @click="playAnimation('前窗1面积设置', 'frontSetValue1')">前窗1面积</div>
  42. <div class="button-box" @click="playAnimation('前窗2面积设置', 'frontSetValue2')">前窗2面积</div>
  43. <div class="button-box" @click="playAnimation('后窗1面积设置', 'frontSetValue3')">后窗1面积</div>
  44. <div class="button-box" @click="playAnimation('后窗2面积设置', 'frontSetValue4')">后窗2面积</div>
  45. </div>
  46. <div v-if="hasPermission('window:ldkz')" class="button-box" @click="playAnimation('风窗自主调控', 'ldkz')">风窗自主调控</div>
  47. <div v-if="hasPermission('window:sameSet')" class="button-box" @click="playAnimation('风窗面积设置', 'sameSetValue')">设定风窗面积</div>
  48. <div class="row" v-if="Number(selectData.nwindownum) == 1">
  49. <div v-if="hasPermission('window:AreaControl')" class="button-box" @click="playAnimation('设定风窗面积', 'frontSetValue')"
  50. >设定风窗面积</div
  51. >
  52. <div v-if="hasPermission('window:showAngle')" class="button-box" @click="playAnimation('设定风窗角度', 'frontSetValue')"
  53. >设定风窗角度</div
  54. >
  55. </div>
  56. </template>
  57. </div>
  58. </div>
  59. <div v-if="renderPlayer" ref="playerRef" class="player-List"> </div>
  60. <div
  61. class="tabs-box bottom-tabs-box"
  62. :class="{ 'table-hide': !tableShow, 'table-show': tableShow }"
  63. style="height: 290px"
  64. @mousedown="setDivHeight($event, 230, scroll, 0)"
  65. id="monitorBox"
  66. >
  67. <div :style="`padding: 5px; height: ${scroll.y + 100}px`">
  68. <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange" id="tabsBox">
  69. <a-tab-pane key="1" tab="实时监测">
  70. <template v-if="(deviceType.startsWith('fanlocal') || deviceType.startsWith('fanmain')) && activeKey == '1'">
  71. <GroupMonitorTable
  72. ref="MonitorDataTable"
  73. :dataSource="dataSource"
  74. :columnsType="`${deviceType}_monitor`"
  75. :scroll="scroll"
  76. :isAction="true"
  77. :isShowSelect="false"
  78. >
  79. </GroupMonitorTable>
  80. </template>
  81. <template v-else>
  82. <!-- 工作面echarts图标 -->
  83. <BarAndLine
  84. v-if="activeKey == '1' && deviceType == 'surface_history'"
  85. class="echarts-line"
  86. xAxisPropType="time"
  87. :dataSource="surfaceEchartsData"
  88. height="300px"
  89. :chartsColumns="surfaceChartsColumns"
  90. :option="echatsOption"
  91. />
  92. <MonitorTable
  93. v-else-if="activeKey == '1'"
  94. ref="monitorTable"
  95. :columnsType="`${deviceType}_monitor`"
  96. :dataSource="dataSource"
  97. design-scope="device_monitor"
  98. :isShowActionColumn="false"
  99. :isShowSelect="true"
  100. title="设备监测"
  101. :scroll="{ y: scroll.y - 30 }"
  102. @selectRow="getSelectRow"
  103. >
  104. <template #filterCell="{ column, record }">
  105. <template v-if="deviceType.startsWith('gate') || deviceType.startsWith('door')">
  106. <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '0' && record.frontGateClose == '0'" color="red"
  107. >正在运行</a-tag
  108. >
  109. <a-tag
  110. v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '0' && record.frontGateClose == 1"
  111. color="default"
  112. >关闭</a-tag
  113. >
  114. <a-tag
  115. v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '1' && record.frontGateClose == '0'"
  116. color="#46C66F"
  117. >打开</a-tag
  118. >
  119. <a-tag
  120. v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '1' && record.frontGateClose == '1'"
  121. color="#FF0000"
  122. >点位异常</a-tag
  123. >
  124. <a-tag v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '0' && record.rearGateClose == '0'" color="red"
  125. >正在运行</a-tag
  126. >
  127. <a-tag
  128. v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '0' && record.rearGateClose == '1'"
  129. color="default"
  130. >关闭</a-tag
  131. >
  132. <a-tag
  133. v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '1' && record.rearGateClose == '0'"
  134. color="#46C66F"
  135. >打开</a-tag
  136. >
  137. <a-tag
  138. v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '1' && record.rearGateClose == '1'"
  139. color="#FF0000"
  140. >点位异常</a-tag
  141. >
  142. <a-tag v-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == '0'" color="red"
  143. >正在运行</a-tag
  144. >
  145. <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == 1" color="default"
  146. >关闭</a-tag
  147. >
  148. <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '0'" color="#46C66F"
  149. >打开</a-tag
  150. >
  151. <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '1'" color="#FF0000"
  152. >点位异常</a-tag
  153. >
  154. <template v-if="column.dataIndex === 'ndoortype'">
  155. <span>{{ render.renderDictText(record.ndoortype, 'ndoortype') }}</span>
  156. </template>
  157. <template v-if="column.dataIndex === 'doorUse'">
  158. <span>{{ render.renderDictText(record.doorUse, 'doorUse') }}</span>
  159. </template>
  160. </template>
  161. <template v-else-if="deviceType.startsWith('windrect')">
  162. <a-tag v-if="column.dataIndex === 'sign'" :color="record.sign == 0 ? '#95CF65' : record.sign == 1 ? '#4590EA' : '#9876AA'">
  163. {{ record.sign == 0 ? '高位' : record.sign == 1 ? '中位' : '低位' }}</a-tag
  164. >
  165. <template v-if="record && column && column.dataIndex === 'isRun' && record.isRun">
  166. <a-tag v-if="record.isRun == -2 || record.isRun == -1" :color="record.isRun == -2 ? '#95CF65' : '#ED5700'">{{
  167. record.isRun == -2 ? '空闲' : '等待'
  168. }}</a-tag>
  169. <a-tag v-else-if="record.isRun == 100" color="#4693FF">完成</a-tag>
  170. <Progress v-else :percent="Number(record.isRun)" size="small" status="active" />
  171. </template>
  172. </template>
  173. <template v-else-if="deviceType.startsWith('safetymonitor')">
  174. <div v-if="!record.devicename && column.dataIndex === 'devicename'">-</div>
  175. <div v-if="!record.V && column.dataIndex === 'V'">-</div>
  176. <div v-if="!record.PointUnit && column.dataIndex === 'PointUnit'">-</div>
  177. <div v-if="!record.highRange && column.dataIndex === 'highRange'">-</div>
  178. <div v-if="!record.lowRange && column.dataIndex === 'lowRange'">-</div>
  179. <div v-if="!record.dataTypeName && column.dataIndex === 'dataTypeName'">-</div>
  180. </template>
  181. <template v-else-if="deviceType.startsWith('atomizing')">
  182. <a-tag v-if="column.dataIndex === 'stateConn' && record.stateConn == '1'" color="green">连接</a-tag>
  183. <a-tag v-if="column.dataIndex === 'stateConn' && record.stateConn == '0'" color="red">断开</a-tag>
  184. </template>
  185. <template v-else-if="deviceType.startsWith('gaspatrol')">
  186. <a-tag v-if="column.dataIndex === 'deviceConnect_str' && record.deviceConnect_str.endsWith('正常')" color="green">{{
  187. record.deviceConnect_str
  188. }}</a-tag>
  189. <a-tag v-if="column.dataIndex === 'deviceConnect_str' && record.deviceConnect_str.endsWith('断开')" color="red">{{
  190. record.deviceConnect_str
  191. }}</a-tag>
  192. </template>
  193. <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == 0 ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'">
  194. {{ record.warnFlag == 0 ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测' }}</a-tag
  195. >
  196. <template v-else-if="column.dataIndex === 'warnLevel'">
  197. <a-tag v-if="record.warnLevel == '101'" color="green">低风险</a-tag>
  198. <a-tag v-else-if="record.warnLevel == '102'" color="#FF5812">一般风险</a-tag>
  199. <a-tag v-else-if="record.warnLevel == '103'" color="#FF5812">较大风险</a-tag>
  200. <a-tag v-else-if="record.warnLevel == '104'" color="#FF5812">重大风险</a-tag>
  201. <a-tag v-else-if="record.warnLevel == '201'" color="#FF0000">报警</a-tag>
  202. <a-tag v-else-if="record.warnLevel == '10000'" color="#FF5812">数据超限</a-tag>
  203. <a-tag v-else-if="record.warnLevel == '1001'" color="default">网络中断</a-tag>
  204. <a-tag v-else color="green">正常</a-tag>
  205. </template>
  206. <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
  207. record.netStatus == '0' ? '断开' : '连接'
  208. }}</a-tag>
  209. </template>
  210. </MonitorTable>
  211. </template>
  212. </a-tab-pane>
  213. <a-tab-pane key="2" tab="历史数据" v-if="!noHistoryArr().find((item) => deviceType.startsWith(item))">
  214. <div class="tab-item" v-if="activeKey == '2'">
  215. <template v-if="deviceType.startsWith('fanmain')">
  216. <HistoryTableNew class="w-100% h-100%" :device-code="`${deviceType}`" :scroll="scroll" dict-code="fan_dict" />
  217. </template>
  218. <template v-else-if="deviceType.startsWith('fanlocal')">
  219. <HistoryTableNew class="w-100% hM-100%" :device-code="`${deviceType}`" :scroll="scroll" dict-code="fanlocal_dict" />
  220. </template>
  221. <template v-else>
  222. <HistoryTable
  223. ref="historyTable"
  224. :sysId="systemID"
  225. :columns-type="`${deviceType}`"
  226. :device-type="deviceType"
  227. designScope="device-history"
  228. :scroll="scroll"
  229. />
  230. </template>
  231. </div>
  232. </a-tab-pane>
  233. <a-tab-pane key="3" tab="报警历史" v-if="!noWarningArr.find((item) => deviceType.startsWith(item))">
  234. <div class="tab-item">
  235. <AlarmHistoryTable
  236. ref="alarmHistoryTable"
  237. v-if="activeKey == '3'"
  238. :sysId="systemID"
  239. columns-type="alarm"
  240. :device-type="deviceType"
  241. :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID, pageSize: 10000 })"
  242. :scroll="scroll"
  243. designScope="alarm-history"
  244. />
  245. </div>
  246. </a-tab-pane>
  247. <a-tab-pane key="4" tab="操作历史" v-if="haveHandlerArr.find((item) => deviceType.startsWith(item))">
  248. <div class="tab-item">
  249. <HandlerHistoryTable
  250. ref="handlerHistoryTable"
  251. v-if="activeKey == '4'"
  252. :sysId="systemID"
  253. columns-type="operator_history"
  254. :device-type="deviceType"
  255. :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })"
  256. :scroll="scroll"
  257. designScope="operator-history"
  258. />
  259. </div>
  260. </a-tab-pane>
  261. </a-tabs>
  262. </div>
  263. </div>
  264. <component v-if="modalVisible" :is="currentModal" v-model:visible="modalVisible" :dataSource="dataSource" :activeID="activeID" />
  265. <HandleModal
  266. v-if="!globalConfig?.simulatedPassword"
  267. :modal-is-show="modalIsShow"
  268. :modal-title="modalTitle"
  269. :modal-type="modalType"
  270. :device-type="deviceType"
  271. @handle-ok="handleOK"
  272. @handle-cancel="handleCancel"
  273. />
  274. <SupplyAir
  275. :data="currentData"
  276. :targetVolume="targetVolume"
  277. :modal-is-show="showTargetModal"
  278. :modalType="modalType"
  279. @handle-cancel="() => (showTargetModal = false)"
  280. />
  281. </div>
  282. </template>
  283. <script setup lang="ts">
  284. import { ref, onMounted, onUnmounted, ComponentOptions, shallowRef, reactive, defineProps, watch, toRaw, nextTick, unref, inject } from 'vue';
  285. import { list, getDeviceList, getDepartmentInfo } from './device.api';
  286. import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
  287. import HistoryTable from '../comment/HistoryTable.vue';
  288. import HistoryTableNew from '/@/views/vent/comment/history/HistoryTable.vue';
  289. import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
  290. import MonitorTable from '../comment/MonitorTable.vue';
  291. import GroupMonitorTable from '../comment/GroupMonitorTable.vue';
  292. import { message, Progress } from 'ant-design-vue';
  293. import { useRouter } from 'vue-router';
  294. import { setDivHeight } from '/@/utils/event';
  295. import { render } from '/@/utils/common/renderUtils';
  296. import HandleModal from './modal.vue';
  297. import { haveHandlerArr, noWarningArr, surfaceChartsColumns, noHistoryArr } from './device.data';
  298. import { getDictItemsByCode } from '/@/utils/dict';
  299. import BarAndLine from '/@/components/chart/BarAndLine.vue';
  300. import { useGlobSetting } from '/@/hooks/setting';
  301. import { useCamera } from '/@/hooks/system/useCamera';
  302. import { usePermission } from '/@/hooks/web/usePermission';
  303. import { deviceControlApi } from '/@/api/vent/index';
  304. import SupplyAir from '../windowMonitor/components/supplyAir.vue';
  305. import { updateWindowAutoAdjustStatus } from '../windowMonitor/window.api';
  306. type DeviceType = { deviceType: string; deviceName: string; datalist: any[] };
  307. const glob = useGlobSetting();
  308. const props = defineProps({
  309. deviceType: {
  310. type: Object,
  311. default: () => {},
  312. },
  313. });
  314. const echatsOption = {
  315. grid: {
  316. top: '35',
  317. left: '30',
  318. right: '45',
  319. bottom: '25',
  320. containLabel: true,
  321. },
  322. toolbox: {
  323. feature: {},
  324. },
  325. };
  326. const initData = {
  327. deviceID: '',
  328. deviceType: '',
  329. strname: '',
  330. dataDh: '-', //压差
  331. dataDtestq: '-', //测试风量
  332. sourcePressure: '-', //气源压力
  333. dataDequivalarea: '-',
  334. netStatus: '0', //通信状态
  335. fault: '气源压力超限',
  336. frontArea: '0',
  337. rearArea: '0',
  338. frontRearDifference: '-',
  339. rearPresentValue: '-',
  340. maxarea: 0,
  341. nwindownum: 0,
  342. };
  343. const { hasPermission } = usePermission();
  344. const { getCamera, removeCamera, getPlayer } = useCamera();
  345. const playerRef = ref();
  346. const renderPlayer = ref(true);
  347. const router = useRouter();
  348. const monitorTable = ref();
  349. const historyTable = ref();
  350. const alarmHistoryTable = ref();
  351. const handlerHistoryTable = ref();
  352. // 模态框
  353. const currentModal = shallowRef<Nullable<ComponentOptions>>(null); //模态框
  354. const modalVisible = ref<Boolean>(false); // 模态框是否可见
  355. const tableShow = ref(true); //是否显示树形菜单
  356. const modalIsShow = ref<boolean>(false); // 是否显示模态框
  357. const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
  358. const modalType = ref(''); // 模态框内容显示类型,设备操作类型
  359. const deviceList = ref<DeviceType[]>([]); //关联设备列表
  360. const deviceActive = ref('');
  361. const activeKey = ref('1'); // tab key
  362. const dataSource = shallowRef([]); // 实时监测数据
  363. const selectData = ref({});
  364. const currentData = ref(initData);
  365. const majorPathEchartsData = ref({}); // 关键路线echarts数据
  366. const surfaceEchartsData = ref<any[]>(); // 工作面历史记录,echarts数据
  367. const activeID = ref(''); // 打开详情modal时监测的设备id
  368. const deviceType = ref(''); // 监测设备类型
  369. const selectRowIndex = ref(-1);
  370. const systemID = ref(''); // 系统监测时,系统id
  371. const cameraAddrs = ref([]);
  372. const targetVolume = ref(0);
  373. const showTargetModal = ref(false);
  374. const scroll = reactive({
  375. y: 180,
  376. });
  377. const globalConfig = inject('globalConfig');
  378. let departmentInfo: Null | Object = null;
  379. function tabChange(activeKeyVal) {
  380. activeKey.value = activeKeyVal;
  381. }
  382. // https获取监测数据
  383. let timer: null | NodeJS.Timeout = undefined;
  384. function getMonitor(flag?) {
  385. if (deviceType.value) {
  386. if (timer) timer = null;
  387. if (Object.prototype.toString.call(timer) === '[object Null]') {
  388. timer = setTimeout(
  389. async () => {
  390. const data = await getDataSource();
  391. currentData.value = data;
  392. if (timer) {
  393. getMonitor();
  394. }
  395. },
  396. flag ? 0 : 1000
  397. );
  398. }
  399. }
  400. }
  401. async function getDataSource() {
  402. if (deviceType.value && deviceType.value.startsWith('sys') && systemID.value) {
  403. const res = await list({ devicetype: 'sys', systemID: systemID.value });
  404. const result = res.msgTxt;
  405. const deviceArr = <DeviceType[]>[];
  406. result.forEach((item) => {
  407. const data = item['datalist'].filter((data: any) => {
  408. const readData = data.readData;
  409. return Object.assign(data, readData);
  410. });
  411. if (item.type != 'sys') {
  412. if (item.type === 'majorpath') {
  413. deviceArr.unshift({ deviceType: item.type, deviceName: item['typeName'], datalist: item['datalist'][0]['paths'] });
  414. majorPathEchartsData.value = item['datalist'][0];
  415. } else if (item.type.startsWith('surface_history')) {
  416. surfaceEchartsData.value = item['datalist'][0];
  417. deviceArr.unshift({
  418. deviceType: item.type,
  419. deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
  420. datalist: data,
  421. });
  422. } else {
  423. deviceArr.unshift({
  424. deviceType: item.type,
  425. deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
  426. datalist: data,
  427. });
  428. }
  429. }
  430. });
  431. deviceList.value = deviceArr;
  432. if (deviceArr.length > 0) {
  433. deviceActive.value = deviceArr[0].deviceType;
  434. monitorChange(0);
  435. }
  436. } else {
  437. let res = null;
  438. if (systemID.value) {
  439. res = await list({ devicetype: 'sys', types: deviceType.value, systemID: systemID.value });
  440. if (res && res.msgTxt) {
  441. const result = res.msgTxt;
  442. result.forEach((item) => {
  443. const data = item['datalist'].filter((data: any) => {
  444. const readData = data.readData;
  445. return Object.assign(data, readData);
  446. });
  447. if (item.type != 'sys') {
  448. if (item.type.startsWith('majorpath') && item.type == deviceType.value) {
  449. dataSource.value = item['datalist'][0]['paths'];
  450. majorPathEchartsData.value = item['datalist'][0];
  451. return;
  452. } else if (item.type == deviceType.value) {
  453. if (item.type == 'surface_history') {
  454. // 工作面图标数据
  455. surfaceEchartsData.value = item['datalist'][0];
  456. } else {
  457. dataSource.value = data;
  458. console.log('关联设备数据--------------->', data);
  459. }
  460. return;
  461. }
  462. }
  463. });
  464. }
  465. } else {
  466. let resultData, searchForm;
  467. if (monitorTable.value) {
  468. const formData = monitorTable.value.getForm();
  469. searchForm = formData.getFieldsValue();
  470. }
  471. if (monitorTable.value) {
  472. if (deviceType.value.startsWith('safetymonitor')) {
  473. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: { ...searchForm } });
  474. } else if (deviceType.value.startsWith('location')) {
  475. if (!departmentInfo) {
  476. departmentInfo = await getDepartmentInfo({});
  477. }
  478. let department = null;
  479. if (departmentInfo && locationForm && locationForm['department']) {
  480. for (const key in departmentInfo) {
  481. const item = departmentInfo[key];
  482. if (item['id'] === locationForm['department']) {
  483. department = item;
  484. break;
  485. }
  486. }
  487. }
  488. resultData = await list({
  489. devicetype: deviceType.value,
  490. pagetype: 'normal',
  491. filterParams: {
  492. strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
  493. userName: locationForm['strname'] ? locationForm['strname'] : '',
  494. userJson: department && department['name'] ? department['name'] : '',
  495. },
  496. });
  497. } else if (deviceType.value.startsWith('vehicle')) {
  498. resultData = await list({
  499. devicetype: deviceType.value,
  500. pagetype: 'normal',
  501. filterParams: {
  502. strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
  503. vehicleName: locationForm['strname'] ? locationForm['strname'] : '',
  504. },
  505. });
  506. } else {
  507. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
  508. }
  509. } else {
  510. // 非安全监控
  511. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
  512. }
  513. if (resultData && resultData.msgTxt) {
  514. const result = resultData.msgTxt[0];
  515. if (result) {
  516. const data = result['datalist'].filter((data: any) => {
  517. const readData = data.readData;
  518. return Object.assign(data, readData);
  519. });
  520. if (deviceType.value.startsWith('safetymonitor')) {
  521. const resultData = <any[]>[];
  522. // 如果是安全监控的数据时需要过滤常见设备数据,根据设定的常用安全监控字典去匹配
  523. const dictCodes = getDictItemsByCode('safetynormal');
  524. if (searchForm && !searchForm['dataTypeName'] && dictCodes && dictCodes.length) {
  525. for (let i = 0; i < dictCodes.length; i++) {
  526. const dict = dictCodes[i];
  527. data.forEach((item) => {
  528. if (dict['value'] == item['dataTypeName']) {
  529. resultData.push(item);
  530. }
  531. });
  532. }
  533. dataSource.value = resultData;
  534. } else {
  535. dataSource.value = data;
  536. }
  537. } else {
  538. let tableData: any[] = [];
  539. let noNetData: any[] = [];
  540. data.filter((el) => {
  541. if (el.netStatus == 1) {
  542. tableData.push(el);
  543. } else {
  544. noNetData.push(el);
  545. }
  546. });
  547. dataSource.value = [...tableData, ...noNetData];
  548. }
  549. } else {
  550. dataSource.value = [];
  551. }
  552. } else {
  553. dataSource.value = [];
  554. }
  555. }
  556. }
  557. const data: any = toRaw(dataSource.value[selectRowIndex.value]); //maxarea
  558. return data;
  559. }
  560. function toHide() {
  561. tableShow.value = !tableShow.value;
  562. document.getElementById('monitorBox').addEventListener('animationend', () => {
  563. if (!tableShow.value) {
  564. document.getElementById('monitorBox').style.height = '0px';
  565. } else {
  566. document.getElementById('monitorBox').style.height = '290';
  567. }
  568. });
  569. }
  570. function monitorChange(index) {
  571. dataSource.value = [];
  572. deviceActive.value = deviceList.value[index].deviceType;
  573. if (deviceType.value != deviceActive.value) deviceType.value = deviceActive.value;
  574. if (activeKey.value == '1' && monitorTable.value) {
  575. monitorTable.value.setLoading(true);
  576. dataSource.value = deviceList.value[index].datalist;
  577. }
  578. if (activeKey.value == '2' && historyTable.value) {
  579. historyTable.value.setLoading(true);
  580. }
  581. if (activeKey.value == '3' && alarmHistoryTable.value) {
  582. alarmHistoryTable.value.setLoading(true);
  583. }
  584. if (activeKey.value == '4' && handlerHistoryTable.value) {
  585. handlerHistoryTable.value.setLoading(true);
  586. }
  587. }
  588. // 切换检测数据
  589. async function getSelectRow(selectRow, index) {
  590. if (!selectRow) return;
  591. selectRowIndex.value = index;
  592. selectData.value = selectRow;
  593. await getCamera(selectRow.deviceID, playerRef, renderPlayer, null, true);
  594. }
  595. const playAnimation = (title, flag) => {
  596. modalType.value = flag + '';
  597. modalTitle.value = title;
  598. modalIsShow.value = true;
  599. };
  600. const handleOK = async (passWord, handlerState, value) => {
  601. if (!passWord && !globalConfig?.simulatedPassword) {
  602. message.warning('请输入密码!');
  603. return;
  604. }
  605. if (handlerState == 'sameSetValue') {
  606. const data1 = {
  607. deviceid: selectData.value.deviceID,
  608. devicetype: selectData.value.deviceType,
  609. paramcode: 'frontSetValue',
  610. password: passWord || globalConfig?.simulatedPassword,
  611. value: value ? value : null,
  612. };
  613. const data2 = {
  614. deviceid: selectData.value.deviceID,
  615. devicetype: selectData.value.deviceType,
  616. paramcode: 'rearSetValue',
  617. password: passWord || globalConfig?.simulatedPassword,
  618. value: value ? value : null,
  619. };
  620. const res1 = await deviceControlApi(data1);
  621. const res2 = await deviceControlApi(data2);
  622. if (res1.success && res2.success) {
  623. message.success('指令已下发成功!');
  624. } else {
  625. message.error(res1.message);
  626. }
  627. handleCancel();
  628. } else if (handlerState == 'ldkz') {
  629. const params = {
  630. windowId: selectData.value.deviceID,
  631. auto: 1,
  632. fengliangF: value,
  633. };
  634. updateWindowAutoAdjustStatus(params).then((res) => {
  635. if (res.success) {
  636. if (globalConfig.History_Type == 'remote') {
  637. message.success('指令已下发至生产管控平台成功!');
  638. } else {
  639. message.success('指令已下发成功!');
  640. }
  641. handleCancel();
  642. targetVolume.value = value;
  643. showTargetModal.value = true;
  644. } else {
  645. message.error(res.message);
  646. }
  647. });
  648. return;
  649. } else {
  650. let data = {
  651. deviceid: selectData.value.deviceID,
  652. devicetype: selectData.value.deviceType,
  653. paramcode: handlerState,
  654. password: passWord || globalConfig?.simulatedPassword,
  655. value: value ? value : null,
  656. };
  657. deviceControlApi(data)
  658. .then((res) => {
  659. if (res.success) {
  660. message.success('指令已下发成功!');
  661. } else {
  662. message.error(res.message);
  663. }
  664. })
  665. .finally(() => {
  666. handleCancel();
  667. });
  668. }
  669. };
  670. const handleCancel = () => {
  671. modalIsShow.value = false;
  672. modalTitle.value = '';
  673. modalType.value = '';
  674. };
  675. onMounted(() => {
  676. debugger;
  677. const route = unref(router.currentRoute);
  678. const nameStrList = route.name.split('-');
  679. if (nameStrList.length > 0) {
  680. deviceType.value = nameStrList[nameStrList.length - 1];
  681. }
  682. timer = null;
  683. getMonitor(true);
  684. });
  685. onUnmounted(() => {
  686. if (timer) {
  687. clearTimeout(timer);
  688. }
  689. timer = undefined;
  690. });
  691. </script>
  692. <style lang="less" scoped>
  693. @import '/@/design/theme.less';
  694. @import '/@/design/vent/modal.less';
  695. @ventSpace: zxm;
  696. @{theme-deepblue} {
  697. .scene-box {
  698. // --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
  699. // --image-tree-icon-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-bg.png');
  700. // --image-tree-icon-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-hover-bg.png');
  701. // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
  702. // --image-tree-expansion-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-bg.png');
  703. // --image-tree-expansion-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-hover-bg.png');
  704. // --image-location-bg: url('/@/assets/images/themify/deepblue/vent/home/location-bg.png');
  705. // --image-location-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/location-hover-bg.png');
  706. // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
  707. // --image-turn-location-top-bg: url('/@/assets/images/themify/deepblue/vent/home/turn-location-top-bg.png');
  708. // --image-tree-icon-cover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-bg.png');
  709. // --image-tree-icon-cover-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-hover-bg.png');
  710. // --image-tohome: url('/@/assets/images/themify/deepblue/vent/home/tohome.png');
  711. // --tree-node-select: #0963c1;
  712. // --tree-node-hover: #0f376ccc;
  713. // --location-bottom-bg: #21324855;
  714. // --location-bottom-border: #aed1ff4d;
  715. }
  716. }
  717. .scene-box {
  718. --image-no-camera_bg: url('/@/assets/images/vent/no-data.png');
  719. --image-camera_bg: url('/@/assets/images/themify/deepblue/vent/camera_bg.png');
  720. --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
  721. --image-tree-icon-bg: url('/@/assets/images/vent/home/tree-icon-bg.png');
  722. --image-tree-icon-hover-bg: url('/@/assets/images/vent/home/tree-icon-hover-bg.png');
  723. --image-tree-bg: url('/@/assets/images/vent/home/tree-bg.png');
  724. --image-tree-expansion-bg: url('/@/assets/images/vent/home/tree-expansion-bg.png');
  725. --image-tree-expansion-hover-bg: url('/@/assets/images/vent/home/tree-expansion-hover-bg.png');
  726. --image-location-bg: url('/@/assets/images/vent/home/location-bg.png');
  727. --image-location-hover-bg: url('/@/assets/images/vent/home/location-hover-bg.png');
  728. --image-turn-location-top-bg: url('/@/assets/images/vent/home/turn-location-top-bg.png');
  729. --image-tree-icon-cover-bg: url('/@/assets/images/vent/home/tree-icon-cover-bg.png');
  730. --image-tree-icon-cover-hover-bg: url('/@/assets/images/vent/home/tree-icon-cover-hover-bg.png');
  731. --image-tohome: url('/@/assets/images/vent/home/tohome.png');
  732. --tree-node-select: #00b1c8;
  733. --tree-node-hover: #00b1c855;
  734. --location-bottom-bg: #00709955;
  735. --location-bottom-border: #aef3ff4d;
  736. }
  737. .top-box {
  738. z-index: 9999;
  739. top: 10px !important;
  740. }
  741. .player-List {
  742. position: relative;
  743. width: 100%;
  744. height: 580px;
  745. display: flex;
  746. overflow-y: auto;
  747. pointer-events: auto;
  748. .player-box {
  749. width: 806px;
  750. height: 555px;
  751. padding: 17px 18px;
  752. background: var(--image-camera_bg);
  753. background-size: 100% 100%;
  754. position: relative;
  755. margin: 10px 70px;
  756. .player-name {
  757. font-size: 14px;
  758. position: absolute;
  759. top: 35px;
  760. right: 35px;
  761. color: #fff;
  762. background-color: hsla(0, 0%, 50%, 0.5);
  763. border-radius: 2px;
  764. padding: 1px 5px;
  765. max-width: 120px;
  766. overflow: hidden;
  767. white-space: nowrap;
  768. text-overflow: ellipsis;
  769. z-index: 999;
  770. }
  771. .click-box {
  772. position: absolute;
  773. width: 100%;
  774. height: 100%;
  775. top: 0;
  776. left: 0;
  777. }
  778. }
  779. .no-player {
  780. width: 100%;
  781. height: 100%;
  782. padding-top: 80px;
  783. background: var(--image-no-camera_bg) no-repeat;
  784. background-position: center;
  785. display: flex;
  786. justify-content: center;
  787. font-size: 50px;
  788. color: var(--vent-text-base);
  789. }
  790. }
  791. .top-header {
  792. position: fixed;
  793. width: 100%;
  794. height: 56px;
  795. background: var(--image-modal-top);
  796. text-align: center;
  797. line-height: 56px;
  798. font-size: 28px;
  799. color: #ffffffdd;
  800. font-weight: 600;
  801. z-index: 1;
  802. letter-spacing: 2px;
  803. font-size: 30px;
  804. }
  805. .select-node {
  806. position: fixed;
  807. top: 100px;
  808. left: 10px;
  809. color: var(--vent-font-color);
  810. display: flex;
  811. justify-content: center;
  812. font-size: 22px;
  813. .title {
  814. margin-left: 10px;
  815. }
  816. }
  817. .expansion-icon {
  818. background: var(--image-tree-icon-bg) no-repeat;
  819. background-size: contain;
  820. position: absolute;
  821. left: 190px;
  822. top: 25px;
  823. &:hover {
  824. background: var(--image-tree-icon-hover-bg) no-repeat;
  825. background-size: contain;
  826. }
  827. }
  828. .device-select {
  829. width: 250px;
  830. height: 500px;
  831. background: var(--image-tree-bg) no-repeat;
  832. position: fixed;
  833. top: 100px;
  834. left: 10px;
  835. background-size: contain;
  836. pointer-events: auto;
  837. padding: 20px 10px 30px 10px;
  838. }
  839. .inspect-info-xj {
  840. position: fixed;
  841. top: 100px;
  842. left: 250px;
  843. width: 320px;
  844. height: 272px;
  845. padding: 20px;
  846. background: url('@/assets/images/inspect-bg.png') no-repeat center;
  847. background-size: 100% 100%;
  848. box-sizing: border-box;
  849. }
  850. .is-expansion-icon {
  851. padding: 5px;
  852. pointer-events: auto;
  853. z-index: 999;
  854. }
  855. .device-select-show {
  856. left: 10px;
  857. animation-name: treeShow;
  858. /* 持续时间 */
  859. animation-duration: 1s;
  860. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  861. }
  862. .device-select-hide {
  863. left: -250px;
  864. animation-name: treeHide;
  865. /* 持续时间 */
  866. animation-duration: 1s;
  867. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  868. }
  869. .node-select-show {
  870. width: 276px;
  871. height: 44px;
  872. background: var(--image-tree-expansion-bg) no-repeat;
  873. left: 10px;
  874. animation-name: treeShow;
  875. /* 持续时间 */
  876. animation-duration: 1s;
  877. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  878. display: flex;
  879. align-items: center;
  880. margin-left: 0;
  881. justify-content: flex-start;
  882. pointer-events: auto;
  883. &:hover {
  884. background: var(--image-tree-expansion-hover-bg) no-repeat;
  885. }
  886. .put-away-icon {
  887. position: relative;
  888. display: inline-block;
  889. left: 4px;
  890. }
  891. }
  892. .node-select-hide {
  893. left: -400px;
  894. animation-name: treeHide;
  895. /* 持续时间 */
  896. animation-duration: 1s;
  897. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  898. }
  899. .device-select-box {
  900. width: 208px;
  901. height: 450px;
  902. overflow-y: auto;
  903. color: var(--vent-font-color);
  904. :deep(.zxm-tree) {
  905. background: transparent !important;
  906. color: var(--vent-font-color) !important;
  907. .zxm-tree-switcher {
  908. background: transparent !important;
  909. }
  910. .zxm-tree-node-content-wrapper.zxm-tree-node-selected {
  911. background-color: var(--tree-node-select);
  912. }
  913. .zxm-tree-node-content-wrapper:hover {
  914. background-color: var(--tree-node-hover);
  915. }
  916. input {
  917. height: 0px !important;
  918. }
  919. }
  920. &::-webkit-scrollbar-track {
  921. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  922. border-radius: 10px;
  923. background: #ededed22;
  924. height: 100px;
  925. }
  926. &::-webkit-scrollbar-thumb {
  927. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  928. background: #4288a444;
  929. }
  930. }
  931. .location-icon {
  932. width: 46px;
  933. height: 178px;
  934. position: absolute;
  935. top: 100px;
  936. background: var(--image-location-bg) no-repeat;
  937. background-size: contain;
  938. writing-mode: vertical-lr;
  939. line-height: 46px;
  940. color: var(--vent-font-color);
  941. padding-top: 10px;
  942. pointer-events: auto;
  943. cursor: pointer;
  944. &:hover {
  945. background: var(--image-location-hover-bg) no-repeat;
  946. }
  947. .location-text {
  948. padding-top: 20px;
  949. letter-spacing: 3px;
  950. font-size: 16px;
  951. }
  952. }
  953. .location-select {
  954. position: fixed;
  955. top: 100px;
  956. pointer-events: auto;
  957. .location-select-box {
  958. width: 100%;
  959. height: 100%;
  960. position: relative;
  961. &::before {
  962. content: '';
  963. position: absolute;
  964. width: 230px;
  965. height: 500px;
  966. top: 0;
  967. left: 0;
  968. background: var(--image-tree-bg) no-repeat;
  969. background-size: contain;
  970. transform: rotateY(180deg);
  971. z-index: -1;
  972. }
  973. .location-top-title {
  974. color: var(--vent-font-color);
  975. position: absolute;
  976. width: 225px;
  977. height: 68px;
  978. background: var(--image-turn-location-top-bg) no-repeat;
  979. background-size: contain;
  980. top: 5px;
  981. left: 5px;
  982. display: flex;
  983. flex-direction: row;
  984. justify-content: space-between;
  985. align-items: flex-end;
  986. .title {
  987. font-size: 18px;
  988. position: relative;
  989. top: -14px;
  990. right: 15px;
  991. }
  992. }
  993. .location-expansion-icon {
  994. background: var(--image-tree-icon-cover-bg) no-repeat;
  995. background-size: contain;
  996. position: relative;
  997. left: 10px;
  998. top: -15px;
  999. padding: 5px;
  1000. &:hover {
  1001. background: var(--image-tree-icon-cover-hover-bg) no-repeat;
  1002. background-size: contain;
  1003. }
  1004. }
  1005. }
  1006. .location-container {
  1007. width: 200px;
  1008. height: 390px;
  1009. position: absolute;
  1010. display: flex;
  1011. flex-direction: column;
  1012. top: 80px;
  1013. left: 18px;
  1014. overflow-y: auto;
  1015. .location-item {
  1016. color: var(--vent-font-color);
  1017. line-height: 30px;
  1018. display: flex;
  1019. justify-content: space-between;
  1020. // background-image: var(--vent-gas-list-item-bg-img);
  1021. background-image: linear-gradient(to left, #39f5ff05, #39f5ff10);
  1022. margin: 3px 0;
  1023. .item-title {
  1024. width: 80px;
  1025. text-align: right;
  1026. color: var(--vent-table-action-link);
  1027. }
  1028. }
  1029. .location-bottom-btn {
  1030. width: 100%;
  1031. color: var(--vent-font-color);
  1032. display: flex;
  1033. justify-content: flex-end;
  1034. margin-top: 20px;
  1035. span {
  1036. display: inline-block;
  1037. width: 100%;
  1038. background: var(--location-bottom-bg);
  1039. border-radius: 3px;
  1040. border: 1px solid var(--location-bottom-border);
  1041. text-align: center;
  1042. padding: 2px 0;
  1043. cursor: pointer;
  1044. &:hover {
  1045. background: #00557422;
  1046. }
  1047. }
  1048. }
  1049. }
  1050. }
  1051. .location-select-show {
  1052. right: 240px;
  1053. animation-name: locationShow;
  1054. /* 持续时间 */
  1055. animation-duration: 1s;
  1056. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1057. }
  1058. .location-select-hide {
  1059. right: -2px;
  1060. animation-name: locationHide;
  1061. /* 持续时间 */
  1062. animation-duration: 1s;
  1063. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1064. }
  1065. .location-btn-show {
  1066. right: -0px;
  1067. animation-name: locationBtnShow;
  1068. /* 持续时间 */
  1069. animation-duration: 1s;
  1070. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1071. }
  1072. .location-btn-hide {
  1073. right: -240px;
  1074. animation-name: locationBtnHide;
  1075. /* 持续时间 */
  1076. animation-duration: 1s;
  1077. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1078. }
  1079. .tabs-box {
  1080. height: 290px;
  1081. }
  1082. .bottom-tabs-box {
  1083. position: relative;
  1084. .tabs-box {
  1085. width: calc(100% - 12px) !important;
  1086. bottom: 3px !important;
  1087. background-color: red;
  1088. }
  1089. .to-small {
  1090. position: absolute;
  1091. top: -65px;
  1092. right: 36px;
  1093. display: flex;
  1094. align-items: center;
  1095. justify-content: center;
  1096. .to-home {
  1097. width: 60px;
  1098. height: 60px;
  1099. background: var(--image-tohome) no-repeat center;
  1100. background-size: auto;
  1101. padding: 8px;
  1102. &:hover {
  1103. background-color: rgba(79, 104, 134, 0.418);
  1104. }
  1105. }
  1106. .table-show-icon {
  1107. width: 30px;
  1108. height: 30px;
  1109. font-size: 30px;
  1110. color: var(--vent-font-color);
  1111. margin-left: 10px;
  1112. }
  1113. }
  1114. .device-button-group {
  1115. position: absolute;
  1116. top: -30px;
  1117. display: flex;
  1118. width: 100%;
  1119. .device-active {
  1120. background: linear-gradient(45deg, #04e6fb, #0c5cab);
  1121. &::before {
  1122. border-color: #0efcff;
  1123. box-shadow: 1px 1px 3px 1px #0efcff inset;
  1124. }
  1125. }
  1126. }
  1127. .table-hide-icon {
  1128. color: var(--vent-font-color);
  1129. cursor: pointer;
  1130. position: absolute;
  1131. right: 20px;
  1132. top: 10px;
  1133. z-index: 9999;
  1134. }
  1135. .enter-detail {
  1136. color: var(--vent-font-color);
  1137. cursor: pointer;
  1138. position: absolute;
  1139. right: 35px;
  1140. top: 35px;
  1141. padding: 5px;
  1142. border-radius: 5px;
  1143. margin-left: 8px;
  1144. margin-right: 8px;
  1145. width: auto;
  1146. height: 33px !important;
  1147. display: flex;
  1148. align-items: center;
  1149. justify-content: center;
  1150. color: var(--vent-font-color);
  1151. padding: 5px 15px 5px 15px;
  1152. z-index: 999;
  1153. cursor: pointer;
  1154. &:hover {
  1155. background: var(--vent-device-manager-control-btn-hover);
  1156. }
  1157. &::before {
  1158. width: calc(100% - 6px);
  1159. height: 27px;
  1160. content: '';
  1161. position: absolute;
  1162. top: 3px;
  1163. right: 0;
  1164. left: 3px;
  1165. bottom: 0;
  1166. z-index: -1;
  1167. border-radius: inherit;
  1168. /*important*/
  1169. background: var(--vent-device-manager-control-btn);
  1170. }
  1171. }
  1172. }
  1173. .table-hide {
  1174. height: 0px;
  1175. animation-name: tableHide;
  1176. /* 持续时间 */
  1177. animation-duration: 1s;
  1178. transition: all 1s;
  1179. }
  1180. .table-show {
  1181. height: 290px;
  1182. animation-name: tableShow;
  1183. /* 持续时间 */
  1184. animation-duration: 1s;
  1185. transition: all 1s;
  1186. }
  1187. .location-form {
  1188. display: flex;
  1189. margin: 8px;
  1190. .location-form-item {
  1191. width: 400px;
  1192. .location-form-label {
  1193. width: 100px;
  1194. display: inline-block;
  1195. color: var(--vent-font-color);
  1196. }
  1197. input {
  1198. background: transparent !important;
  1199. color: var(--vent-font-color);
  1200. border: 1px solid var(--vent-form-item-border) !important;
  1201. }
  1202. }
  1203. .zxm-select-selector {
  1204. width: 200px !important;
  1205. }
  1206. }
  1207. @keyframes tableShow {
  1208. 0% {
  1209. height: 0px;
  1210. opacity: 0;
  1211. }
  1212. 100% {
  1213. height: 290px;
  1214. opacity: 1;
  1215. }
  1216. }
  1217. @keyframes tableHide {
  1218. 0% {
  1219. opacity: 1;
  1220. }
  1221. 100% {
  1222. height: 0px;
  1223. opacity: 0;
  1224. }
  1225. }
  1226. @keyframes treeShow {
  1227. 0% {
  1228. left: -400px;
  1229. opacity: 0;
  1230. }
  1231. 100% {
  1232. left: 10px;
  1233. opacity: 1;
  1234. }
  1235. }
  1236. @keyframes treeHide {
  1237. 0% {
  1238. left: 10px;
  1239. opacity: 1;
  1240. }
  1241. 100% {
  1242. left: -400px;
  1243. opacity: 0;
  1244. }
  1245. }
  1246. @keyframes locationShow {
  1247. 0% {
  1248. right: 0px;
  1249. opacity: 0;
  1250. }
  1251. 100% {
  1252. right: 240px;
  1253. opacity: 1;
  1254. }
  1255. }
  1256. @keyframes locationHide {
  1257. 0% {
  1258. right: 240px;
  1259. opacity: 1;
  1260. }
  1261. 100% {
  1262. right: 0;
  1263. opacity: 0;
  1264. }
  1265. }
  1266. @keyframes locationBtnShow {
  1267. 0% {
  1268. right: -240px;
  1269. opacity: 0;
  1270. }
  1271. 100% {
  1272. right: -2px;
  1273. opacity: 1;
  1274. }
  1275. }
  1276. @keyframes locationBtnHide {
  1277. 0% {
  1278. right: -2px;
  1279. opacity: 1;
  1280. }
  1281. 100% {
  1282. right: -240px;
  1283. opacity: 0;
  1284. }
  1285. }
  1286. :deep(.@{ventSpace}-picker-datetime-panel) {
  1287. height: 200px !important;
  1288. overflow-y: auto !important;
  1289. }
  1290. :deep(.@{ventSpace}-tabs-tabpane-active) {
  1291. // overflow: auto;
  1292. height: 100%;
  1293. }
  1294. :deep(.zxm-select-dropdown) {
  1295. left: 0 !important;
  1296. color: #000000 !important;
  1297. }
  1298. :deep(.zxm-select-selector) {
  1299. height: 34px !important;
  1300. line-height: 34px !important;
  1301. }
  1302. :deep(.zxm-input) {
  1303. height: 32px !important;
  1304. line-height: 32px !important;
  1305. .zxm-select-selection-item {
  1306. line-height: 32px !important;
  1307. }
  1308. }
  1309. .device-button {
  1310. height: 26px;
  1311. display: flex;
  1312. justify-content: center;
  1313. align-items: center;
  1314. color: var(--vent-font-color);
  1315. position: relative;
  1316. cursor: pointer;
  1317. padding: 0 20px;
  1318. background: linear-gradient(45deg, #04e6fb55, #0c5cab55);
  1319. clip-path: polygon(10px 0, 0 50%, 10px 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
  1320. &:nth-child(1) {
  1321. left: calc(-6px * 1);
  1322. }
  1323. &:nth-child(2) {
  1324. left: calc(-6px * 2);
  1325. }
  1326. &:nth-child(3) {
  1327. left: calc(-6px * 3);
  1328. }
  1329. &:nth-child(4) {
  1330. left: calc(-6px * 4);
  1331. }
  1332. &:nth-child(5) {
  1333. left: calc(-6px * 5);
  1334. }
  1335. &:nth-child(6) {
  1336. left: calc(-6px * 6);
  1337. }
  1338. &:nth-child(7) {
  1339. left: calc(-6px * 7);
  1340. }
  1341. &:nth-child(8) {
  1342. left: calc(-6px * 8);
  1343. }
  1344. &:nth-child(9) {
  1345. left: calc(-6px * 9);
  1346. }
  1347. &:nth-child(10) {
  1348. left: calc(-6px * 10);
  1349. }
  1350. &:nth-child(11) {
  1351. left: calc(-6px * 11);
  1352. }
  1353. &:nth-child(12) {
  1354. left: calc(-6px * 12);
  1355. }
  1356. &:nth-child(13) {
  1357. left: calc(-6px * 13);
  1358. }
  1359. &:nth-child(14) {
  1360. left: calc(-6px * 14);
  1361. }
  1362. &:nth-child(15) {
  1363. left: calc(-6px * 15);
  1364. }
  1365. &:nth-child(16) {
  1366. left: calc(-6px * 16);
  1367. }
  1368. &:nth-child(17) {
  1369. left: calc(-6px * 17);
  1370. }
  1371. &:nth-child(18) {
  1372. left: calc(-6px * 18);
  1373. }
  1374. &:nth-child(19) {
  1375. left: calc(-6px * 19);
  1376. }
  1377. // &:first-child {
  1378. // clip-path: polygon(0 0, 10px 50%, 0 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
  1379. // }
  1380. }
  1381. // :deep(.@{ventSpace}-pagination){
  1382. // margin-right: 20px !important;
  1383. // margin-top: 5px !important;
  1384. // display: flex;
  1385. // align-items: center;
  1386. // }
  1387. </style>