index.vue 80 KB

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