index.vue 46 KB

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