index.vue 79 KB

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