index.vue 77 KB

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