index.vue 78 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('gasDay_normal') && activeKey == '1'" 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 == '1'"
  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="1"
  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 == '1'">
  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 == '1'">
  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 == '1'">
  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 == '1'">
  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 == '1'">
  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 == '1'">
  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 == '1'">
  359. <gaspatrolTable ref="gaspatrol" @getSearch="getSearch" @locate="goLocation"> </gaspatrolTable>
  360. </template>
  361. <!-- 瓦斯日报 -->
  362. <template v-else-if="deviceType.startsWith('gasDayReport') && activeKey == '1' && glob.sysOrgCode != 'sdmtjtbetmk'">
  363. <gasReport ref="gasreport" @locate="goLocation"> </gasReport>
  364. </template>
  365. <template v-else-if="deviceType.startsWith('gasDayReport') && activeKey == '1' && glob.sysOrgCode == 'sdmtjtbetmk'">
  366. <gasReportCount ref="gasreportcount" @locate="goLocation"> </gasReportCount>
  367. </template>
  368. <!-- 粉尘监测报表-->
  369. <template v-else-if="deviceType.startsWith('dustDayReport') && activeKey == '1'">
  370. <dustMonitorTable @locate="goLocation" :isShowAction="true"></dustMonitorTable>
  371. </template>
  372. <template v-else-if="deviceType.startsWith('bundleDayReport') && activeKey == '1'">
  373. <bundleMonitorTable @locate="goLocation" :isShowAction="true"></bundleMonitorTable>
  374. </template>
  375. <template v-else-if="deviceType.startsWith('bundleSpyDayReport') && activeKey == '1'">
  376. <bundleSpyMonitorTable @locate="goLocation" :isShowAction="true"></bundleSpyMonitorTable>
  377. </template>
  378. <template v-else-if="deviceType.startsWith('dusting') && activeKey == '1'">
  379. <DustingTable :dataSource="dataSource" :deviceType="deviceType" :scroll="scroll" @locate="goLocation" />
  380. </template>
  381. <!-- 设备分站 -->
  382. <template v-else-if="deviceType.startsWith('substation_normal') && activeKey == '1'">
  383. <stationTable ref="station" @locate="goLocation" @stationDetail="stationDetail"> </stationTable>
  384. </template>
  385. <!-- 瓦斯管网 -->
  386. <template v-else-if="deviceType.startsWith('gaspipe') && activeKey == '1'">
  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 == '1' && 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 == '1'"
  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="2" tab="历史数据" v-if="!noHistoryArr().find((item) => deviceType.startsWith(item))">
  544. <div class="tab-item" v-if="activeKey == '2'">
  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 key="3" tab="报警历史" v-if="!noWarningArr.find((item) => deviceType.startsWith(item)) || !hasPermission('safety:hideWarning')">
  591. <div class="tab-item">
  592. <AlarmHistoryTable
  593. ref="alarmHistoryTable"
  594. v-if="activeKey == '3'"
  595. :sysId="systemID"
  596. columns-type="alarm"
  597. :device-type="deviceType"
  598. :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID, pageSize: 10000 })"
  599. :scroll="scroll"
  600. designScope="alarm-history"
  601. />
  602. </div>
  603. </a-tab-pane>
  604. <a-tab-pane key="4" tab="操作历史" v-if="haveHandlerArr.find((item) => deviceType.startsWith(item))">
  605. <div class="tab-item">
  606. <HandlerHistoryTable
  607. ref="handlerHistoryTable"
  608. v-if="activeKey == '4'"
  609. :sysId="systemID"
  610. columns-type="operator_history"
  611. :device-type="deviceType"
  612. :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })"
  613. :scroll="scroll"
  614. designScope="operator-history"
  615. />
  616. </div>
  617. </a-tab-pane>
  618. </a-tabs>
  619. </div>
  620. </div>
  621. <mainPath
  622. v-if="deviceType == 'majorpath'"
  623. :dataSource="majorPathEchartsData"
  624. style="width: 300px; height: 300px; position: absolute; left: 250px; top: 40px"
  625. />
  626. <component v-if="modalVisible" :is="currentModal" v-model:visible="modalVisible" :dataSource="dataSource" :activeID="activeID" />
  627. </div>
  628. </template>
  629. <script setup lang="ts">
  630. import { ref, onMounted, onUnmounted, ComponentOptions, shallowRef, reactive, defineProps, watch } from 'vue';
  631. import { SendOutlined, FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons-vue';
  632. import { list, getDeviceList, getDeviceTypeList, devPosition, getDepartmentInfo, getExportUrl } from './device.api';
  633. import AlarmHistoryTable from '../../../comment/AlarmHistoryTable.vue';
  634. import HistoryTable from '../../../comment/HistoryTable.vue';
  635. import HistoryTableNew from '/@/views/vent/comment/history/HistoryTable.vue';
  636. import HandlerHistoryTable from '../../../comment/HandlerHistoryTable.vue';
  637. import MonitorTable from '../../../comment/MonitorTable.vue';
  638. import GroupMonitorTable from '../../../comment/GroupMonitorTable.vue';
  639. import stationTable from '../../../comment/stationTable.vue';
  640. import gaspatrolTable from '../../../comment/gaspatrolTable.vue';
  641. import gasReport from '../../../comment/gasReport.vue';
  642. import gasReportCount from '../../../comment/gasReportCount.vue';
  643. import dustMonitorTable from '../../../comment/dustMonitorTable.vue';
  644. import bundleMonitorTable from '../../../comment/bundleMonitorTable.vue';
  645. import gasInspectDialog from '../../../comment/gasInspectDialog.vue';
  646. import DustingTable from '../../../comment/DustingTable.vue';
  647. import bundleSpyMonitorTable from '../../../comment/bundleSpyMonitorTable.vue';
  648. import GasPipeTable from '../../../comment/GasPipeTable.vue';
  649. import HistoryTableMajorPath from './modal/HistoryTableMajorPath.vue';
  650. import HistoryBall from './modal/history-ball.vue';
  651. import { TreeProps, message, Progress, Input, Select } from 'ant-design-vue';
  652. import { TableAction } from '/@/components/Table';
  653. import { SvgIcon } from '/@/components/Icon';
  654. import { getActions } from '/@/qiankun/state';
  655. import { useRouter } from 'vue-router';
  656. import { setDivHeight } from '/@/utils/event';
  657. import { render } from '/@/utils/common/renderUtils';
  658. import {
  659. majorColumns,
  660. haveSysDetailArr,
  661. haveDetailArr,
  662. haveHandlerArr,
  663. noWarningArr,
  664. surfaceChartsColumns,
  665. noHistoryArr,
  666. getMonitorComponent,
  667. vehicleFormConfig,
  668. noLocationArr,
  669. haveHistoryEcharts,
  670. } from './device.data';
  671. import mainPath from './modal/mainPath.vue';
  672. import { formConfig } from '../../../safetyMonitor/safety.data';
  673. import { getDictItemsByCode } from '/@/utils/dict';
  674. import BarAndLine from '/@/components/chart/BarAndLine.vue';
  675. import MTreeSelect from '/@/components/Form/src/jeecg/components/MTreeSelect.vue';
  676. // import ApiSelect from '/@/components/Form/src/components/ApiSelect.vue';
  677. import { nextTick } from 'vue';
  678. import { useMethods } from '/@/hooks/system/useMethods';
  679. import { useGo } from '/@/hooks/web/usePage';
  680. import { useGlobSetting } from '/@/hooks/setting';
  681. import { usePermission } from '/@/hooks/web/usePermission';
  682. type DeviceType = { deviceType: string; deviceName: string; datalist: any[] };
  683. const glob = useGlobSetting();
  684. // import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
  685. const { FiberModal, BundleModal, DustModal, BallvalveModal, AtomizingModal, GaspatrolModal, WisdomBallModal } = getMonitorComponent();
  686. const props = defineProps({
  687. pageData: {
  688. type: Object,
  689. default: () => {},
  690. },
  691. });
  692. const { hasPermission } = usePermission();
  693. const { handleExportXls } = useMethods();
  694. const go = useGo();
  695. const echatsOption = {
  696. grid: {
  697. top: '35',
  698. left: '30',
  699. right: '45',
  700. bottom: '25',
  701. containLabel: true,
  702. },
  703. toolbox: {
  704. feature: {},
  705. },
  706. };
  707. const router = useRouter();
  708. const actions = getActions();
  709. const locationForm = reactive({
  710. strname: '',
  711. department: '',
  712. stationname: '',
  713. });
  714. const noLocationList = noLocationArr();
  715. const monitorTable = ref();
  716. const historyTable = ref();
  717. const alarmHistoryTable = ref();
  718. const handlerHistoryTable = ref();
  719. // const routerParam = ref('home') // 默认进来时首页
  720. const isRefresh = ref(true);
  721. // 模态框
  722. const currentModal = shallowRef<Nullable<ComponentOptions>>(null); //模态框
  723. const modalVisible = ref<Boolean>(false); // 模态框是否可见
  724. // const drawerHeight = ref(240) // 监测框最小高度
  725. const treeShow = ref(true); //是否显示树形菜单
  726. const tableShow = ref(true); //是否显示树形菜单
  727. const locationSettingShow = ref(false); //是否显示树形菜单
  728. const treeNodeTitle = ref(''); // 选中的树形标题
  729. const locationList = ref([]); //巷道定位图标显示列表
  730. const deviceList = ref<DeviceType[]>([]); //关联设备列表
  731. const deviceActive = ref('');
  732. const activeKey = ref('1'); // tab key
  733. const dataSource = shallowRef([]); // 实时监测数据
  734. const majorPathEchartsData = ref({}); // 关键路线echarts数据
  735. const surfaceEchartsData = ref<any[]>(); // 工作面历史记录,echarts数据
  736. const activeID = ref(''); // 打开详情modal时监测的设备id
  737. const deviceType = ref(''); // 监测设备类型
  738. const systemType = ref('');
  739. const systemID = ref(''); // 系统监测时,系统id
  740. const selectedKeys = ref<string[]>([]);
  741. const expandedKeys = ref<string[]>([]);
  742. const scroll = reactive({
  743. y: 180,
  744. });
  745. const treeData = ref<TreeProps['treeData']>([]);
  746. let departmentInfo: Null | Object = null;
  747. let startMonitorTimer = 0;
  748. let gaspatrol = ref(null);
  749. let gasreport = ref(null);
  750. let gasreportcount = ref(null);
  751. let station = ref(null);
  752. let gasSearch = reactive({
  753. address: '',
  754. userName: '',
  755. insType: '2',
  756. class: 'night',
  757. });
  758. //树形菜单选择事件
  759. const onSelect: TreeProps['onSelect'] = (keys, e) => {
  760. deviceType.value = '';
  761. systemID.value = '';
  762. deviceList.value = [];
  763. const title = e.node.title; // 在
  764. if (e.node.parent && e.node.parent.node.type.toString().startsWith('sys')) {
  765. systemType.value = e.node.parent.node.type;
  766. if (deviceType.value != e.node.parent.node.type) deviceType.value = e.node.parent.node.type;
  767. systemID.value = e.node.type;
  768. // 传递工作面id信息,用于定位
  769. go(`/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=${deviceType.value}&deviceid=${systemID.value}`);
  770. } else {
  771. systemType.value = e.node.type;
  772. if (deviceType.value != e.node.type) deviceType.value = e.node.type;
  773. go(`/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=${deviceType.value}&deviceid=`);
  774. }
  775. clearTimeout(timer);
  776. timer = undefined;
  777. if (startMonitorTimer) {
  778. clearTimeout(startMonitorTimer);
  779. }
  780. dataSource.value = [];
  781. monitorTable.value.resetPagination();
  782. if (!startMonitorTimer) {
  783. startMonitorTimer = setTimeout(() => {
  784. expandedKeys.value = keys;
  785. selectedKeys.value = keys;
  786. treeNodeTitle.value = e.node.title;
  787. if (e.node.children?.length < 1 && timer) {
  788. getMonitor(true);
  789. }
  790. }, 1000);
  791. }
  792. // activeKey.value = '1';
  793. };
  794. function tabChange(activeKeyVal) {
  795. activeKey.value = activeKeyVal;
  796. }
  797. function showTree(flag, value) {
  798. if (flag == 'treeShow') treeShow.value = value;
  799. if (flag == 'location') locationSettingShow.value = value;
  800. }
  801. async function getDeviceType(sysType?) {
  802. if (treeData.value?.length > 0) return;
  803. const result = await getDeviceTypeList({});
  804. if (result.length > 0) {
  805. const dataSource = <TreeProps['treeData']>[];
  806. let key = '0';
  807. const getData = (resultList, dataSourceList, keyVal) => {
  808. resultList.forEach((item, index) => {
  809. if (item.deviceType != 'sys' && item.children && item.children.length > 0) {
  810. const children = getData(item.children, [], `${keyVal}-${index}`);
  811. // 判断关键阻力路线
  812. if (item.itemValue.startsWith(sysType) && children[0]) {
  813. systemID.value = item.children[0]['itemValue'];
  814. }
  815. dataSourceList.push({
  816. children: children,
  817. title: item.itemText,
  818. key: `${keyVal}-${index}`,
  819. type: item.itemValue,
  820. parentKey: `${keyVal}`,
  821. });
  822. } else {
  823. dataSourceList.push({
  824. children: [],
  825. title: item.itemText,
  826. key: `${keyVal}-${index}`,
  827. type: item.itemValue,
  828. parentKey: `${keyVal}`,
  829. });
  830. }
  831. });
  832. return dataSourceList;
  833. };
  834. treeData.value = getData(result, dataSource, key);
  835. }
  836. }
  837. // https获取监测数据
  838. let timer: null | NodeJS.Timeout = undefined;
  839. function getMonitor(flag?) {
  840. if (deviceType.value) {
  841. if (timer) timer = null;
  842. if (Object.prototype.toString.call(timer) === '[object Null]') {
  843. timer = setTimeout(
  844. async () => {
  845. if (deviceType.value.startsWith('gasDay_normal') && gaspatrol.value) {
  846. gaspatrol.value.queryNowGasInsInfoList(); //人工瓦斯巡检
  847. } else if (deviceType.value.startsWith('gasDayReport')) {
  848. if (glob.sysOrgCode == 'sdmtjtbetmk') {
  849. gasreportcount.value.getSearchReport();
  850. } else {
  851. gasreport.value.getSearchReport(); //瓦斯日报
  852. }
  853. } else if (deviceType.value.startsWith('substation') && station.value) {
  854. //分站
  855. station.value.getStationList();
  856. } else {
  857. await getDataSource();
  858. }
  859. if (timer) {
  860. getMonitor();
  861. }
  862. },
  863. flag ? 0 : 1000
  864. );
  865. }
  866. }
  867. }
  868. async function getDataSource() {
  869. if (deviceType.value && deviceType.value.startsWith('sys') && systemID.value) {
  870. const res = await list({ devicetype: 'sys', systemID: systemID.value });
  871. const result = res.msgTxt;
  872. const deviceArr = <DeviceType[]>[];
  873. result.forEach((item) => {
  874. const data = item['datalist'].filter((data: any) => {
  875. const readData = data.readData;
  876. return Object.assign(data, readData);
  877. });
  878. if (item.type != 'sys') {
  879. if (item.type === 'majorpath') {
  880. deviceArr.unshift({ deviceType: item.type, deviceName: item['typeName'], datalist: item['datalist'][0]['paths'] });
  881. majorPathEchartsData.value = item['datalist'][0];
  882. } else if (item.type.startsWith('surface_history')) {
  883. surfaceEchartsData.value = item['datalist'][0];
  884. deviceArr.unshift({
  885. deviceType: item.type,
  886. deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
  887. datalist: data,
  888. });
  889. } else {
  890. deviceArr.unshift({
  891. deviceType: item.type,
  892. deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
  893. datalist: data,
  894. });
  895. }
  896. }
  897. });
  898. deviceList.value = deviceArr;
  899. if (deviceArr.length > 0) {
  900. // if (deviceArr[1]) {
  901. // deviceActive.value = deviceArr[1].deviceType
  902. // monitorChange(1)
  903. // } else {
  904. // deviceActive.value = deviceArr[0].deviceType
  905. // monitorChange(0)
  906. // }
  907. deviceActive.value = deviceArr[0].deviceType;
  908. monitorChange(0);
  909. }
  910. } else {
  911. let res = null;
  912. if (systemID.value) {
  913. res = await list({ devicetype: 'sys', types: deviceType.value, systemID: systemID.value });
  914. if (res && res.msgTxt) {
  915. const result = res.msgTxt;
  916. result.forEach((item) => {
  917. const data = item['datalist'].filter((data: any) => {
  918. const readData = data.readData;
  919. return Object.assign(data, readData);
  920. });
  921. if (item.type != 'sys') {
  922. if (item.type.startsWith('majorpath') && item.type == deviceType.value) {
  923. dataSource.value = item['datalist'][0]['paths'];
  924. majorPathEchartsData.value = item['datalist'][0];
  925. return;
  926. } else if (item.type == deviceType.value) {
  927. if (item.type == 'surface_history') {
  928. // 工作面图标数据
  929. surfaceEchartsData.value = item['datalist'][0];
  930. } else {
  931. dataSource.value = data;
  932. console.log('关联设备数据--------------->', data);
  933. }
  934. return;
  935. }
  936. }
  937. });
  938. }
  939. } else {
  940. let resultData, searchForm;
  941. if (monitorTable.value) {
  942. const formData = monitorTable.value.getForm();
  943. searchForm = formData.getFieldsValue();
  944. }
  945. if (monitorTable.value) {
  946. if (deviceType.value.startsWith('safetymonitor')) {
  947. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: { ...searchForm } });
  948. } else if (deviceType.value.startsWith('location')) {
  949. if (!departmentInfo) {
  950. departmentInfo = await getDepartmentInfo({});
  951. }
  952. let department = null;
  953. if (departmentInfo && locationForm && locationForm['department']) {
  954. for (const key in departmentInfo) {
  955. const item = departmentInfo[key];
  956. if (item['id'] === locationForm['department']) {
  957. department = item;
  958. break;
  959. }
  960. }
  961. }
  962. resultData = await list({
  963. devicetype: deviceType.value,
  964. pagetype: 'normal',
  965. filterParams: {
  966. strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
  967. userName: locationForm['strname'] ? locationForm['strname'] : '',
  968. userJson: department && department['name'] ? department['name'] : '',
  969. },
  970. });
  971. } else if (deviceType.value.startsWith('vehicle')) {
  972. resultData = await list({
  973. devicetype: deviceType.value,
  974. pagetype: 'normal',
  975. filterParams: {
  976. strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
  977. vehicleName: locationForm['strname'] ? locationForm['strname'] : '',
  978. },
  979. });
  980. } else {
  981. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
  982. }
  983. } else {
  984. // 非安全监控
  985. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
  986. }
  987. if (resultData && resultData.msgTxt) {
  988. const result = resultData.msgTxt[0];
  989. if (result) {
  990. const data = result['datalist'].filter((data: any) => {
  991. const readData = data.readData;
  992. return Object.assign(data, readData);
  993. });
  994. if (deviceType.value.startsWith('safetymonitor')) {
  995. const resultData = <any[]>[];
  996. // 如果是安全监控的数据时需要过滤常见设备数据,根据设定的常用安全监控字典去匹配
  997. const dictCodes = getDictItemsByCode('safetynormal');
  998. if (searchForm && !searchForm['dataTypeName'] && dictCodes && dictCodes.length) {
  999. for (let i = 0; i < dictCodes.length; i++) {
  1000. const dict = dictCodes[i];
  1001. data.forEach((item) => {
  1002. if (dict['value'] == item['dataTypeName']) {
  1003. resultData.push(item);
  1004. }
  1005. });
  1006. }
  1007. dataSource.value = resultData;
  1008. } else {
  1009. dataSource.value = data;
  1010. }
  1011. } else {
  1012. let tableData: any[] = [];
  1013. let noNetData: any[] = [];
  1014. data.filter((el) => {
  1015. if (el.netStatus == 1) {
  1016. tableData.push(el);
  1017. } else {
  1018. noNetData.push(el);
  1019. }
  1020. });
  1021. dataSource.value = [...tableData, ...noNetData];
  1022. }
  1023. } else {
  1024. dataSource.value = [];
  1025. }
  1026. } else {
  1027. dataSource.value = [];
  1028. }
  1029. }
  1030. }
  1031. }
  1032. //设备分站详情跳转
  1033. function stationDetail() {
  1034. const newPage = router.resolve({ path: '/safety/list/detail/home' });
  1035. window.open(newPage.href, '_blank');
  1036. }
  1037. function goLocation(record) {
  1038. // debugger;
  1039. if (record['deviceType'] == 'person_bd' || record['deviceType'] == 'car_bd') {
  1040. actions.setGlobalState({ locationId: record.devNum, locationObj: null, pageObj: null, type: record['deviceType'].split('_')[0] });
  1041. } else if (deviceType.value == 'bundleSpyDayReport' || deviceType.value == 'dustDayReport' || deviceType.value == 'bundleDayReport') {
  1042. actions.setGlobalState({ locationName: record.jcdd, locationObj: null, pageObj: null, type: record['deviceType'] });
  1043. } else if (deviceType.value.startsWith('gasDay')) {
  1044. actions.setGlobalState({ locationName: record.strInstallPos, locationObj: null, pageObj: null, type: record['deviceType'] });
  1045. } else if (deviceType.value == 'gasDayReport') {
  1046. actions.setGlobalState({ locationName: record.jcdd, locationObj: null, pageObj: null, type: record['deviceType'] });
  1047. } else if (deviceType.value.startsWith('substation')) {
  1048. actions.setGlobalState({ locationId: record.id, locationObj: null, pageObj: null, type: record['deviceType'] });
  1049. } else {
  1050. if (deviceType.value.startsWith('location')) {
  1051. actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null, type: 'person' });
  1052. } else if (deviceType.value.startsWith('vehicle')) {
  1053. actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null, type: 'car' });
  1054. } else {
  1055. actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null });
  1056. }
  1057. }
  1058. }
  1059. function getSearch(param) {
  1060. (gasSearch.address = param.address), (gasSearch.userName = param.userName), (gasSearch.insType = param.insType), (gasSearch.class = param.class);
  1061. }
  1062. // 详情跳转
  1063. function goDetail(record?) {
  1064. if (record) {
  1065. activeID.value = record.deviceID;
  1066. if (deviceType.value.startsWith('fiber')) {
  1067. currentModal.value = FiberModal;
  1068. modalVisible.value = true;
  1069. } else if (deviceType.value.startsWith('dusting')) {
  1070. currentModal.value = DustModal;
  1071. modalVisible.value = true;
  1072. } else if (deviceType.value.startsWith('bundletube')) {
  1073. currentModal.value = BundleModal;
  1074. modalVisible.value = true;
  1075. } else if (deviceType.value.startsWith('firemon_normal')) {
  1076. // currentModal.value = BundleModal;
  1077. currentModal.value = WisdomBallModal;
  1078. modalVisible.value = true;
  1079. } else if (deviceType.value.startsWith('ballvalve')) {
  1080. currentModal.value = BallvalveModal;
  1081. modalVisible.value = true;
  1082. } else if (deviceType.value.startsWith('atomizing')) {
  1083. currentModal.value = AtomizingModal;
  1084. modalVisible.value = true;
  1085. } else if (deviceType.value.startsWith('gaspatrol')) {
  1086. currentModal.value = GaspatrolModal;
  1087. modalVisible.value = true;
  1088. } else if (deviceType.value.startsWith('door')) {
  1089. const newPage = router.resolve({ path: '/monitorChannel/monitor-firedoor', query: { id: activeID.value, deviceType: deviceType.value } });
  1090. window.open(newPage.href, '_blank');
  1091. } else if (deviceType.value.indexOf('gate') != -1) {
  1092. const newPage = router.resolve({ path: '/monitorChannel/monitor-gate', query: { id: activeID.value, deviceType: deviceType.value } });
  1093. window.open(newPage.href, '_blank');
  1094. } else if (deviceType.value.indexOf('window') != -1) {
  1095. const newPage = router.resolve({ path: '/monitorChannel/monitor-window', query: { id: activeID.value, deviceType: deviceType.value } });
  1096. window.open(newPage.href, '_blank');
  1097. } else if (deviceType.value.indexOf('windrect') != -1) {
  1098. const newPage = router.resolve({ path: '/monitorChannel/monitor-windrect', query: { id: activeID.value, deviceType: deviceType.value } });
  1099. window.open(newPage.href, '_blank');
  1100. } else if (deviceType.value.indexOf('fanmain') != -1) {
  1101. const newPage = router.resolve({ path: '/monitorChannel/monitor-fanmain', query: { id: activeID.value, deviceType: deviceType.value } });
  1102. window.open(newPage.href, '_blank');
  1103. } else if (deviceType.value.indexOf('fanlocal') != -1 && glob.sysOrgCode !== 'ymdnymdn') {
  1104. const newPage = router.resolve({ path: '/monitorChannel/monitor-fanlocal', query: { id: activeID.value, deviceType: deviceType.value } });
  1105. window.open(newPage.href, '_blank');
  1106. } else if (deviceType.value.indexOf('fanlocal') != -1 && glob.sysOrgCode == 'ymdnymdn') {
  1107. const newPage = router.resolve({ path: '/monitorChannel/monitor-fanlocal1', query: { id: activeID.value, deviceType: record.deviceType } });
  1108. window.open(newPage.href, '_blank');
  1109. } else if (deviceType.value.indexOf('pulping') != -1) {
  1110. // const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } });
  1111. const newPage = router.resolve({ path: '/grout-home' });
  1112. window.open(newPage.href, '_blank');
  1113. } else if (deviceType.value.indexOf('pressurefan') != -1) {
  1114. const newPage = router.resolve({ path: '/nitrogen/home', query: { id: activeID.value } });
  1115. window.open(newPage.href, '_blank');
  1116. } else if (deviceType.value.indexOf('chamber') != -1) {
  1117. const newPage = router.resolve({ path: '/chamber-home', query: { id: activeID.value } });
  1118. window.open(newPage.href, '_blank');
  1119. } else if (deviceType.value.indexOf('safetymonitor') != -1) {
  1120. const newPage = router.resolve({ path: '/monitorChannel/device-monitor/safetymonitor', query: { id: activeID.value } });
  1121. window.open(newPage.href, '_blank');
  1122. } else if (deviceType.value.indexOf('pump') != -1) {
  1123. const newPage = router.resolve({ path: '/monitorChannel/gasPump-home', query: { id: activeID.value } });
  1124. window.open(newPage.href, '_blank');
  1125. } else if (systemType.value.indexOf('nitrogen') != -1) {
  1126. const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } });
  1127. window.open(newPage.href, '_blank');
  1128. } else if (deviceType.value.indexOf('forcFan') != -1) {
  1129. const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } });
  1130. window.open(newPage.href, '_blank');
  1131. } else if (deviceType.value.indexOf('pulping') != -1) {
  1132. // const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } });
  1133. const newPage = router.resolve({ path: '/grout-home' });
  1134. window.open(newPage.href, '_blank');
  1135. } else if (deviceType.value.indexOf('gasmonitor') != -1) {
  1136. const newPage = router.resolve({ path: '/gas/warn/home' });
  1137. window.open(newPage.href, '_blank');
  1138. } else {
  1139. message.info('待开发。。。');
  1140. }
  1141. } else {
  1142. if (systemType.value.indexOf('sys_dongshi') != -1) {
  1143. const newPage = router.resolve({ path: '/chamber-home', query: { id: systemID.value } });
  1144. window.open(newPage.href, '_blank');
  1145. } else if (systemType.value.indexOf('sys_obfurage') != -1) {
  1146. const newPage = router.resolve({ path: '/monitorChannel/obfurage-home', query: { id: systemID.value } });
  1147. window.open(newPage.href, '_blank');
  1148. } else if (systemType.value.indexOf('sys_surface_caimei') != -1) {
  1149. const newPage = router.resolve({ path: '/monitorChannel/wokerFace-home', query: { id: systemID.value } });
  1150. window.open(newPage.href, '_blank');
  1151. } else if (systemType.value.indexOf('sys_surface_juejin') != -1) {
  1152. const newPage = router.resolve({ path: '/monitorChannel/tunFace-home', query: { id: systemID.value } });
  1153. window.open(newPage.href, '_blank');
  1154. } else if (systemType.value.indexOf('sys_maintunnel_leather') != -1) {
  1155. const newPage = router.resolve({ path: '/monitorChannel/beltTun-home', query: { id: systemID.value } });
  1156. window.open(newPage.href, '_blank');
  1157. } else if (systemType.value.indexOf('sys_surface_junya') != -1) {
  1158. const newPage = router.resolve({ path: '/monitorChannel/balancePress-home', query: { id: systemID.value } });
  1159. window.open(newPage.href, '_blank');
  1160. } else if (systemType.value.indexOf('sys_nitrogen') != -1) {
  1161. const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } });
  1162. window.open(newPage.href, '_blank');
  1163. } else if (deviceType.value.indexOf('forcFan') != -1) {
  1164. const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } });
  1165. window.open(newPage.href, '_blank');
  1166. } else if (deviceType.value.indexOf('pulping') != -1) {
  1167. // const newPage = router.resolve({ path: '/grout-home', query: { id: systemID.value } });
  1168. const newPage = router.resolve({ path: '/grout-home' });
  1169. window.open(newPage.href, '_blank');
  1170. } else if (deviceType.value.indexOf('gasDay_normal') != -1) {
  1171. const newPage = router.resolve({ path: '/gas/gas-report-inspect/home' });
  1172. window.open(newPage.href, '_blank');
  1173. } else if (deviceType.value.indexOf('gasDayReport') != -1) {
  1174. const newPage = router.resolve({ path: '/gas/gasDayReport/home' });
  1175. window.open(newPage.href, '_blank');
  1176. } else if (deviceType.value.indexOf('dustDayReport') != -1) {
  1177. const newPage = router.resolve({ path: '/dustDayReport/home' });
  1178. window.open(newPage.href, '_blank');
  1179. } else if (deviceType.value.indexOf('bundleDayReport') != -1) {
  1180. const newPage = router.resolve({ path: '/bundleDayReport/home' });
  1181. window.open(newPage.href, '_blank');
  1182. } else if (deviceType.value.indexOf('bundleSpyDayReport') != -1) {
  1183. const newPage = router.resolve({ path: '/bundleSpyDayReport/home' });
  1184. window.open(newPage.href, '_blank');
  1185. } else {
  1186. message.info('待开发。。。');
  1187. }
  1188. }
  1189. }
  1190. function exportXls() {
  1191. handleExportXls('瓦斯巡检记录', getExportUrl, { devicetype: deviceType.value });
  1192. }
  1193. function toHome() {
  1194. deviceList.value = [];
  1195. if (timer) clearTimeout(timer);
  1196. timer = undefined;
  1197. deviceType.value = '';
  1198. go(glob.homePath);
  1199. }
  1200. function toHide() {
  1201. tableShow.value = !tableShow.value;
  1202. document.getElementById('monitorBox').addEventListener('animationend', () => {
  1203. if (!tableShow.value) {
  1204. document.getElementById('monitorBox').style.height = '0px';
  1205. } else {
  1206. document.getElementById('monitorBox').style.height = '290';
  1207. }
  1208. });
  1209. }
  1210. async function findTreeDataValue(obj) {
  1211. const findDeviceType = (data: any[], obj, flag = true) => {
  1212. return data.find((item: any) => {
  1213. if (item.children.length > 0) {
  1214. findDeviceType(item.children, obj);
  1215. }
  1216. // debugger;
  1217. if (obj.deviceType && obj.deviceType.startsWith('sys_')) {
  1218. // debugger;
  1219. if (item.type == obj.deviceid) {
  1220. deviceType.value = 'sys';
  1221. systemID.value = obj.deviceid;
  1222. selectedKeys.value = [item.key];
  1223. expandedKeys.value = [item.key];
  1224. treeNodeTitle.value = item.title;
  1225. }
  1226. } else {
  1227. if (!flag) {
  1228. if (obj.deviceType && item.type.startsWith(obj.deviceType)) {
  1229. deviceType.value = item.type;
  1230. selectedKeys.value = [item.key];
  1231. expandedKeys.value = [item.key];
  1232. treeNodeTitle.value = item.title;
  1233. return true;
  1234. }
  1235. return false;
  1236. } else {
  1237. if (obj.deviceType && item.type == obj.deviceType) {
  1238. deviceType.value = item.type;
  1239. selectedKeys.value = [item.key];
  1240. expandedKeys.value = [item.key];
  1241. treeNodeTitle.value = item.title;
  1242. return true;
  1243. }
  1244. return false;
  1245. }
  1246. }
  1247. return false;
  1248. });
  1249. };
  1250. const flag = findDeviceType(treeData.value, obj);
  1251. if (!flag) {
  1252. findDeviceType(treeData.value, obj, false);
  1253. }
  1254. // 无类型时
  1255. if (!treeNodeTitle.value && treeData.value && treeData.value[0] && treeData.value[0]['children']) {
  1256. const defaultData = treeData.value[0]['children'][0];
  1257. if (deviceType.value !== defaultData.type) deviceType.value = defaultData.type;
  1258. selectedKeys.value = [defaultData.key as string];
  1259. expandedKeys.value = [defaultData.key as string];
  1260. treeNodeTitle.value = defaultData.title;
  1261. }
  1262. if (timer === undefined) {
  1263. timer = null;
  1264. await getDataSource();
  1265. getMonitor(true);
  1266. }
  1267. }
  1268. function monitorChange(index) {
  1269. dataSource.value = [];
  1270. deviceActive.value = deviceList.value[index].deviceType;
  1271. if (deviceType.value != deviceActive.value) deviceType.value = deviceActive.value;
  1272. if (activeKey.value == '1' && monitorTable.value) {
  1273. monitorTable.value.setLoading(true);
  1274. dataSource.value = deviceList.value[index].datalist;
  1275. }
  1276. if (activeKey.value == '2' && historyTable.value) {
  1277. historyTable.value.setLoading(true);
  1278. }
  1279. if (activeKey.value == '3' && alarmHistoryTable.value) {
  1280. alarmHistoryTable.value.setLoading(true);
  1281. }
  1282. if (activeKey.value == '4' && handlerHistoryTable.value) {
  1283. handlerHistoryTable.value.setLoading(true);
  1284. }
  1285. }
  1286. /**
  1287. * 设置巷道设备定位图标的显示与隐藏
  1288. */
  1289. function setLocation() {
  1290. let locationStr = '';
  1291. locationList.value.forEach((item: any) => {
  1292. if (item.Visible) {
  1293. locationStr = locationStr ? locationStr + ',' + item.value : item.value;
  1294. }
  1295. });
  1296. actions.setGlobalState({ locationId: null, locationObj: null, pageObj: null, locationPlane: locationStr });
  1297. setTimeout(() => {
  1298. message.success('设置成功');
  1299. }, 600);
  1300. }
  1301. watch(
  1302. () => props.pageData,
  1303. async (pageObj) => {
  1304. isRefresh.value = false;
  1305. if (!treeData.value || treeData.value?.length < 1) {
  1306. await getDeviceType();
  1307. }
  1308. nextTick(() => {
  1309. isRefresh.value = true;
  1310. // if (pageObj && pageObj.pageType && pageObj.pageType.startsWith('sys_')) {
  1311. // findTreeDataValue({ deviceid: systemID.value });
  1312. // } else {
  1313. // findTreeDataValue({ deviceType: pageObj.pageType });
  1314. // }
  1315. findTreeDataValue(pageObj);
  1316. });
  1317. },
  1318. { immediate: true }
  1319. );
  1320. onMounted(async () => {
  1321. const pageObj = props.pageData;
  1322. if (!pageObj) return;
  1323. if (pageObj && pageObj.pageType) {
  1324. if (pageObj.pageType.startsWith('sys_')) {
  1325. await getDeviceType(pageObj.pageType);
  1326. findTreeDataValue({ deviceType: pageObj.pageType, deviceid: pageObj.deviceid });
  1327. } else {
  1328. await getDeviceType();
  1329. findTreeDataValue({ deviceType: pageObj.pageType });
  1330. }
  1331. } else {
  1332. await getDeviceType();
  1333. findTreeDataValue({ deviceid: pageObj.deviceid });
  1334. }
  1335. // 定位
  1336. const posShowData = pageObj.locationPlane;
  1337. if (posShowData) {
  1338. locationList.value = posShowData;
  1339. } else {
  1340. locationList.value = await devPosition({});
  1341. }
  1342. // safetyOption.value = await safetyDeviceList(null, { devicetype: 'safetymonitor', code: 'dataTypeName' })
  1343. });
  1344. onUnmounted(() => {
  1345. if (timer) {
  1346. clearTimeout(timer);
  1347. }
  1348. timer = undefined;
  1349. });
  1350. </script>
  1351. <style lang="less" scoped>
  1352. @import '/@/design/theme.less';
  1353. @import '/@/design/vent/modal.less';
  1354. @ventSpace: zxm;
  1355. @{theme-deepblue} {
  1356. .scene-box {
  1357. // --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
  1358. // --image-tree-icon-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-bg.png');
  1359. // --image-tree-icon-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-hover-bg.png');
  1360. // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
  1361. // --image-tree-expansion-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-bg.png');
  1362. // --image-tree-expansion-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-hover-bg.png');
  1363. // --image-location-bg: url('/@/assets/images/themify/deepblue/vent/home/location-bg.png');
  1364. // --image-location-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/location-hover-bg.png');
  1365. // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
  1366. // --image-turn-location-top-bg: url('/@/assets/images/themify/deepblue/vent/home/turn-location-top-bg.png');
  1367. // --image-tree-icon-cover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-bg.png');
  1368. // --image-tree-icon-cover-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-hover-bg.png');
  1369. // --image-tohome: url('/@/assets/images/themify/deepblue/vent/home/tohome.png');
  1370. // --tree-node-select: #0963c1;
  1371. // --tree-node-hover: #0f376ccc;
  1372. // --location-bottom-bg: #21324855;
  1373. // --location-bottom-border: #aed1ff4d;
  1374. }
  1375. }
  1376. .scene-box {
  1377. --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
  1378. --image-tree-icon-bg: url('/@/assets/images/vent/home/tree-icon-bg.png');
  1379. --image-tree-icon-hover-bg: url('/@/assets/images/vent/home/tree-icon-hover-bg.png');
  1380. --image-tree-bg: url('/@/assets/images/vent/home/tree-bg.png');
  1381. --image-tree-expansion-bg: url('/@/assets/images/vent/home/tree-expansion-bg.png');
  1382. --image-tree-expansion-hover-bg: url('/@/assets/images/vent/home/tree-expansion-hover-bg.png');
  1383. --image-location-bg: url('/@/assets/images/vent/home/location-bg.png');
  1384. --image-location-hover-bg: url('/@/assets/images/vent/home/location-hover-bg.png');
  1385. --image-turn-location-top-bg: url('/@/assets/images/vent/home/turn-location-top-bg.png');
  1386. --image-tree-icon-cover-bg: url('/@/assets/images/vent/home/tree-icon-cover-bg.png');
  1387. --image-tree-icon-cover-hover-bg: url('/@/assets/images/vent/home/tree-icon-cover-hover-bg.png');
  1388. --image-tohome: url('/@/assets/images/vent/home/tohome.png');
  1389. --tree-node-select: #00b1c8;
  1390. --tree-node-hover: #00b1c855;
  1391. --location-bottom-bg: #00709955;
  1392. --location-bottom-border: #aef3ff4d;
  1393. }
  1394. .top-header {
  1395. position: fixed;
  1396. width: 100%;
  1397. height: 56px;
  1398. background: var(--image-modal-top);
  1399. text-align: center;
  1400. line-height: 56px;
  1401. font-size: 28px;
  1402. color: #ffffffdd;
  1403. font-weight: 600;
  1404. z-index: 1;
  1405. letter-spacing: 2px;
  1406. font-size: 30px;
  1407. }
  1408. .select-node {
  1409. position: fixed;
  1410. top: 100px;
  1411. left: 10px;
  1412. color: var(--vent-font-color);
  1413. display: flex;
  1414. justify-content: center;
  1415. font-size: 22px;
  1416. .title {
  1417. margin-left: 10px;
  1418. }
  1419. }
  1420. .expansion-icon {
  1421. background: var(--image-tree-icon-bg) no-repeat;
  1422. background-size: contain;
  1423. position: absolute;
  1424. left: 190px;
  1425. top: 25px;
  1426. &:hover {
  1427. background: var(--image-tree-icon-hover-bg) no-repeat;
  1428. background-size: contain;
  1429. }
  1430. }
  1431. .device-select {
  1432. width: 250px;
  1433. height: 500px;
  1434. background: var(--image-tree-bg) no-repeat;
  1435. position: fixed;
  1436. top: 100px;
  1437. left: 10px;
  1438. background-size: contain;
  1439. pointer-events: auto;
  1440. padding: 20px 10px 30px 10px;
  1441. }
  1442. .inspect-info-xj {
  1443. position: fixed;
  1444. top: 100px;
  1445. left: 250px;
  1446. width: 320px;
  1447. height: 272px;
  1448. padding: 20px;
  1449. background: url('@/assets/images/inspect-bg.png') no-repeat center;
  1450. background-size: 100% 100%;
  1451. box-sizing: border-box;
  1452. }
  1453. .is-expansion-icon {
  1454. padding: 5px;
  1455. pointer-events: auto;
  1456. z-index: 999;
  1457. }
  1458. .device-select-show {
  1459. left: 10px;
  1460. animation-name: treeShow;
  1461. /* 持续时间 */
  1462. animation-duration: 1s;
  1463. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1464. }
  1465. .device-select-hide {
  1466. left: -250px;
  1467. animation-name: treeHide;
  1468. /* 持续时间 */
  1469. animation-duration: 1s;
  1470. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1471. }
  1472. .node-select-show {
  1473. width: 276px;
  1474. height: 44px;
  1475. background: var(--image-tree-expansion-bg) no-repeat;
  1476. left: 10px;
  1477. animation-name: treeShow;
  1478. /* 持续时间 */
  1479. animation-duration: 1s;
  1480. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1481. display: flex;
  1482. align-items: center;
  1483. margin-left: 0;
  1484. justify-content: flex-start;
  1485. pointer-events: auto;
  1486. &:hover {
  1487. background: var(--image-tree-expansion-hover-bg) no-repeat;
  1488. }
  1489. .put-away-icon {
  1490. position: relative;
  1491. display: inline-block;
  1492. left: 4px;
  1493. }
  1494. }
  1495. .node-select-hide {
  1496. left: -400px;
  1497. animation-name: treeHide;
  1498. /* 持续时间 */
  1499. animation-duration: 1s;
  1500. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1501. }
  1502. .device-select-box {
  1503. width: 208px;
  1504. height: 450px;
  1505. overflow-y: auto;
  1506. color: var(--vent-font-color);
  1507. :deep(.zxm-tree) {
  1508. background: transparent !important;
  1509. color: var(--vent-font-color) !important;
  1510. .zxm-tree-switcher {
  1511. background: transparent !important;
  1512. }
  1513. .zxm-tree-node-content-wrapper.zxm-tree-node-selected {
  1514. background-color: var(--tree-node-select);
  1515. }
  1516. .zxm-tree-node-content-wrapper:hover {
  1517. background-color: var(--tree-node-hover);
  1518. }
  1519. input {
  1520. height: 0px !important;
  1521. }
  1522. }
  1523. &::-webkit-scrollbar-track {
  1524. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  1525. border-radius: 10px;
  1526. background: #ededed22;
  1527. height: 100px;
  1528. }
  1529. &::-webkit-scrollbar-thumb {
  1530. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  1531. background: #4288a444;
  1532. }
  1533. }
  1534. .location-icon {
  1535. width: 46px;
  1536. height: 178px;
  1537. position: absolute;
  1538. top: 100px;
  1539. background: var(--image-location-bg) no-repeat;
  1540. background-size: contain;
  1541. writing-mode: vertical-lr;
  1542. line-height: 46px;
  1543. color: var(--vent-font-color);
  1544. padding-top: 10px;
  1545. pointer-events: auto;
  1546. cursor: pointer;
  1547. &:hover {
  1548. background: var(--image-location-hover-bg) no-repeat;
  1549. }
  1550. .location-text {
  1551. padding-top: 20px;
  1552. letter-spacing: 3px;
  1553. font-size: 16px;
  1554. }
  1555. }
  1556. .location-select {
  1557. position: fixed;
  1558. top: 100px;
  1559. pointer-events: auto;
  1560. .location-select-box {
  1561. width: 100%;
  1562. height: 100%;
  1563. position: relative;
  1564. &::before {
  1565. content: '';
  1566. position: absolute;
  1567. width: 230px;
  1568. height: 500px;
  1569. top: 0;
  1570. left: 0;
  1571. background: var(--image-tree-bg) no-repeat;
  1572. background-size: contain;
  1573. transform: rotateY(180deg);
  1574. z-index: -1;
  1575. }
  1576. .location-top-title {
  1577. color: var(--vent-font-color);
  1578. position: absolute;
  1579. width: 225px;
  1580. height: 68px;
  1581. background: var(--image-turn-location-top-bg) no-repeat;
  1582. background-size: contain;
  1583. top: 5px;
  1584. left: 5px;
  1585. display: flex;
  1586. flex-direction: row;
  1587. justify-content: space-between;
  1588. align-items: flex-end;
  1589. .title {
  1590. font-size: 18px;
  1591. position: relative;
  1592. top: -14px;
  1593. right: 15px;
  1594. }
  1595. }
  1596. .location-expansion-icon {
  1597. background: var(--image-tree-icon-cover-bg) no-repeat;
  1598. background-size: contain;
  1599. position: relative;
  1600. left: 10px;
  1601. top: -15px;
  1602. padding: 5px;
  1603. &:hover {
  1604. background: var(--image-tree-icon-cover-hover-bg) no-repeat;
  1605. background-size: contain;
  1606. }
  1607. }
  1608. }
  1609. .location-container {
  1610. width: 200px;
  1611. height: 390px;
  1612. position: absolute;
  1613. display: flex;
  1614. flex-direction: column;
  1615. top: 80px;
  1616. left: 18px;
  1617. overflow-y: auto;
  1618. .location-item {
  1619. color: var(--vent-font-color);
  1620. line-height: 30px;
  1621. display: flex;
  1622. justify-content: space-between;
  1623. // background-image: var(--vent-gas-list-item-bg-img);
  1624. background-image: linear-gradient(to left, #39f5ff05, #39f5ff10);
  1625. margin: 3px 0;
  1626. .item-title {
  1627. width: 80px;
  1628. text-align: right;
  1629. color: var(--vent-table-action-link);
  1630. }
  1631. }
  1632. .location-bottom-btn {
  1633. width: 100%;
  1634. color: var(--vent-font-color);
  1635. display: flex;
  1636. justify-content: flex-end;
  1637. margin-top: 20px;
  1638. span {
  1639. display: inline-block;
  1640. width: 100%;
  1641. background: var(--location-bottom-bg);
  1642. border-radius: 3px;
  1643. border: 1px solid var(--location-bottom-border);
  1644. text-align: center;
  1645. padding: 2px 0;
  1646. cursor: pointer;
  1647. &:hover {
  1648. background: #00557422;
  1649. }
  1650. }
  1651. }
  1652. }
  1653. }
  1654. .location-select-show {
  1655. right: 240px;
  1656. animation-name: locationShow;
  1657. /* 持续时间 */
  1658. animation-duration: 1s;
  1659. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1660. }
  1661. .location-select-hide {
  1662. right: -2px;
  1663. animation-name: locationHide;
  1664. /* 持续时间 */
  1665. animation-duration: 1s;
  1666. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1667. }
  1668. .location-btn-show {
  1669. right: -0px;
  1670. animation-name: locationBtnShow;
  1671. /* 持续时间 */
  1672. animation-duration: 1s;
  1673. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1674. }
  1675. .location-btn-hide {
  1676. right: -240px;
  1677. animation-name: locationBtnHide;
  1678. /* 持续时间 */
  1679. animation-duration: 1s;
  1680. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1681. }
  1682. .tabs-box {
  1683. height: 290px;
  1684. }
  1685. .bottom-tabs-box {
  1686. position: relative;
  1687. .tabs-box {
  1688. width: calc(100% - 12px) !important;
  1689. bottom: 3px !important;
  1690. background-color: red;
  1691. }
  1692. .to-small {
  1693. position: absolute;
  1694. top: -65px;
  1695. right: 36px;
  1696. display: flex;
  1697. align-items: center;
  1698. justify-content: center;
  1699. .to-home {
  1700. width: 60px;
  1701. height: 60px;
  1702. background: var(--image-tohome) no-repeat center;
  1703. background-size: auto;
  1704. padding: 8px;
  1705. &:hover {
  1706. background-color: rgba(79, 104, 134, 0.418);
  1707. }
  1708. }
  1709. .table-show-icon {
  1710. width: 30px;
  1711. height: 30px;
  1712. font-size: 30px;
  1713. color: var(--vent-font-color);
  1714. margin-left: 10px;
  1715. }
  1716. }
  1717. .device-button-group {
  1718. position: absolute;
  1719. top: -30px;
  1720. display: flex;
  1721. width: 100%;
  1722. .device-active {
  1723. background: linear-gradient(45deg, #04e6fb, #0c5cab);
  1724. &::before {
  1725. border-color: #0efcff;
  1726. box-shadow: 1px 1px 3px 1px #0efcff inset;
  1727. }
  1728. }
  1729. }
  1730. .table-hide-icon {
  1731. color: var(--vent-font-color);
  1732. cursor: pointer;
  1733. position: absolute;
  1734. right: 20px;
  1735. top: 10px;
  1736. z-index: 9999;
  1737. }
  1738. .enter-detail {
  1739. color: var(--vent-font-color);
  1740. cursor: pointer;
  1741. position: absolute;
  1742. right: 35px;
  1743. top: 35px;
  1744. padding: 5px;
  1745. border-radius: 5px;
  1746. margin-left: 8px;
  1747. margin-right: 8px;
  1748. width: auto;
  1749. height: 33px !important;
  1750. display: flex;
  1751. align-items: center;
  1752. justify-content: center;
  1753. color: var(--vent-font-color);
  1754. padding: 5px 15px 5px 15px;
  1755. z-index: 999;
  1756. cursor: pointer;
  1757. &:hover {
  1758. background: var(--vent-device-manager-control-btn-hover);
  1759. }
  1760. &::before {
  1761. width: calc(100% - 6px);
  1762. height: 27px;
  1763. content: '';
  1764. position: absolute;
  1765. top: 3px;
  1766. right: 0;
  1767. left: 3px;
  1768. bottom: 0;
  1769. z-index: -1;
  1770. border-radius: inherit;
  1771. /*important*/
  1772. background: var(--vent-device-manager-control-btn);
  1773. }
  1774. }
  1775. }
  1776. .table-hide {
  1777. height: 0px;
  1778. animation-name: tableHide;
  1779. /* 持续时间 */
  1780. animation-duration: 1s;
  1781. transition: all 1s;
  1782. }
  1783. .table-show {
  1784. height: 290px;
  1785. animation-name: tableShow;
  1786. /* 持续时间 */
  1787. animation-duration: 1s;
  1788. transition: all 1s;
  1789. }
  1790. .location-form {
  1791. display: flex;
  1792. margin: 8px;
  1793. .location-form-item {
  1794. width: 400px;
  1795. .location-form-label {
  1796. width: 100px;
  1797. display: inline-block;
  1798. color: var(--vent-font-color);
  1799. }
  1800. input {
  1801. background: transparent !important;
  1802. color: var(--vent-font-color);
  1803. border: 1px solid var(--vent-form-item-border) !important;
  1804. }
  1805. }
  1806. .zxm-select-selector {
  1807. width: 200px !important;
  1808. }
  1809. }
  1810. @keyframes tableShow {
  1811. 0% {
  1812. height: 0px;
  1813. opacity: 0;
  1814. }
  1815. 100% {
  1816. height: 290px;
  1817. opacity: 1;
  1818. }
  1819. }
  1820. @keyframes tableHide {
  1821. 0% {
  1822. opacity: 1;
  1823. }
  1824. 100% {
  1825. height: 0px;
  1826. opacity: 0;
  1827. }
  1828. }
  1829. @keyframes treeShow {
  1830. 0% {
  1831. left: -400px;
  1832. opacity: 0;
  1833. }
  1834. 100% {
  1835. left: 10px;
  1836. opacity: 1;
  1837. }
  1838. }
  1839. @keyframes treeHide {
  1840. 0% {
  1841. left: 10px;
  1842. opacity: 1;
  1843. }
  1844. 100% {
  1845. left: -400px;
  1846. opacity: 0;
  1847. }
  1848. }
  1849. @keyframes locationShow {
  1850. 0% {
  1851. right: 0px;
  1852. opacity: 0;
  1853. }
  1854. 100% {
  1855. right: 240px;
  1856. opacity: 1;
  1857. }
  1858. }
  1859. @keyframes locationHide {
  1860. 0% {
  1861. right: 240px;
  1862. opacity: 1;
  1863. }
  1864. 100% {
  1865. right: 0;
  1866. opacity: 0;
  1867. }
  1868. }
  1869. @keyframes locationBtnShow {
  1870. 0% {
  1871. right: -240px;
  1872. opacity: 0;
  1873. }
  1874. 100% {
  1875. right: -2px;
  1876. opacity: 1;
  1877. }
  1878. }
  1879. @keyframes locationBtnHide {
  1880. 0% {
  1881. right: -2px;
  1882. opacity: 1;
  1883. }
  1884. 100% {
  1885. right: -240px;
  1886. opacity: 0;
  1887. }
  1888. }
  1889. :deep(.@{ventSpace}-picker-datetime-panel) {
  1890. height: 200px !important;
  1891. overflow-y: auto !important;
  1892. }
  1893. :deep(.@{ventSpace}-tabs-tabpane-active) {
  1894. // overflow: auto;
  1895. height: 100%;
  1896. }
  1897. :deep(.zxm-select-dropdown) {
  1898. left: 0 !important;
  1899. color: #000000 !important;
  1900. }
  1901. :deep(.zxm-select-selector) {
  1902. height: 34px !important;
  1903. line-height: 34px !important;
  1904. }
  1905. :deep(.zxm-input) {
  1906. height: 32px !important;
  1907. line-height: 32px !important;
  1908. .zxm-select-selection-item {
  1909. line-height: 32px !important;
  1910. }
  1911. }
  1912. .device-button {
  1913. height: 26px;
  1914. display: flex;
  1915. justify-content: center;
  1916. align-items: center;
  1917. color: var(--vent-font-color);
  1918. position: relative;
  1919. cursor: pointer;
  1920. padding: 0 20px;
  1921. background: linear-gradient(45deg, #04e6fb55, #0c5cab55);
  1922. clip-path: polygon(10px 0, 0 50%, 10px 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
  1923. &:nth-child(1) {
  1924. left: calc(-6px * 1);
  1925. }
  1926. &:nth-child(2) {
  1927. left: calc(-6px * 2);
  1928. }
  1929. &:nth-child(3) {
  1930. left: calc(-6px * 3);
  1931. }
  1932. &:nth-child(4) {
  1933. left: calc(-6px * 4);
  1934. }
  1935. &:nth-child(5) {
  1936. left: calc(-6px * 5);
  1937. }
  1938. &:nth-child(6) {
  1939. left: calc(-6px * 6);
  1940. }
  1941. &:nth-child(7) {
  1942. left: calc(-6px * 7);
  1943. }
  1944. &:nth-child(8) {
  1945. left: calc(-6px * 8);
  1946. }
  1947. &:nth-child(9) {
  1948. left: calc(-6px * 9);
  1949. }
  1950. &:nth-child(10) {
  1951. left: calc(-6px * 10);
  1952. }
  1953. &:nth-child(11) {
  1954. left: calc(-6px * 11);
  1955. }
  1956. &:nth-child(12) {
  1957. left: calc(-6px * 12);
  1958. }
  1959. &:nth-child(13) {
  1960. left: calc(-6px * 13);
  1961. }
  1962. &:nth-child(14) {
  1963. left: calc(-6px * 14);
  1964. }
  1965. &:nth-child(15) {
  1966. left: calc(-6px * 15);
  1967. }
  1968. &:nth-child(16) {
  1969. left: calc(-6px * 16);
  1970. }
  1971. &:nth-child(17) {
  1972. left: calc(-6px * 17);
  1973. }
  1974. &:nth-child(18) {
  1975. left: calc(-6px * 18);
  1976. }
  1977. &:nth-child(19) {
  1978. left: calc(-6px * 19);
  1979. }
  1980. // &:first-child {
  1981. // clip-path: polygon(0 0, 10px 50%, 0 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
  1982. // }
  1983. }
  1984. // :deep(.@{ventSpace}-pagination){
  1985. // margin-right: 20px !important;
  1986. // margin-top: 5px !important;
  1987. // display: flex;
  1988. // align-items: center;
  1989. // }
  1990. </style>