index.vue 80 KB

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