index.vue 73 KB

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