index.vue 72 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006
  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 class="w-100% h-100%" :device-code="`${deviceType}`" :scroll="scroll"
  469. dict-code="fan_dict" />
  470. </template>
  471. <template v-else-if="deviceType.startsWith('fanlocal')">
  472. <HistoryTableNew class="w-100% hM-100%" :device-code="`${deviceType}`" :scroll="scroll" dict-code="fanlocal_dict" />
  473. </template>
  474. <template v-else-if="deviceType.startsWith('majorpath')">
  475. <HistoryTableMajorPath class="w-100% h-100%" :sysId="`${systemID}`" :scroll="scroll" columnsType="sys_majorpath" type="table" />
  476. </template>
  477. <template v-else>
  478. <HistoryTable ref="historyTable" :sysId="systemID" :columns-type="`${deviceType}`"
  479. :device-type="deviceType" designScope="device-history" :scroll="scroll" />
  480. </template>
  481. </div>
  482. </a-tab-pane>
  483. <a-tab-pane key="5" tab="历史曲线" v-if="deviceType.startsWith('majorpath')">
  484. <div class="tab-item">
  485. <HistoryTableMajorPath class="w-100% h-100%" :sysId="`${systemID}`" :scroll="scroll" columnsType="sys_majorpath" type="chart" />
  486. </div>
  487. </a-tab-pane>
  488. <a-tab-pane key="3" tab="报警历史" v-if="!noWarningArr.find((item) => deviceType.startsWith(item))">
  489. <div class="tab-item">
  490. <AlarmHistoryTable ref="alarmHistoryTable" v-if="activeKey == '3'" :sysId="systemID" columns-type="alarm"
  491. :device-type="deviceType"
  492. :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID, pageSize: 10000 })"
  493. :scroll="scroll" designScope="alarm-history" />
  494. </div>
  495. </a-tab-pane>
  496. <a-tab-pane key="4" tab="操作历史" v-if="haveHandlerArr.find((item) => deviceType.startsWith(item))">
  497. <div class="tab-item">
  498. <HandlerHistoryTable ref="handlerHistoryTable" v-if="activeKey == '4'" :sysId="systemID"
  499. columns-type="operator_history" :device-type="deviceType"
  500. :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })"
  501. :scroll="scroll" designScope="operator-history" />
  502. </div>
  503. </a-tab-pane>
  504. </a-tabs>
  505. </div>
  506. </div>
  507. <mainPath v-if="deviceType == 'majorpath'" :dataSource="majorPathEchartsData"
  508. style="width: 300px; height: 300px; position: absolute; left: 250px; top: 40px" />
  509. <component v-if="modalVisible" :is="currentModal" v-model:visible="modalVisible" :dataSource="dataSource"
  510. :activeID="activeID" />
  511. </div>
  512. </template>
  513. <script setup lang="ts">
  514. import { ref, onMounted, onUnmounted, ComponentOptions, shallowRef, reactive, defineProps, watch } from 'vue';
  515. import { SendOutlined, FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons-vue';
  516. import { list, getDeviceList, getDeviceTypeList, devPosition, getDepartmentInfo, getExportUrl } from './device.api';
  517. import AlarmHistoryTable from '../../../comment/AlarmHistoryTable.vue';
  518. import HistoryTable from '../../../comment/HistoryTable.vue';
  519. import HistoryTableNew from '/@/views/vent/comment/history/HistoryTable.vue';
  520. import HandlerHistoryTable from '../../../comment/HandlerHistoryTable.vue';
  521. import MonitorTable from '../../../comment/MonitorTable.vue';
  522. import GroupMonitorTable from '../../../comment/GroupMonitorTable.vue';
  523. import stationTable from '../../../comment/stationTable.vue';
  524. import gaspatrolTable from '../../../comment/gaspatrolTable.vue';
  525. import gasReport from '../../../comment/gasReport.vue';
  526. import gasReportCount from '../../../comment/gasReportCount.vue';
  527. import dustMonitorTable from '../../../comment/dustMonitorTable.vue';
  528. import bundleMonitorTable from '../../../comment/bundleMonitorTable.vue';
  529. import gasInspectDialog from '../../../comment/gasInspectDialog.vue';
  530. import DustingTable from '../../../comment/DustingTable.vue';
  531. import bundleSpyMonitorTable from '../../../comment/bundleSpyMonitorTable.vue';
  532. import HistoryTableMajorPath from './modal/HistoryTableMajorPath.vue';
  533. import HistoryBall from './modal/history-ball.vue';
  534. import { TreeProps, message, Progress, Input, Select } from 'ant-design-vue';
  535. import { TableAction } from '/@/components/Table';
  536. import { SvgIcon } from '/@/components/Icon';
  537. import { getActions } from '/@/qiankun/state';
  538. import { useRouter } from 'vue-router';
  539. import { setDivHeight } from '/@/utils/event';
  540. import { render } from '/@/utils/common/renderUtils';
  541. import {
  542. majorColumns,
  543. haveSysDetailArr,
  544. haveDetailArr,
  545. haveHandlerArr,
  546. noWarningArr,
  547. surfaceChartsColumns,
  548. noHistoryArr,
  549. getMonitorComponent,
  550. vehicleFormConfig,
  551. noLocationArr,
  552. } from './device.data';
  553. import mainPath from './modal/mainPath.vue';
  554. import { formConfig } from '../../../safetyMonitor/safety.data';
  555. import { getDictItemsByCode } from '/@/utils/dict';
  556. import BarAndLine from '/@/components/chart/BarAndLine.vue';
  557. import MTreeSelect from '/@/components/Form/src/jeecg/components/MTreeSelect.vue';
  558. // import ApiSelect from '/@/components/Form/src/components/ApiSelect.vue';
  559. import { nextTick } from 'vue';
  560. import { useMethods } from '/@/hooks/system/useMethods';
  561. import { useGo } from '/@/hooks/web/usePage';
  562. import { useGlobSetting } from '/@/hooks/setting';
  563. type DeviceType = { deviceType: string; deviceName: string; datalist: any[] };
  564. const glob = useGlobSetting();
  565. // import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
  566. const { FiberModal, BundleModal, DustModal, BallvalveModal, AtomizingModal, GaspatrolModal, WisdomBallModal } = getMonitorComponent();
  567. const props = defineProps({
  568. pageData: {
  569. type: Object,
  570. default: () => { },
  571. },
  572. });
  573. const { handleExportXls } = useMethods();
  574. const go = useGo();
  575. const echatsOption = {
  576. grid: {
  577. top: '35',
  578. left: '30',
  579. right: '45',
  580. bottom: '25',
  581. containLabel: true,
  582. },
  583. toolbox: {
  584. feature: {},
  585. },
  586. };
  587. const router = useRouter();
  588. const actions = getActions();
  589. const locationForm = reactive({
  590. strname: '',
  591. department: '',
  592. stationname: '',
  593. });
  594. const noLocationList = noLocationArr();
  595. const monitorTable = ref();
  596. const historyTable = ref();
  597. const alarmHistoryTable = ref();
  598. const handlerHistoryTable = ref();
  599. // const routerParam = ref('home') // 默认进来时首页
  600. const isRefresh = ref(true);
  601. // 模态框
  602. const currentModal = shallowRef<Nullable<ComponentOptions>>(null); //模态框
  603. const modalVisible = ref<Boolean>(false); // 模态框是否可见
  604. // const drawerHeight = ref(240) // 监测框最小高度
  605. const treeShow = ref(true); //是否显示树形菜单
  606. const tableShow = ref(true); //是否显示树形菜单
  607. const locationSettingShow = ref(false); //是否显示树形菜单
  608. const treeNodeTitle = ref(''); // 选中的树形标题
  609. const locationList = ref([]); //巷道定位图标显示列表
  610. const deviceList = ref<DeviceType[]>([]); //关联设备列表
  611. const deviceActive = ref('');
  612. const activeKey = ref('1'); // tab key
  613. const dataSource = shallowRef([]); // 实时监测数据
  614. const majorPathEchartsData = ref({}); // 关键路线echarts数据
  615. const surfaceEchartsData = ref<any[]>(); // 工作面历史记录,echarts数据
  616. const activeID = ref(''); // 打开详情modal时监测的设备id
  617. const deviceType = ref(''); // 监测设备类型
  618. const systemType = ref('');
  619. const systemID = ref(''); // 系统监测时,系统id
  620. const selectedKeys = ref<string[]>([]);
  621. const expandedKeys = ref<string[]>([]);
  622. const scroll = reactive({
  623. y: 180,
  624. });
  625. const treeData = ref<TreeProps['treeData']>([]);
  626. let departmentInfo: Null | Object = null;
  627. let startMonitorTimer = 0;
  628. let gaspatrol = ref(null);
  629. let gasreport = ref(null);
  630. let gasreportcount = ref(null);
  631. let station = ref(null);
  632. let gasSearch = reactive({
  633. address: '',
  634. userName: '',
  635. insType: '2',
  636. class: 'night',
  637. });
  638. //树形菜单选择事件
  639. const onSelect: TreeProps['onSelect'] = (keys, e) => {
  640. deviceType.value = '';
  641. systemID.value = '';
  642. deviceList.value = [];
  643. const title = e.node.title; // 在
  644. if (e.node.parent && e.node.parent.node.type.toString().startsWith('sys')) {
  645. systemType.value = e.node.parent.node.type;
  646. if (deviceType.value != e.node.parent.node.type) deviceType.value = e.node.parent.node.type;
  647. systemID.value = e.node.type;
  648. // 传递工作面id信息,用于定位
  649. go(`/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=${deviceType.value}&deviceid=${systemID.value}`);
  650. } else {
  651. systemType.value = e.node.type;
  652. if (deviceType.value != e.node.type) deviceType.value = e.node.type;
  653. go(`/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=${deviceType.value}&deviceid=`);
  654. }
  655. clearTimeout(timer);
  656. timer = undefined;
  657. if (startMonitorTimer) {
  658. clearTimeout(startMonitorTimer);
  659. }
  660. dataSource.value = [];
  661. monitorTable.value.resetPagination();
  662. if (!startMonitorTimer) {
  663. startMonitorTimer = setTimeout(() => {
  664. expandedKeys.value = keys;
  665. selectedKeys.value = keys;
  666. treeNodeTitle.value = e.node.title;
  667. if (e.node.children?.length < 1 && timer) {
  668. getMonitor(true);
  669. }
  670. }, 1000);
  671. }
  672. // activeKey.value = '1';
  673. };
  674. function tabChange(activeKeyVal) {
  675. activeKey.value = activeKeyVal;
  676. }
  677. function showTree(flag, value) {
  678. if (flag == 'treeShow') treeShow.value = value;
  679. if (flag == 'location') locationSettingShow.value = value;
  680. }
  681. async function getDeviceType(sysType?) {
  682. if (treeData.value?.length > 0) return;
  683. const result = await getDeviceTypeList({});
  684. if (result.length > 0) {
  685. const dataSource = <TreeProps['treeData']>[];
  686. let key = '0';
  687. const getData = (resultList, dataSourceList, keyVal) => {
  688. resultList.forEach((item, index) => {
  689. if (item.deviceType != 'sys' && item.children && item.children.length > 0) {
  690. const children = getData(item.children, [], `${keyVal}-${index}`);
  691. // 判断关键阻力路线
  692. if (item.itemValue.startsWith(sysType) && children[0]) {
  693. systemID.value = item.children[0]['itemValue'];
  694. }
  695. dataSourceList.push({
  696. children: children,
  697. title: item.itemText,
  698. key: `${keyVal}-${index}`,
  699. type: item.itemValue,
  700. parentKey: `${keyVal}`,
  701. });
  702. } else {
  703. dataSourceList.push({
  704. children: [],
  705. title: item.itemText,
  706. key: `${keyVal}-${index}`,
  707. type: item.itemValue,
  708. parentKey: `${keyVal}`,
  709. });
  710. }
  711. });
  712. return dataSourceList;
  713. };
  714. treeData.value = getData(result, dataSource, key);
  715. }
  716. }
  717. // https获取监测数据
  718. let timer: null | NodeJS.Timeout = undefined;
  719. function getMonitor(flag?) {
  720. if (deviceType.value) {
  721. if (timer) timer = null;
  722. if (Object.prototype.toString.call(timer) === '[object Null]') {
  723. timer = setTimeout(
  724. async () => {
  725. if (deviceType.value.startsWith('gasDay_normal') && gaspatrol.value) {
  726. gaspatrol.value.queryNowGasInsInfoList(); //人工瓦斯巡检
  727. } else if (deviceType.value.startsWith('gasDayReport')) {
  728. if (glob.sysOrgCode == 'sdmtjtbetmk') {
  729. gasreportcount.value.getSearchReport();
  730. } else {
  731. gasreport.value.getSearchReport(); //瓦斯日报
  732. }
  733. } else if (deviceType.value.startsWith('substation') && station.value) {
  734. //分站
  735. station.value.getStationList();
  736. } else {
  737. await getDataSource();
  738. }
  739. if (timer) {
  740. getMonitor();
  741. }
  742. },
  743. flag ? 0 : 1000
  744. );
  745. }
  746. }
  747. }
  748. async function getDataSource() {
  749. if (deviceType.value && deviceType.value.startsWith('sys') && systemID.value) {
  750. const res = await list({ devicetype: 'sys', systemID: systemID.value });
  751. const result = res.msgTxt;
  752. const deviceArr = <DeviceType[]>[];
  753. result.forEach((item) => {
  754. const data = item['datalist'].filter((data: any) => {
  755. const readData = data.readData;
  756. return Object.assign(data, readData);
  757. });
  758. if (item.type != 'sys') {
  759. if (item.type === 'majorpath') {
  760. deviceArr.unshift({ deviceType: item.type, deviceName: item['typeName'], datalist: item['datalist'][0]['paths'] });
  761. majorPathEchartsData.value = item['datalist'][0];
  762. } else if (item.type.startsWith('surface_history')) {
  763. surfaceEchartsData.value = item['datalist'][0];
  764. deviceArr.unshift({
  765. deviceType: item.type,
  766. deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
  767. datalist: data,
  768. });
  769. } else {
  770. deviceArr.unshift({
  771. deviceType: item.type,
  772. deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
  773. datalist: data,
  774. });
  775. }
  776. }
  777. });
  778. deviceList.value = deviceArr;
  779. if (deviceArr.length > 0) {
  780. // if (deviceArr[1]) {
  781. // deviceActive.value = deviceArr[1].deviceType
  782. // monitorChange(1)
  783. // } else {
  784. // deviceActive.value = deviceArr[0].deviceType
  785. // monitorChange(0)
  786. // }
  787. deviceActive.value = deviceArr[0].deviceType;
  788. monitorChange(0);
  789. }
  790. } else {
  791. let res = null;
  792. if (systemID.value) {
  793. res = await list({ devicetype: 'sys', types: deviceType.value, systemID: systemID.value });
  794. if (res && res.msgTxt) {
  795. const result = res.msgTxt;
  796. result.forEach((item) => {
  797. const data = item['datalist'].filter((data: any) => {
  798. const readData = data.readData;
  799. return Object.assign(data, readData);
  800. });
  801. if (item.type != 'sys') {
  802. if (item.type.startsWith('majorpath') && item.type == deviceType.value) {
  803. dataSource.value = item['datalist'][0]['paths'];
  804. majorPathEchartsData.value = item['datalist'][0];
  805. return;
  806. } else if (item.type == deviceType.value) {
  807. if (item.type == 'surface_history') {
  808. // 工作面图标数据
  809. surfaceEchartsData.value = item['datalist'][0];
  810. } else {
  811. dataSource.value = data;
  812. console.log('关联设备数据--------------->', data);
  813. }
  814. return;
  815. }
  816. }
  817. });
  818. }
  819. } else {
  820. let resultData, searchForm;
  821. if (monitorTable.value) {
  822. const formData = monitorTable.value.getForm();
  823. searchForm = formData.getFieldsValue();
  824. }
  825. if (monitorTable.value) {
  826. if (deviceType.value.startsWith('safetymonitor')) {
  827. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: { ...searchForm } });
  828. } else if (deviceType.value.startsWith('location')) {
  829. if (!departmentInfo) {
  830. departmentInfo = await getDepartmentInfo({});
  831. }
  832. let department = null;
  833. if (departmentInfo && locationForm && locationForm['department']) {
  834. for (const key in departmentInfo) {
  835. const item = departmentInfo[key];
  836. if (item['id'] === locationForm['department']) {
  837. department = item;
  838. break;
  839. }
  840. }
  841. }
  842. resultData = await list({
  843. devicetype: deviceType.value,
  844. pagetype: 'normal',
  845. filterParams: {
  846. strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
  847. userName: locationForm['strname'] ? locationForm['strname'] : '',
  848. userJson: department && department['name'] ? department['name'] : '',
  849. },
  850. });
  851. } else if (deviceType.value.startsWith('vehicle')) {
  852. resultData = await list({
  853. devicetype: deviceType.value,
  854. pagetype: 'normal',
  855. filterParams: {
  856. strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
  857. vehicleName: locationForm['strname'] ? locationForm['strname'] : '',
  858. },
  859. });
  860. } else {
  861. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
  862. }
  863. } else {
  864. // 非安全监控
  865. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
  866. }
  867. if (resultData && resultData.msgTxt) {
  868. const result = resultData.msgTxt[0];
  869. if (result) {
  870. const data = result['datalist'].filter((data: any) => {
  871. const readData = data.readData;
  872. return Object.assign(data, readData);
  873. });
  874. if (deviceType.value.startsWith('safetymonitor')) {
  875. const resultData = <any[]>[];
  876. // 如果是安全监控的数据时需要过滤常见设备数据,根据设定的常用安全监控字典去匹配
  877. const dictCodes = getDictItemsByCode('safetynormal');
  878. if (searchForm && !searchForm['dataTypeName'] && dictCodes && dictCodes.length) {
  879. for (let i = 0; i < dictCodes.length; i++) {
  880. const dict = dictCodes[i];
  881. data.forEach((item) => {
  882. if (dict['value'] == item['dataTypeName']) {
  883. resultData.push(item);
  884. }
  885. });
  886. }
  887. dataSource.value = resultData;
  888. } else {
  889. dataSource.value = data;
  890. }
  891. } else {
  892. let tableData: any[] = [];
  893. let noNetData: any[] = [];
  894. data.filter((el) => {
  895. if (el.netStatus == 1) {
  896. tableData.push(el);
  897. } else {
  898. noNetData.push(el);
  899. }
  900. });
  901. dataSource.value = [...tableData, ...noNetData];
  902. }
  903. } else {
  904. dataSource.value = [];
  905. }
  906. } else {
  907. dataSource.value = [];
  908. }
  909. }
  910. }
  911. }
  912. //设备分站详情跳转
  913. function stationDetail() {
  914. const newPage = router.resolve({ path: '/safety/list/detail/home' });
  915. window.open(newPage.href, '_blank');
  916. }
  917. function goLocation(record) {
  918. // debugger;
  919. if (record['deviceType'] == 'person_bd' || record['deviceType'] == 'car_bd') {
  920. actions.setGlobalState({ locationId: record.devNum, locationObj: null, pageObj: null, type: record['deviceType'].split('_')[0] });
  921. } else if (deviceType.value == 'bundleSpyDayReport' || deviceType.value == 'dustDayReport' || deviceType.value == 'bundleDayReport') {
  922. actions.setGlobalState({ locationName: record.jcdd, locationObj: null, pageObj: null, type: record['deviceType'] });
  923. } else if (deviceType.value.startsWith('gasDay')) {
  924. actions.setGlobalState({ locationName: record.strInstallPos, locationObj: null, pageObj: null, type: record['deviceType'] });
  925. } else if (deviceType.value == 'gasDayReport') {
  926. actions.setGlobalState({ locationName: record.jcdd, locationObj: null, pageObj: null, type: record['deviceType'] });
  927. } else if (deviceType.value.startsWith('substation')) {
  928. actions.setGlobalState({ locationId: record.id, locationObj: null, pageObj: null, type: record['deviceType'] });
  929. } else {
  930. if (deviceType.value.startsWith('location')) {
  931. actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null, type: 'person' });
  932. } else if (deviceType.value.startsWith('vehicle')) {
  933. actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null, type: 'car' });
  934. } else {
  935. actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null });
  936. }
  937. }
  938. }
  939. function getSearch(param) {
  940. gasSearch.address = param.address,
  941. gasSearch.userName = param.userName,
  942. gasSearch.insType = param.insType,
  943. gasSearch.class = param.class
  944. }
  945. // 详情跳转
  946. function goDetail(record?) {
  947. if (record) {
  948. activeID.value = record.deviceID;
  949. if (deviceType.value.startsWith('fiber')) {
  950. currentModal.value = FiberModal;
  951. modalVisible.value = true;
  952. } else if (deviceType.value.startsWith('dusting')) {
  953. currentModal.value = DustModal;
  954. modalVisible.value = true;
  955. } else if (deviceType.value.startsWith('bundletube')) {
  956. currentModal.value = BundleModal;
  957. modalVisible.value = true;
  958. } else if (deviceType.value.startsWith('firemon_normal')) {
  959. // currentModal.value = BundleModal;
  960. currentModal.value = WisdomBallModal;
  961. modalVisible.value = true;
  962. } else if (deviceType.value.startsWith('ballvalve')) {
  963. currentModal.value = BallvalveModal;
  964. modalVisible.value = true;
  965. } else if (deviceType.value.startsWith('atomizing')) {
  966. currentModal.value = AtomizingModal;
  967. modalVisible.value = true;
  968. } else if (deviceType.value.startsWith('gaspatrol')) {
  969. currentModal.value = GaspatrolModal;
  970. modalVisible.value = true;
  971. } else if (deviceType.value.startsWith('door')) {
  972. const newPage = router.resolve({ path: '/monitorChannel/monitor-firedoor', query: { id: activeID.value, deviceType: deviceType.value } });
  973. window.open(newPage.href, '_blank');
  974. } else if (deviceType.value.indexOf('gate') != -1) {
  975. const newPage = router.resolve({ path: '/monitorChannel/monitor-gate', query: { id: activeID.value, deviceType: deviceType.value } });
  976. window.open(newPage.href, '_blank');
  977. } else if (deviceType.value.indexOf('window') != -1) {
  978. const newPage = router.resolve({ path: '/monitorChannel/monitor-window', query: { id: activeID.value, deviceType: deviceType.value } });
  979. window.open(newPage.href, '_blank');
  980. } else if (deviceType.value.indexOf('windrect') != -1) {
  981. const newPage = router.resolve({ path: '/monitorChannel/monitor-windrect', query: { id: activeID.value, deviceType: deviceType.value } });
  982. window.open(newPage.href, '_blank');
  983. } else if (deviceType.value.indexOf('fanmain') != -1) {
  984. const newPage = router.resolve({ path: '/monitorChannel/monitor-fanmain', query: { id: activeID.value, deviceType: deviceType.value } });
  985. window.open(newPage.href, '_blank');
  986. } else if (deviceType.value.indexOf('fanlocal') != -1 && glob.sysOrgCode !== 'ymdnymdn') {
  987. const newPage = router.resolve({ path: '/monitorChannel/monitor-fanlocal', query: { id: activeID.value, deviceType: deviceType.value } });
  988. window.open(newPage.href, '_blank');
  989. } else if (deviceType.value.indexOf('fanlocal') != -1 && glob.sysOrgCode == 'ymdnymdn') {
  990. const newPage = router.resolve({ path: '/monitorChannel/monitor-fanlocal1', query: { id: activeID.value, deviceType: record.deviceType } });
  991. window.open(newPage.href, '_blank');
  992. } else if (deviceType.value.indexOf('pulping') != -1) {
  993. const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } });
  994. window.open(newPage.href, '_blank');
  995. } else if (deviceType.value.indexOf('pressurefan') != -1) {
  996. const newPage = router.resolve({ path: '/nitrogen/home', query: { id: activeID.value } });
  997. window.open(newPage.href, '_blank');
  998. } else if (deviceType.value.indexOf('chamber') != -1) {
  999. const newPage = router.resolve({ path: '/chamber-home', query: { id: activeID.value } });
  1000. window.open(newPage.href, '_blank');
  1001. } else if (deviceType.value.indexOf('safetymonitor') != -1) {
  1002. const newPage = router.resolve({ path: '/monitorChannel/device-monitor/safetymonitor', query: { id: activeID.value } });
  1003. window.open(newPage.href, '_blank');
  1004. } else if (deviceType.value.indexOf('pump') != -1) {
  1005. const newPage = router.resolve({ path: '/monitorChannel/gasPump-home', query: { id: activeID.value } });
  1006. window.open(newPage.href, '_blank');
  1007. } else if (systemType.value.indexOf('nitrogen') != -1) {
  1008. const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } });
  1009. window.open(newPage.href, '_blank');
  1010. } else if (deviceType.value.indexOf('forcFan') != -1) {
  1011. const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } });
  1012. window.open(newPage.href, '_blank');
  1013. } else if (deviceType.value.indexOf('pulping') != -1) {
  1014. const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } });
  1015. window.open(newPage.href, '_blank');
  1016. } else if (deviceType.value.indexOf('gasmonitor') != -1) {
  1017. const newPage = router.resolve({ path: '/gas/warn/home' });
  1018. window.open(newPage.href, '_blank');
  1019. } else {
  1020. message.info('待开发。。。');
  1021. }
  1022. } else {
  1023. if (systemType.value.indexOf('sys_dongshi') != -1) {
  1024. const newPage = router.resolve({ path: '/chamber-home', query: { id: systemID.value } });
  1025. window.open(newPage.href, '_blank');
  1026. } else if (systemType.value.indexOf('sys_obfurage') != -1) {
  1027. const newPage = router.resolve({ path: '/monitorChannel/obfurage-home', query: { id: systemID.value } });
  1028. window.open(newPage.href, '_blank');
  1029. } else if (systemType.value.indexOf('sys_surface_caimei') != -1) {
  1030. const newPage = router.resolve({ path: '/monitorChannel/wokerFace-home', query: { id: systemID.value } });
  1031. window.open(newPage.href, '_blank');
  1032. } else if (systemType.value.indexOf('sys_surface_juejin') != -1) {
  1033. const newPage = router.resolve({ path: '/monitorChannel/tunFace-home', query: { id: systemID.value } });
  1034. window.open(newPage.href, '_blank');
  1035. } else if (systemType.value.indexOf('sys_maintunnel_leather') != -1) {
  1036. const newPage = router.resolve({ path: '/monitorChannel/beltTun-home', query: { id: systemID.value } });
  1037. window.open(newPage.href, '_blank');
  1038. } else if (systemType.value.indexOf('sys_surface_junya') != -1) {
  1039. const newPage = router.resolve({ path: '/monitorChannel/balancePress-home', query: { id: systemID.value } });
  1040. window.open(newPage.href, '_blank');
  1041. } else if (systemType.value.indexOf('sys_nitrogen') != -1) {
  1042. const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } });
  1043. window.open(newPage.href, '_blank');
  1044. } else if (deviceType.value.indexOf('forcFan') != -1) {
  1045. const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } });
  1046. window.open(newPage.href, '_blank');
  1047. } else if (deviceType.value.indexOf('pulping') != -1) {
  1048. const newPage = router.resolve({ path: '/grout-home', query: { id: systemID.value } });
  1049. window.open(newPage.href, '_blank');
  1050. } else if (deviceType.value.indexOf('gasDay_normal') != -1) {
  1051. const newPage = router.resolve({ path: '/gas/gas-report-inspect/home' });
  1052. window.open(newPage.href, '_blank');
  1053. } else if (deviceType.value.indexOf('gasDayReport') != -1) {
  1054. const newPage = router.resolve({ path: '/gas/gasDayReport/home' });
  1055. window.open(newPage.href, '_blank');
  1056. } else if (deviceType.value.indexOf('dustDayReport') != -1) {
  1057. const newPage = router.resolve({ path: '/dustDayReport/home' });
  1058. window.open(newPage.href, '_blank');
  1059. } else if (deviceType.value.indexOf('bundleDayReport') != -1) {
  1060. const newPage = router.resolve({ path: '/bundleDayReport/home' });
  1061. window.open(newPage.href, '_blank');
  1062. } else if (deviceType.value.indexOf('bundleSpyDayReport') != -1) {
  1063. const newPage = router.resolve({ path: '/bundleSpyDayReport/home' });
  1064. window.open(newPage.href, '_blank');
  1065. } else {
  1066. message.info('待开发。。。');
  1067. }
  1068. }
  1069. }
  1070. function exportXls() {
  1071. handleExportXls('瓦斯巡检记录', getExportUrl, { devicetype: deviceType.value });
  1072. }
  1073. function toHome() {
  1074. deviceList.value = [];
  1075. if (timer) clearTimeout(timer);
  1076. timer = undefined;
  1077. deviceType.value = '';
  1078. go(glob.homePath);
  1079. }
  1080. function toHide() {
  1081. tableShow.value = !tableShow.value;
  1082. document.getElementById('monitorBox').addEventListener('animationend', () => {
  1083. if (!tableShow.value) {
  1084. document.getElementById('monitorBox').style.height = '0px';
  1085. } else {
  1086. document.getElementById('monitorBox').style.height = '290';
  1087. }
  1088. });
  1089. }
  1090. async function findTreeDataValue(obj) {
  1091. const findDeviceType = (data: any[], obj, flag = true) => {
  1092. return data.find((item: any) => {
  1093. if (item.children.length > 0) {
  1094. findDeviceType(item.children, obj);
  1095. }
  1096. // debugger;
  1097. if (obj.deviceType && obj.deviceType.startsWith('sys_')) {
  1098. // debugger;
  1099. if (item.type == obj.deviceid) {
  1100. deviceType.value = 'sys';
  1101. systemID.value = obj.deviceid;
  1102. selectedKeys.value = [item.key];
  1103. expandedKeys.value = [item.key];
  1104. treeNodeTitle.value = item.title;
  1105. }
  1106. } else {
  1107. if (!flag) {
  1108. if (obj.deviceType && item.type.startsWith(obj.deviceType)) {
  1109. deviceType.value = item.type;
  1110. selectedKeys.value = [item.key];
  1111. expandedKeys.value = [item.key];
  1112. treeNodeTitle.value = item.title;
  1113. return true;
  1114. }
  1115. return false;
  1116. } else {
  1117. if (obj.deviceType && item.type == obj.deviceType) {
  1118. deviceType.value = item.type;
  1119. selectedKeys.value = [item.key];
  1120. expandedKeys.value = [item.key];
  1121. treeNodeTitle.value = item.title;
  1122. return true;
  1123. }
  1124. return false;
  1125. }
  1126. }
  1127. return false;
  1128. });
  1129. };
  1130. const flag = findDeviceType(treeData.value, obj);
  1131. if (!flag) {
  1132. findDeviceType(treeData.value, obj, false);
  1133. }
  1134. // 无类型时
  1135. if (!treeNodeTitle.value && treeData.value && treeData.value[0] && treeData.value[0]['children']) {
  1136. const defaultData = treeData.value[0]['children'][0];
  1137. if (deviceType.value !== defaultData.type) deviceType.value = defaultData.type;
  1138. selectedKeys.value = [defaultData.key as string];
  1139. expandedKeys.value = [defaultData.key as string];
  1140. treeNodeTitle.value = defaultData.title;
  1141. }
  1142. if (timer === undefined) {
  1143. timer = null;
  1144. await getDataSource();
  1145. getMonitor(true);
  1146. }
  1147. }
  1148. function monitorChange(index) {
  1149. dataSource.value = [];
  1150. deviceActive.value = deviceList.value[index].deviceType;
  1151. if (deviceType.value != deviceActive.value) deviceType.value = deviceActive.value;
  1152. if (activeKey.value == '1' && monitorTable.value) {
  1153. monitorTable.value.setLoading(true);
  1154. dataSource.value = deviceList.value[index].datalist;
  1155. }
  1156. if (activeKey.value == '2' && historyTable.value) {
  1157. historyTable.value.setLoading(true);
  1158. }
  1159. if (activeKey.value == '3' && alarmHistoryTable.value) {
  1160. alarmHistoryTable.value.setLoading(true);
  1161. }
  1162. if (activeKey.value == '4' && handlerHistoryTable.value) {
  1163. handlerHistoryTable.value.setLoading(true);
  1164. }
  1165. }
  1166. /**
  1167. * 设置巷道设备定位图标的显示与隐藏
  1168. */
  1169. function setLocation() {
  1170. let locationStr = '';
  1171. locationList.value.forEach((item: any) => {
  1172. if (item.Visible) {
  1173. locationStr = locationStr ? locationStr + ',' + item.value : item.value;
  1174. }
  1175. });
  1176. actions.setGlobalState({ locationId: null, locationObj: null, pageObj: null, locationPlane: locationStr });
  1177. setTimeout(() => {
  1178. message.success('设置成功');
  1179. }, 600);
  1180. }
  1181. watch(
  1182. () => props.pageData,
  1183. async (pageObj) => {
  1184. isRefresh.value = false;
  1185. if (!treeData.value || treeData.value?.length < 1) {
  1186. await getDeviceType();
  1187. }
  1188. nextTick(() => {
  1189. isRefresh.value = true;
  1190. // if (pageObj && pageObj.pageType && pageObj.pageType.startsWith('sys_')) {
  1191. // findTreeDataValue({ deviceid: systemID.value });
  1192. // } else {
  1193. // findTreeDataValue({ deviceType: pageObj.pageType });
  1194. // }
  1195. findTreeDataValue(pageObj);
  1196. });
  1197. },
  1198. { immediate: true }
  1199. );
  1200. onMounted(async () => {
  1201. const pageObj = props.pageData;
  1202. if (!pageObj) return;
  1203. if (pageObj && pageObj.pageType) {
  1204. if (pageObj.pageType.startsWith('sys_')) {
  1205. await getDeviceType(pageObj.pageType);
  1206. findTreeDataValue({ deviceType: pageObj.pageType, deviceid: pageObj.deviceid });
  1207. } else {
  1208. await getDeviceType();
  1209. findTreeDataValue({ deviceType: pageObj.pageType });
  1210. }
  1211. } else {
  1212. await getDeviceType();
  1213. findTreeDataValue({ deviceid: pageObj.deviceid });
  1214. }
  1215. // 定位
  1216. const posShowData = pageObj.locationPlane;
  1217. if (posShowData) {
  1218. locationList.value = posShowData;
  1219. } else {
  1220. locationList.value = await devPosition({});
  1221. }
  1222. // safetyOption.value = await safetyDeviceList(null, { devicetype: 'safetymonitor', code: 'dataTypeName' })
  1223. });
  1224. onUnmounted(() => {
  1225. if (timer) {
  1226. clearTimeout(timer);
  1227. }
  1228. timer = undefined;
  1229. });
  1230. </script>
  1231. <style lang="less" scoped>
  1232. @import '/@/design/theme.less';
  1233. @import '/@/design/vent/modal.less';
  1234. @ventSpace: zxm;
  1235. @{theme-deepblue} {
  1236. .scene-box {
  1237. // --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
  1238. // --image-tree-icon-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-bg.png');
  1239. // --image-tree-icon-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-hover-bg.png');
  1240. // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
  1241. // --image-tree-expansion-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-bg.png');
  1242. // --image-tree-expansion-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-hover-bg.png');
  1243. // --image-location-bg: url('/@/assets/images/themify/deepblue/vent/home/location-bg.png');
  1244. // --image-location-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/location-hover-bg.png');
  1245. // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
  1246. // --image-turn-location-top-bg: url('/@/assets/images/themify/deepblue/vent/home/turn-location-top-bg.png');
  1247. // --image-tree-icon-cover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-bg.png');
  1248. // --image-tree-icon-cover-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-hover-bg.png');
  1249. // --image-tohome: url('/@/assets/images/themify/deepblue/vent/home/tohome.png');
  1250. // --tree-node-select: #0963c1;
  1251. // --tree-node-hover: #0f376ccc;
  1252. // --location-bottom-bg: #21324855;
  1253. // --location-bottom-border: #aed1ff4d;
  1254. }
  1255. }
  1256. .scene-box {
  1257. --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
  1258. --image-tree-icon-bg: url('/@/assets/images/vent/home/tree-icon-bg.png');
  1259. --image-tree-icon-hover-bg: url('/@/assets/images/vent/home/tree-icon-hover-bg.png');
  1260. --image-tree-bg: url('/@/assets/images/vent/home/tree-bg.png');
  1261. --image-tree-expansion-bg: url('/@/assets/images/vent/home/tree-expansion-bg.png');
  1262. --image-tree-expansion-hover-bg: url('/@/assets/images/vent/home/tree-expansion-hover-bg.png');
  1263. --image-location-bg: url('/@/assets/images/vent/home/location-bg.png');
  1264. --image-location-hover-bg: url('/@/assets/images/vent/home/location-hover-bg.png');
  1265. --image-turn-location-top-bg: url('/@/assets/images/vent/home/turn-location-top-bg.png');
  1266. --image-tree-icon-cover-bg: url('/@/assets/images/vent/home/tree-icon-cover-bg.png');
  1267. --image-tree-icon-cover-hover-bg: url('/@/assets/images/vent/home/tree-icon-cover-hover-bg.png');
  1268. --image-tohome: url('/@/assets/images/vent/home/tohome.png');
  1269. --tree-node-select: #00b1c8;
  1270. --tree-node-hover: #00b1c855;
  1271. --location-bottom-bg: #00709955;
  1272. --location-bottom-border: #aef3ff4d;
  1273. }
  1274. .top-header {
  1275. position: fixed;
  1276. width: 100%;
  1277. height: 56px;
  1278. background: var(--image-modal-top);
  1279. text-align: center;
  1280. line-height: 56px;
  1281. font-size: 28px;
  1282. color: #ffffffdd;
  1283. font-weight: 600;
  1284. z-index: 1;
  1285. letter-spacing: 2px;
  1286. font-size: 30px;
  1287. }
  1288. .select-node {
  1289. position: fixed;
  1290. top: 100px;
  1291. left: 10px;
  1292. color: var(--vent-font-color);
  1293. display: flex;
  1294. justify-content: center;
  1295. font-size: 22px;
  1296. .title {
  1297. margin-left: 10px;
  1298. }
  1299. }
  1300. .expansion-icon {
  1301. background: var(--image-tree-icon-bg) no-repeat;
  1302. background-size: contain;
  1303. position: absolute;
  1304. left: 190px;
  1305. top: 25px;
  1306. &:hover {
  1307. background: var(--image-tree-icon-hover-bg) no-repeat;
  1308. background-size: contain;
  1309. }
  1310. }
  1311. .device-select {
  1312. width: 250px;
  1313. height: 500px;
  1314. background: var(--image-tree-bg) no-repeat;
  1315. position: fixed;
  1316. top: 100px;
  1317. left: 10px;
  1318. background-size: contain;
  1319. pointer-events: auto;
  1320. padding: 20px 10px 30px 10px;
  1321. }
  1322. .inspect-info-xj {
  1323. position: fixed;
  1324. top: 100px;
  1325. left: 250px;
  1326. width: 320px;
  1327. height: 272px;
  1328. padding: 20px;
  1329. background: url('@/assets/images/inspect-bg.png') no-repeat center;
  1330. background-size: 100% 100%;
  1331. box-sizing: border-box;
  1332. }
  1333. .is-expansion-icon {
  1334. padding: 5px;
  1335. pointer-events: auto;
  1336. z-index: 999;
  1337. }
  1338. .device-select-show {
  1339. left: 10px;
  1340. animation-name: treeShow;
  1341. /* 持续时间 */
  1342. animation-duration: 1s;
  1343. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1344. }
  1345. .device-select-hide {
  1346. left: -250px;
  1347. animation-name: treeHide;
  1348. /* 持续时间 */
  1349. animation-duration: 1s;
  1350. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1351. }
  1352. .node-select-show {
  1353. width: 276px;
  1354. height: 44px;
  1355. background: var(--image-tree-expansion-bg) no-repeat;
  1356. left: 10px;
  1357. animation-name: treeShow;
  1358. /* 持续时间 */
  1359. animation-duration: 1s;
  1360. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1361. display: flex;
  1362. align-items: center;
  1363. margin-left: 0;
  1364. justify-content: flex-start;
  1365. pointer-events: auto;
  1366. &:hover {
  1367. background: var(--image-tree-expansion-hover-bg) no-repeat;
  1368. }
  1369. .put-away-icon {
  1370. position: relative;
  1371. display: inline-block;
  1372. left: 4px;
  1373. }
  1374. }
  1375. .node-select-hide {
  1376. left: -400px;
  1377. animation-name: treeHide;
  1378. /* 持续时间 */
  1379. animation-duration: 1s;
  1380. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1381. }
  1382. .device-select-box {
  1383. width: 208px;
  1384. height: 450px;
  1385. overflow-y: auto;
  1386. color: var(--vent-font-color);
  1387. :deep(.zxm-tree) {
  1388. background: transparent !important;
  1389. color: var(--vent-font-color) !important;
  1390. .zxm-tree-switcher {
  1391. background: transparent !important;
  1392. }
  1393. .zxm-tree-node-content-wrapper.zxm-tree-node-selected {
  1394. background-color: var(--tree-node-select);
  1395. }
  1396. .zxm-tree-node-content-wrapper:hover {
  1397. background-color: var(--tree-node-hover);
  1398. }
  1399. input {
  1400. height: 0px !important;
  1401. }
  1402. }
  1403. &::-webkit-scrollbar-track {
  1404. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  1405. border-radius: 10px;
  1406. background: #ededed22;
  1407. height: 100px;
  1408. }
  1409. &::-webkit-scrollbar-thumb {
  1410. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  1411. background: #4288a444;
  1412. }
  1413. }
  1414. .location-icon {
  1415. width: 46px;
  1416. height: 178px;
  1417. position: absolute;
  1418. top: 100px;
  1419. background: var(--image-location-bg) no-repeat;
  1420. background-size: contain;
  1421. writing-mode: vertical-lr;
  1422. line-height: 46px;
  1423. color: var(--vent-font-color);
  1424. padding-top: 10px;
  1425. pointer-events: auto;
  1426. cursor: pointer;
  1427. &:hover {
  1428. background: var(--image-location-hover-bg) no-repeat;
  1429. }
  1430. .location-text {
  1431. padding-top: 20px;
  1432. letter-spacing: 3px;
  1433. font-size: 16px;
  1434. }
  1435. }
  1436. .location-select {
  1437. position: fixed;
  1438. top: 100px;
  1439. pointer-events: auto;
  1440. .location-select-box {
  1441. width: 100%;
  1442. height: 100%;
  1443. position: relative;
  1444. &::before {
  1445. content: '';
  1446. position: absolute;
  1447. width: 230px;
  1448. height: 500px;
  1449. top: 0;
  1450. left: 0;
  1451. background: var(--image-tree-bg) no-repeat;
  1452. background-size: contain;
  1453. transform: rotateY(180deg);
  1454. z-index: -1;
  1455. }
  1456. .location-top-title {
  1457. color: var(--vent-font-color);
  1458. position: absolute;
  1459. width: 225px;
  1460. height: 68px;
  1461. background: var(--image-turn-location-top-bg) no-repeat;
  1462. background-size: contain;
  1463. top: 5px;
  1464. left: 5px;
  1465. display: flex;
  1466. flex-direction: row;
  1467. justify-content: space-between;
  1468. align-items: flex-end;
  1469. .title {
  1470. font-size: 18px;
  1471. position: relative;
  1472. top: -14px;
  1473. right: 15px;
  1474. }
  1475. }
  1476. .location-expansion-icon {
  1477. background: var(--image-tree-icon-cover-bg) no-repeat;
  1478. background-size: contain;
  1479. position: relative;
  1480. left: 10px;
  1481. top: -15px;
  1482. padding: 5px;
  1483. &:hover {
  1484. background: var(--image-tree-icon-cover-hover-bg) no-repeat;
  1485. background-size: contain;
  1486. }
  1487. }
  1488. }
  1489. .location-container {
  1490. width: 200px;
  1491. height: 390px;
  1492. position: absolute;
  1493. display: flex;
  1494. flex-direction: column;
  1495. top: 80px;
  1496. left: 18px;
  1497. overflow-y: auto;
  1498. .location-item {
  1499. color: var(--vent-font-color);
  1500. line-height: 30px;
  1501. display: flex;
  1502. justify-content: space-between;
  1503. // background-image: var(--vent-gas-list-item-bg-img);
  1504. background-image: linear-gradient(to left, #39f5ff05, #39f5ff10);
  1505. margin: 3px 0;
  1506. .item-title {
  1507. width: 80px;
  1508. text-align: right;
  1509. color: var(--vent-table-action-link);
  1510. }
  1511. }
  1512. .location-bottom-btn {
  1513. width: 100%;
  1514. color: var(--vent-font-color);
  1515. display: flex;
  1516. justify-content: flex-end;
  1517. margin-top: 20px;
  1518. span {
  1519. display: inline-block;
  1520. width: 100%;
  1521. background: var(--location-bottom-bg);
  1522. border-radius: 3px;
  1523. border: 1px solid var(--location-bottom-border);
  1524. text-align: center;
  1525. padding: 2px 0;
  1526. cursor: pointer;
  1527. &:hover {
  1528. background: #00557422;
  1529. }
  1530. }
  1531. }
  1532. }
  1533. }
  1534. .location-select-show {
  1535. right: 240px;
  1536. animation-name: locationShow;
  1537. /* 持续时间 */
  1538. animation-duration: 1s;
  1539. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1540. }
  1541. .location-select-hide {
  1542. right: -2px;
  1543. animation-name: locationHide;
  1544. /* 持续时间 */
  1545. animation-duration: 1s;
  1546. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1547. }
  1548. .location-btn-show {
  1549. right: -0px;
  1550. animation-name: locationBtnShow;
  1551. /* 持续时间 */
  1552. animation-duration: 1s;
  1553. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1554. }
  1555. .location-btn-hide {
  1556. right: -240px;
  1557. animation-name: locationBtnHide;
  1558. /* 持续时间 */
  1559. animation-duration: 1s;
  1560. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1561. }
  1562. .tabs-box {
  1563. height: 290px;
  1564. }
  1565. .bottom-tabs-box {
  1566. position: relative;
  1567. .tabs-box {
  1568. width: calc(100% - 12px) !important;
  1569. bottom: 3px !important;
  1570. background-color: red;
  1571. }
  1572. .to-small {
  1573. position: absolute;
  1574. top: -65px;
  1575. right: 36px;
  1576. display: flex;
  1577. align-items: center;
  1578. justify-content: center;
  1579. .to-home {
  1580. width: 60px;
  1581. height: 60px;
  1582. background: var(--image-tohome) no-repeat center;
  1583. background-size: auto;
  1584. padding: 8px;
  1585. &:hover {
  1586. background-color: rgba(79, 104, 134, 0.418);
  1587. }
  1588. }
  1589. .table-show-icon {
  1590. width: 30px;
  1591. height: 30px;
  1592. font-size: 30px;
  1593. color: var(--vent-font-color);
  1594. margin-left: 10px;
  1595. }
  1596. }
  1597. .device-button-group {
  1598. position: absolute;
  1599. top: -30px;
  1600. display: flex;
  1601. width: 100%;
  1602. .device-active {
  1603. background: linear-gradient(45deg, #04e6fb, #0c5cab);
  1604. &::before {
  1605. border-color: #0efcff;
  1606. box-shadow: 1px 1px 3px 1px #0efcff inset;
  1607. }
  1608. }
  1609. }
  1610. .table-hide-icon {
  1611. color: var(--vent-font-color);
  1612. cursor: pointer;
  1613. position: absolute;
  1614. right: 20px;
  1615. top: 10px;
  1616. z-index: 9999;
  1617. }
  1618. .enter-detail {
  1619. color: var(--vent-font-color);
  1620. cursor: pointer;
  1621. position: absolute;
  1622. right: 35px;
  1623. top: 35px;
  1624. padding: 5px;
  1625. border-radius: 5px;
  1626. margin-left: 8px;
  1627. margin-right: 8px;
  1628. width: auto;
  1629. height: 33px !important;
  1630. display: flex;
  1631. align-items: center;
  1632. justify-content: center;
  1633. color: var(--vent-font-color);
  1634. padding: 5px 15px 5px 15px;
  1635. z-index: 999;
  1636. cursor: pointer;
  1637. &:hover {
  1638. background: var(--vent-device-manager-control-btn-hover);
  1639. }
  1640. &::before {
  1641. width: calc(100% - 6px);
  1642. height: 27px;
  1643. content: '';
  1644. position: absolute;
  1645. top: 3px;
  1646. right: 0;
  1647. left: 3px;
  1648. bottom: 0;
  1649. z-index: -1;
  1650. border-radius: inherit;
  1651. /*important*/
  1652. background: var(--vent-device-manager-control-btn);
  1653. }
  1654. }
  1655. }
  1656. .table-hide {
  1657. height: 0px;
  1658. animation-name: tableHide;
  1659. /* 持续时间 */
  1660. animation-duration: 1s;
  1661. transition: all 1s;
  1662. }
  1663. .table-show {
  1664. height: 290px;
  1665. animation-name: tableShow;
  1666. /* 持续时间 */
  1667. animation-duration: 1s;
  1668. transition: all 1s;
  1669. }
  1670. .location-form {
  1671. display: flex;
  1672. margin: 8px;
  1673. .location-form-item {
  1674. width: 400px;
  1675. .location-form-label {
  1676. width: 100px;
  1677. display: inline-block;
  1678. color: var(--vent-font-color);
  1679. }
  1680. input {
  1681. background: transparent !important;
  1682. color: var(--vent-font-color);
  1683. border: 1px solid var(--vent-form-item-border) !important;
  1684. }
  1685. }
  1686. .zxm-select-selector {
  1687. width: 200px !important;
  1688. }
  1689. }
  1690. @keyframes tableShow {
  1691. 0% {
  1692. height: 0px;
  1693. opacity: 0;
  1694. }
  1695. 100% {
  1696. height: 290px;
  1697. opacity: 1;
  1698. }
  1699. }
  1700. @keyframes tableHide {
  1701. 0% {
  1702. opacity: 1;
  1703. }
  1704. 100% {
  1705. height: 0px;
  1706. opacity: 0;
  1707. }
  1708. }
  1709. @keyframes treeShow {
  1710. 0% {
  1711. left: -400px;
  1712. opacity: 0;
  1713. }
  1714. 100% {
  1715. left: 10px;
  1716. opacity: 1;
  1717. }
  1718. }
  1719. @keyframes treeHide {
  1720. 0% {
  1721. left: 10px;
  1722. opacity: 1;
  1723. }
  1724. 100% {
  1725. left: -400px;
  1726. opacity: 0;
  1727. }
  1728. }
  1729. @keyframes locationShow {
  1730. 0% {
  1731. right: 0px;
  1732. opacity: 0;
  1733. }
  1734. 100% {
  1735. right: 240px;
  1736. opacity: 1;
  1737. }
  1738. }
  1739. @keyframes locationHide {
  1740. 0% {
  1741. right: 240px;
  1742. opacity: 1;
  1743. }
  1744. 100% {
  1745. right: 0;
  1746. opacity: 0;
  1747. }
  1748. }
  1749. @keyframes locationBtnShow {
  1750. 0% {
  1751. right: -240px;
  1752. opacity: 0;
  1753. }
  1754. 100% {
  1755. right: -2px;
  1756. opacity: 1;
  1757. }
  1758. }
  1759. @keyframes locationBtnHide {
  1760. 0% {
  1761. right: -2px;
  1762. opacity: 1;
  1763. }
  1764. 100% {
  1765. right: -240px;
  1766. opacity: 0;
  1767. }
  1768. }
  1769. :deep(.@{ventSpace}-picker-datetime-panel) {
  1770. height: 200px !important;
  1771. overflow-y: auto !important;
  1772. }
  1773. :deep(.@{ventSpace}-tabs-tabpane-active) {
  1774. // overflow: auto;
  1775. height: 100%;
  1776. }
  1777. :deep(.zxm-select-dropdown) {
  1778. left: 0 !important;
  1779. color: #000000 !important;
  1780. }
  1781. :deep(.zxm-select-selector) {
  1782. height: 34px !important;
  1783. line-height: 34px !important;
  1784. }
  1785. :deep(.zxm-input) {
  1786. height: 32px !important;
  1787. line-height: 32px !important;
  1788. .zxm-select-selection-item {
  1789. line-height: 32px !important;
  1790. }
  1791. }
  1792. .device-button {
  1793. height: 26px;
  1794. display: flex;
  1795. justify-content: center;
  1796. align-items: center;
  1797. color: var(--vent-font-color);
  1798. position: relative;
  1799. cursor: pointer;
  1800. padding: 0 20px;
  1801. background: linear-gradient(45deg, #04e6fb55, #0c5cab55);
  1802. clip-path: polygon(10px 0, 0 50%, 10px 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
  1803. &:nth-child(1) {
  1804. left: calc(-6px * 1);
  1805. }
  1806. &:nth-child(2) {
  1807. left: calc(-6px * 2);
  1808. }
  1809. &:nth-child(3) {
  1810. left: calc(-6px * 3);
  1811. }
  1812. &:nth-child(4) {
  1813. left: calc(-6px * 4);
  1814. }
  1815. &:nth-child(5) {
  1816. left: calc(-6px * 5);
  1817. }
  1818. &:nth-child(6) {
  1819. left: calc(-6px * 6);
  1820. }
  1821. &:nth-child(7) {
  1822. left: calc(-6px * 7);
  1823. }
  1824. &:nth-child(8) {
  1825. left: calc(-6px * 8);
  1826. }
  1827. &:nth-child(9) {
  1828. left: calc(-6px * 9);
  1829. }
  1830. &:nth-child(10) {
  1831. left: calc(-6px * 10);
  1832. }
  1833. &:nth-child(11) {
  1834. left: calc(-6px * 11);
  1835. }
  1836. &:nth-child(12) {
  1837. left: calc(-6px * 12);
  1838. }
  1839. &:nth-child(13) {
  1840. left: calc(-6px * 13);
  1841. }
  1842. &:nth-child(14) {
  1843. left: calc(-6px * 14);
  1844. }
  1845. &:nth-child(15) {
  1846. left: calc(-6px * 15);
  1847. }
  1848. &:nth-child(16) {
  1849. left: calc(-6px * 16);
  1850. }
  1851. &:nth-child(17) {
  1852. left: calc(-6px * 17);
  1853. }
  1854. &:nth-child(18) {
  1855. left: calc(-6px * 18);
  1856. }
  1857. &:nth-child(19) {
  1858. left: calc(-6px * 19);
  1859. }
  1860. // &:first-child {
  1861. // clip-path: polygon(0 0, 10px 50%, 0 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
  1862. // }
  1863. }
  1864. // :deep(.@{ventSpace}-pagination){
  1865. // margin-right: 20px !important;
  1866. // margin-top: 5px !important;
  1867. // display: flex;
  1868. // align-items: center;
  1869. // }</style>