index.vue 78 KB

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