index.vue 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415
  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. function tabChange(activeKeyVal) {
  303. activeKey.value = activeKeyVal;
  304. }
  305. // https获取监测数据
  306. let timer: null | NodeJS.Timeout = undefined;
  307. function getMonitor(flag?) {
  308. if (deviceType.value) {
  309. if (timer) timer = null;
  310. if (Object.prototype.toString.call(timer) === '[object Null]') {
  311. timer = setTimeout(
  312. async () => {
  313. await getDataSource();
  314. if (timer) {
  315. getMonitor();
  316. }
  317. },
  318. flag ? 0 : 1000
  319. );
  320. }
  321. }
  322. }
  323. async function getDataSource() {
  324. if (deviceType.value && deviceType.value.startsWith('sys') && systemID.value) {
  325. const res = await list({ devicetype: 'sys', systemID: systemID.value });
  326. const result = res.msgTxt;
  327. const deviceArr = <DeviceType[]>[];
  328. result.forEach((item) => {
  329. const data = item['datalist'].filter((data: any) => {
  330. const readData = data.readData;
  331. return Object.assign(data, readData);
  332. });
  333. if (item.type != 'sys') {
  334. if (item.type === 'majorpath') {
  335. deviceArr.unshift({ deviceType: item.type, deviceName: item['typeName'], datalist: item['datalist'][0]['paths'] });
  336. majorPathEchartsData.value = item['datalist'][0];
  337. } else if (item.type.startsWith('surface_history')) {
  338. surfaceEchartsData.value = item['datalist'][0];
  339. deviceArr.unshift({
  340. deviceType: item.type,
  341. deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
  342. datalist: data,
  343. });
  344. } else {
  345. deviceArr.unshift({
  346. deviceType: item.type,
  347. deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
  348. datalist: data,
  349. });
  350. }
  351. }
  352. });
  353. deviceList.value = deviceArr;
  354. if (deviceArr.length > 0) {
  355. deviceActive.value = deviceArr[0].deviceType;
  356. monitorChange(0);
  357. }
  358. } else {
  359. let res = null;
  360. if (systemID.value) {
  361. res = await list({ devicetype: 'sys', types: deviceType.value, systemID: systemID.value });
  362. if (res && res.msgTxt) {
  363. const result = res.msgTxt;
  364. result.forEach((item) => {
  365. const data = item['datalist'].filter((data: any) => {
  366. const readData = data.readData;
  367. return Object.assign(data, readData);
  368. });
  369. if (item.type != 'sys') {
  370. if (item.type.startsWith('majorpath') && item.type == deviceType.value) {
  371. dataSource.value = item['datalist'][0]['paths'];
  372. majorPathEchartsData.value = item['datalist'][0];
  373. return;
  374. } else if (item.type == deviceType.value) {
  375. if (item.type == 'surface_history') {
  376. // 工作面图标数据
  377. surfaceEchartsData.value = item['datalist'][0];
  378. } else {
  379. dataSource.value = data;
  380. console.log('关联设备数据--------------->', data);
  381. }
  382. return;
  383. }
  384. }
  385. });
  386. }
  387. } else {
  388. let resultData, searchForm;
  389. if (monitorTable.value) {
  390. const formData = monitorTable.value.getForm();
  391. searchForm = formData.getFieldsValue();
  392. }
  393. if (monitorTable.value) {
  394. if (deviceType.value.startsWith('safetymonitor')) {
  395. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: { ...searchForm } });
  396. } else if (deviceType.value.startsWith('location')) {
  397. if (!departmentInfo) {
  398. departmentInfo = await getDepartmentInfo({});
  399. }
  400. let department = null;
  401. if (departmentInfo && locationForm && locationForm['department']) {
  402. for (const key in departmentInfo) {
  403. const item = departmentInfo[key];
  404. if (item['id'] === locationForm['department']) {
  405. department = item;
  406. break;
  407. }
  408. }
  409. }
  410. resultData = await list({
  411. devicetype: deviceType.value,
  412. pagetype: 'normal',
  413. filterParams: {
  414. strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
  415. userName: locationForm['strname'] ? locationForm['strname'] : '',
  416. userJson: department && department['name'] ? department['name'] : '',
  417. },
  418. });
  419. } else if (deviceType.value.startsWith('vehicle')) {
  420. resultData = await list({
  421. devicetype: deviceType.value,
  422. pagetype: 'normal',
  423. filterParams: {
  424. strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
  425. vehicleName: locationForm['strname'] ? locationForm['strname'] : '',
  426. },
  427. });
  428. } else {
  429. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
  430. }
  431. } else {
  432. // 非安全监控
  433. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
  434. }
  435. if (resultData && resultData.msgTxt) {
  436. const result = resultData.msgTxt[0];
  437. if (result) {
  438. const data = result['datalist'].filter((data: any) => {
  439. const readData = data.readData;
  440. return Object.assign(data, readData);
  441. });
  442. if (deviceType.value.startsWith('safetymonitor')) {
  443. const resultData = <any[]>[];
  444. // 如果是安全监控的数据时需要过滤常见设备数据,根据设定的常用安全监控字典去匹配
  445. const dictCodes = getDictItemsByCode('safetynormal');
  446. if (searchForm && !searchForm['dataTypeName'] && dictCodes && dictCodes.length) {
  447. for (let i = 0; i < dictCodes.length; i++) {
  448. const dict = dictCodes[i];
  449. data.forEach((item) => {
  450. if (dict['value'] == item['dataTypeName']) {
  451. resultData.push(item);
  452. }
  453. });
  454. }
  455. dataSource.value = resultData;
  456. } else {
  457. dataSource.value = data;
  458. }
  459. } else {
  460. let tableData: any[] = [];
  461. let noNetData: any[] = [];
  462. data.filter((el) => {
  463. if (el.netStatus == 1) {
  464. tableData.push(el);
  465. } else {
  466. noNetData.push(el);
  467. }
  468. });
  469. dataSource.value = [...tableData, ...noNetData];
  470. }
  471. } else {
  472. dataSource.value = [];
  473. }
  474. } else {
  475. dataSource.value = [];
  476. }
  477. }
  478. }
  479. }
  480. function toHide() {
  481. tableShow.value = !tableShow.value;
  482. document.getElementById('monitorBox').addEventListener('animationend', () => {
  483. if (!tableShow.value) {
  484. document.getElementById('monitorBox').style.height = '0px';
  485. } else {
  486. document.getElementById('monitorBox').style.height = '290';
  487. }
  488. });
  489. }
  490. function monitorChange(index) {
  491. dataSource.value = [];
  492. deviceActive.value = deviceList.value[index].deviceType;
  493. if (deviceType.value != deviceActive.value) deviceType.value = deviceActive.value;
  494. if (activeKey.value == '1' && monitorTable.value) {
  495. monitorTable.value.setLoading(true);
  496. dataSource.value = deviceList.value[index].datalist;
  497. }
  498. if (activeKey.value == '2' && historyTable.value) {
  499. historyTable.value.setLoading(true);
  500. }
  501. if (activeKey.value == '3' && alarmHistoryTable.value) {
  502. alarmHistoryTable.value.setLoading(true);
  503. }
  504. if (activeKey.value == '4' && handlerHistoryTable.value) {
  505. handlerHistoryTable.value.setLoading(true);
  506. }
  507. }
  508. // 切换检测数据
  509. async function getSelectRow(selectRow, index) {
  510. if (!selectRow) return;
  511. selectRowIndex.value = index;
  512. selectData.value = selectRow;
  513. cameraAddrs.value = await getCamera(selectRow.deviceID, playerRef.value, null, true);
  514. if(cameraAddrs.value && cameraAddrs.value.length > 0){
  515. nextTick(async() => {
  516. for(let i=0; i<cameraAddrs.value.length; i++){
  517. const item = cameraAddrs.value[i]
  518. const fileExtension = item.addr.split('.').pop();
  519. if (item['addr'] && item['addr'].includes('0.0.0.0')) {
  520. item['addr'] = item['addr'].replace('0.0.0.0', window.location.hostname);
  521. }
  522. if(item['addr'].startsWith('rtsp://')) {
  523. const videoDom = document.getElementById('video' + i);
  524. if(videoDom){
  525. const server = new window['WebRtcStreamer'](
  526. videoDom,
  527. VUE_APP_URL.webRtcUrl.startsWith('/') ? location.protocol + VUE_APP_URL.webRtcUrl : VUE_APP_URL.webRtcUrl
  528. );
  529. await server.connect(item['addr']);
  530. videoDom.play();
  531. }
  532. }else{
  533. getPlayer(fileExtension, 'player' + i,item['devicekind'], item['addr'], item['cameraRate'], {width: 755, height: 490})
  534. }
  535. }
  536. })
  537. }
  538. }
  539. const playAnimation = (title, flag) => {
  540. modalType.value = flag + '';
  541. modalTitle.value = title;
  542. modalIsShow.value = true;
  543. };
  544. const handleOK = (passWord, handlerState, value) => {
  545. if (!passWord && !globalConfig?.simulatedPassword) {
  546. message.warning('请输入密码!');
  547. return;
  548. }
  549. let data = {
  550. deviceid: selectData.value.deviceID,
  551. devicetype: selectData.value.deviceType,
  552. paramcode: handlerState,
  553. password: passWord || globalConfig?.simulatedPassword,
  554. value: value,
  555. };
  556. deviceControlApi(data)
  557. .then((res) => {
  558. if (res.success) {
  559. message.success('指令已下发成功!');
  560. } else {
  561. message.error(res.message);
  562. }
  563. })
  564. .finally(() => {
  565. handleCancel();
  566. });
  567. };
  568. const handleCancel = () => {
  569. modalIsShow.value = false;
  570. modalTitle.value = '';
  571. modalType.value = '';
  572. };
  573. onMounted( () => {
  574. debugger;
  575. const route = unref(router.currentRoute);
  576. const nameStrList = route.name.split('-')
  577. if(nameStrList.length > 0){
  578. deviceType.value = nameStrList[nameStrList.length -1];
  579. }
  580. timer = null
  581. getMonitor(true)
  582. });
  583. onUnmounted(() => {
  584. if (timer) {
  585. clearTimeout(timer);
  586. }
  587. timer = undefined;
  588. });
  589. </script>
  590. <style lang="less" scoped>
  591. @import '/@/design/theme.less';
  592. @import '/@/design/vent/modal.less';
  593. @ventSpace: zxm;
  594. @{theme-deepblue} {
  595. .scene-box {
  596. // --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
  597. // --image-tree-icon-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-bg.png');
  598. // --image-tree-icon-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-hover-bg.png');
  599. // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
  600. // --image-tree-expansion-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-bg.png');
  601. // --image-tree-expansion-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-hover-bg.png');
  602. // --image-location-bg: url('/@/assets/images/themify/deepblue/vent/home/location-bg.png');
  603. // --image-location-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/location-hover-bg.png');
  604. // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
  605. // --image-turn-location-top-bg: url('/@/assets/images/themify/deepblue/vent/home/turn-location-top-bg.png');
  606. // --image-tree-icon-cover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-bg.png');
  607. // --image-tree-icon-cover-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-hover-bg.png');
  608. // --image-tohome: url('/@/assets/images/themify/deepblue/vent/home/tohome.png');
  609. // --tree-node-select: #0963c1;
  610. // --tree-node-hover: #0f376ccc;
  611. // --location-bottom-bg: #21324855;
  612. // --location-bottom-border: #aed1ff4d;
  613. }
  614. }
  615. .scene-box {
  616. --image-no-camera_bg: url('/@/assets/images/vent/no-data.png');
  617. --image-camera_bg: url('/@/assets/images/themify/deepblue/vent/camera_bg.png');
  618. --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
  619. --image-tree-icon-bg: url('/@/assets/images/vent/home/tree-icon-bg.png');
  620. --image-tree-icon-hover-bg: url('/@/assets/images/vent/home/tree-icon-hover-bg.png');
  621. --image-tree-bg: url('/@/assets/images/vent/home/tree-bg.png');
  622. --image-tree-expansion-bg: url('/@/assets/images/vent/home/tree-expansion-bg.png');
  623. --image-tree-expansion-hover-bg: url('/@/assets/images/vent/home/tree-expansion-hover-bg.png');
  624. --image-location-bg: url('/@/assets/images/vent/home/location-bg.png');
  625. --image-location-hover-bg: url('/@/assets/images/vent/home/location-hover-bg.png');
  626. --image-turn-location-top-bg: url('/@/assets/images/vent/home/turn-location-top-bg.png');
  627. --image-tree-icon-cover-bg: url('/@/assets/images/vent/home/tree-icon-cover-bg.png');
  628. --image-tree-icon-cover-hover-bg: url('/@/assets/images/vent/home/tree-icon-cover-hover-bg.png');
  629. --image-tohome: url('/@/assets/images/vent/home/tohome.png');
  630. --tree-node-select: #00b1c8;
  631. --tree-node-hover: #00b1c855;
  632. --location-bottom-bg: #00709955;
  633. --location-bottom-border: #aef3ff4d;
  634. }
  635. .top-box{
  636. z-index: 9999;
  637. top: 10px !important;
  638. }
  639. .player-List{
  640. position: relative;
  641. width: 100%;
  642. height: 580px;
  643. display: flex;
  644. overflow-y: auto;
  645. pointer-events: auto;
  646. .player-box {
  647. width: 806px;
  648. height: 555px;
  649. padding: 17px 18px;
  650. background: var(--image-camera_bg);
  651. background-size: 100% 100%;
  652. position: relative;
  653. margin: 10px 70px;
  654. .player-name {
  655. font-size: 14px;
  656. position: absolute;
  657. top: 35px;
  658. right: 35px;
  659. color: #fff;
  660. background-color: hsla(0, 0%, 50%, 0.5);
  661. border-radius: 2px;
  662. padding: 1px 5px;
  663. max-width: 120px;
  664. overflow: hidden;
  665. white-space: nowrap;
  666. text-overflow: ellipsis;
  667. z-index: 999;
  668. }
  669. .click-box {
  670. position: absolute;
  671. width: 100%;
  672. height: 100%;
  673. top: 0;
  674. left: 0;
  675. }
  676. }
  677. .no-player{
  678. width: 100%;
  679. height: 100%;
  680. padding-top: 80px;
  681. background: var(--image-no-camera_bg) no-repeat;
  682. background-position: center;
  683. display: flex;
  684. justify-content: center;
  685. font-size: 50px;
  686. color: var(--vent-text-base)
  687. }
  688. }
  689. .top-header {
  690. position: fixed;
  691. width: 100%;
  692. height: 56px;
  693. background: var(--image-modal-top);
  694. text-align: center;
  695. line-height: 56px;
  696. font-size: 28px;
  697. color: #ffffffdd;
  698. font-weight: 600;
  699. z-index: 1;
  700. letter-spacing: 2px;
  701. font-size: 30px;
  702. }
  703. .select-node {
  704. position: fixed;
  705. top: 100px;
  706. left: 10px;
  707. color: var(--vent-font-color);
  708. display: flex;
  709. justify-content: center;
  710. font-size: 22px;
  711. .title {
  712. margin-left: 10px;
  713. }
  714. }
  715. .expansion-icon {
  716. background: var(--image-tree-icon-bg) no-repeat;
  717. background-size: contain;
  718. position: absolute;
  719. left: 190px;
  720. top: 25px;
  721. &:hover {
  722. background: var(--image-tree-icon-hover-bg) no-repeat;
  723. background-size: contain;
  724. }
  725. }
  726. .device-select {
  727. width: 250px;
  728. height: 500px;
  729. background: var(--image-tree-bg) no-repeat;
  730. position: fixed;
  731. top: 100px;
  732. left: 10px;
  733. background-size: contain;
  734. pointer-events: auto;
  735. padding: 20px 10px 30px 10px;
  736. }
  737. .inspect-info-xj {
  738. position: fixed;
  739. top: 100px;
  740. left: 250px;
  741. width: 320px;
  742. height: 272px;
  743. padding: 20px;
  744. background: url('@/assets/images/inspect-bg.png') no-repeat center;
  745. background-size: 100% 100%;
  746. box-sizing: border-box;
  747. }
  748. .is-expansion-icon {
  749. padding: 5px;
  750. pointer-events: auto;
  751. z-index: 999;
  752. }
  753. .device-select-show {
  754. left: 10px;
  755. animation-name: treeShow;
  756. /* 持续时间 */
  757. animation-duration: 1s;
  758. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  759. }
  760. .device-select-hide {
  761. left: -250px;
  762. animation-name: treeHide;
  763. /* 持续时间 */
  764. animation-duration: 1s;
  765. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  766. }
  767. .node-select-show {
  768. width: 276px;
  769. height: 44px;
  770. background: var(--image-tree-expansion-bg) no-repeat;
  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. display: flex;
  777. align-items: center;
  778. margin-left: 0;
  779. justify-content: flex-start;
  780. pointer-events: auto;
  781. &:hover {
  782. background: var(--image-tree-expansion-hover-bg) no-repeat;
  783. }
  784. .put-away-icon {
  785. position: relative;
  786. display: inline-block;
  787. left: 4px;
  788. }
  789. }
  790. .node-select-hide {
  791. left: -400px;
  792. animation-name: treeHide;
  793. /* 持续时间 */
  794. animation-duration: 1s;
  795. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  796. }
  797. .device-select-box {
  798. width: 208px;
  799. height: 450px;
  800. overflow-y: auto;
  801. color: var(--vent-font-color);
  802. :deep(.zxm-tree) {
  803. background: transparent !important;
  804. color: var(--vent-font-color) !important;
  805. .zxm-tree-switcher {
  806. background: transparent !important;
  807. }
  808. .zxm-tree-node-content-wrapper.zxm-tree-node-selected {
  809. background-color: var(--tree-node-select);
  810. }
  811. .zxm-tree-node-content-wrapper:hover {
  812. background-color: var(--tree-node-hover);
  813. }
  814. input {
  815. height: 0px !important;
  816. }
  817. }
  818. &::-webkit-scrollbar-track {
  819. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  820. border-radius: 10px;
  821. background: #ededed22;
  822. height: 100px;
  823. }
  824. &::-webkit-scrollbar-thumb {
  825. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  826. background: #4288a444;
  827. }
  828. }
  829. .location-icon {
  830. width: 46px;
  831. height: 178px;
  832. position: absolute;
  833. top: 100px;
  834. background: var(--image-location-bg) no-repeat;
  835. background-size: contain;
  836. writing-mode: vertical-lr;
  837. line-height: 46px;
  838. color: var(--vent-font-color);
  839. padding-top: 10px;
  840. pointer-events: auto;
  841. cursor: pointer;
  842. &:hover {
  843. background: var(--image-location-hover-bg) no-repeat;
  844. }
  845. .location-text {
  846. padding-top: 20px;
  847. letter-spacing: 3px;
  848. font-size: 16px;
  849. }
  850. }
  851. .location-select {
  852. position: fixed;
  853. top: 100px;
  854. pointer-events: auto;
  855. .location-select-box {
  856. width: 100%;
  857. height: 100%;
  858. position: relative;
  859. &::before {
  860. content: '';
  861. position: absolute;
  862. width: 230px;
  863. height: 500px;
  864. top: 0;
  865. left: 0;
  866. background: var(--image-tree-bg) no-repeat;
  867. background-size: contain;
  868. transform: rotateY(180deg);
  869. z-index: -1;
  870. }
  871. .location-top-title {
  872. color: var(--vent-font-color);
  873. position: absolute;
  874. width: 225px;
  875. height: 68px;
  876. background: var(--image-turn-location-top-bg) no-repeat;
  877. background-size: contain;
  878. top: 5px;
  879. left: 5px;
  880. display: flex;
  881. flex-direction: row;
  882. justify-content: space-between;
  883. align-items: flex-end;
  884. .title {
  885. font-size: 18px;
  886. position: relative;
  887. top: -14px;
  888. right: 15px;
  889. }
  890. }
  891. .location-expansion-icon {
  892. background: var(--image-tree-icon-cover-bg) no-repeat;
  893. background-size: contain;
  894. position: relative;
  895. left: 10px;
  896. top: -15px;
  897. padding: 5px;
  898. &:hover {
  899. background: var(--image-tree-icon-cover-hover-bg) no-repeat;
  900. background-size: contain;
  901. }
  902. }
  903. }
  904. .location-container {
  905. width: 200px;
  906. height: 390px;
  907. position: absolute;
  908. display: flex;
  909. flex-direction: column;
  910. top: 80px;
  911. left: 18px;
  912. overflow-y: auto;
  913. .location-item {
  914. color: var(--vent-font-color);
  915. line-height: 30px;
  916. display: flex;
  917. justify-content: space-between;
  918. // background-image: var(--vent-gas-list-item-bg-img);
  919. background-image: linear-gradient(to left, #39f5ff05, #39f5ff10);
  920. margin: 3px 0;
  921. .item-title {
  922. width: 80px;
  923. text-align: right;
  924. color: var(--vent-table-action-link);
  925. }
  926. }
  927. .location-bottom-btn {
  928. width: 100%;
  929. color: var(--vent-font-color);
  930. display: flex;
  931. justify-content: flex-end;
  932. margin-top: 20px;
  933. span {
  934. display: inline-block;
  935. width: 100%;
  936. background: var(--location-bottom-bg);
  937. border-radius: 3px;
  938. border: 1px solid var(--location-bottom-border);
  939. text-align: center;
  940. padding: 2px 0;
  941. cursor: pointer;
  942. &:hover {
  943. background: #00557422;
  944. }
  945. }
  946. }
  947. }
  948. }
  949. .location-select-show {
  950. right: 240px;
  951. animation-name: locationShow;
  952. /* 持续时间 */
  953. animation-duration: 1s;
  954. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  955. }
  956. .location-select-hide {
  957. right: -2px;
  958. animation-name: locationHide;
  959. /* 持续时间 */
  960. animation-duration: 1s;
  961. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  962. }
  963. .location-btn-show {
  964. right: -0px;
  965. animation-name: locationBtnShow;
  966. /* 持续时间 */
  967. animation-duration: 1s;
  968. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  969. }
  970. .location-btn-hide {
  971. right: -240px;
  972. animation-name: locationBtnHide;
  973. /* 持续时间 */
  974. animation-duration: 1s;
  975. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  976. }
  977. .tabs-box {
  978. height: 290px;
  979. }
  980. .bottom-tabs-box {
  981. position: relative;
  982. .tabs-box {
  983. width: calc(100% - 12px) !important;
  984. bottom: 3px !important;
  985. background-color: red;
  986. }
  987. .to-small {
  988. position: absolute;
  989. top: -65px;
  990. right: 36px;
  991. display: flex;
  992. align-items: center;
  993. justify-content: center;
  994. .to-home {
  995. width: 60px;
  996. height: 60px;
  997. background: var(--image-tohome) no-repeat center;
  998. background-size: auto;
  999. padding: 8px;
  1000. &:hover {
  1001. background-color: rgba(79, 104, 134, 0.418);
  1002. }
  1003. }
  1004. .table-show-icon {
  1005. width: 30px;
  1006. height: 30px;
  1007. font-size: 30px;
  1008. color: var(--vent-font-color);
  1009. margin-left: 10px;
  1010. }
  1011. }
  1012. .device-button-group {
  1013. position: absolute;
  1014. top: -30px;
  1015. display: flex;
  1016. width: 100%;
  1017. .device-active {
  1018. background: linear-gradient(45deg, #04e6fb, #0c5cab);
  1019. &::before {
  1020. border-color: #0efcff;
  1021. box-shadow: 1px 1px 3px 1px #0efcff inset;
  1022. }
  1023. }
  1024. }
  1025. .table-hide-icon {
  1026. color: var(--vent-font-color);
  1027. cursor: pointer;
  1028. position: absolute;
  1029. right: 20px;
  1030. top: 10px;
  1031. z-index: 9999;
  1032. }
  1033. .enter-detail {
  1034. color: var(--vent-font-color);
  1035. cursor: pointer;
  1036. position: absolute;
  1037. right: 35px;
  1038. top: 35px;
  1039. padding: 5px;
  1040. border-radius: 5px;
  1041. margin-left: 8px;
  1042. margin-right: 8px;
  1043. width: auto;
  1044. height: 33px !important;
  1045. display: flex;
  1046. align-items: center;
  1047. justify-content: center;
  1048. color: var(--vent-font-color);
  1049. padding: 5px 15px 5px 15px;
  1050. z-index: 999;
  1051. cursor: pointer;
  1052. &:hover {
  1053. background: var(--vent-device-manager-control-btn-hover);
  1054. }
  1055. &::before {
  1056. width: calc(100% - 6px);
  1057. height: 27px;
  1058. content: '';
  1059. position: absolute;
  1060. top: 3px;
  1061. right: 0;
  1062. left: 3px;
  1063. bottom: 0;
  1064. z-index: -1;
  1065. border-radius: inherit;
  1066. /*important*/
  1067. background: var(--vent-device-manager-control-btn);
  1068. }
  1069. }
  1070. }
  1071. .table-hide {
  1072. height: 0px;
  1073. animation-name: tableHide;
  1074. /* 持续时间 */
  1075. animation-duration: 1s;
  1076. transition: all 1s;
  1077. }
  1078. .table-show {
  1079. height: 290px;
  1080. animation-name: tableShow;
  1081. /* 持续时间 */
  1082. animation-duration: 1s;
  1083. transition: all 1s;
  1084. }
  1085. .location-form {
  1086. display: flex;
  1087. margin: 8px;
  1088. .location-form-item {
  1089. width: 400px;
  1090. .location-form-label {
  1091. width: 100px;
  1092. display: inline-block;
  1093. color: var(--vent-font-color);
  1094. }
  1095. input {
  1096. background: transparent !important;
  1097. color: var(--vent-font-color);
  1098. border: 1px solid var(--vent-form-item-border) !important;
  1099. }
  1100. }
  1101. .zxm-select-selector {
  1102. width: 200px !important;
  1103. }
  1104. }
  1105. @keyframes tableShow {
  1106. 0% {
  1107. height: 0px;
  1108. opacity: 0;
  1109. }
  1110. 100% {
  1111. height: 290px;
  1112. opacity: 1;
  1113. }
  1114. }
  1115. @keyframes tableHide {
  1116. 0% {
  1117. opacity: 1;
  1118. }
  1119. 100% {
  1120. height: 0px;
  1121. opacity: 0;
  1122. }
  1123. }
  1124. @keyframes treeShow {
  1125. 0% {
  1126. left: -400px;
  1127. opacity: 0;
  1128. }
  1129. 100% {
  1130. left: 10px;
  1131. opacity: 1;
  1132. }
  1133. }
  1134. @keyframes treeHide {
  1135. 0% {
  1136. left: 10px;
  1137. opacity: 1;
  1138. }
  1139. 100% {
  1140. left: -400px;
  1141. opacity: 0;
  1142. }
  1143. }
  1144. @keyframes locationShow {
  1145. 0% {
  1146. right: 0px;
  1147. opacity: 0;
  1148. }
  1149. 100% {
  1150. right: 240px;
  1151. opacity: 1;
  1152. }
  1153. }
  1154. @keyframes locationHide {
  1155. 0% {
  1156. right: 240px;
  1157. opacity: 1;
  1158. }
  1159. 100% {
  1160. right: 0;
  1161. opacity: 0;
  1162. }
  1163. }
  1164. @keyframes locationBtnShow {
  1165. 0% {
  1166. right: -240px;
  1167. opacity: 0;
  1168. }
  1169. 100% {
  1170. right: -2px;
  1171. opacity: 1;
  1172. }
  1173. }
  1174. @keyframes locationBtnHide {
  1175. 0% {
  1176. right: -2px;
  1177. opacity: 1;
  1178. }
  1179. 100% {
  1180. right: -240px;
  1181. opacity: 0;
  1182. }
  1183. }
  1184. :deep(.@{ventSpace}-picker-datetime-panel) {
  1185. height: 200px !important;
  1186. overflow-y: auto !important;
  1187. }
  1188. :deep(.@{ventSpace}-tabs-tabpane-active) {
  1189. // overflow: auto;
  1190. height: 100%;
  1191. }
  1192. :deep(.zxm-select-dropdown) {
  1193. left: 0 !important;
  1194. color: #000000 !important;
  1195. }
  1196. :deep(.zxm-select-selector) {
  1197. height: 34px !important;
  1198. line-height: 34px !important;
  1199. }
  1200. :deep(.zxm-input) {
  1201. height: 32px !important;
  1202. line-height: 32px !important;
  1203. .zxm-select-selection-item {
  1204. line-height: 32px !important;
  1205. }
  1206. }
  1207. .device-button {
  1208. height: 26px;
  1209. display: flex;
  1210. justify-content: center;
  1211. align-items: center;
  1212. color: var(--vent-font-color);
  1213. position: relative;
  1214. cursor: pointer;
  1215. padding: 0 20px;
  1216. background: linear-gradient(45deg, #04e6fb55, #0c5cab55);
  1217. clip-path: polygon(10px 0, 0 50%, 10px 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
  1218. &:nth-child(1) {
  1219. left: calc(-6px * 1);
  1220. }
  1221. &:nth-child(2) {
  1222. left: calc(-6px * 2);
  1223. }
  1224. &:nth-child(3) {
  1225. left: calc(-6px * 3);
  1226. }
  1227. &:nth-child(4) {
  1228. left: calc(-6px * 4);
  1229. }
  1230. &:nth-child(5) {
  1231. left: calc(-6px * 5);
  1232. }
  1233. &:nth-child(6) {
  1234. left: calc(-6px * 6);
  1235. }
  1236. &:nth-child(7) {
  1237. left: calc(-6px * 7);
  1238. }
  1239. &:nth-child(8) {
  1240. left: calc(-6px * 8);
  1241. }
  1242. &:nth-child(9) {
  1243. left: calc(-6px * 9);
  1244. }
  1245. &:nth-child(10) {
  1246. left: calc(-6px * 10);
  1247. }
  1248. &:nth-child(11) {
  1249. left: calc(-6px * 11);
  1250. }
  1251. &:nth-child(12) {
  1252. left: calc(-6px * 12);
  1253. }
  1254. &:nth-child(13) {
  1255. left: calc(-6px * 13);
  1256. }
  1257. &:nth-child(14) {
  1258. left: calc(-6px * 14);
  1259. }
  1260. &:nth-child(15) {
  1261. left: calc(-6px * 15);
  1262. }
  1263. &:nth-child(16) {
  1264. left: calc(-6px * 16);
  1265. }
  1266. &:nth-child(17) {
  1267. left: calc(-6px * 17);
  1268. }
  1269. &:nth-child(18) {
  1270. left: calc(-6px * 18);
  1271. }
  1272. &:nth-child(19) {
  1273. left: calc(-6px * 19);
  1274. }
  1275. // &:first-child {
  1276. // clip-path: polygon(0 0, 10px 50%, 0 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
  1277. // }
  1278. }
  1279. // :deep(.@{ventSpace}-pagination){
  1280. // margin-right: 20px !important;
  1281. // margin-top: 5px !important;
  1282. // display: flex;
  1283. // align-items: center;
  1284. // }</style>