index.vue 74 KB

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