index.vue 47 KB

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