index.vue 45 KB

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