index.vue 45 KB

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