index.vue 45 KB

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