index.vue 48 KB

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