index.vue 46 KB

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