index.vue 78 KB

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