statistics.vue 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918
  1. <template>
  2. <view>
  3. <!-- 导航栏 -->
  4. <view class="navbar">
  5. <view class="title">
  6. 能源管理
  7. </view>
  8. <!-- <view class="icon" @click="toDataMonitoringList" v-if="codes.indexOf('detector') != -1">
  9. <image class="img" src="@/assets/img/riLine-equalizer-line.svg" mode=""></image>
  10. </view> -->
  11. </view>
  12. <!-- 标签 -->
  13. <view class="tabs-box">
  14. <view class="tabs" :style="{width: companyList.length>4 ? '' : '100%'}">
  15. <u-tabs :list="merchantList1" :is-scroll="false" active-color="#fff" inactive-color="#CCE2FF"
  16. bg-color="#1677FF" :current="current" @change="change"></u-tabs>
  17. </view>
  18. <view class="more" @click="popShow=true" v-if="companyList.length >= 4">
  19. <u-icon name="arrow-down" color="#fff" size="40"></u-icon>
  20. </view>
  21. </view>
  22. <!-- 标签弹出层 -->
  23. <u-popup v-model="popShow" duration="10" mode="top" :negative-top="88" border-radius="16">
  24. <view class="popup-tabs">
  25. <view class="tabs">
  26. <u-tabs :list="merchantList1" :is-scroll="false" :current="current" @change="change"></u-tabs>
  27. </view>
  28. <view class="more">
  29. <u-icon name="arrow-up" color="#777777" size="40" @click="popShow=false"></u-icon>
  30. </view>
  31. </view>
  32. <view class="tabs-options">
  33. <view class="item" v-for="(item, index) in merchantList2" :key="index"
  34. @click="merchantChange(item,index)">
  35. {{item.name}}
  36. </view>
  37. </view>
  38. </u-popup>
  39. <view class="main" v-if="current==0">
  40. <!-- 电表运行情况 -->
  41. <view class="statistics-1 statistics">
  42. <view class="title">
  43. <view class="icon">
  44. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  45. </view>
  46. <view class="text">
  47. 电表运行情况
  48. </view>
  49. <view class="check-all" @click="toEquipmentElectricity">
  50. 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  51. </view>
  52. </view>
  53. <view class="item">
  54. <view class="item-progess">
  55. <view class="img-box">
  56. <u-circle-progress active-color="#2979ff" :percent="alarmsPercent" width="88">
  57. </u-circle-progress>
  58. </view>
  59. </view>
  60. <!-- 累计 -->
  61. <view class="total">
  62. <view class="total1">
  63. <view class="normal">
  64. 正常:1台
  65. </view>
  66. <view class="abnormal">
  67. 异常:2台
  68. </view>
  69. </view>
  70. <view class="total2">
  71. 本月累计触发告警 <text class="total-number">12</text> 次
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. <!-- 用电量 -->
  77. <view class="statistics-e statistics" v-if="codes.indexOf('reading') != -1 && kWhList.length != 0">
  78. <view class="title">
  79. <view class="icon">
  80. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  81. </view>
  82. <view class="text">
  83. 用电量 (度)
  84. </view>
  85. <view class="check-all" @click="toEquipmentElectricity">
  86. 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  87. </view>
  88. </view>
  89. <view class="content">
  90. <view class="electricity">
  91. <view class="item" v-for="(item, index) in kWhList" :key="index"
  92. @click="toElectronicMonitoring(item)">
  93. <view class="item-content">
  94. <view class="equipment">
  95. <view class="equipment1 ">
  96. {{item.name}}
  97. </view>
  98. <view class="equipment2">
  99. {{item.installationAddressSimple}}
  100. </view>
  101. <view class="state" v-if="!item.online">
  102. <!-- <view class="dot off-line"></view> -->
  103. <view class="text">离线</view>
  104. </view>
  105. <view class="state state2" v-else>
  106. <!-- <view class="dot on-line"></view> -->
  107. <view class="text">在线</view>
  108. </view>
  109. </view>
  110. <view class="electricity">
  111. <view class="electricity-item electricity-item-day">
  112. <view class="date">
  113. 今日
  114. </view>
  115. <view class="number">
  116. {{item.thisDayKwh}}
  117. </view>
  118. </view>
  119. <view class="electricity-item">
  120. <view class="date">
  121. 本月
  122. </view>
  123. <view class="number">
  124. {{item.thisMonthKwh}}
  125. </view>
  126. </view>
  127. <view class="electricity-item">
  128. <view class="date">
  129. 上月
  130. </view>
  131. <view class="number">
  132. {{item.lastMonthKwh}}
  133. </view>
  134. </view>
  135. </view>
  136. </view>
  137. <view class="more">
  138. <u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. <!-- 统计2 异常告警记录 -->
  145. <view class="statistics-2 statistics">
  146. <view class="title">
  147. <view class="icon">
  148. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  149. </view>
  150. <view class="text">
  151. 异常告警记录
  152. </view>
  153. <view class="check-all" @click="gotoUrl('/pages/abnormal/abnormalAlarmRecord?id='+companyId)">
  154. 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  155. </view>
  156. </view>
  157. <!-- 异常 -->
  158. <view class="abnormal-item">
  159. <view class="item-title">
  160. <view class="name">
  161. 设备离线
  162. </view>
  163. <view class="date">
  164. 2024-02-14 09:00:01
  165. </view>
  166. </view>
  167. <view class="item-value">
  168. <view class="value-content">
  169. <view class="value1">
  170. 七楼电表1
  171. </view>
  172. <view class="value2">
  173. 荆鹏软件园
  174. </view>
  175. </view>
  176. <!-- 箭头 -->
  177. <view class="more">
  178. <u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  179. </view>
  180. </view>
  181. </view>
  182. </view>
  183. <!-- 异常设备排名 -->
  184. <view class="statistics statistics-ranking">
  185. <view class="title">
  186. <view class="icon">
  187. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  188. </view>
  189. <view class="text">
  190. 异常设备排名
  191. </view>
  192. <view class="check-all">
  193. 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  194. </view>
  195. </view>
  196. <!-- 合计 -->
  197. <view class="total">
  198. 本年度共有<text> 42</text>次设备异常告警
  199. </view>
  200. <view class="ranking-main">
  201. <view class="item" v-for="item in 3"
  202. @click="gotoUrl('/pages/equipmentDataMonitoring/electronicMonitoring?id='+'&name=')">
  203. <view class="ranking">
  204. 1
  205. </view>
  206. <view class="name">
  207. <view class="name1">
  208. 荆鹏软件园01
  209. </view>
  210. <view class="name2">
  211. 荆鹏集团
  212. </view>
  213. </view>
  214. <view class="time">
  215. 5次
  216. </view>
  217. </view>
  218. </view>
  219. <!-- 查看全部排名 -->
  220. <!-- <view class="check-all" @click="gotoUrl('/pages/abnormal/abnormalDeviceRanking')">
  221. 查看全部排名 <u-icon name="arrow-down" size="24" color="rgba(119,119,119,1)"></u-icon>
  222. </view> -->
  223. </view>
  224. </view>
  225. <view class="main" v-if="current==1">
  226. <!-- 设备运行情况 -->
  227. <view class="statistics-1 statistics">
  228. <view class="title">
  229. <view class="icon">
  230. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  231. </view>
  232. <view class="text">
  233. 设备运行情况
  234. </view>
  235. <view class="check-all" @click="toEquipmentElectricity">
  236. 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  237. </view>
  238. </view>
  239. <view class="item">
  240. <view class="item-progess">
  241. <view class="img-box">
  242. <u-circle-progress active-color="#2979ff" :percent="alarmsPercent" width="88">
  243. </u-circle-progress>
  244. </view>
  245. </view>
  246. <!-- 累计 -->
  247. <view class="total">
  248. <view class="total1">
  249. <view class="normal">
  250. 正常:1台
  251. </view>
  252. <view class="abnormal">
  253. 异常:2台
  254. </view>
  255. </view>
  256. <view class="total2">
  257. 本月累计触发告警 <text class="total-number">12</text> 次
  258. </view>
  259. </view>
  260. </view>
  261. </view>
  262. <!-- 能源管理 -->
  263. <view class="statistics statistics-manage">
  264. <view class="title">
  265. <view class="icon">
  266. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  267. </view>
  268. <view class="text">
  269. 能源管理
  270. </view>
  271. <view class="check-all" @click="toEquipmentElectricity">
  272. 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  273. </view>
  274. </view>
  275. <!-- 图表 -->
  276. <view class="chart">
  277. <view class="u-subsection">
  278. <u-subsection :list="list" :current="0" font-size="24"></u-subsection>
  279. </view>
  280. <view class="chat-box">
  281. <img src="@/assets/img/chat@13x.png" alt="" />
  282. </view>
  283. </view>
  284. <view class="search">
  285. <view class="switch">
  286. <u-switch v-model="checked" size="40"></u-switch><text>只看离线表</text>
  287. </view>
  288. <view class="search-box">
  289. <input type="text" placeholder="请输入电表查询" />
  290. <view class="icon">
  291. <img src="@/assets/img/riLine-search-line 1.svg" alt="" />
  292. </view>
  293. </view>
  294. </view>
  295. <!-- 电表统计 -->
  296. <view class="meter-statistic">
  297. <!-- 总计 -->
  298. <view class="sum">
  299. <view class="icon">
  300. <u-icon name="arrow-up" color="#d4d4d4" size="24"></u-icon>
  301. </view>
  302. <view class="meter-name">
  303. 荆鹏软件园总表
  304. </view>
  305. <view class="meter-state">
  306. 在线
  307. </view>
  308. <view class="meter-number">
  309. 5610.39度<u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  310. </view>
  311. </view>
  312. <view class="sum2">
  313. <view class="title">
  314. 一级表合计用电(未扣除)
  315. </view>
  316. <view class="value">
  317. 5608.39度
  318. </view>
  319. </view>
  320. <!-- 一级表 -->
  321. <view class="sum first-level">
  322. <view class="icon">
  323. <u-icon name="arrow-up" color="#d4d4d4" size="24"></u-icon>
  324. </view>
  325. <view class="icon">
  326. <img src="@/assets/img/switchIcon.png" alt="" />
  327. </view>
  328. <view class="meter-name">
  329. 一级表a
  330. </view>
  331. <view class="meter-state">
  332. 在线
  333. </view>
  334. <view class="meter-number">
  335. 2805.39度<u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  336. </view>
  337. </view>
  338. <!-- 二级表 -->
  339. <view class="sum second-level">
  340. <view class="icon">
  341. <u-icon name="arrow-up" color="#d4d4d4" size="24"></u-icon>
  342. </view>
  343. <view class="icon">
  344. <img src="@/assets/img/switchIcon.png" alt="" />
  345. </view>
  346. <view class="meter-name">
  347. 二级表a
  348. </view>
  349. <view class="meter-state">
  350. 在线
  351. </view>
  352. <view class="meter-number">
  353. 2805.39度<u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  354. </view>
  355. </view>
  356. <!-- 开关 -->
  357. <view class="else-switch">
  358. <view class="sum item">
  359. <view class="icon">
  360. <img src="@/assets/img/switchIcon.png" alt="" />
  361. </view>
  362. <view class="meter-name">
  363. 空调开关
  364. </view>
  365. <view class="meter-state">
  366. 在线
  367. </view>
  368. <view class="meter-number">
  369. 2805.39度<u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  370. </view>
  371. </view>
  372. <view class="sum item">
  373. <view class="icon">
  374. <img src="@/assets/img/switchIcon.png" alt="" />
  375. </view>
  376. <view class="meter-name">
  377. 灯控开关
  378. </view>
  379. <view class="meter-state">
  380. 在线
  381. </view>
  382. <view class="meter-number">
  383. 2805.39度<u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  384. </view>
  385. </view>
  386. </view>
  387. <view class="sum second-level">
  388. <view class="icon">
  389. <u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  390. </view>
  391. <view class="icon">
  392. <img src="@/assets/img/switchIcon.png" alt="" />
  393. </view>
  394. <view class="meter-name">
  395. 二级表a
  396. </view>
  397. <view class="meter-state meter-state2">
  398. 离线
  399. </view>
  400. <view class="meter-number">
  401. 2805.39度<u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  402. </view>
  403. </view>
  404. <view class="sum first-level">
  405. <view class="icon">
  406. <u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  407. </view>
  408. <view class="icon">
  409. <img src="@/assets/img/switchIcon.png" alt="" />
  410. </view>
  411. <view class="meter-name">
  412. 一级表a
  413. </view>
  414. <view class="meter-state">
  415. 在线
  416. </view>
  417. <view class="meter-number">
  418. 2805.39度<u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  419. </view>
  420. </view>
  421. </view>
  422. </view>
  423. <view class="statistics-2 statistics">
  424. <view class="title">
  425. <view class="icon">
  426. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  427. </view>
  428. <view class="text">
  429. 异常告警记录
  430. </view>
  431. <view class="check-all" @click="gotoUrl('/pages/abnormal/abnormalAlarmRecord?id='+companyId)">
  432. 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  433. </view>
  434. </view>
  435. <!-- 异常 -->
  436. <view class="abnormal-item">
  437. <view class="item-title">
  438. <view class="name">
  439. 设备离线
  440. </view>
  441. <view class="date">
  442. 2024-02-14 09:00:01
  443. </view>
  444. </view>
  445. <view class="item-value">
  446. <view class="value-content">
  447. <view class="value1">
  448. 七楼电表1
  449. </view>
  450. <view class="value2">
  451. 荆鹏软件园
  452. </view>
  453. </view>
  454. <!-- 箭头 -->
  455. <view class="more">
  456. <u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  457. </view>
  458. </view>
  459. </view>
  460. </view>
  461. <view class="statistics statistics-ranking">
  462. <view class="title">
  463. <view class="icon">
  464. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  465. </view>
  466. <view class="text">
  467. 异常设备排名
  468. </view>
  469. <view class="check-all">
  470. 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  471. </view>
  472. </view>
  473. <!-- 合计 -->
  474. <view class="total">
  475. 本年度共有<text> 42</text>次设备异常告警
  476. </view>
  477. <view class="ranking-main">
  478. <view class="item" v-for="item in 3"
  479. @click="gotoUrl('/pages/equipmentDataMonitoring/electronicMonitoring?id='+'&name=')">
  480. <view class="ranking">
  481. 1
  482. </view>
  483. <view class="name">
  484. <view class="name1">
  485. 荆鹏软件园01
  486. </view>
  487. <view class="name2">
  488. 荆鹏集团
  489. </view>
  490. </view>
  491. <view class="time">
  492. 5次
  493. </view>
  494. </view>
  495. </view>
  496. <!-- 查看全部排名 -->
  497. <!-- <view class="check-all" @click="gotoUrl('/pages/abnormal/abnormalDeviceRanking')">
  498. 查看全部排名 <u-icon name="arrow-down" size="24" color="rgba(119,119,119,1)"></u-icon>
  499. </view> -->
  500. </view>
  501. </view>
  502. <energyCenterTabbar :current="0"></energyCenterTabbar>
  503. </view>
  504. </template>
  505. <script>
  506. import energyCenterTabbar from '@/components/energyCenterTabbar.vue'
  507. import * as echarts from 'echarts';
  508. import * as API from '@/apis/pagejs/index.js'
  509. export default {
  510. components: {
  511. energyCenterTabbar
  512. },
  513. data() {
  514. return {
  515. abnormalRecordsList: [], // 异常告警记录
  516. queryDate: '',
  517. alarmsPercent: 0,
  518. alarmsForm: {
  519. okNum: 0,
  520. errorNum: 0,
  521. errorMonthNum: 0
  522. }, // 累计报警
  523. companyId: '', // 商户ID
  524. pageIndexe: 1, // 设备数据检测
  525. totalPagee: 1,
  526. deviceList: [],
  527. pageIndexp: 1, // 用电量
  528. totalPagep: 1,
  529. kWhList: [],
  530. codes: '', // 判断:reading用电量 detector设备数据检测
  531. merchantList1: [], // 商户
  532. merchantList2: [],
  533. companyList: [],
  534. popShow: false,
  535. current: 0,
  536. myLineChart: null, // 图表
  537. myBarChart: null,
  538. myPieChart: null,
  539. intervalId: null, // 用于存储间隔ID
  540. intervalReady: true, // 用于存储间隔ID
  541. list: [{
  542. name: '上月'
  543. },
  544. {
  545. name: '当月'
  546. },
  547. {
  548. name: '当日'
  549. }, {
  550. name: '当年'
  551. }, {
  552. name: '合计'
  553. },
  554. {
  555. name: '指定月份'
  556. }
  557. ],
  558. current: 0,
  559. checked: false,
  560. }
  561. },
  562. onLoad() {
  563. var date = new Date();
  564. var year = date.getFullYear();
  565. var month = date.getMonth() + 1 >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1);
  566. this.queryDate = year + '-' + month;
  567. this.getPowerConsumption(0);
  568. this.getEquipmentDataMonitoring(0);
  569. this.getCompanyInfoList();
  570. this.getAccumulatedAlarms();
  571. this.getAbnormalAlarmRecord();
  572. },
  573. onReady() {
  574. this.getfindByOpenId();
  575. this.getHomePageDeviceStatus();
  576. // this.getBarCharts();
  577. // this.getLineCharts();
  578. },
  579. beforeDestroy() {
  580. this.clearTimer(); // 组件销毁前清除定时器
  581. this.intervalReady = false;
  582. console.log("组件销毁前清除定时器")
  583. },
  584. methods: {
  585. clearTimer() {
  586. if (this.intervalId) {
  587. clearInterval(this.intervalId); // 清除定时器
  588. this.intervalId = null; // 重置定时器ID
  589. }
  590. },
  591. startInterval() {
  592. this.clearTimer(); // 组件销毁前清除定时器
  593. this.intervalId = setInterval(() => {
  594. // 每隔5秒运行的代码
  595. // console.log('这段代码每隔5秒运行一次');
  596. this.getPowerConsumption(0, true)
  597. }, 60000);
  598. },
  599. merchantChange(item, index) {
  600. var m = item;
  601. var n = this.merchantList1[this.current];
  602. this.merchantList1[this.current] = m;
  603. this.merchantList2[index] = n;
  604. this.companyId = item.id;
  605. this.getPowerConsumption(0);
  606. this.getEquipmentDataMonitoring(0);
  607. this.getAccumulatedAlarms();
  608. this.getHomePageDeviceStatus();
  609. this.getAbnormalAlarmRecord();
  610. this.popShow = false;
  611. },
  612. // 单位
  613. getCompanyInfoList() {
  614. uni.showLoading({
  615. title: "加载中",
  616. mask: true,
  617. })
  618. API.deviceCompanyList().then((response) => {
  619. uni.hideLoading();
  620. var list = response.data.companyInfoList;
  621. var mList1 = [];
  622. var mList2 = [];
  623. mList1.push({
  624. id: '',
  625. name: '全部'
  626. });
  627. for (var i = 0; i < list.length; i++) {
  628. if (i >= 3) {
  629. mList2.push(list[i]);
  630. } else {
  631. mList1.push(list[i]);
  632. }
  633. }
  634. this.companyList = list;
  635. this.merchantList1 = mList1;
  636. this.merchantList2 = mList2;
  637. }).catch(error => {
  638. uni.showToast({
  639. title: error,
  640. icon: "none"
  641. })
  642. })
  643. },
  644. // 商户ID
  645. getfindByOpenId() {
  646. uni.showLoading({
  647. title: "加载中",
  648. mask: true,
  649. })
  650. API.findByOpenId({
  651. openId: this.carhelp.getOpenId()
  652. }).then((response) => {
  653. uni.hideLoading();
  654. this.codes = response.data.regUser.codes;
  655. }).catch(error => {
  656. uni.showToast({
  657. title: error,
  658. icon: "none"
  659. })
  660. })
  661. },
  662. // 设备数据监测
  663. getEquipmentDataMonitoring(pl) {
  664. this.pageIndexe = this.pageIndexe + pl;
  665. if (this.pageIndexe > this.totalPagee) {
  666. this.pageIndexe = 1;
  667. }
  668. uni.showLoading({
  669. title: "加载中",
  670. mask: true,
  671. })
  672. API.homePageDeviceData({
  673. pageIndex: this.pageIndexe,
  674. pageSize: 5,
  675. companyId: this.companyId
  676. }).then((response) => {
  677. uni.hideLoading();
  678. this.deviceList = response.data.data;
  679. this.totalPagee = response.data.totalPage;
  680. }).catch(error => {
  681. uni.showToast({
  682. title: error,
  683. icon: "none"
  684. })
  685. })
  686. },
  687. // 异常告警记录
  688. getAbnormalAlarmRecord() {
  689. uni.showLoading({
  690. title: "加载中",
  691. mask: true,
  692. })
  693. API.alarmRecord({
  694. queryDate: this.queryDate,
  695. configId: '',
  696. pageIndex: 1,
  697. pageSize: 3,
  698. companyId: this.companyId
  699. }).then((response) => {
  700. uni.hideLoading();
  701. this.abnormalRecordsList = response.data.data;
  702. }).catch(error => {
  703. uni.showToast({
  704. title: error,
  705. icon: "none"
  706. })
  707. })
  708. },
  709. // 用电量
  710. getPowerConsumption(pl, interval) {
  711. this.pageIndexp = this.pageIndexp + pl;
  712. if (this.pageIndexp > this.totalPagep) {
  713. this.pageIndexp = 1;
  714. }
  715. if (!interval) {
  716. uni.showLoading({
  717. title: "加载中",
  718. mask: true,
  719. })
  720. }
  721. API.homePageKwh({
  722. pageIndex: this.pageIndexp,
  723. pageSize: 5,
  724. companyId: this.companyId
  725. }).then((response) => {
  726. if (!interval) {
  727. uni.hideLoading();
  728. }
  729. this.kWhList = response.data.data;
  730. this.totalPagep = response.data.totalPage;
  731. if (!interval) {
  732. this.startInterval(); // 组件挂载后开始间隔
  733. }
  734. }).catch(error => {
  735. uni.showToast({
  736. title: error,
  737. icon: "none"
  738. })
  739. })
  740. },
  741. // 累计工单
  742. getAccumulatedWorkOrders() {
  743. },
  744. // 累计报警
  745. getAccumulatedAlarms() {
  746. uni.showLoading({
  747. title: "加载中",
  748. mask: true,
  749. })
  750. API.deviceStatus({
  751. companyId: this.companyId
  752. }).then((response) => {
  753. uni.hideLoading();
  754. this.alarmsForm = response.data;
  755. if (this.alarmsForm.okNum != 0) {
  756. this.alarmsPercent = this.alarmsForm.okNum / (this.alarmsForm.okNum + this.alarmsForm
  757. .errorNum) * 100;
  758. }
  759. }).catch(error => {
  760. uni.showToast({
  761. title: error,
  762. icon: "none"
  763. })
  764. })
  765. },
  766. // 工单处理
  767. getLineCharts() {
  768. if (!this.myLineChart) {
  769. this.myLineChart = echarts.init(document.getElementById('lineEcharts'));
  770. }
  771. var option = {
  772. tooltip: {
  773. trigger: 'axis',
  774. axisPointer: {
  775. type: 'shadow'
  776. }
  777. },
  778. legend: {
  779. data: ['新增工单', '处理工单', '剩余工单']
  780. },
  781. grid: {
  782. left: '3%',
  783. right: '4%',
  784. bottom: '3%',
  785. containLabel: true
  786. },
  787. xAxis: {
  788. type: 'category',
  789. data: ['1日', '2日', '3日', '4日', '5日', '6日']
  790. },
  791. yAxis: {
  792. type: 'value'
  793. },
  794. series: [{
  795. name: '新增工单',
  796. type: 'line',
  797. data: [2, 1, 0, 1, 3, 0],
  798. itemStyle: {
  799. color: '#FF3D00'
  800. }
  801. },
  802. {
  803. name: '处理工单',
  804. type: 'line',
  805. data: [3, 1, 1, 0, 2, 1],
  806. itemStyle: {
  807. color: '#FF7B00'
  808. }
  809. },
  810. {
  811. name: '剩余工单',
  812. type: 'line',
  813. data: [5, 2, 1, 1, 5, 1],
  814. itemStyle: {
  815. color: '#58A55C'
  816. }
  817. }
  818. ]
  819. };
  820. this.myLineChart.setOption(option);
  821. },
  822. // 故障类型
  823. getBarCharts() {
  824. if (!this.myBarChart) {
  825. this.myBarChart = echarts.init(document.getElementById('barEcharts'));
  826. }
  827. var option = {
  828. tooltip: {
  829. trigger: 'axis',
  830. axisPointer: {
  831. type: 'shadow'
  832. }
  833. },
  834. legend: {},
  835. grid: {
  836. left: '3%',
  837. right: '4%',
  838. bottom: '3%',
  839. containLabel: true
  840. },
  841. xAxis: [{
  842. type: 'category',
  843. data: ['一月', '二月', '三月']
  844. }],
  845. yAxis: [{
  846. type: 'value'
  847. }],
  848. barGap: '0',
  849. series: [{
  850. name: '温度异常',
  851. type: 'bar',
  852. data: [100, 140, 230],
  853. itemStyle: {
  854. color: '#FF3D00'
  855. }
  856. },
  857. {
  858. name: '电压异常',
  859. type: 'bar',
  860. data: [150, 100, 200],
  861. itemStyle: {
  862. color: '#FF7B00'
  863. }
  864. },
  865. {
  866. name: '功率因素异常',
  867. type: 'bar',
  868. data: [50, 80, 100],
  869. itemStyle: {
  870. color: '#FFAE00'
  871. }
  872. }
  873. ]
  874. };
  875. this.myBarChart.setOption(option);
  876. },
  877. // 设备状态
  878. getHomePageDeviceStatus() {
  879. uni.showLoading({
  880. title: "加载中",
  881. mask: true,
  882. })
  883. API.homePageDeviceStatus({
  884. companyId: this.companyId
  885. }).then((response) => {
  886. uni.hideLoading();
  887. var list = response.data;
  888. this.getPieCharts(list);
  889. }).catch(error => {
  890. uni.showToast({
  891. title: error,
  892. icon: "none"
  893. })
  894. })
  895. },
  896. getPieCharts(list) {
  897. if (!this.myPieChart) {
  898. this.myPieChart = echarts.init(document.getElementById('pieEcharts'), null, {
  899. // width: uni.upx2px(700),
  900. height: uni.upx2px(620)
  901. });
  902. }
  903. this.myPieChart.clear();
  904. var data = [{
  905. value: 1,
  906. name: '温度异常',
  907. itemStyle: {
  908. color: '#FF4F3F'
  909. }
  910. },
  911. {
  912. value: 1,
  913. name: '烟感异常',
  914. itemStyle: {
  915. color: '#FF7B00'
  916. }
  917. },
  918. {
  919. value: 1,
  920. name: '正常运行',
  921. itemStyle: {
  922. color: '#1677FF'
  923. }
  924. },
  925. {
  926. value: 1,
  927. name: '设备异常',
  928. itemStyle: {
  929. color: '#F2BD42'
  930. }
  931. },
  932. {
  933. value: 1,
  934. name: '设备离线',
  935. itemStyle: {
  936. color: '#C2C2C2'
  937. }
  938. },
  939. ];
  940. var data2 = [];
  941. if (list) {
  942. data[0].value = list.errorTemperatureNum; //温度异常
  943. data[1].value = list.errorSmokeNum; //烟感异常
  944. data[2].value = list.okNum; //正常运行
  945. data[3].value = list.errorDeviceNum; //设备异常
  946. data[4].value = list.errorOnlineNum; //设备离线
  947. for (var i = 0; i < data.length; i++) {
  948. if (data[i].value != 0) {
  949. data2.push(data[i]);
  950. }
  951. }
  952. }
  953. var option = {
  954. tooltip: {
  955. trigger: 'item'
  956. },
  957. legend: {
  958. left: 'center'
  959. },
  960. series: [{
  961. type: 'pie',
  962. top: '6%',
  963. // left: '3%',
  964. // right: '8%',
  965. bottom: '8%',
  966. radius: ['45%', '60%'],
  967. label: {
  968. formatter: '{name|{b}}\n{value|{c}}',
  969. fontSize: 12,
  970. position: 'outer',
  971. bleedMargin: 5,
  972. rich: {
  973. name: {
  974. align: 'left'
  975. },
  976. value: {
  977. align: 'left'
  978. }
  979. }
  980. },
  981. emphasis: {
  982. label: {
  983. itemStyle: {
  984. shadowBlur: 10,
  985. shadowOffsetX: 0,
  986. shadowColor: 'rgba(0, 0, 0, 0.5)'
  987. }
  988. }
  989. },
  990. data: data2
  991. }]
  992. };
  993. this.myPieChart.setOption(option);
  994. },
  995. change(index) {
  996. this.current = index;
  997. this.companyId = this.merchantList1[index].id;
  998. this.getPowerConsumption(0);
  999. this.getEquipmentDataMonitoring(0);
  1000. this.getAccumulatedAlarms();
  1001. this.getHomePageDeviceStatus();
  1002. this.getAbnormalAlarmRecord();
  1003. },
  1004. toDataMonitoringList() {
  1005. uni.navigateTo({
  1006. url: '/pages/equipmentDataMonitoring/dataMonitoring-list'
  1007. })
  1008. },
  1009. toEquipmentConditionMonitoring() {
  1010. uni.navigateTo({
  1011. url: '/pages/equipmentConditionMonitoring/equipmentConditionMonitoring'
  1012. })
  1013. },
  1014. toWorkOrderManagement() {
  1015. return
  1016. uni.navigateTo({
  1017. url: '/pages/workOrderManagement/workOrderManagement'
  1018. })
  1019. },
  1020. toEquipmentElectricity() {
  1021. uni.navigateTo({
  1022. url: '/pages/equipmentDataMonitoring/equipmentElectricity'
  1023. })
  1024. },
  1025. toElectronicMonitoring(item) {
  1026. uni.navigateTo({
  1027. url: '/pages/equipmentDataMonitoring/electronicMonitoring?id=' + item.id + '&name=' + item
  1028. .name +
  1029. '&companyId=' + item.companyId
  1030. })
  1031. }
  1032. }
  1033. }
  1034. </script>
  1035. <style lang="scss" scoped>
  1036. page {
  1037. padding-bottom: 200rpx;
  1038. }
  1039. /deep/.u-drawer-content {
  1040. margin-top: 88rpx;
  1041. }
  1042. .popup-tabs {
  1043. background-color: #fff;
  1044. display: flex;
  1045. align-items: center;
  1046. justify-content: space-between;
  1047. padding-top: 32rpx;
  1048. padding-right: 32rpx;
  1049. color: rgba(51, 51, 51, 1);
  1050. font-size: 32rpx;
  1051. .tabs {
  1052. width: 88%;
  1053. }
  1054. }
  1055. /deep/.u-tab-item {
  1056. width: 25% !important;
  1057. flex: none !important;
  1058. }
  1059. .tabs-options {
  1060. display: flex;
  1061. padding: 24rpx 32rpx 0;
  1062. flex-wrap: wrap;
  1063. .item {
  1064. width: 25%;
  1065. margin-bottom: 40rpx;
  1066. }
  1067. }
  1068. // 导航栏
  1069. .navbar {
  1070. background-color: rgba(22, 119, 255, 1);
  1071. color: #fff;
  1072. line-height: 88rpx;
  1073. display: flex;
  1074. justify-content: space-between;
  1075. align-items: center;
  1076. padding: 0 32rpx;
  1077. color: rgba(255, 255, 255, 1);
  1078. font-size: 36rpx;
  1079. position: fixed;
  1080. left: 0;
  1081. right: 0;
  1082. top: 0;
  1083. z-index: 999999;
  1084. .img {
  1085. width: 48rpx;
  1086. height: 48rpx;
  1087. vertical-align: middle;
  1088. }
  1089. }
  1090. // 标签
  1091. .tabs-box {
  1092. padding: 32rpx 0;
  1093. margin-top: 88rpx;
  1094. padding-right: 32rpx;
  1095. background-color: rgba(22, 119, 255, 1);
  1096. display: flex;
  1097. align-items: center;
  1098. justify-content: space-between;
  1099. .tabs {
  1100. width: 88%;
  1101. }
  1102. }
  1103. .main {
  1104. border-radius: 16px 16px 0px 0px;
  1105. background: linear-gradient(180deg, rgba(242, 244, 246, 1) 61%, rgba(255, 255, 255, 0) 100%);
  1106. margin-top: -24rpx;
  1107. padding: 32rpx;
  1108. .statistics {
  1109. border-radius: 8px;
  1110. background-color: rgba(255, 255, 255, 1);
  1111. box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
  1112. margin-bottom: 24rpx;
  1113. padding: 40rpx;
  1114. .title {
  1115. display: flex;
  1116. align-items: center;
  1117. margin-bottom: 20rpx;
  1118. .img {
  1119. width: 36rpx;
  1120. height: 36rpx;
  1121. vertical-align: middle;
  1122. border-radius: 999px;
  1123. }
  1124. .change {
  1125. display: flex;
  1126. align-items: center;
  1127. .change-img {
  1128. width: 32rpx;
  1129. height: 32rpx;
  1130. vertical-align: middle;
  1131. }
  1132. text {
  1133. margin-left: 8rpx;
  1134. }
  1135. }
  1136. .text {
  1137. color: rgba(16, 16, 16, 1);
  1138. font-size: 36rpx;
  1139. margin-left: 16rpx;
  1140. font-weight: bold;
  1141. }
  1142. .change {
  1143. margin-left: 16rpx;
  1144. font-size: 24rpx;
  1145. color: #838383;
  1146. }
  1147. .check-all {
  1148. margin-left: auto;
  1149. color: rgba(131, 131, 131, 1);
  1150. font-size: 24rpx;
  1151. }
  1152. }
  1153. }
  1154. // 用电量
  1155. .statistics-e {
  1156. padding: 40rpx;
  1157. .electricity {
  1158. background-color: #fff;
  1159. .item:last-of-type {
  1160. border: none;
  1161. padding-bottom: 0;
  1162. }
  1163. .item {
  1164. padding: 16rpx 0;
  1165. display: flex;
  1166. align-items: center;
  1167. justify-content: space-between;
  1168. border-bottom: 1px solid rgba(245, 245, 245, 1);
  1169. .item-content {
  1170. width: 93%;
  1171. }
  1172. .equipment {
  1173. display: flex;
  1174. align-items: center;
  1175. .equipment1 {
  1176. color: rgba(51, 51, 51, 1);
  1177. font-size: 32rpx;
  1178. max-width: 40%;
  1179. font-weight: bold;
  1180. white-space: nowrap;
  1181. overflow: hidden;
  1182. text-overflow: ellipsis;
  1183. }
  1184. .equipment2 {
  1185. color: rgba(119, 119, 119, 1);
  1186. margin-left: 16rpx;
  1187. max-width: 40%;
  1188. white-space: nowrap;
  1189. overflow: hidden;
  1190. text-overflow: ellipsis;
  1191. }
  1192. }
  1193. // 状态
  1194. .state {
  1195. width: 64rpx;
  1196. height: 36rpx;
  1197. line-height: 36rpx;
  1198. border-radius: 8rpx;
  1199. font-size: 22rpx;
  1200. text-align: center;
  1201. border: 1px solid rgba(255, 123, 0, 1);
  1202. color: rgba(255, 123, 0, 1);
  1203. margin-left: auto;
  1204. // .dot {
  1205. // margin-right: 8rpx;
  1206. // width: 16rpx;
  1207. // height: 16rpx;
  1208. // background-color: rgba(255, 123, 0, 1);
  1209. // border-radius: 999px;
  1210. // margin-left: auto;
  1211. // }
  1212. }
  1213. .state2 {
  1214. border: 1px solid rgba(0, 185, 98, 1);
  1215. color: rgba(0, 185, 98, 1);
  1216. }
  1217. .electricity {
  1218. display: flex;
  1219. justify-content: space-between;
  1220. align-items: center;
  1221. margin-top: 8rpx;
  1222. text-align: center;
  1223. .electricity-item {
  1224. display: flex;
  1225. align-items: center;
  1226. width: 33.3%;
  1227. height: 40rpx;
  1228. line-height: 40rpx;
  1229. .number {
  1230. color: rgba(51, 51, 51, 1);
  1231. font-weight: bold;
  1232. font-size: 24rpx;
  1233. margin-left: 8rpx;
  1234. }
  1235. .date {
  1236. color: rgba(119, 119, 119, 1);
  1237. font-size: 24rpx;
  1238. }
  1239. }
  1240. }
  1241. }
  1242. }
  1243. }
  1244. // 统计1
  1245. .statistics-1 {
  1246. background-color: rgba(255, 255, 255, 1);
  1247. width: 100%;
  1248. padding: 24rpx;
  1249. box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
  1250. border-radius: 8px;
  1251. margin-bottom: 24rpx;
  1252. .item {
  1253. margin-top: 32rpx;
  1254. display: flex;
  1255. align-items: center;
  1256. .item-progess {
  1257. display: flex;
  1258. align-items: center;
  1259. .img {
  1260. width: 88rpx;
  1261. height: 88rpx;
  1262. margin-right: 24rpx;
  1263. vertical-align: middle;
  1264. }
  1265. }
  1266. .total {
  1267. margin-left: 24rpx;
  1268. color: rgba(119, 119, 119, 1);
  1269. .total1 {
  1270. display: flex;
  1271. color: rgba(51, 51, 51, 1);
  1272. font-size: 32rpx;
  1273. font-weight: bold;
  1274. .normal {
  1275. margin-bottom: 12rpx;
  1276. }
  1277. }
  1278. .total2 {
  1279. color: rgba(119, 119, 119, 1);
  1280. }
  1281. .abnormal {
  1282. margin-left: 24rpx;
  1283. }
  1284. }
  1285. .total-number {
  1286. color: rgba(255, 123, 0, 1);
  1287. margin: 0 8rpx;
  1288. font-weight: bold;
  1289. }
  1290. }
  1291. }
  1292. // 统计2异常报警记录
  1293. .statistics-2 {
  1294. .abnormal-item:last-of-type {
  1295. border-bottom: none !important;
  1296. padding-bottom: 0;
  1297. }
  1298. .abnormal-item {
  1299. display: flex;
  1300. justify-content: space-between;
  1301. align-items: center;
  1302. padding: 16rpx;
  1303. border-bottom: 1px solid rgba(245, 245, 245, 1);
  1304. .item-title {
  1305. color: rgba(51, 51, 51, 1);
  1306. .img {
  1307. width: 32rpx;
  1308. height: 32rpx;
  1309. margin-right: 8rpx;
  1310. }
  1311. .name {
  1312. color: rgba(51, 51, 51, 1);
  1313. }
  1314. .date {
  1315. color: rgba(119, 119, 119, 1);
  1316. font-size: 24rpx;
  1317. }
  1318. }
  1319. .item-value {
  1320. text-align: right;
  1321. display: flex;
  1322. align-items: center;
  1323. .more {
  1324. margin-left: 8rpx;
  1325. }
  1326. .value1 {
  1327. font-weight: bold;
  1328. color: rgba(51, 51, 51, 1);
  1329. }
  1330. .value2 {
  1331. color: rgba(119, 119, 119, 1);
  1332. font-size: 24rpx;
  1333. }
  1334. }
  1335. }
  1336. }
  1337. // 统计3设备实时监控
  1338. .statistics-3 {
  1339. .monitoring-item {
  1340. padding: 16rpx 0;
  1341. border-bottom: 1px solid rgba(245, 245, 245, 1);
  1342. .item-title {
  1343. display: flex;
  1344. align-items: center;
  1345. .text1 {
  1346. color: rgba(51, 51, 51, 1);
  1347. }
  1348. }
  1349. .company-name {
  1350. color: rgba(119, 119, 119, 1);
  1351. font-size: 24rpx;
  1352. display: flex;
  1353. align-items: center;
  1354. .state {
  1355. margin-left: 12rpx;
  1356. display: flex;
  1357. align-items: center;
  1358. color: rgba(255, 123, 0, 1);
  1359. text {
  1360. margin-right: 8rpx;
  1361. display: inline-block;
  1362. width: 16rpx;
  1363. height: 16rpx;
  1364. border-radius: 999px;
  1365. }
  1366. .off-line {
  1367. background-color: rgba(255, 123, 0, 1);
  1368. }
  1369. .on-line {
  1370. background-color: rgba(0, 185, 98, 1);
  1371. }
  1372. }
  1373. .state2 {
  1374. color: rgba(0, 185, 98, 1);
  1375. }
  1376. }
  1377. .state {
  1378. margin-left: auto;
  1379. display: flex;
  1380. .state1,
  1381. .state2 {
  1382. display: flex;
  1383. align-items: center;
  1384. margin-left: 24rpx;
  1385. }
  1386. .more {
  1387. margin-left: 8rpx;
  1388. }
  1389. .img {
  1390. width: 32rpx;
  1391. height: 32rpx;
  1392. vertical-align: middle;
  1393. margin-right: 8rpx;
  1394. }
  1395. }
  1396. // 监控信息
  1397. .infos {
  1398. margin-top: 8rpx;
  1399. display: flex;
  1400. align-items: center;
  1401. justify-content: space-between;
  1402. flex-wrap: wrap;
  1403. .infos-item {
  1404. width: 38%;
  1405. display: flex;
  1406. align-items: center;
  1407. color: rgba(51, 51, 51, 1);
  1408. font-size: 22rpx;
  1409. // margin-right: 16rpx;
  1410. margin-bottom: 8rpx;
  1411. .icon {}
  1412. }
  1413. .text {
  1414. font-weight: bold;
  1415. }
  1416. }
  1417. }
  1418. }
  1419. // 设备状态
  1420. .statistics-4 {
  1421. .chat-img {
  1422. width: 100%;
  1423. height: 620rpx;
  1424. }
  1425. }
  1426. // 故障类型
  1427. .statistics-5,
  1428. .statistics-6 {
  1429. .chat-img {
  1430. width: 100%;
  1431. height: 410rpx;
  1432. }
  1433. }
  1434. // 异常设备排名
  1435. .statistics-ranking {
  1436. .total {
  1437. color: rgba(16, 16, 16, 1);
  1438. padding-left: 52rpx;
  1439. text {
  1440. color: #1677FF;
  1441. padding: 0 8rpx;
  1442. }
  1443. }
  1444. .ranking-main {
  1445. margin-top: 40rpx;
  1446. border-radius: 16px;
  1447. background-color: #fff;
  1448. .item:last-of-type {
  1449. margin-bottom: 0;
  1450. }
  1451. .item {
  1452. display: flex;
  1453. align-items: center;
  1454. margin-bottom: 32rpx;
  1455. .ranking {
  1456. color: rgba(16, 16, 16, 1);
  1457. font-weight: bold;
  1458. }
  1459. .icon {
  1460. width: 72rpx;
  1461. height: 72rpx;
  1462. border-radius: 4px;
  1463. background-color: rgba(219, 234, 255, 1);
  1464. display: flex;
  1465. align-items: center;
  1466. justify-content: center;
  1467. margin-left: 24rpx;
  1468. .img {
  1469. width: 48rpx;
  1470. height: 48rpx;
  1471. }
  1472. }
  1473. .name {
  1474. margin-left: 16rpx;
  1475. .name1 {
  1476. color: rgba(51, 51, 51, 1);
  1477. font-weight: bold;
  1478. }
  1479. .name2 {
  1480. color: rgba(119, 119, 119, 1);
  1481. font-size: 24rpx;
  1482. margin-top: 4rpx;
  1483. }
  1484. }
  1485. .time {
  1486. color: rgba(16, 16, 16, 1);
  1487. margin-left: auto;
  1488. font-weight: bold;
  1489. }
  1490. }
  1491. }
  1492. // 查看全部排名
  1493. .check-all {
  1494. text-align: center;
  1495. color: rgba(119, 119, 119, 1);
  1496. font-size: 12px;
  1497. }
  1498. }
  1499. // 能源管理
  1500. .statistics-manage {
  1501. padding: 40rpx 0;
  1502. .title,
  1503. .chart,
  1504. .search,
  1505. .meter-statistic {
  1506. padding: 0 32rpx;
  1507. }
  1508. // 图表
  1509. .chart {
  1510. padding-top: 32rpx;
  1511. border-top: 1px solid rgba(242, 242, 242, 1);
  1512. /deep/.u-subsection {
  1513. padding: 2px;
  1514. }
  1515. /deep/.u-item {
  1516. padding: 0;
  1517. font-size: 24rpx
  1518. }
  1519. .chat-box {
  1520. margin-top: 24rpx;
  1521. width: 100%;
  1522. height: 480rpx;
  1523. img {
  1524. width: 100%;
  1525. height: 100%;
  1526. }
  1527. }
  1528. }
  1529. .search {
  1530. border-top: 1px solid rgba(242, 242, 242, 1);
  1531. border-bottom: 1px solid rgba(242, 242, 242, 1);
  1532. display: flex;
  1533. align-items: center;
  1534. justify-content: space-between;
  1535. padding: 40rpx 32rpx;
  1536. .switch {
  1537. display: flex;
  1538. align-items: center;
  1539. text {
  1540. margin-left: 8rpx;
  1541. color: rgba(51, 51, 51, 1);
  1542. }
  1543. }
  1544. .search-box {
  1545. border-radius: 50px;
  1546. background-color: rgba(242, 244, 246, 1);
  1547. color: rgba(136, 136, 136, 1);
  1548. height: 56rpx;
  1549. line-height: 56rpx;
  1550. padding-left: 16rpx;
  1551. padding-right: 8rpx;
  1552. flex: 1;
  1553. margin-left: 28rpx;
  1554. display: flex;
  1555. align-items: center;
  1556. justify-content: space-between;
  1557. uni-input {
  1558. height: 56rpx;
  1559. line-height: 56rpx !important;
  1560. font-size: 28rpx;
  1561. width: 75%;
  1562. }
  1563. .icon {
  1564. display: flex;
  1565. align-items: center;
  1566. justify-content: center;
  1567. width: 64rpx;
  1568. height: 40rpx;
  1569. border-radius: 50px;
  1570. background-color: rgba(22, 119, 255, 1);
  1571. }
  1572. }
  1573. }
  1574. }
  1575. // 电表统计
  1576. .meter-statistic {
  1577. margin-top: 32rpx;
  1578. .sum {
  1579. display: flex;
  1580. align-items: center;
  1581. .meter-name {
  1582. color: rgba(51, 51, 51, 1);
  1583. font-size: 32rpx;
  1584. margin-left: 8rpx;
  1585. font-weight: bold;
  1586. }
  1587. .icon {
  1588. margin-right: 8rpx;
  1589. img {
  1590. width: 40rpx;
  1591. height: 40rpx;
  1592. vertical-align: middle;
  1593. }
  1594. }
  1595. .meter-state {
  1596. margin-left: 8rpx;
  1597. width: 64rpx;
  1598. height: 36rpx;
  1599. line-height: 36rpx;
  1600. border-radius: 4px;
  1601. background-color: rgba(255, 255, 255, 1);
  1602. color: rgba(0, 185, 98, 1);
  1603. font-size: 22rpx;
  1604. text-align: center;
  1605. border: 1px solid rgba(0, 185, 98, 1);
  1606. }
  1607. .meter-state2 {
  1608. border: 1px solid rgba(255, 123, 0, 1);
  1609. color: rgba(255, 123, 0, 1);
  1610. }
  1611. .meter-number {
  1612. margin-left: auto;
  1613. color: rgba(51, 51, 51, 1);
  1614. font-size: 32rpx;
  1615. /deep/.u-icon--right {
  1616. margin-left: 8rpx;
  1617. }
  1618. }
  1619. }
  1620. .sum2 {
  1621. padding: 0 32rpx;
  1622. margin-top: 8rpx;
  1623. display: flex;
  1624. align-items: center;
  1625. justify-content: space-between;
  1626. .title {
  1627. color: rgba(119, 119, 119, 1);
  1628. }
  1629. .value {
  1630. color: rgba(119, 119, 119, 1);
  1631. }
  1632. }
  1633. // 一级表
  1634. .first-level {
  1635. padding-left: 32rpx;
  1636. margin-top: 20rpx;
  1637. .meter-name {
  1638. font-size: 28rpx
  1639. }
  1640. }
  1641. // 二级表
  1642. .second-level {
  1643. padding-left: 64rpx;
  1644. margin-top: 20rpx;
  1645. .meter-name {
  1646. font-size: 24rpx
  1647. }
  1648. }
  1649. .else-switch {
  1650. padding-left: 144rpx;
  1651. .meter-name {
  1652. font-size: 24rpx
  1653. }
  1654. .item {
  1655. margin-top: 24rpx;
  1656. }
  1657. }
  1658. }
  1659. }
  1660. /deep/.u-drawer {
  1661. z-index: 999 !important;
  1662. }
  1663. </style>