index.vue 46 KB

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