index.vue 74 KB

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