index.vue 87 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434
  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 }" @click="showTree('treeShow', true)">
  5. <SvgIcon class="is-expansion-icon put-away-icon" size="38" name="expansion" />
  6. <span class="title">{{ treeNodeTitle }}</span>
  7. </div>
  8. <div class="device-select" :class="{ 'device-select-show': treeShow, 'device-select-hide': !treeShow }">
  9. <SvgIcon class="is-expansion-icon expansion-icon" size="28" name="put-away" @click="showTree('treeShow', false)" />
  10. <div class="device-select-box">
  11. <a-tree
  12. :show-line="true"
  13. :tree-data="treeData"
  14. v-model:selectedKeys="selectedKeys"
  15. :autoExpandParent="true"
  16. v-model:expandedKeys="expandedKeys"
  17. @select="onSelect"
  18. >
  19. </a-tree>
  20. </div>
  21. </div>
  22. <!-- 瓦斯巡检弹窗信息 -->
  23. <div v-if="deviceType.startsWith('gasDay_normal') && activeKey == 'monitor'" class="inspect-info-xj">
  24. <gasInspectDialog :gasSearch="gasSearch"></gasInspectDialog>
  25. </div>
  26. <div
  27. class="location-icon"
  28. :class="{ 'location-btn-show': !locationSettingShow, 'location-btn-hide': locationSettingShow }"
  29. @click="showTree('location', true)"
  30. >
  31. <SvgIcon size="18" name="put-away" />
  32. <span class="location-text">定位图标显示</span>
  33. </div>
  34. <div
  35. v-if="false && deviceType.startsWith('windrect')"
  36. class="topology-icon"
  37. :class="{ 'topology-btn-show': !topologyShow, 'topology-btn-hide': topologyShow }"
  38. @click="showTree('windTopology', true)"
  39. >
  40. <SvgIcon size="18" name="put-away" />
  41. <span class="topology-text">测风网络拓扑</span>
  42. </div>
  43. <div class="location-select" :class="{ 'location-select-show': locationSettingShow, 'location-select-hide': !locationSettingShow }">
  44. <div class="location-select-box">
  45. <div class="location-top-title" @click="showTree('location', false)">
  46. <SvgIcon class="is-expansion-icon location-expansion-icon" size="28" name="expansion" />
  47. <div class="title">定位图标显示</div>
  48. </div>
  49. <div class="location-container">
  50. <template v-for="location in locationList" :key="location.deviceType">
  51. <div class="location-item">
  52. <div class="item-title">{{ location.title }}&nbsp;:</div>
  53. <div>
  54. <a-radio-group v-model:value="location.Visible" :name="location.deviceType">
  55. <a-radio :value="1">是</a-radio>
  56. <a-radio :value="0">否</a-radio>
  57. </a-radio-group>
  58. </div>
  59. </div>
  60. </template>
  61. <div class="location-bottom-btn">
  62. <span @click="setLocation">提交</span>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. <div class="topology-select" :class="{ 'topology-select-show': topologyShow, 'topology-select-hide': !topologyShow }">
  68. <div class="topology-select-box">
  69. <div class="topology-top-title" @click="showTree('windTopology', false)">
  70. <SvgIcon class="is-expansion-icon topology-expansion-icon" size="28" name="expansion" />
  71. <div class="title">测风网络拓扑</div>
  72. </div>
  73. <div class="topology-container">
  74. <WindTopology v-if="topologyShow" />
  75. </div>
  76. </div>
  77. </div>
  78. <div
  79. class="bottom-tabs-box"
  80. :class="{ 'table-hide': !tableShow, 'table-show': tableShow }"
  81. style="height: 290px"
  82. @mousedown="setDivHeight($event, 230, scroll, 0)"
  83. id="monitorBox"
  84. >
  85. <div :style="`padding: 5px; height: ${scroll.y + 100}px`">
  86. <div class="to-small">
  87. <div class="to-home" @click="toHome()"></div>
  88. <!-- <div class="to-3D" @click="toHome('3D')"></div>
  89. <div v-if="hasPermission('show:modalChange')" class="to-2D" @click="toHome('2D')"></div> -->
  90. <FullscreenOutlined v-if="!tableShow" class="table-show-icon" @click="toHide" />
  91. </div>
  92. <div class="device-button-group" v-if="deviceList.length > 0">
  93. <!-- 关联设备 -->
  94. <div
  95. class="device-button"
  96. :class="{ 'device-active': deviceActive == device.deviceType }"
  97. v-for="(device, index) in deviceList"
  98. :key="index"
  99. @click="monitorChange(index)"
  100. >{{ device.deviceName }}
  101. </div>
  102. <!-- 场景详情进入 -->
  103. <div v-if="haveSysDetailArr.find((item) => deviceType.startsWith(item))" class="enter-detail" @click.stop="goDetail()">
  104. <send-outlined />
  105. {{ treeNodeTitle }}详情
  106. </div>
  107. </div>
  108. <!-- 进入瓦斯人工巡检历史详情 -->
  109. <div v-if="deviceType == 'gasDay_normal'">
  110. <div class="device-button-group">
  111. <div v-if="deviceType.startsWith('gasDay_normal')" class="enter-detail" @click.stop="goDetail()">
  112. <send-outlined />
  113. 瓦斯人工巡检历史详情
  114. </div>
  115. </div>
  116. </div>
  117. <!-- 进入瓦斯日报历史详情 -->
  118. <div v-if="deviceType == 'gasDayReport'">
  119. <div class="device-button-group">
  120. <div v-if="deviceType.startsWith('gasDayReport')" class="enter-detail" @click.stop="goDetail()">
  121. <send-outlined />
  122. 瓦斯日报历史详情
  123. </div>
  124. </div>
  125. </div>
  126. <!-- 进入粉尘报表分析详情 -->
  127. <div v-if="deviceType == 'dustDayReport'">
  128. <div class="device-button-group">
  129. <div v-if="deviceType.startsWith('dustDayReport')" class="enter-detail" @click.stop="goDetail()">
  130. <send-outlined />
  131. 粉尘报表分析
  132. </div>
  133. </div>
  134. </div>
  135. <div v-if="deviceType == 'bundleDayReport'">
  136. <div class="device-button-group">
  137. <div v-if="deviceType.startsWith('bundleDayReport')" class="enter-detail" @click.stop="goDetail()">
  138. <send-outlined />
  139. 束管日报分析
  140. </div>
  141. </div>
  142. </div>
  143. <div v-if="deviceType == 'bundleSpyDayReport'">
  144. <div class="device-button-group">
  145. <div v-if="deviceType.startsWith('bundleSpyDayReport')" class="enter-detail" @click.stop="goDetail()">
  146. <send-outlined />
  147. 色谱仪报表分析
  148. </div>
  149. </div>
  150. </div>
  151. <div v-if="deviceType == 'gaspatrol'">
  152. <div class="device-button-group">
  153. <div class="enter-detail" @click="exportXls()">
  154. <send-outlined />
  155. 导出
  156. </div>
  157. </div>
  158. </div>
  159. <div class="table-hide-icon" @click="toHide">
  160. <FullscreenExitOutlined style="font-size: 18px" />
  161. </div>
  162. <!-- 是人员定位表单代码,由于放在tab中,表格对已知刷新,导致表单数据也在刷寻,造成输入一半的中文时会清空输入框的内容,导致的输入不上数据 -->
  163. <div
  164. v-if="(deviceType.startsWith('location') || deviceType.startsWith('vehicle')) && activeKey == 'monitor'"
  165. class="location-form"
  166. style="position: absolute; top: 50px; z-index: 9999"
  167. >
  168. <div class="location-form-item">
  169. <span class="location-form-label">{{ deviceType.startsWith('location') ? '人员名称:' : '车辆名称' }}</span>
  170. <Input style="width: 200px" v-model:value="locationForm.strname" />
  171. </div>
  172. <!-- <div class="location-form-item">
  173. <span class="location-form-label">所属部门:</span>
  174. <MTreeSelect
  175. style="width: 200px"
  176. v-model:value="locationForm.department"
  177. placeholder="请选择所属部门"
  178. api="/monitor/getDepartmentInfo"
  179. :virtual="false"
  180. :isGetPopupContainer="false"
  181. />
  182. </div> -->
  183. <div class="location-form-item">
  184. <span class="location-form-label">分站名称:</span>
  185. <Input style="width: 200px" v-model:value="locationForm.stationname" />
  186. </div>
  187. </div>
  188. <a-tabs v-model:activeKey="activeKey" @change="tabChange" id="tabsBox">
  189. <a-tab-pane
  190. key="monitor"
  191. :tab="
  192. deviceType.startsWith('gasDay_normal')
  193. ? '当日巡检监测'
  194. : deviceType.startsWith('dustDayReport') ||
  195. deviceType.startsWith('bundleDayReport') ||
  196. deviceType.startsWith('bundleSpyDayReport') ||
  197. deviceType.startsWith('bundleReport') ||
  198. deviceType.startsWith('bundleSpyReport') ||
  199. deviceType.startsWith('dustReport')
  200. ? '最新监测报表'
  201. : '实时监测'
  202. "
  203. >
  204. <template v-if="(deviceType.startsWith('fanlocal') || deviceType.startsWith('fanmain')) && activeKey == 'monitor'">
  205. <GroupMonitorTable
  206. ref="MonitorDataTable"
  207. :dataSource="dataSource"
  208. :columnsType="`${deviceType}_monitor`"
  209. :scroll="scroll"
  210. :isAction="true"
  211. :isShowSelect="false"
  212. >
  213. <template #action="{ record }">
  214. <TableAction
  215. :actions="
  216. haveDetailArr().find((item) => deviceType.startsWith(item))
  217. ? [
  218. {
  219. label: '详情',
  220. onClick: goDetail.bind(null, record),
  221. },
  222. {
  223. label: '定位',
  224. onClick: goLocation.bind(null, record),
  225. },
  226. ]
  227. : [
  228. {
  229. label: '定位',
  230. onClick: goLocation.bind(null, record),
  231. },
  232. ]
  233. "
  234. />
  235. </template>
  236. </GroupMonitorTable>
  237. </template>
  238. <template v-else-if="deviceType == 'majorpath' && activeKey == 'monitor'">
  239. <a-table :columns="majorColumns" :data-source="dataSource" bordered :scroll="{ y: scroll.y - 30 }" :pagination="false"></a-table>
  240. </template>
  241. <template v-else-if="deviceType.startsWith('safetymonitor') && activeKey == 'monitor'">
  242. <MonitorTable
  243. ref="monitorTable"
  244. :columnsType="`${deviceType}_monitor`"
  245. :deviceType="deviceType"
  246. :dataSource="dataSource"
  247. design-scope="device_monitor"
  248. :isShowActionColumn="true"
  249. :isShowSelect="false"
  250. title="设备监测"
  251. :form-config="formConfig"
  252. :scroll="{ y: scroll.y - 110 }"
  253. >
  254. <template #action="{ record }">
  255. <TableAction
  256. :actions="
  257. haveDetailArr().find((item) => deviceType.startsWith(item))
  258. ? [
  259. {
  260. label: '详情',
  261. onClick: goDetail.bind(null, record),
  262. },
  263. {
  264. label: '定位',
  265. onClick: goLocation.bind(null, record),
  266. },
  267. ]
  268. : [
  269. {
  270. label: '定位',
  271. onClick: goLocation.bind(null, record),
  272. },
  273. ]
  274. "
  275. />
  276. </template>
  277. <template #filterCell="{ column, record }">
  278. <div v-if="!record.devicename && column.dataIndex === 'devicename'">-</div>
  279. <div v-if="!record.V && column.dataIndex === 'V'">-</div>
  280. <div v-if="!record.PointUnit && column.dataIndex === 'PointUnit'">-</div>
  281. <div v-if="!record.highRange && column.dataIndex === 'highRange'">-</div>
  282. <div v-if="!record.lowRange && column.dataIndex === 'lowRange'">-</div>
  283. <div v-if="!record.dataTypeName && column.dataIndex === 'dataTypeName'">-</div>
  284. <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
  285. record.netStatus == '0' ? '断开' : '连接'
  286. }}</a-tag>
  287. </template>
  288. </MonitorTable>
  289. </template>
  290. <template v-else-if="deviceType.startsWith('location') && activeKey == 'monitor'">
  291. <MonitorTable
  292. ref="monitorTable"
  293. :columnsType="`${deviceType}_monitor`"
  294. :deviceType="deviceType"
  295. :dataSource="dataSource"
  296. design-scope="device_monitor"
  297. :isShowActionColumn="true"
  298. :isShowSelect="false"
  299. title="设备监测"
  300. :scroll="{ y: scroll.y - 110 }"
  301. style="margin-top: 60px"
  302. >
  303. <template v-if="!noLocationList.includes('location')" #action="{ record }">
  304. <TableAction
  305. :actions="[
  306. {
  307. label: '定位',
  308. onClick: goLocation.bind(null, record),
  309. },
  310. ]"
  311. />
  312. </template>
  313. </MonitorTable>
  314. </template>
  315. <template v-else-if="deviceType.startsWith('vehicle') && activeKey == 'monitor'">
  316. <MonitorTable
  317. ref="monitorTable"
  318. :columnsType="`${deviceType}_monitor`"
  319. :deviceType="deviceType"
  320. :dataSource="dataSource"
  321. design-scope="device_monitor"
  322. :isShowActionColumn="true"
  323. :isShowSelect="false"
  324. title="设备监测"
  325. :scroll="{ y: scroll.y - 110 }"
  326. style="margin-top: 60px"
  327. >
  328. <template v-if="!noLocationList.includes('location')" #action="{ record }">
  329. <TableAction
  330. :actions="[
  331. {
  332. label: '定位',
  333. onClick: goLocation.bind(null, record),
  334. },
  335. ]"
  336. />
  337. </template>
  338. </MonitorTable>
  339. </template>
  340. <!-- <template v-else-if="deviceType.startsWith('gasmonitor') && activeKey == 'monitor'">
  341. <MonitorTable
  342. ref="monitorTable"
  343. :columnsType="`${deviceType}_monitor`"
  344. :dataSource="dataSource"
  345. design-scope="device_monitor"
  346. :isShowActionColumn="true"
  347. :isShowSelect="false"
  348. title="设备监测"
  349. :scroll="{ y: scroll.y - 30 }"
  350. >
  351. <template #action="{ record }">
  352. <TableAction
  353. :actions="[
  354. {
  355. label: '故障诊断分析',
  356. onClick: goDetail.bind(null, record),
  357. },
  358. {
  359. label: '定位',
  360. onClick: goLocation.bind(null, record),
  361. },
  362. ]"
  363. />
  364. </template>
  365. <template #filterCell="{ column, record }">
  366. <template v-if="column.dataIndex === 'isLeakage'">
  367. {{ record.isLeakage === '1' ? '是' : '否' }}
  368. </template>
  369. <template v-if="column.dataIndex === 'leakagePoint' && record.pipFaultDiag && record.pipFaultDiag.isLeakage">
  370. {{ record.pipFaultDiag.ld_x }}
  371. </template>
  372. <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == 0 ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'">
  373. {{ record.warnFlag == 0 ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测' }}
  374. </a-tag>
  375. <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">
  376. {{ record.netStatus == '0' ? '断开' : '连接' }}
  377. </a-tag>
  378. </template>
  379. </MonitorTable>
  380. </template> -->
  381. <!-- 瓦斯人工巡检 -->
  382. <template v-else-if="deviceType.startsWith('gasDay_normal') && activeKey == 'monitor'">
  383. <gaspatrolTable ref="gaspatrol" @getSearch="getSearch" @locate="goLocation"> </gaspatrolTable>
  384. </template>
  385. <!-- 瓦斯日报 -->
  386. <template v-else-if="deviceType.startsWith('gasDayReport') && activeKey == 'monitor' && glob.sysOrgCode != 'sdmtjtbetmk'">
  387. <gasReport ref="gasreport" @locate="goLocation"> </gasReport>
  388. </template>
  389. <template v-else-if="deviceType.startsWith('gasDayReport') && activeKey == 'monitor' && glob.sysOrgCode == 'sdmtjtbetmk'">
  390. <gasReportCount ref="gasreportcount" @locate="goLocation"> </gasReportCount>
  391. </template>
  392. <!-- 粉尘监测报表-->
  393. <template v-else-if="deviceType.startsWith('dustDayReport') && activeKey == 'monitor'">
  394. <dustMonitorTable @locate="goLocation" :isShowAction="true"></dustMonitorTable>
  395. </template>
  396. <template v-else-if="deviceType.startsWith('bundleDayReport') && activeKey == 'monitor'">
  397. <bundleMonitorTable @locate="goLocation" :isShowAction="true"></bundleMonitorTable>
  398. </template>
  399. <template v-else-if="deviceType.startsWith('bundleSpyDayReport') && activeKey == 'monitor'">
  400. <bundleSpyMonitorTable @locate="goLocation" :isShowAction="true"></bundleSpyMonitorTable>
  401. </template>
  402. <template v-else-if="deviceType.startsWith('dusting') && activeKey == 'monitor'">
  403. <DustingTable :dataSource="dataSource" :deviceType="deviceType" :scroll="scroll" @locate="goLocation" />
  404. </template>
  405. <!-- 设备分站 -->
  406. <template v-else-if="deviceType.startsWith('substation_normal') && activeKey == 'monitor'">
  407. <stationTable ref="station" @locate="goLocation" @stationDetail="stationDetail"> </stationTable>
  408. </template>
  409. <!-- 瓦斯管网 -->
  410. <template v-else-if="deviceType.startsWith('gaspipe') && activeKey == 'monitor'">
  411. <GasPipeTable :showDetailButton="true" :scroll="scroll" @detail="goDetail($event)" @locate="goLocation" />
  412. </template>
  413. <template v-else>
  414. <!-- 工作面echarts图标 -->
  415. <BarAndLine
  416. v-if="activeKey == 'monitor' && deviceType == 'surface_history'"
  417. class="echarts-line"
  418. xAxisPropType="time"
  419. :dataSource="surfaceEchartsData"
  420. height="300px"
  421. :chartsColumns="surfaceChartsColumns"
  422. :option="echatsOption"
  423. />
  424. <MonitorTable
  425. v-else-if="activeKey == 'monitor'"
  426. ref="monitorTable"
  427. :columnsType="`${deviceType}_monitor`"
  428. :dataSource="dataSource"
  429. design-scope="device_monitor"
  430. :isShowActionColumn="true"
  431. :isShowSelect="false"
  432. title="设备监测"
  433. :scroll="{ y: scroll.y - 30 }"
  434. >
  435. <template #action="{ record }">
  436. <TableAction
  437. :actions="
  438. haveDetailArr().find((item) => deviceType.startsWith(item))
  439. ? [
  440. {
  441. label: '详情',
  442. onClick: goDetail.bind(null, record),
  443. },
  444. {
  445. label: '定位',
  446. onClick: goLocation.bind(null, record),
  447. },
  448. ]
  449. : [
  450. {
  451. label: '定位',
  452. onClick: goLocation.bind(null, record),
  453. },
  454. ]
  455. "
  456. />
  457. </template>
  458. <template #filterCell="{ column, record }">
  459. <template v-if="deviceType.startsWith('gate') || deviceType.startsWith('door')">
  460. <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '0' && record.frontGateClose == '0'" color="red"
  461. >正在运行</a-tag
  462. >
  463. <a-tag
  464. v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '0' && record.frontGateClose == 1"
  465. color="default"
  466. >关闭</a-tag
  467. >
  468. <a-tag
  469. v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '1' && record.frontGateClose == '0'"
  470. color="#46C66F"
  471. >打开</a-tag
  472. >
  473. <a-tag
  474. v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '1' && record.frontGateClose == '1'"
  475. color="#FF0000"
  476. >点位异常</a-tag
  477. >
  478. <a-tag v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '0' && record.rearGateClose == '0'" color="red"
  479. >正在运行</a-tag
  480. >
  481. <a-tag
  482. v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '0' && record.rearGateClose == '1'"
  483. color="default"
  484. >关闭</a-tag
  485. >
  486. <a-tag
  487. v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '1' && record.rearGateClose == '0'"
  488. color="#46C66F"
  489. >打开</a-tag
  490. >
  491. <a-tag
  492. v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '1' && record.rearGateClose == '1'"
  493. color="#FF0000"
  494. >点位异常</a-tag
  495. >
  496. <a-tag v-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == '0'" color="red"
  497. >正在运行</a-tag
  498. >
  499. <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == 1" color="default"
  500. >关闭</a-tag
  501. >
  502. <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '0'" color="#46C66F"
  503. >打开</a-tag
  504. >
  505. <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '1'" color="#FF0000"
  506. >点位异常</a-tag
  507. >
  508. <template v-if="column.dataIndex === 'ndoortype'">
  509. <span>{{ render.renderDictText(record.ndoortype, 'ndoortype') }}</span>
  510. </template>
  511. <template v-if="column.dataIndex === 'doorUse'">
  512. <span>{{ render.renderDictText(record.doorUse, 'doorUse') }}</span>
  513. </template>
  514. </template>
  515. <template v-else-if="deviceType.startsWith('windrect')">
  516. <a-tag v-if="column.dataIndex === 'sign'" :color="record.sign == 0 ? '#95CF65' : record.sign == 1 ? '#4590EA' : '#9876AA'">
  517. {{ record.sign == 0 ? '高位' : record.sign == 1 ? '中位' : '低位' }}</a-tag
  518. >
  519. <template v-if="record && column && column.dataIndex === 'isRun' && record.isRun">
  520. <a-tag v-if="record.isRun == -2 || record.isRun == -1" :color="record.isRun == -2 ? '#95CF65' : '#ED5700'">{{
  521. record.isRun == -2 ? '空闲' : '等待'
  522. }}</a-tag>
  523. <a-tag v-else-if="record.isRun == 100" color="#4693FF">完成</a-tag>
  524. <Progress v-else :percent="Number(record.isRun)" size="small" status="active" />
  525. </template>
  526. </template>
  527. <template v-else-if="deviceType.startsWith('safetymonitor')">
  528. <div v-if="!record.devicename && column.dataIndex === 'devicename'">-</div>
  529. <div v-if="!record.V && column.dataIndex === 'V'">-</div>
  530. <div v-if="!record.PointUnit && column.dataIndex === 'PointUnit'">-</div>
  531. <div v-if="!record.highRange && column.dataIndex === 'highRange'">-</div>
  532. <div v-if="!record.lowRange && column.dataIndex === 'lowRange'">-</div>
  533. <div v-if="!record.dataTypeName && column.dataIndex === 'dataTypeName'">-</div>
  534. </template>
  535. <template v-else-if="deviceType.startsWith('atomizing')">
  536. <a-tag v-if="column.dataIndex === 'stateConn' && record.stateConn == '1'" color="green">连接</a-tag>
  537. <a-tag v-if="column.dataIndex === 'stateConn' && record.stateConn == '0'" color="red">断开</a-tag>
  538. </template>
  539. <template v-else-if="deviceType.startsWith('gaspatrol')">
  540. <a-tag v-if="column.dataIndex === 'deviceConnect_str' && record.deviceConnect_str.endsWith('正常')" color="green">{{
  541. record.deviceConnect_str
  542. }}</a-tag>
  543. <a-tag v-if="column.dataIndex === 'deviceConnect_str' && record.deviceConnect_str.endsWith('断开')" color="red">{{
  544. record.deviceConnect_str
  545. }}</a-tag>
  546. </template>
  547. <a-tag v-if="column.dataIndex === 'runRoRecondition'" :color="record.runRoRecondition == '1' ? '#f00' : 'green'">{{
  548. record.runRoRecondition == '1' ? '检修' : '运行'
  549. }}</a-tag>
  550. <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == 0 ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'">
  551. {{ record.warnFlag == 0 ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测' }}</a-tag
  552. >
  553. <template v-else-if="column.dataIndex === 'warnLevel'">
  554. <a-tag v-if="record.warnLevel == '101'" color="green">低风险</a-tag>
  555. <a-tag v-else-if="record.warnLevel == '102'" color="#FF5812">一般风险</a-tag>
  556. <a-tag v-else-if="record.warnLevel == '103'" color="#FF5812">较大风险</a-tag>
  557. <a-tag v-else-if="record.warnLevel == '104'" color="#FF5812">重大风险</a-tag>
  558. <a-tag v-else-if="record.warnLevel == '201'" color="#FF0000">报警</a-tag>
  559. <a-tag v-else-if="record.warnLevel == '10000'" color="#FF5812">数据超限</a-tag>
  560. <a-tag v-else-if="record.warnLevel == '1001'" color="default">网络中断</a-tag>
  561. <a-tag v-else color="green">正常</a-tag>
  562. </template>
  563. <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
  564. record.netStatus == '0' ? '断开' : '连接'
  565. }}</a-tag>
  566. </template>
  567. </MonitorTable>
  568. </template>
  569. </a-tab-pane>
  570. <a-tab-pane key="history" tab="历史数据" v-if="!noHistoryArr().find((item) => deviceType.startsWith(item))">
  571. <div class="tab-item" v-if="activeKey == 'history'">
  572. <template v-if="deviceType.startsWith('firemon_normal')">
  573. <HistoryBall :dataSource="dataSource"></HistoryBall>
  574. </template>
  575. <template v-else-if="deviceType.startsWith('fanmain')">
  576. <HistoryTableNew class="w-100% h-100%" :device-code="`${deviceType}`" :scroll="scroll" dict-code="fan_dict" />
  577. </template>
  578. <template v-else-if="deviceType.startsWith('fanlocal')">
  579. <HistoryTableNew class="w-100% h-100%" :device-code="`${deviceType}`" :scroll="scroll" dict-code="fanlocal_dict" />s
  580. </template>
  581. <template v-else>
  582. <HistoryTable
  583. ref="historyTable"
  584. :sysId="systemID"
  585. :columns-type="`${deviceType}`"
  586. :device-type="deviceType"
  587. designScope="device-history"
  588. :scroll="scroll"
  589. />
  590. </template>
  591. </div>
  592. </a-tab-pane>
  593. <a-tab-pane
  594. key="5"
  595. :tab="deviceType.startsWith('gasmonitor') ? '曲线监测' : '历史曲线'"
  596. v-if="haveHistoryEcharts.find((item) => deviceType.startsWith(item))"
  597. >
  598. <div class="tab-item">
  599. <HistoryTableMajorPath
  600. v-if="deviceType.startsWith('majorpath')"
  601. class="w-100% h-100%"
  602. :sysId="`${systemID}`"
  603. :scroll="scroll"
  604. columnsType="sys_majorpath"
  605. type="chart"
  606. />
  607. <DeviceEcharts
  608. chartsColumnsType="gasmonitor_chart"
  609. xAxisPropType="strname"
  610. height="300px"
  611. :dataSource="dataSource"
  612. :device-list-api="list.bind(null, { devicetype: 'gasmonitor', pagetype: 'normal' })"
  613. device-type="gasmonitor"
  614. />
  615. </div>
  616. </a-tab-pane>
  617. <a-tab-pane
  618. key="alarm"
  619. tab="报警历史"
  620. v-if="!noWarningArr.find((item) => deviceType.startsWith(item)) || !hasPermission('safety:hideWarning')"
  621. >
  622. <div class="tab-item">
  623. <AlarmHistoryTable
  624. ref="alarmHistoryTable"
  625. v-if="activeKey == 'alarm'"
  626. :sysId="systemID"
  627. columns-type="alarm"
  628. :device-type="deviceType"
  629. :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID, pageSize: 10000 })"
  630. :scroll="scroll"
  631. designScope="alarm-history"
  632. />
  633. </div>
  634. </a-tab-pane>
  635. <a-tab-pane key="4" tab="操作历史" v-if="haveHandlerArr.find((item) => deviceType.startsWith(item))">
  636. <div class="tab-item">
  637. <HandlerHistoryTable
  638. ref="handlerHistoryTable"
  639. v-if="activeKey == '4'"
  640. :sysId="systemID"
  641. columns-type="operator_history"
  642. :device-type="deviceType"
  643. :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })"
  644. :scroll="scroll"
  645. designScope="operator-history"
  646. />
  647. </div>
  648. </a-tab-pane>
  649. </a-tabs>
  650. </div>
  651. </div>
  652. <mainPath
  653. v-if="deviceType == 'majorpath'"
  654. :dataSource="majorPathEchartsData"
  655. style="position: absolute; top: 40px; left: 250px; width: 300px; height: 300px"
  656. />
  657. <component v-if="modalVisible" :is="currentModal" v-model:visible="modalVisible" :dataSource="dataSource" :activeID="activeID" />
  658. </div>
  659. </template>
  660. <script setup lang="ts">
  661. import { ref, onMounted, onUnmounted, ComponentOptions, shallowRef, reactive, watch } from 'vue';
  662. import { SendOutlined, FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons-vue';
  663. import { list, getDeviceList, getDeviceTypeList, devPosition, getDepartmentInfo, getExportUrl, getRegulation } from './device.api';
  664. import WindTopology from '/@/views/vent/monitorManager/windrectMonitor/topology/WindTopology.vue';
  665. import AlarmHistoryTable from '../../../comment/AlarmHistoryTable.vue';
  666. import HistoryTable from '../../../comment/HistoryTable.vue';
  667. import HistoryTableNew from '/@/views/vent/comment/history/HistoryTable.vue';
  668. import HandlerHistoryTable from '../../../comment/HandlerHistoryTable.vue';
  669. import MonitorTable from '../../../comment/MonitorTable.vue';
  670. import GroupMonitorTable from '../../../comment/GroupMonitorTable.vue';
  671. import stationTable from '../../../comment/stationTable.vue';
  672. import gaspatrolTable from '../../../comment/gaspatrolTable.vue';
  673. import gasReport from '../../../comment/gasReport.vue';
  674. import gasReportCount from '../../../comment/gasReportCount.vue';
  675. import dustMonitorTable from '../../../comment/dustMonitorTable.vue';
  676. import bundleMonitorTable from '../../../comment/bundleMonitorTable.vue';
  677. import gasInspectDialog from '../../../comment/gasInspectDialog.vue';
  678. import DustingTable from '../../../comment/DustingTable.vue';
  679. import bundleSpyMonitorTable from '../../../comment/bundleSpyMonitorTable.vue';
  680. import GasPipeTable from '../../../comment/GasPipeTable.vue';
  681. import HistoryTableMajorPath from './modal/HistoryTableMajorPath.vue';
  682. import HistoryBall from './modal/history-ball.vue';
  683. import { TreeProps, message, Progress, Input, Select } from 'ant-design-vue';
  684. import { TableAction } from '/@/components/Table';
  685. import { SvgIcon } from '/@/components/Icon';
  686. import { getActions } from '/@/qiankun/state';
  687. import { useRouter, useRoute } from 'vue-router';
  688. import { setDivHeight } from '/@/utils/event';
  689. import { render } from '/@/utils/common/renderUtils';
  690. import {
  691. majorColumns,
  692. haveSysDetailArr,
  693. haveDetailArr,
  694. haveHandlerArr,
  695. noWarningArr,
  696. surfaceChartsColumns,
  697. noHistoryArr,
  698. getMonitorComponent,
  699. noLocationArr,
  700. haveHistoryEcharts,
  701. } from './device.data';
  702. import mainPath from './modal/mainPath.vue';
  703. import { formConfig } from '../../../safetyMonitor/safety.data';
  704. import { getDictItemsByCode } from '/@/utils/dict';
  705. import BarAndLine from '/@/components/chart/BarAndLine.vue';
  706. import { nextTick } from 'vue';
  707. import { useMethods } from '/@/hooks/system/useMethods';
  708. import { useGo } from '/@/hooks/web/usePage';
  709. import { useGlobSetting } from '/@/hooks/setting';
  710. import { usePermission } from '/@/hooks/web/usePermission';
  711. import { PageEnum } from '/@/enums/pageEnum';
  712. import { useUserStore } from '/@/store/modules/user';
  713. type DeviceType = { deviceType: string; deviceName: string; datalist: any[] };
  714. const glob = useGlobSetting();
  715. // import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
  716. const { FiberModal, BundleModal, DustModal, BallvalveModal, AtomizingModal, GaspatrolModal, WisdomBallModal } = getMonitorComponent();
  717. const props = defineProps({
  718. pageData: {
  719. type: Object,
  720. default: () => {},
  721. },
  722. });
  723. const { hasPermission } = usePermission();
  724. const { handleExportXls } = useMethods();
  725. const go = useGo();
  726. const echatsOption = {
  727. grid: {
  728. top: '35',
  729. left: '30',
  730. right: '45',
  731. bottom: '25',
  732. containLabel: true,
  733. },
  734. toolbox: {
  735. feature: {},
  736. },
  737. };
  738. const router = useRouter();
  739. const route = useRoute();
  740. const actions = getActions();
  741. const locationForm = reactive({
  742. strname: '',
  743. department: '',
  744. stationname: '',
  745. });
  746. const noLocationList = noLocationArr();
  747. const monitorTable = ref();
  748. const historyTable = ref();
  749. const alarmHistoryTable = ref();
  750. const handlerHistoryTable = ref();
  751. // const routerParam = ref('home') // 默认进来时首页
  752. const isRefresh = ref(true);
  753. // 模态框
  754. const currentModal = shallowRef<Nullable<ComponentOptions>>(null); //模态框
  755. const modalVisible = ref<Boolean>(false); // 模态框是否可见
  756. // const drawerHeight = ref(240) // 监测框最小高度
  757. const treeShow = ref(true); //是否显示树形菜单
  758. const tableShow = ref(true); //是否显示树形菜单
  759. const locationSettingShow = ref(false); //是否显示树形菜单
  760. const topologyShow = ref(false); // 是否显示测风网络拓扑面板
  761. const treeNodeTitle = ref(''); // 选中的树形标题
  762. const locationList = ref([]); //巷道定位图标显示列表
  763. const deviceList = ref<DeviceType[]>([]); //关联设备列表
  764. const deviceActive = ref('');
  765. const activeKey = ref('monitor'); // tab key
  766. const dataSource = shallowRef([]); // 实时监测数据
  767. const majorPathEchartsData = ref({}); // 关键路线echarts数据
  768. const surfaceEchartsData = ref<any[]>(); // 工作面历史记录,echarts数据
  769. const activeID = ref(''); // 打开详情modal时监测的设备id
  770. const deviceType = ref(''); // 监测设备类型
  771. const systemType = ref('');
  772. const systemID = ref(''); // 系统监测时,系统id
  773. const selectedKeys = ref<string[]>([]);
  774. const expandedKeys = ref<string[]>([]);
  775. const scroll = reactive({
  776. y: 180,
  777. });
  778. const treeData = ref<TreeProps['treeData']>([]);
  779. let departmentInfo: Null | Object = null;
  780. let startMonitorTimer = 0;
  781. let gaspatrol = ref(null);
  782. let gasreport = ref(null);
  783. let gasreportcount = ref(null);
  784. let station = ref(null);
  785. let gasSearch = reactive({
  786. address: '',
  787. userName: '',
  788. insType: '2',
  789. class: 'night',
  790. });
  791. //树形菜单选择事件
  792. const onSelect: TreeProps['onSelect'] = (keys, e) => {
  793. deviceType.value = '';
  794. systemID.value = '';
  795. deviceList.value = [];
  796. const title = e.node.title; // 在
  797. if (e.node.parent && e.node.parent.node.type.toString().startsWith('sys')) {
  798. systemType.value = e.node.parent.node.type;
  799. if (deviceType.value != e.node.parent.node.type) deviceType.value = e.node.parent.node.type;
  800. systemID.value = e.node.type;
  801. // 传递工作面id信息,用于定位
  802. go(`${route.path}?type=tunMonitor&deviceType=${deviceType.value}&deviceid=${systemID.value}`);
  803. } else {
  804. systemType.value = e.node.type;
  805. if (deviceType.value != e.node.type) deviceType.value = e.node.type;
  806. go(`${route.path}?type=tunMonitor&deviceType=${deviceType.value}&deviceid=`);
  807. }
  808. clearTimeout(timer);
  809. timer = undefined;
  810. if (startMonitorTimer) {
  811. clearTimeout(startMonitorTimer);
  812. }
  813. dataSource.value = [];
  814. monitorTable.value.resetPagination();
  815. if (!startMonitorTimer) {
  816. startMonitorTimer = setTimeout(() => {
  817. expandedKeys.value = keys;
  818. selectedKeys.value = keys;
  819. treeNodeTitle.value = e.node.title;
  820. if (e.node.children?.length < 1 && timer) {
  821. getMonitor(true);
  822. }
  823. }, 1000);
  824. }
  825. // activeKey.value = '1';
  826. };
  827. function tabChange(activeKeyVal) {
  828. activeKey.value = activeKeyVal;
  829. router.push({ path: route.path, query: { ...route.query, tabtype: activeKey.value } });
  830. }
  831. function showTree(flag, value) {
  832. if (flag == 'treeShow') treeShow.value = value;
  833. if (flag == 'location') locationSettingShow.value = value;
  834. if (flag == 'windTopology') topologyShow.value = value;
  835. }
  836. async function getDeviceType(sysType?) {
  837. if (treeData.value?.length > 0) return;
  838. const result = await getDeviceTypeList({});
  839. if (result.length > 0) {
  840. const dataSource = <TreeProps['treeData']>[];
  841. let key = '0';
  842. const getData = (resultList, dataSourceList, keyVal) => {
  843. resultList.forEach((item, index) => {
  844. if (item.deviceType != 'sys' && item.children && item.children.length > 0) {
  845. const children = getData(item.children, [], `${keyVal}-${index}`);
  846. // 判断关键阻力路线
  847. if (item.itemValue.startsWith(sysType) && children[0]) {
  848. systemID.value = item.children[0]['itemValue'];
  849. }
  850. dataSourceList.push({
  851. children: children,
  852. title: item.itemText,
  853. key: `${keyVal}-${index}`,
  854. type: item.itemValue,
  855. parentKey: `${keyVal}`,
  856. });
  857. } else {
  858. dataSourceList.push({
  859. children: [],
  860. title: item.itemText,
  861. key: `${keyVal}-${index}`,
  862. type: item.itemValue,
  863. parentKey: `${keyVal}`,
  864. });
  865. }
  866. });
  867. return dataSourceList;
  868. };
  869. treeData.value = getData(result, dataSource, key);
  870. }
  871. }
  872. // https获取监测数据
  873. let timer: null | NodeJS.Timeout = undefined;
  874. function getMonitor(flag?) {
  875. if (deviceType.value) {
  876. if (timer) timer = null;
  877. if (Object.prototype.toString.call(timer) === '[object Null]') {
  878. timer = setTimeout(
  879. async () => {
  880. if (deviceType.value.startsWith('gasDay_normal') && gaspatrol.value) {
  881. gaspatrol.value.queryNowGasInsInfoList(); //人工瓦斯巡检
  882. } else if (deviceType.value.startsWith('gasDayReport')) {
  883. if (glob.sysOrgCode == 'sdmtjtbetmk') {
  884. gasreportcount.value.getSearchReport();
  885. } else {
  886. gasreport.value.getSearchReport(); //瓦斯日报
  887. }
  888. } else if (deviceType.value.startsWith('substation') && station.value) {
  889. //分站
  890. station.value.getStationList();
  891. } else {
  892. await getDataSource();
  893. }
  894. if (timer) {
  895. getMonitor();
  896. }
  897. },
  898. flag ? 0 : 1000
  899. );
  900. }
  901. }
  902. }
  903. let allRegulations: any[] | null = null;
  904. async function getDataSource() {
  905. if (deviceType.value && deviceType.value.startsWith('sys') && systemID.value) {
  906. const res = await list({ devicetype: 'sys', systemID: systemID.value });
  907. const result = res.msgTxt;
  908. const deviceArr = <DeviceType[]>[];
  909. result.forEach((item) => {
  910. const data = item['datalist'].filter((data: any) => {
  911. const readData = data.readData;
  912. return Object.assign(data, readData);
  913. });
  914. // 如果查出的所有设备里,设备类型是sys的,标识其是系统总体,不应显示在设备列表中
  915. if (item.type == 'sys') return;
  916. // majorpath关键线路需要显示图表
  917. if (item.type === 'majorpath') {
  918. deviceArr.unshift({ deviceType: item.type, deviceName: item['typeName'], datalist: item['datalist'][0]['paths'] });
  919. return (majorPathEchartsData.value = item['datalist'][0]);
  920. }
  921. // 工作面历史数据需要显示图表
  922. if (item.type.startsWith('surface_history')) {
  923. surfaceEchartsData.value = item['datalist'][0];
  924. return deviceArr.unshift({
  925. deviceType: item.type,
  926. deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
  927. datalist: data,
  928. });
  929. }
  930. // 其余的存在 subtype 的(一般为报表)仅需显示报表表格,同时它们一版都排在后面
  931. if (item.subtype) {
  932. return deviceArr.push({
  933. deviceType: item.subtype,
  934. deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
  935. datalist: data,
  936. });
  937. }
  938. deviceArr.unshift({
  939. deviceType: item.type,
  940. deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
  941. datalist: data,
  942. });
  943. });
  944. deviceList.value = deviceArr;
  945. if (deviceArr.length > 0) {
  946. // if (deviceArr[1]) {
  947. // deviceActive.value = deviceArr[1].deviceType
  948. // monitorChange(1)
  949. // } else {
  950. // deviceActive.value = deviceArr[0].deviceType
  951. // monitorChange(0)
  952. // }
  953. // deviceActive.value = route.query['deviceActive'] || deviceArr[0].deviceType;
  954. monitorChange(0);
  955. }
  956. } else {
  957. let res = null;
  958. if (systemID.value) {
  959. res = await list({ devicetype: 'sys', types: deviceType.value, systemID: systemID.value });
  960. if (res && res.msgTxt) {
  961. const result = res.msgTxt;
  962. result.forEach((item) => {
  963. const data = item['datalist'].filter((data: any) => {
  964. const readData = data.readData;
  965. return Object.assign(data, readData);
  966. });
  967. if (item.type != 'sys') {
  968. if (item.type.startsWith('majorpath') && item.type == deviceType.value) {
  969. dataSource.value = item['datalist'][0]['paths'];
  970. majorPathEchartsData.value = item['datalist'][0];
  971. return;
  972. } else if (item.type == deviceType.value) {
  973. if (item.type == 'surface_history') {
  974. // 工作面图标数据
  975. surfaceEchartsData.value = item['datalist'][0];
  976. } else {
  977. dataSource.value = data;
  978. }
  979. return;
  980. }
  981. }
  982. });
  983. }
  984. } else {
  985. let resultData, searchForm;
  986. if (monitorTable.value) {
  987. const formData = monitorTable.value.getForm();
  988. searchForm = formData.getFieldsValue();
  989. }
  990. if (monitorTable.value) {
  991. if (deviceType.value.startsWith('safetymonitor')) {
  992. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: { ...searchForm } });
  993. } else if (deviceType.value.startsWith('location')) {
  994. if (!departmentInfo) {
  995. departmentInfo = await getDepartmentInfo({});
  996. }
  997. let department = null;
  998. if (departmentInfo && locationForm && locationForm['department']) {
  999. for (const key in departmentInfo) {
  1000. const item = departmentInfo[key];
  1001. if (item['id'] === locationForm['department']) {
  1002. department = item;
  1003. break;
  1004. }
  1005. }
  1006. }
  1007. resultData = await list({
  1008. devicetype: deviceType.value,
  1009. pagetype: 'normal',
  1010. filterParams: {
  1011. strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
  1012. userName: locationForm['strname'] ? locationForm['strname'] : '',
  1013. userJson: department && department['name'] ? department['name'] : '',
  1014. },
  1015. });
  1016. } else if (deviceType.value.startsWith('vehicle')) {
  1017. resultData = await list({
  1018. devicetype: deviceType.value,
  1019. pagetype: 'normal',
  1020. filterParams: {
  1021. strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
  1022. vehicleName: locationForm['strname'] ? locationForm['strname'] : '',
  1023. },
  1024. });
  1025. } else {
  1026. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
  1027. }
  1028. } else {
  1029. // 非安全监控
  1030. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
  1031. }
  1032. if (resultData && resultData.msgTxt) {
  1033. const result = resultData.msgTxt[0];
  1034. if (result) {
  1035. const data = result['datalist'].filter((data: any) => {
  1036. const readData = data.readData;
  1037. return Object.assign(data, readData);
  1038. });
  1039. if (deviceType.value.startsWith('safetymonitor')) {
  1040. const resultData = <any[]>[];
  1041. // 如果是安全监控的数据时需要过滤常见设备数据,根据设定的常用安全监控字典去匹配
  1042. const dictCodes = getDictItemsByCode('safetynormal');
  1043. if (searchForm && !searchForm['dataTypeName'] && dictCodes && dictCodes.length) {
  1044. for (let i = 0; i < dictCodes.length; i++) {
  1045. const dict = dictCodes[i];
  1046. data.forEach((item) => {
  1047. if (dict['value'] == item['dataTypeName']) {
  1048. resultData.push(item);
  1049. }
  1050. });
  1051. }
  1052. dataSource.value = resultData;
  1053. } else {
  1054. dataSource.value = data;
  1055. }
  1056. } else {
  1057. let tableData: any[] = [];
  1058. let noNetData: any[] = [];
  1059. data.filter((el) => {
  1060. if (el.netStatus == 1) {
  1061. tableData.push(el);
  1062. } else {
  1063. noNetData.push(el);
  1064. }
  1065. });
  1066. const rawData = [...tableData, ...noNetData] || [];
  1067. const processedData = [...rawData];
  1068. // 首次请求获取去所有regulation数据
  1069. if (allRegulations === null) {
  1070. // console.log(allRegulations, 'sssssssss');
  1071. const regulationRes = await getRegulation({
  1072. deviceKind: deviceType.value,
  1073. });
  1074. allRegulations = regulationRes || [];
  1075. }
  1076. // 根据id创建一个映射表
  1077. const regulationMap = new Map();
  1078. allRegulations.forEach((reg) => {
  1079. regulationMap.set(reg.id, reg);
  1080. });
  1081. // 对regulation字段进行替换
  1082. processedData.forEach((data) => {
  1083. if (data.regulation) {
  1084. const reg = regulationMap.get(data.regulation);
  1085. if (reg) {
  1086. data.regulation = reg; // 替换为完整对象
  1087. data.fmin = reg.fmin;
  1088. data.fmax = reg.fmax;
  1089. }
  1090. }
  1091. });
  1092. dataSource.value = processedData;
  1093. if (dataSource.value.length > 0) {
  1094. await processReadData(processedData);
  1095. }
  1096. }
  1097. } else {
  1098. dataSource.value = [];
  1099. }
  1100. } else {
  1101. dataSource.value = [];
  1102. }
  1103. }
  1104. }
  1105. }
  1106. async function processReadData(data: any[]) {
  1107. const promises = data
  1108. .filter((item) => item.readData)
  1109. .map(async (item) => {
  1110. item.readData && Object.assign(item, item.readData);
  1111. });
  1112. await Promise.all(promises);
  1113. }
  1114. //设备分站详情跳转
  1115. function stationDetail() {
  1116. const newPage = router.resolve({ path: '/safety/list/detail/home' });
  1117. window.open(newPage.href, '_blank');
  1118. }
  1119. function goLocation(record) {
  1120. if (record['deviceType'] == 'person_bd' || record['deviceType'] == 'car_bd') {
  1121. actions.setGlobalState({ locationId: record.devNum, locationObj: record, pageObj: null, type: record['deviceType'].split('_')[0] });
  1122. } else if (deviceType.value == 'bundleSpyDayReport' || deviceType.value == 'dustDayReport' || deviceType.value == 'bundleDayReport') {
  1123. actions.setGlobalState({ locationName: record.jcdd, locationObj: record, pageObj: null, type: record['deviceType'] });
  1124. } else if (deviceType.value.startsWith('gasDay')) {
  1125. actions.setGlobalState({ locationName: record.strInstallPos, locationObj: record, pageObj: null, type: record['deviceType'] });
  1126. } else if (deviceType.value == 'gasDayReport') {
  1127. actions.setGlobalState({ locationName: record.jcdd, locationObj: record, pageObj: null, type: record['deviceType'] });
  1128. } else if (deviceType.value.startsWith('substation')) {
  1129. actions.setGlobalState({ locationId: record.id, locationObj: record, pageObj: null, type: record['deviceType'] });
  1130. } else {
  1131. if (deviceType.value.startsWith('location')) {
  1132. actions.setGlobalState({ locationId: record.deviceID, locationObj: record, pageObj: null, type: 'person' });
  1133. } else if (deviceType.value.startsWith('vehicle')) {
  1134. actions.setGlobalState({ locationId: record.deviceID, locationObj: record, pageObj: null, type: 'car' });
  1135. } else {
  1136. actions.setGlobalState({ locationId: record.deviceID, locationObj: record, pageObj: null, type: deviceType.value });
  1137. }
  1138. }
  1139. }
  1140. function getSearch(param) {
  1141. (gasSearch.address = param.address), (gasSearch.userName = param.userName), (gasSearch.insType = param.insType), (gasSearch.class = param.class);
  1142. }
  1143. // 详情跳转
  1144. function goDetail(record?) {
  1145. if (record) {
  1146. activeID.value = record.deviceID;
  1147. if (deviceType.value.startsWith('fiber')) {
  1148. currentModal.value = FiberModal;
  1149. modalVisible.value = true;
  1150. } else if (deviceType.value.startsWith('dusting')) {
  1151. currentModal.value = DustModal;
  1152. modalVisible.value = true;
  1153. } else if (deviceType.value.startsWith('bundletube')) {
  1154. currentModal.value = BundleModal;
  1155. modalVisible.value = true;
  1156. } else if (deviceType.value.startsWith('firemon_normal')) {
  1157. // currentModal.value = BundleModal;
  1158. currentModal.value = WisdomBallModal;
  1159. modalVisible.value = true;
  1160. } else if (deviceType.value.startsWith('ballvalve')) {
  1161. currentModal.value = BallvalveModal;
  1162. modalVisible.value = true;
  1163. } else if (deviceType.value.startsWith('atomizing')) {
  1164. currentModal.value = AtomizingModal;
  1165. modalVisible.value = true;
  1166. } else if (deviceType.value.startsWith('gaspatrol')) {
  1167. currentModal.value = GaspatrolModal;
  1168. modalVisible.value = true;
  1169. } else if (deviceType.value.startsWith('door')) {
  1170. const newPage = router.resolve({ path: '/monitorChannel/monitor-firedoor', query: { id: activeID.value, deviceType: deviceType.value } });
  1171. window.open(newPage.href, '_blank');
  1172. } else if (deviceType.value.indexOf('gate') != -1) {
  1173. const newPage = router.resolve({ path: '/monitorChannel/monitor-gate', query: { id: activeID.value, deviceType: deviceType.value } });
  1174. window.open(newPage.href, '_blank');
  1175. } else if (deviceType.value.indexOf('window') != -1) {
  1176. const newPage = router.resolve({ path: '/monitorChannel/monitor-window', query: { id: activeID.value, deviceType: deviceType.value } });
  1177. window.open(newPage.href, '_blank');
  1178. } else if (deviceType.value.indexOf('windrect') != -1) {
  1179. const newPage = router.resolve({ path: '/monitorChannel/monitor-windrect', query: { id: activeID.value, deviceType: deviceType.value } });
  1180. window.open(newPage.href, '_blank');
  1181. } else if (deviceType.value.indexOf('fanmain') != -1) {
  1182. const newPage = router.resolve({ path: '/monitorChannel/monitor-fanmain', query: { id: activeID.value, deviceType: deviceType.value } });
  1183. window.open(newPage.href, '_blank');
  1184. } else if (deviceType.value.indexOf('fanlocal') != -1 && glob.sysOrgCode !== 'ymdnymdn') {
  1185. const newPage = router.resolve({ path: '/monitorChannel/monitor-fanlocal', query: { id: activeID.value, deviceType: deviceType.value } });
  1186. window.open(newPage.href, '_blank');
  1187. } else if (deviceType.value.indexOf('fanlocal') != -1 && glob.sysOrgCode == 'ymdnymdn') {
  1188. const newPage = router.resolve({ path: '/monitorChannel/monitor-fanlocal1', query: { id: activeID.value, deviceType: record.deviceType } });
  1189. window.open(newPage.href, '_blank');
  1190. } else if (deviceType.value.indexOf('pulping') != -1) {
  1191. // const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } });
  1192. const newPage = router.resolve({ path: '/grout-home' });
  1193. window.open(newPage.href, '_blank');
  1194. } else if (deviceType.value.indexOf('pressurefan') != -1) {
  1195. const newPage = router.resolve({ path: '/nitrogen/home', query: { id: activeID.value } });
  1196. window.open(newPage.href, '_blank');
  1197. } else if (deviceType.value.indexOf('chamber') != -1) {
  1198. const newPage = router.resolve({ path: '/chamber-home', query: { id: activeID.value } });
  1199. window.open(newPage.href, '_blank');
  1200. } else if (deviceType.value.indexOf('safetymonitor') != -1) {
  1201. const newPage = router.resolve({ path: '/monitorChannel/device-monitor/safetymonitor', query: { id: activeID.value } });
  1202. window.open(newPage.href, '_blank');
  1203. } else if (deviceType.value.indexOf('pump') != -1) {
  1204. const newPage = router.resolve({ path: '/monitorChannel/gasPump-home', query: { id: activeID.value } });
  1205. window.open(newPage.href, '_blank');
  1206. } else if (systemType.value.indexOf('nitrogen') != -1) {
  1207. const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } });
  1208. window.open(newPage.href, '_blank');
  1209. } else if (deviceType.value.indexOf('forcFan') != -1) {
  1210. const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } });
  1211. window.open(newPage.href, '_blank');
  1212. } else if (deviceType.value.indexOf('pulping') != -1) {
  1213. // const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } });
  1214. const newPage = router.resolve({ path: '/grout-home' });
  1215. window.open(newPage.href, '_blank');
  1216. } else if (deviceType.value.indexOf('gasmonitor') != -1) {
  1217. const newPage = router.resolve({ path: '/gas/warn/home' });
  1218. window.open(newPage.href, '_blank');
  1219. } else {
  1220. message.info('待开发。。。');
  1221. }
  1222. } else {
  1223. if (systemType.value.indexOf('sys_dongshi') != -1) {
  1224. const newPage = router.resolve({ path: '/chamber-home', query: { id: systemID.value } });
  1225. window.open(newPage.href, '_blank');
  1226. } else if (systemType.value.indexOf('sys_obfurage') != -1) {
  1227. const newPage = router.resolve({ path: '/monitorChannel/obfurage-home', query: { id: systemID.value } });
  1228. window.open(newPage.href, '_blank');
  1229. } else if (systemType.value.indexOf('sys_surface_caimei') != -1) {
  1230. const newPage = router.resolve({ path: '/monitorChannel/wokerFace-home', query: { id: systemID.value } });
  1231. window.open(newPage.href, '_blank');
  1232. } else if (systemType.value.indexOf('sys_surface_juejin') != -1) {
  1233. const newPage = router.resolve({ path: '/monitorChannel/tunFace-home', query: { id: systemID.value } });
  1234. window.open(newPage.href, '_blank');
  1235. } else if (systemType.value.indexOf('sys_maintunnel_leather') != -1) {
  1236. const newPage = router.resolve({ path: '/monitorChannel/beltTun-home', query: { id: systemID.value } });
  1237. window.open(newPage.href, '_blank');
  1238. } else if (systemType.value.indexOf('sys_surface_junya') != -1) {
  1239. const newPage = router.resolve({ path: '/monitorChannel/balancePress-home', query: { id: systemID.value } });
  1240. window.open(newPage.href, '_blank');
  1241. } else if (systemType.value.indexOf('sys_nitrogen') != -1) {
  1242. const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } });
  1243. window.open(newPage.href, '_blank');
  1244. } else if (deviceType.value.indexOf('forcFan') != -1) {
  1245. const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } });
  1246. window.open(newPage.href, '_blank');
  1247. } else if (deviceType.value.indexOf('pulping') != -1) {
  1248. // const newPage = router.resolve({ path: '/grout-home', query: { id: systemID.value } });
  1249. const newPage = router.resolve({ path: '/grout-home' });
  1250. window.open(newPage.href, '_blank');
  1251. } else if (deviceType.value.indexOf('gasDay_normal') != -1) {
  1252. const newPage = router.resolve({ path: '/gas/gas-report-inspect/home' });
  1253. window.open(newPage.href, '_blank');
  1254. } else if (deviceType.value.indexOf('gasDayReport') != -1) {
  1255. const newPage = router.resolve({ path: '/gas/gasDayReport/home' });
  1256. window.open(newPage.href, '_blank');
  1257. } else if (deviceType.value.indexOf('dustDayReport') != -1) {
  1258. const newPage = router.resolve({ path: '/dustDayReport/home' });
  1259. window.open(newPage.href, '_blank');
  1260. } else if (deviceType.value.indexOf('bundleDayReport') != -1) {
  1261. const newPage = router.resolve({ path: '/bundleDayReport/home' });
  1262. window.open(newPage.href, '_blank');
  1263. } else if (deviceType.value.indexOf('bundleSpyDayReport') != -1) {
  1264. const newPage = router.resolve({ path: '/bundleSpyDayReport/home' });
  1265. window.open(newPage.href, '_blank');
  1266. } else {
  1267. message.info('待开发。。。');
  1268. }
  1269. }
  1270. }
  1271. function exportXls() {
  1272. handleExportXls('瓦斯巡检记录', getExportUrl, { devicetype: deviceType.value });
  1273. }
  1274. function toHome(flag?: string) {
  1275. if (flag == '2D') {
  1276. router.push({
  1277. path: route.path.includes('micro-vent-2dModal') ? route.path : route.path.replace('micro-vent-3dModal', 'micro-vent-2dModal'),
  1278. query: {
  1279. ...route.query,
  1280. isNoReverse: '1',
  1281. },
  1282. });
  1283. } else if (flag == '3D') {
  1284. router.push({
  1285. path: route.path.includes('micro-vent-3dModal') ? route.path : route.path.replace('micro-vent-2dModal', 'micro-vent-3dModal'),
  1286. query: {
  1287. ...route.query,
  1288. isNoReverse: '1',
  1289. },
  1290. });
  1291. } else {
  1292. deviceList.value = [];
  1293. if (timer) clearTimeout(timer);
  1294. timer = undefined;
  1295. deviceType.value = '';
  1296. const { userInfo } = useUserStore();
  1297. go((userInfo && userInfo.homePath) || glob.homePath || PageEnum.BASE_HOME);
  1298. }
  1299. }
  1300. function toHide() {
  1301. tableShow.value = !tableShow.value;
  1302. document.getElementById('monitorBox').addEventListener('animationend', () => {
  1303. if (!tableShow.value) {
  1304. document.getElementById('monitorBox').style.height = '0px';
  1305. } else {
  1306. document.getElementById('monitorBox').style.height = '290';
  1307. }
  1308. });
  1309. }
  1310. async function findTreeDataValue(obj) {
  1311. const findDeviceType = (data: any[], obj, flag = true) => {
  1312. return data.find((item: any) => {
  1313. if (item.children.length > 0) {
  1314. findDeviceType(item.children, obj);
  1315. }
  1316. // debugger;
  1317. if (obj.deviceType && obj.deviceType.startsWith('sys_')) {
  1318. // debugger;
  1319. if (item.type == obj.deviceid) {
  1320. deviceType.value = 'sys';
  1321. systemID.value = obj.deviceid;
  1322. selectedKeys.value = [item.key];
  1323. expandedKeys.value = [item.key];
  1324. treeNodeTitle.value = item.title;
  1325. }
  1326. } else {
  1327. if (!flag) {
  1328. if (obj.deviceType && item.type.startsWith(obj.deviceType)) {
  1329. deviceType.value = item.type;
  1330. selectedKeys.value = [item.key];
  1331. expandedKeys.value = [item.key];
  1332. treeNodeTitle.value = item.title;
  1333. return true;
  1334. }
  1335. return false;
  1336. } else {
  1337. if (obj.deviceType && item.type == obj.deviceType) {
  1338. deviceType.value = item.type;
  1339. selectedKeys.value = [item.key];
  1340. expandedKeys.value = [item.key];
  1341. treeNodeTitle.value = item.title;
  1342. return true;
  1343. }
  1344. return false;
  1345. }
  1346. }
  1347. return false;
  1348. });
  1349. };
  1350. const flag = findDeviceType(treeData.value, obj);
  1351. if (!flag) {
  1352. findDeviceType(treeData.value, obj, false);
  1353. }
  1354. // 无类型时
  1355. if (!treeNodeTitle.value && treeData.value && treeData.value[0] && treeData.value[0]['children']) {
  1356. const defaultData = treeData.value[0]['children'][0];
  1357. if (deviceType.value !== defaultData.type) deviceType.value = defaultData.type;
  1358. selectedKeys.value = [defaultData.key as string];
  1359. expandedKeys.value = [defaultData.key as string];
  1360. treeNodeTitle.value = defaultData.title;
  1361. }
  1362. if (timer === undefined) {
  1363. timer = null;
  1364. await getDataSource();
  1365. getMonitor(true);
  1366. }
  1367. }
  1368. function monitorChange(index) {
  1369. dataSource.value = [];
  1370. deviceActive.value = deviceList.value[index].deviceType;
  1371. router.replace({ path: route.path, query: { ...route.query, deviceactive: deviceActive.value } });
  1372. if (deviceType.value != deviceActive.value) deviceType.value = deviceActive.value;
  1373. if (activeKey.value == 'monitor' && monitorTable.value) {
  1374. monitorTable.value.setLoading(true);
  1375. dataSource.value = deviceList.value[index].datalist;
  1376. }
  1377. if (activeKey.value == 'history' && historyTable.value) {
  1378. historyTable.value.setLoading(true);
  1379. }
  1380. if (activeKey.value == 'alarm' && alarmHistoryTable.value) {
  1381. alarmHistoryTable.value.setLoading(true);
  1382. }
  1383. if (activeKey.value == '4' && handlerHistoryTable.value) {
  1384. handlerHistoryTable.value.setLoading(true);
  1385. }
  1386. }
  1387. /**
  1388. * 设置巷道设备定位图标的显示与隐藏
  1389. */
  1390. function setLocation() {
  1391. let locationStr = '';
  1392. locationList.value.forEach((item: any) => {
  1393. if (item.Visible) {
  1394. locationStr = locationStr ? locationStr + ',' + item.value : item.value;
  1395. }
  1396. });
  1397. actions.setGlobalState({ locationId: null, locationObj: null, pageObj: null, locationPlane: locationStr });
  1398. setTimeout(() => {
  1399. message.success('设置成功');
  1400. }, 600);
  1401. }
  1402. watch(
  1403. () => props.pageData,
  1404. async (pageObj) => {
  1405. isRefresh.value = false;
  1406. if (!treeData.value || treeData.value?.length < 1) {
  1407. await getDeviceType();
  1408. }
  1409. nextTick(() => {
  1410. isRefresh.value = true;
  1411. // if (pageObj && pageObj.pageType && pageObj.pageType.startsWith('sys_')) {
  1412. // findTreeDataValue({ deviceid: systemID.value });
  1413. // } else {
  1414. // findTreeDataValue({ deviceType: pageObj.pageType });
  1415. // }
  1416. findTreeDataValue(pageObj);
  1417. });
  1418. },
  1419. { immediate: true }
  1420. );
  1421. watch(
  1422. () => deviceActive.value,
  1423. async (val) => {
  1424. if (val) {
  1425. router.push({ path: route.path, query: { ...route.query, deviceactive: deviceActive.value } });
  1426. }
  1427. }
  1428. );
  1429. onMounted(async () => {
  1430. const pageObj = props.pageData;
  1431. if (!pageObj) return;
  1432. if (pageObj && pageObj.pageType) {
  1433. if (pageObj.pageType.startsWith('sys_')) {
  1434. await getDeviceType(pageObj.pageType);
  1435. findTreeDataValue({ deviceType: pageObj.pageType, deviceid: pageObj.deviceid });
  1436. } else {
  1437. await getDeviceType();
  1438. findTreeDataValue({ deviceType: pageObj.pageType });
  1439. }
  1440. } else {
  1441. await getDeviceType();
  1442. findTreeDataValue({ deviceid: pageObj.deviceid });
  1443. }
  1444. // 定位
  1445. const posShowData = pageObj.locationPlane;
  1446. if (posShowData) {
  1447. locationList.value = posShowData;
  1448. } else {
  1449. locationList.value = await devPosition({});
  1450. }
  1451. router.push({ path: route.path, query: { ...route.query, tabtype: activeKey.value } });
  1452. // safetyOption.value = await safetyDeviceList(null, { devicetype: 'safetymonitor', code: 'dataTypeName' })
  1453. });
  1454. onUnmounted(() => {
  1455. if (timer) {
  1456. clearTimeout(timer);
  1457. }
  1458. timer = undefined;
  1459. });
  1460. </script>
  1461. <style lang="less" scoped>
  1462. @import url('/@/design/theme.less');
  1463. @import url('/@/design/vent/modal.less');
  1464. @ventSpace: zxm;
  1465. @{theme-deepblue} {
  1466. .scene-box {
  1467. // --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
  1468. // --image-tree-icon-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-bg.png');
  1469. // --image-tree-icon-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-hover-bg.png');
  1470. // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
  1471. // --image-tree-expansion-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-bg.png');
  1472. // --image-tree-expansion-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-hover-bg.png');
  1473. // --image-location-bg: url('/@/assets/images/themify/deepblue/vent/home/location-bg.png');
  1474. // --image-location-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/location-hover-bg.png');
  1475. // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
  1476. // --image-turn-location-top-bg: url('/@/assets/images/themify/deepblue/vent/home/turn-location-top-bg.png');
  1477. // --image-tree-icon-cover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-bg.png');
  1478. // --image-tree-icon-cover-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-hover-bg.png');
  1479. // --image-tohome: url('/@/assets/images/themify/deepblue/vent/home/tohome.png');
  1480. // --tree-node-select: #0963c1;
  1481. // --tree-node-hover: #0f376ccc;
  1482. // --location-bottom-bg: #21324855;
  1483. // --location-bottom-border: #aed1ff4d;
  1484. }
  1485. }
  1486. .scene-box {
  1487. --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
  1488. --image-tree-icon-bg: url('/@/assets/images/vent/home/tree-icon-bg.png');
  1489. --image-tree-icon-hover-bg: url('/@/assets/images/vent/home/tree-icon-hover-bg.png');
  1490. --image-tree-bg: url('/@/assets/images/vent/home/tree-bg.png');
  1491. --image-tree-expansion-bg: url('/@/assets/images/vent/home/tree-expansion-bg.png');
  1492. --image-tree-expansion-hover-bg: url('/@/assets/images/vent/home/tree-expansion-hover-bg.png');
  1493. --image-location-bg: url('/@/assets/images/vent/home/location-bg.png');
  1494. --image-location-hover-bg: url('/@/assets/images/vent/home/location-hover-bg.png');
  1495. --image-turn-location-top-bg: url('/@/assets/images/vent/home/turn-location-top-bg.png');
  1496. --image-turn-topology-bg: url('/@/assets/images/vent/home/turn-topology-bg.png');
  1497. --image-tree-icon-cover-bg: url('/@/assets/images/vent/home/tree-icon-cover-bg.png');
  1498. --image-tree-icon-cover-hover-bg: url('/@/assets/images/vent/home/tree-icon-cover-hover-bg.png');
  1499. --image-tohome: url('/@/assets/images/vent/home/tohome.png');
  1500. --image-to2D: url('/@/assets/images/vent/home/2.5D.png');
  1501. --image-to3D: url('/@/assets/images/vent/home/3D.png');
  1502. --tree-node-select: #00b1c8;
  1503. --tree-node-hover: #00b1c855;
  1504. --location-bottom-bg: #00709955;
  1505. --location-bottom-border: #aef3ff4d;
  1506. }
  1507. .scene-box {
  1508. pointer-events: none;
  1509. }
  1510. .top-header {
  1511. position: fixed;
  1512. z-index: 1;
  1513. width: 100%;
  1514. height: 56px;
  1515. background: var(--image-modal-top);
  1516. color: #fffd;
  1517. text-align: center;
  1518. line-height: 56px;
  1519. font-weight: 600;
  1520. letter-spacing: 2px;
  1521. font-size: 30px;
  1522. }
  1523. .select-node {
  1524. position: fixed;
  1525. top: 100px;
  1526. left: 10px;
  1527. display: flex;
  1528. justify-content: center;
  1529. color: var(--vent-font-color);
  1530. font-size: 22px;
  1531. .title {
  1532. margin-left: 10px;
  1533. }
  1534. }
  1535. .expansion-icon {
  1536. position: absolute;
  1537. top: 25px;
  1538. left: 190px;
  1539. background: var(--image-tree-icon-bg) no-repeat;
  1540. background-size: contain;
  1541. &:hover {
  1542. background: var(--image-tree-icon-hover-bg) no-repeat;
  1543. background-size: contain;
  1544. }
  1545. }
  1546. .device-select {
  1547. position: fixed;
  1548. top: 100px;
  1549. left: 10px;
  1550. width: 250px;
  1551. height: 500px;
  1552. padding: 20px 10px 30px;
  1553. background: var(--image-tree-bg) no-repeat;
  1554. background-size: contain;
  1555. pointer-events: auto;
  1556. }
  1557. .inspect-info-xj {
  1558. position: fixed;
  1559. top: 100px;
  1560. left: 250px;
  1561. width: 320px;
  1562. height: 272px;
  1563. padding: 20px;
  1564. background: url('@/assets/images/inspect-bg.png') no-repeat center;
  1565. background-size: 100% 100%;
  1566. box-sizing: border-box;
  1567. }
  1568. .is-expansion-icon {
  1569. z-index: 999;
  1570. padding: 5px;
  1571. pointer-events: auto;
  1572. }
  1573. .device-select-show {
  1574. left: 10px;
  1575. animation-name: treeShow;
  1576. /* 持续时间 */
  1577. animation-duration: 1s;
  1578. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1579. }
  1580. .device-select-hide {
  1581. left: -250px;
  1582. animation-name: treeHide;
  1583. /* 持续时间 */
  1584. animation-duration: 1s;
  1585. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1586. }
  1587. .node-select-show {
  1588. left: 10px;
  1589. display: flex;
  1590. align-items: center;
  1591. justify-content: flex-start;
  1592. width: 276px;
  1593. height: 44px;
  1594. background: var(--image-tree-expansion-bg) no-repeat;
  1595. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1596. animation-name: treeShow;
  1597. /* 持续时间 */
  1598. animation-duration: 1s;
  1599. margin-left: 0;
  1600. pointer-events: auto;
  1601. &:hover {
  1602. background: var(--image-tree-expansion-hover-bg) no-repeat;
  1603. }
  1604. .put-away-icon {
  1605. position: relative;
  1606. left: 4px;
  1607. display: inline-block;
  1608. }
  1609. }
  1610. .node-select-hide {
  1611. left: -400px;
  1612. animation-name: treeHide;
  1613. /* 持续时间 */
  1614. animation-duration: 1s;
  1615. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1616. }
  1617. .device-select-box {
  1618. width: 208px;
  1619. height: 450px;
  1620. overflow-y: auto;
  1621. color: var(--vent-font-color);
  1622. :deep(.zxm-tree) {
  1623. background: transparent !important;
  1624. color: var(--vent-font-color) !important;
  1625. .zxm-tree-switcher {
  1626. background: transparent !important;
  1627. }
  1628. .zxm-tree-node-content-wrapper.zxm-tree-node-selected {
  1629. background-color: var(--tree-node-select);
  1630. }
  1631. .zxm-tree-node-content-wrapper:hover {
  1632. background-color: var(--tree-node-hover);
  1633. }
  1634. input {
  1635. height: 0 !important;
  1636. }
  1637. }
  1638. &::-webkit-scrollbar-track {
  1639. height: 100px;
  1640. background: #ededed22;
  1641. box-shadow: inset 0 0 5px rgb(0 0 0 / 20%);
  1642. border-radius: 10px;
  1643. }
  1644. &::-webkit-scrollbar-thumb {
  1645. box-shadow: inset 0 0 5px rgb(0 0 0 / 20%);
  1646. background: #4288a444;
  1647. }
  1648. }
  1649. .location-icon {
  1650. position: absolute;
  1651. top: 100px;
  1652. width: 46px;
  1653. height: 178px;
  1654. background: var(--image-location-bg) no-repeat;
  1655. color: var(--vent-font-color);
  1656. cursor: pointer;
  1657. background-size: contain;
  1658. writing-mode: vertical-lr;
  1659. line-height: 46px;
  1660. padding-top: 10px;
  1661. pointer-events: auto;
  1662. &:hover {
  1663. background: var(--image-location-hover-bg) no-repeat;
  1664. }
  1665. .location-text {
  1666. padding-top: 20px;
  1667. letter-spacing: 3px;
  1668. font-size: 16px;
  1669. }
  1670. }
  1671. .location-select {
  1672. position: fixed;
  1673. top: 100px;
  1674. pointer-events: auto;
  1675. .location-select-box {
  1676. position: relative;
  1677. width: 100%;
  1678. height: 100%;
  1679. &::before {
  1680. position: absolute;
  1681. top: 0;
  1682. left: 0;
  1683. z-index: -1;
  1684. width: 230px;
  1685. height: 500px;
  1686. background: var(--image-tree-bg) no-repeat;
  1687. transform: rotateY(180deg);
  1688. content: '';
  1689. background-size: contain;
  1690. }
  1691. .location-top-title {
  1692. position: absolute;
  1693. top: 5px;
  1694. left: 5px;
  1695. display: flex;
  1696. flex-direction: row;
  1697. align-items: flex-end;
  1698. justify-content: space-between;
  1699. width: 225px;
  1700. height: 68px;
  1701. background: var(--image-turn-location-top-bg) no-repeat;
  1702. color: var(--vent-font-color);
  1703. background-size: contain;
  1704. .title {
  1705. font-size: 18px;
  1706. position: relative;
  1707. top: -14px;
  1708. right: 15px;
  1709. }
  1710. }
  1711. .location-expansion-icon {
  1712. position: relative;
  1713. top: -15px;
  1714. left: 10px;
  1715. padding: 5px;
  1716. background: var(--image-tree-icon-cover-bg) no-repeat;
  1717. background-size: contain;
  1718. &:hover {
  1719. background: var(--image-tree-icon-cover-hover-bg) no-repeat;
  1720. background-size: contain;
  1721. }
  1722. }
  1723. }
  1724. .location-container {
  1725. position: absolute;
  1726. top: 80px;
  1727. left: 18px;
  1728. display: flex;
  1729. flex-direction: column;
  1730. width: 200px;
  1731. height: 390px;
  1732. overflow-y: auto;
  1733. .location-item {
  1734. display: flex;
  1735. justify-content: space-between;
  1736. margin: 3px 0;
  1737. color: var(--vent-font-color);
  1738. line-height: 30px;
  1739. // background-image: var(--vent-gas-list-item-bg-img);
  1740. background-image: linear-gradient(to left, #39f5ff05, #39f5ff10);
  1741. .item-title {
  1742. width: 80px;
  1743. color: var(--vent-table-action-link);
  1744. text-align: right;
  1745. }
  1746. }
  1747. .location-bottom-btn {
  1748. display: flex;
  1749. justify-content: flex-end;
  1750. width: 100%;
  1751. color: var(--vent-font-color);
  1752. margin-top: 20px;
  1753. span {
  1754. display: inline-block;
  1755. width: 100%;
  1756. padding: 2px 0;
  1757. border: 1px solid var(--location-bottom-border);
  1758. background: var(--location-bottom-bg);
  1759. text-align: center;
  1760. cursor: pointer;
  1761. border-radius: 3px;
  1762. &:hover {
  1763. background: #00557422;
  1764. }
  1765. }
  1766. }
  1767. }
  1768. }
  1769. .location-select-show {
  1770. right: 240px;
  1771. animation-name: locationShow;
  1772. /* 持续时间 */
  1773. animation-duration: 1s;
  1774. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1775. }
  1776. .location-select-hide {
  1777. right: -2px;
  1778. animation-name: locationHide;
  1779. /* 持续时间 */
  1780. animation-duration: 1s;
  1781. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1782. }
  1783. .location-btn-show {
  1784. right: -0;
  1785. animation-name: locationBtnShow;
  1786. /* 持续时间 */
  1787. animation-duration: 1s;
  1788. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1789. }
  1790. .location-btn-hide {
  1791. right: -240px;
  1792. animation-name: locationBtnHide;
  1793. /* 持续时间 */
  1794. animation-duration: 1s;
  1795. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1796. }
  1797. .topology-icon {
  1798. position: absolute;
  1799. top: 300px;
  1800. width: 46px;
  1801. height: 178px;
  1802. background: var(--image-location-bg) no-repeat;
  1803. color: var(--vent-font-color);
  1804. cursor: pointer;
  1805. background-size: contain;
  1806. writing-mode: vertical-lr;
  1807. line-height: 46px;
  1808. padding-top: 10px;
  1809. pointer-events: auto;
  1810. &:hover {
  1811. background: var(--image-location-hover-bg) no-repeat;
  1812. }
  1813. .topology-text {
  1814. padding-top: 16px;
  1815. letter-spacing: 2px;
  1816. font-size: 15px;
  1817. }
  1818. }
  1819. .topology-btn-show {
  1820. right: -0;
  1821. animation-name: locationBtnShow;
  1822. /* 持续时间 */
  1823. animation-duration: 1s;
  1824. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1825. }
  1826. .topology-btn-hide {
  1827. right: -240px;
  1828. animation-name: locationBtnHide;
  1829. /* 持续时间 */
  1830. animation-duration: 1s;
  1831. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1832. }
  1833. // 测风网络拓扑面板:复用定位图标面板结构,适配大面板尺寸 + 右滑入/滑出
  1834. // ===== 测风网络拓扑面板:独立 CSS 类(样式参考 location-select-* 定义)=====
  1835. .topology-select {
  1836. position: fixed;
  1837. top: 100px;
  1838. pointer-events: auto;
  1839. width: 640px;
  1840. height: 510px;
  1841. transition: right 1s cubic-bezier(0.165, 0.84, 0.44, 1);
  1842. .topology-select-box {
  1843. position: relative;
  1844. width: 100%;
  1845. height: 100%;
  1846. // border: 1px solid @border-color-base;
  1847. // background-color: #394664;
  1848. background: var(--image-turn-topology-bg) no-repeat;
  1849. background-size: 100% 100%;
  1850. .topology-top-title {
  1851. // position: absolute;
  1852. // top: 5px;
  1853. // left: 5px;
  1854. display: flex;
  1855. flex-direction: row;
  1856. align-items: flex-end;
  1857. justify-content: space-between;
  1858. // width: 225px;
  1859. height: 58px;
  1860. color: var(--vent-font-color);
  1861. background-size: contain;
  1862. padding: 20px 10px 0 10px;
  1863. .title {
  1864. font-size: 18px;
  1865. // position: relative;
  1866. // top: -14px;
  1867. right: 15px;
  1868. color: #fff;
  1869. // color: #06435f;
  1870. }
  1871. .topology-expansion-icon {
  1872. // position: relative;
  1873. // top: -15px;
  1874. // left: 10px;
  1875. padding: 5px;
  1876. background: var(--image-tree-icon-cover-bg) no-repeat;
  1877. background-size: contain;
  1878. &:hover {
  1879. background: var(--image-tree-icon-cover-hover-bg) no-repeat;
  1880. background-size: contain;
  1881. }
  1882. }
  1883. }
  1884. .topology-container {
  1885. // position: absolute;
  1886. // top: 92px;
  1887. // left: 18px;
  1888. // width: calc(min(1040px, 84vw) - 36px);
  1889. height: 460px;
  1890. margin-top: 20px;
  1891. overflow: hidden;
  1892. }
  1893. }
  1894. }
  1895. .topology-select-show {
  1896. right: 10px;
  1897. animation-name: none;
  1898. }
  1899. .topology-select-hide {
  1900. right: -650px;
  1901. animation-name: none;
  1902. }
  1903. .tabs-box {
  1904. height: 290px;
  1905. }
  1906. .bottom-tabs-box {
  1907. position: relative;
  1908. background-color: var(--vent-configurable-module-border-bd);
  1909. backdrop-filter: blur(18px);
  1910. border: 1px solid #fff5;
  1911. border-radius: 8px;
  1912. // .tabs-box {
  1913. // width: calc(100% - 12px) !important;
  1914. // bottom: 3px !important;
  1915. // }
  1916. .to-small {
  1917. position: absolute;
  1918. top: -65px;
  1919. right: 36px;
  1920. display: flex;
  1921. align-items: center;
  1922. justify-content: center;
  1923. .to-home {
  1924. width: 50px;
  1925. height: 50px;
  1926. border-radius: 15%;
  1927. padding: 8px;
  1928. backdrop-filter: blur(10px);
  1929. background-color: rgb(30 58 117 / 41.8%);
  1930. margin-right: 10px;
  1931. cursor: pointer;
  1932. &::after {
  1933. position: absolute;
  1934. top: 8px;
  1935. left: 8px;
  1936. width: 34px;
  1937. height: 34px;
  1938. background: var(--image-tohome) no-repeat center;
  1939. content: '';
  1940. background-repeat: no-repeat;
  1941. background-size: 100% 100%;
  1942. }
  1943. &:hover {
  1944. background-color: rgb(79 104 134 / 41.8%);
  1945. }
  1946. }
  1947. .to-2D {
  1948. width: 50px;
  1949. height: 50px;
  1950. border-radius: 15%;
  1951. padding: 8px;
  1952. backdrop-filter: blur(10px);
  1953. background-color: rgb(30 58 117 / 41.8%);
  1954. cursor: pointer;
  1955. &::after {
  1956. position: absolute;
  1957. top: 8px;
  1958. left: 8px;
  1959. width: 34px;
  1960. height: 34px;
  1961. background: var(--image-to2D) no-repeat center;
  1962. content: '';
  1963. background-repeat: no-repeat;
  1964. background-size: 100% 100%;
  1965. }
  1966. &:hover {
  1967. background-color: rgb(79 104 134 / 41.8%);
  1968. }
  1969. }
  1970. .to-3D {
  1971. width: 50px;
  1972. height: 50px;
  1973. border-radius: 15%;
  1974. padding: 8px;
  1975. backdrop-filter: blur(10px);
  1976. background-color: rgb(30 58 117 / 41.8%);
  1977. margin-right: 10px;
  1978. cursor: pointer;
  1979. &::after {
  1980. position: absolute;
  1981. top: 8px;
  1982. left: 8px;
  1983. width: 34px;
  1984. height: 34px;
  1985. background: var(--image-to3D) no-repeat center;
  1986. content: '';
  1987. background-repeat: no-repeat;
  1988. background-size: 100% 100%;
  1989. }
  1990. &:hover {
  1991. background-color: rgb(79 104 134 / 41.8%);
  1992. }
  1993. }
  1994. .table-show-icon {
  1995. width: 30px;
  1996. height: 30px;
  1997. font-size: 30px;
  1998. color: var(--vent-font-color);
  1999. margin-left: 10px;
  2000. }
  2001. }
  2002. .device-button-group {
  2003. position: absolute;
  2004. top: -30px;
  2005. display: flex;
  2006. width: 100%;
  2007. .device-active {
  2008. background: linear-gradient(45deg, #04e6fb, #0c5cab);
  2009. &::before {
  2010. border-color: #0efcff;
  2011. box-shadow: 1px 1px 3px 1px #0efcff inset;
  2012. }
  2013. }
  2014. }
  2015. .table-hide-icon {
  2016. position: absolute;
  2017. top: 10px;
  2018. right: 20px;
  2019. z-index: 9999;
  2020. color: var(--vent-font-color);
  2021. cursor: pointer;
  2022. }
  2023. .enter-detail {
  2024. position: absolute;
  2025. top: 35px;
  2026. right: 35px;
  2027. z-index: 999;
  2028. display: flex;
  2029. align-items: center;
  2030. justify-content: center;
  2031. width: auto;
  2032. height: 33px !important;
  2033. padding: 5px;
  2034. padding: 5px 15px;
  2035. color: var(--vent-font-color);
  2036. cursor: pointer;
  2037. border-radius: 5px;
  2038. margin-left: 8px;
  2039. margin-right: 8px;
  2040. &:hover {
  2041. background: var(--vent-device-manager-control-btn-hover);
  2042. }
  2043. &::before {
  2044. position: absolute;
  2045. inset: 3px 0 0 3px;
  2046. z-index: -1;
  2047. width: calc(100% - 6px);
  2048. height: 27px;
  2049. /* important */
  2050. background: var(--vent-device-manager-control-btn);
  2051. content: '';
  2052. border-radius: inherit;
  2053. }
  2054. }
  2055. }
  2056. .table-hide {
  2057. height: 0;
  2058. animation-name: tableHide;
  2059. /* 持续时间 */
  2060. animation-duration: 1s;
  2061. transition: all 1s;
  2062. }
  2063. .table-show {
  2064. height: 290px;
  2065. animation-name: tableShow;
  2066. /* 持续时间 */
  2067. animation-duration: 1s;
  2068. transition: all 1s;
  2069. }
  2070. .location-form {
  2071. display: flex;
  2072. margin: 8px;
  2073. .location-form-item {
  2074. width: 400px;
  2075. .location-form-label {
  2076. display: inline-block;
  2077. width: 100px;
  2078. color: var(--vent-font-color);
  2079. }
  2080. input {
  2081. border: 1px solid var(--vent-form-item-border) !important;
  2082. background: transparent !important;
  2083. color: var(--vent-font-color);
  2084. }
  2085. }
  2086. .zxm-select-selector {
  2087. width: 200px !important;
  2088. }
  2089. }
  2090. @keyframes tableShow {
  2091. 0% {
  2092. height: 0;
  2093. opacity: 0;
  2094. }
  2095. 100% {
  2096. height: 290px;
  2097. opacity: 1;
  2098. }
  2099. }
  2100. @keyframes tableHide {
  2101. 0% {
  2102. opacity: 1;
  2103. }
  2104. 100% {
  2105. height: 0;
  2106. opacity: 0;
  2107. }
  2108. }
  2109. @keyframes treeShow {
  2110. 0% {
  2111. left: -400px;
  2112. opacity: 0;
  2113. }
  2114. 100% {
  2115. left: 10px;
  2116. opacity: 1;
  2117. }
  2118. }
  2119. @keyframes treeHide {
  2120. 0% {
  2121. left: 10px;
  2122. opacity: 1;
  2123. }
  2124. 100% {
  2125. left: -400px;
  2126. opacity: 0;
  2127. }
  2128. }
  2129. @keyframes locationShow {
  2130. 0% {
  2131. right: 0;
  2132. opacity: 0;
  2133. }
  2134. 100% {
  2135. right: 240px;
  2136. opacity: 1;
  2137. }
  2138. }
  2139. @keyframes locationHide {
  2140. 0% {
  2141. right: 240px;
  2142. opacity: 1;
  2143. }
  2144. 100% {
  2145. right: 0;
  2146. opacity: 0;
  2147. }
  2148. }
  2149. @keyframes locationBtnShow {
  2150. 0% {
  2151. right: -240px;
  2152. opacity: 0;
  2153. }
  2154. 100% {
  2155. right: -2px;
  2156. opacity: 1;
  2157. }
  2158. }
  2159. @keyframes locationBtnHide {
  2160. 0% {
  2161. right: -2px;
  2162. opacity: 1;
  2163. }
  2164. 100% {
  2165. right: -240px;
  2166. opacity: 0;
  2167. }
  2168. }
  2169. :deep(.@{ventSpace}-picker-datetime-panel) {
  2170. height: 200px !important;
  2171. overflow-y: auto !important;
  2172. }
  2173. :deep(.@{ventSpace}-tabs-tabpane-active) {
  2174. // overflow: auto;
  2175. height: 100%;
  2176. }
  2177. :deep(.zxm-select-dropdown) {
  2178. left: 0 !important;
  2179. color: #000 !important;
  2180. }
  2181. :deep(.zxm-select-selector) {
  2182. height: 34px !important;
  2183. line-height: 34px !important;
  2184. }
  2185. :deep(.zxm-input) {
  2186. height: 32px !important;
  2187. line-height: 32px !important;
  2188. .zxm-select-selection-item {
  2189. line-height: 32px !important;
  2190. }
  2191. }
  2192. .device-button {
  2193. position: relative;
  2194. display: flex;
  2195. align-items: center;
  2196. justify-content: center;
  2197. height: 26px;
  2198. padding: 0 20px;
  2199. background: linear-gradient(45deg, #04e6fb55, #0c5cab55);
  2200. color: var(--vent-font-color);
  2201. cursor: pointer;
  2202. clip-path: polygon(10px 0, 0 50%, 10px 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
  2203. &:nth-child(1) {
  2204. left: calc(-6px * 1);
  2205. }
  2206. &:nth-child(2) {
  2207. left: calc(-6px * 2);
  2208. }
  2209. &:nth-child(3) {
  2210. left: calc(-6px * 3);
  2211. }
  2212. &:nth-child(4) {
  2213. left: calc(-6px * 4);
  2214. }
  2215. &:nth-child(5) {
  2216. left: calc(-6px * 5);
  2217. }
  2218. &:nth-child(6) {
  2219. left: calc(-6px * 6);
  2220. }
  2221. &:nth-child(7) {
  2222. left: calc(-6px * 7);
  2223. }
  2224. &:nth-child(8) {
  2225. left: calc(-6px * 8);
  2226. }
  2227. &:nth-child(9) {
  2228. left: calc(-6px * 9);
  2229. }
  2230. &:nth-child(10) {
  2231. left: calc(-6px * 10);
  2232. }
  2233. &:nth-child(11) {
  2234. left: calc(-6px * 11);
  2235. }
  2236. &:nth-child(12) {
  2237. left: calc(-6px * 12);
  2238. }
  2239. &:nth-child(13) {
  2240. left: calc(-6px * 13);
  2241. }
  2242. &:nth-child(14) {
  2243. left: calc(-6px * 14);
  2244. }
  2245. &:nth-child(15) {
  2246. left: calc(-6px * 15);
  2247. }
  2248. &:nth-child(16) {
  2249. left: calc(-6px * 16);
  2250. }
  2251. &:nth-child(17) {
  2252. left: calc(-6px * 17);
  2253. }
  2254. &:nth-child(18) {
  2255. left: calc(-6px * 18);
  2256. }
  2257. &:nth-child(19) {
  2258. left: calc(-6px * 19);
  2259. }
  2260. // &:first-child {
  2261. // clip-path: polygon(0 0, 10px 50%, 0 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
  2262. // }
  2263. }
  2264. // :deep(.@{ventSpace}-pagination){
  2265. // margin-right: 20px !important;
  2266. // margin-top: 5px !important;
  2267. // display: flex;
  2268. // align-items: center;
  2269. // }
  2270. </style>