index-copy.vue 87 KB

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