statistics.vue 39 KB

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