equipmentElectricity.vue 24 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165
  1. <template>
  2. <view>
  3. <view class="navbar-c">
  4. <view class="back" @click="backStatistics">
  5. <u-icon name="arrow-left" color="#101010" size="36"></u-icon>
  6. </view>
  7. <view class="title">
  8. 用电量(度)
  9. <image class="img" src="@/assets/img/refresh-line.svg" @click="getList(true)"></image>
  10. </view>
  11. </view>
  12. <u-picker-select title="日期选择" v-model="tabsFrom.show2" :defaultTime="tabsFrom.show2Index" :endYear="endYear"
  13. mode="time" :params="params" :noselect="false" @confirm="selector2confirm" @cancel="selector2cancel"
  14. @reset="selector2reset"></u-picker-select>
  15. <!-- 标签 -->
  16. <view class="tabs-box" >
  17. <view class="tabs" :style="{width: companyList.length>4 ? '' : '100%'}">
  18. <u-tabs :list="merchantList1" :is-scroll="false" inactive-color="#999999" active-color="#666666"
  19. :current="current" @change="change"></u-tabs>
  20. </view>
  21. <view class="icon" @click="popShow=true" v-if="companyList.length >= 4">
  22. <u-icon name="arrow-down" color="#999999"></u-icon>
  23. </view>
  24. </view>
  25. <!-- 标签弹出层 -->
  26. <u-popup v-model="popShow" duration="10" mode="top" :negative-top="88" border-radius="16">
  27. <view class="popup-tabs">
  28. <view class="tabs">
  29. <u-tabs :list="merchantList1" :is-scroll="false" :current="current" @change="change"></u-tabs>
  30. </view>
  31. <view class="more">
  32. <u-icon name="arrow-up" color="#777777" size="40" @click="popShow=false"></u-icon>
  33. </view>
  34. </view>
  35. <view class="tabs-options">
  36. <view class="item" v-for="(item, index) in merchantList2" :key="index"
  37. @click="merchantChange(item,index)">
  38. {{item.name}}
  39. </view>
  40. </view>
  41. </u-popup>
  42. <!-- 全部标签 -->
  43. <view class="main" v-show="current==0" >
  44. <view class="item" v-for="(item, index) in kWhList" :key="item.index" v-if="current==0"
  45. @click="toElectronicMonitoring(item)">
  46. <view class="item-content">
  47. <view class="equipment">
  48. <view class="equipment1 ">
  49. {{item.name}}
  50. </view>
  51. <view class="equipment2">
  52. {{item.installationAddressSimple}}
  53. </view>
  54. <view class="state" v-if="!item.online">
  55. <view class="dot off-line"></view>
  56. <view class="text">离线</view>
  57. </view>
  58. <view class="state state2" v-else>
  59. <view class="dot on-line"></view>
  60. <view class="text">在线</view>
  61. </view>
  62. </view>
  63. <view class="electricity">
  64. <view class="electricity-item electricity-item-day">
  65. <view class="date">
  66. 今日
  67. </view>
  68. <view class="number">
  69. {{item.thisDayKwh}}
  70. </view>
  71. </view>
  72. <view class="electricity-item">
  73. <view class="date">
  74. 本月
  75. </view>
  76. <view class="number">
  77. {{item.thisMonthKwh}}
  78. </view>
  79. </view>
  80. <view class="electricity-item">
  81. <view class="date">
  82. 上月
  83. </view>
  84. <view class="number">
  85. {{item.lastMonthKwh}}
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. <view class="more">
  91. <u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  92. </view>
  93. </view>
  94. </view>
  95. <u-divider v-show="current==0" :isnone="kWhList.length==0" nonetext="暂无数据" border-color="#CFD2D5">已经到底了</u-divider>
  96. <!-- 子项标签 -->
  97. <view class="statistics-manage" v-if="current==1" >
  98. <!-- 图表 -->
  99. <view class="chart">
  100. <view class="u-subsection">
  101. <u-subsection :list="list" :current="homePageManageType" @change="sectionChange" font-size="24"></u-subsection>
  102. </view>
  103. <view class="chat-box" id="barEcharts">
  104. </view>
  105. </view>
  106. <view class="search">
  107. <view class="switch">
  108. <u-switch v-model="checked" size="40"></u-switch><text>只看离线表</text>
  109. </view>
  110. <view class="search-box">
  111. <input type="text" placeholder="请输入电表查询" />
  112. <view class="icon">
  113. <img src="@/assets/img/riLine-search-line 1.svg" alt="" />
  114. </view>
  115. </view>
  116. </view>
  117. <!-- 电表统计 -->
  118. <Tree-Body :meterList="meterList" ref="mytree"
  119. @query="getHomePageManageChildMeter"
  120. ></Tree-Body>
  121. <!-- 电表统计 -->
  122. <view class="meter-statistic" v-if="false">
  123. <!-- 总计 -->
  124. <view v-for="(item,i) in meterList" :key="i">
  125. <view class="sum meter-statistic-main">
  126. <view class="icon" @click="showBtn(item)" v-if="item.childMeterList&&item.childMeterList.length" >
  127. <u-icon name="arrow-up" color="#d4d4d4" v-show="ifBtnShow(item)" size="24"></u-icon>
  128. <u-icon name="arrow-down" color="#d4d4d4" v-show="!ifBtnShow(item)" size="24"></u-icon>
  129. </view>
  130. <view class="meter-name" >
  131. {{item.name}}
  132. </view>
  133. <view class="meter-state" v-if="item.online">
  134. 在线
  135. </view>
  136. <view class="meter-state meter-state2" v-else>
  137. 离线
  138. </view>
  139. <view class="meter-number" @click="toElectronicMonitoring(item)">
  140. {{item.kwh}}度<u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  141. </view>
  142. </view>
  143. <view class="sum2">
  144. <view class="title">
  145. {{item.name}}用电(未扣除)
  146. </view>
  147. <view class="value">
  148. {{item.childKwh}}度
  149. </view>
  150. </view>
  151. <!-- 一级表 -->
  152. <view class="sum first-level" v-if="item.childMeterList&&item.childMeterList.length"
  153. v-show="ifBtnShow(item)" v-for="(item2,j) in item.childMeterList" :key="j" >
  154. <view class="first-level-list">
  155. <view class="icon" @click="showBtn(item2)" v-if="item2.childMeterList&&item2.childMeterList.length" >
  156. <u-icon name="arrow-up" color="#d4d4d4" v-show="ifBtnShow(item2)" size="24"></u-icon>
  157. <u-icon name="arrow-down" color="#d4d4d4" v-show="!ifBtnShow(item2)" size="24"></u-icon>
  158. </view>
  159. <view class="icon">
  160. <img src="@/assets/img/switchIcon.png" alt="" />
  161. </view>
  162. <view class="meter-name" >
  163. {{item2.name}}
  164. </view>
  165. <view class="meter-state" v-if="item2.online">
  166. 在线
  167. </view>
  168. <view class="meter-state meter-state2" v-else>
  169. 离线
  170. </view>
  171. <view class="meter-number" @click="toElectronicMonitoring(item2)" >
  172. {{item2.kwh}}度<u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  173. </view>
  174. </view>
  175. <!-- 二级表 -->
  176. <view class="sum second-level" v-if="item2.childMeterList&&item2.childMeterList.length"
  177. v-show="ifBtnShow(item2)" v-for="(item3,k) in item2.childMeterList" :key="k"
  178. >
  179. <view class="first-level-list">
  180. <view class="icon" @click="showBtn(item3)" v-if="item3.childMeterList&&item3.childMeterList.length" >
  181. <u-icon name="arrow-up" color="#d4d4d4" v-show="ifBtnShow(item3)" size="24"></u-icon>
  182. <u-icon name="arrow-down" color="#d4d4d4" v-show="!ifBtnShow(item3)" size="24"></u-icon>
  183. </view>
  184. <view class="icon">
  185. <img src="@/assets/img/switchIcon.png" alt="" />
  186. </view>
  187. <view class="meter-name">
  188. {{item3.name}}
  189. </view>
  190. <view class="meter-state" v-if="item3.online">
  191. 在线
  192. </view>
  193. <view class=" meter-state meter-state2" v-else>
  194. 离线
  195. </view>
  196. <view class="meter-number" @click="toElectronicMonitoring(item3)">
  197. {{item3.kwh}}度<u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  198. </view>
  199. </view>
  200. <!-- 开关 -->
  201. <view class="else-switch " v-if="item3.childMeterList&&item3.childMeterList.length"
  202. v-show="ifBtnShow(item3)" v-for="(item4,h) in item3.childMeterList" :key="h" >
  203. <view class="sum item first-level-list">
  204. <view class="icon">
  205. <img src="@/assets/img/switchIcon.png" alt="" />
  206. <!-- switchClose -->
  207. </view>
  208. <view class="meter-name">
  209. {{item4.name}}
  210. </view>
  211. <view class="meter-state" v-if="item4.online">
  212. 在线
  213. </view>
  214. <view class=" meter-state meter-state2" v-else>
  215. 离线
  216. </view>
  217. <view class="meter-number" @click="toElectronicMonitoring(item4)" >
  218. {{item4.kwh}}度<u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  219. </view>
  220. </view>
  221. </view>
  222. </view>
  223. </view>
  224. </view>
  225. </view>
  226. </view>
  227. </view>
  228. </template>
  229. <script>
  230. import * as API from '@/apis/pagejs/index.js'
  231. import * as API2 from '@/apis/pagejs/energyManage.js'
  232. import * as echarts from 'echarts';
  233. import {
  234. parseUnixTime,
  235. beforeTimeStamp,
  236. getWeek
  237. } from '@/apis/utils'
  238. import TreeBody from '@/components/tree/tree-body.vue';
  239. export default {
  240. components: {
  241. TreeBody
  242. },
  243. data() {
  244. return {
  245. companyList: [], // 商户
  246. merchantList1: [],
  247. merchantList2: [],
  248. myLineChart: null, // 图表
  249. myBarChart: null,
  250. myPieChart: null,
  251. homePageManageType: 0,
  252. homePageManageObj: {
  253. childKwh: 0,
  254. differenceKwh: 0,
  255. parkKwh: 0
  256. },
  257. meterList: [],
  258. meterListShow:{},
  259. queryDate: '',
  260. kWhList: [], //设备
  261. companyId: '',
  262. popShow: false,
  263. current: 0,
  264. allKWhList: [],
  265. companyKwhList: [],
  266. pageIndex: 1,
  267. recordsTotal: 0,
  268. windowHeight: '',
  269. checked:false,
  270. list: [{
  271. name: '上月',
  272. value: "2"
  273. },
  274. {
  275. name: '当月',
  276. value: "1"
  277. },
  278. {
  279. name: '当日',
  280. value: "4"
  281. }, {
  282. name: '当年',
  283. value: "3"
  284. }, {
  285. name: '合计',
  286. value: "0"
  287. },
  288. {
  289. name: '指定月份',
  290. value: "10"
  291. }
  292. ],
  293. endYear: '',
  294. params: {
  295. year: true,
  296. month: true,
  297. day: true,
  298. hour: false,
  299. minute: false,
  300. second: false
  301. },
  302. value: '2',
  303. clickType: -1,
  304. tabsFrom: {
  305. show1: false,
  306. show1Index: 0,
  307. show2Index: '',
  308. show2: false,
  309. show1Text: "全部类型",
  310. show2Text: "全部时间",
  311. },
  312. }
  313. },
  314. onReady() {
  315. this.endYear = new Date().getFullYear();
  316. this.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  317. this.getCompanyInfoList();
  318. },
  319. onReachBottom() {
  320. if (this.kWhList.length < this.recordsTotal) {
  321. this.myLoadmore();
  322. }
  323. },
  324. methods: {
  325. refreshList() {
  326. if (this.current != 0) {
  327. this.getList(true);
  328. } else {
  329. this.getCompanyInfoList();
  330. }
  331. },
  332. companyChange(item, index) {
  333. this.current = index + 1;
  334. this.companyId = item.id;
  335. this.getList(true);
  336. },
  337. getCompanyInfoList() {
  338. this.companyKwhList = [];
  339. API.deviceCompanyList().then((response) => {
  340. var list = response.data.companyInfoList;
  341. this.companyList = list;
  342. var mList1 = [];
  343. var mList2 = [];
  344. mList1.push({
  345. id: '',
  346. name: '全部'
  347. });
  348. for (var i = 0; i < list.length; i++) {
  349. if (i >= 3) {
  350. mList2.push(list[i]);
  351. } else {
  352. mList1.push(list[i]);
  353. }
  354. }
  355. this.merchantList1 = mList1;
  356. this.merchantList2 = mList2;
  357. this.companyId = mList1[0].id;
  358. this.getList();
  359. }).catch(error => {
  360. uni.showToast({
  361. title: error,
  362. icon: "none"
  363. })
  364. })
  365. },
  366. myLoadmore() {
  367. this.pageIndex += 1;
  368. this.getList();
  369. },
  370. getList(bl) {
  371. uni.showLoading({
  372. title: "加载中",
  373. mask: true,
  374. })
  375. if (bl) {
  376. this.kWhList = [];
  377. this.pageIndex = 1;
  378. }
  379. var data = {
  380. pageIndex: this.pageIndex,
  381. pageSize: 20,
  382. companyId: this.companyId
  383. };
  384. API.homePageKwh(data).then((res) => {
  385. uni.hideLoading();
  386. this.kWhList = [
  387. ...this.kWhList,
  388. ...res.data.data
  389. ];
  390. this.recordsTotal = res.data.recordsTotal;
  391. }).catch(error => {
  392. uni.showToast({
  393. title: error,
  394. icon: "none"
  395. })
  396. })
  397. },
  398. merchantChange(item, index) {
  399. var m = item;
  400. var n = this.merchantList1[this.current];
  401. this.merchantList1[this.current] = m;
  402. this.merchantList2[index] = n;
  403. this.companyId = item.id;
  404. this.popShow = false;
  405. //this.getList(true);
  406. this.merchantChangeApi()
  407. },
  408. // 设备数据监测
  409. getHomePageManageChildMeter(item,bl) {
  410. if(!bl){
  411. uni.showLoading({
  412. title: "加载中",
  413. mask: true,
  414. })
  415. }
  416. API2.homePageManageChildMeter({
  417. parentMeterId:item.id,
  418. queryDate:this.queryDate,
  419. companyId: this.companyId,
  420. type: this.list[this.homePageManageType].value
  421. }).then((response) => {
  422. if(!bl){
  423. uni.hideLoading();
  424. }
  425. // this.meterList = response.data.meterList;
  426. // if(!this.meterListShow.id){
  427. // this.meterListShow.id=1
  428. // this.recursionList(this.meterList)
  429. // }
  430. var childMeterList=response.data.childMeterList
  431. item.childMeterList=childMeterList
  432. if(!bl){
  433. for(var i in childMeterList){
  434. var obj=childMeterList[i]
  435. this.getHomePageManageChildMeter(obj,true)
  436. }
  437. }
  438. }).catch(error => {
  439. uni.showToast({
  440. title: error,
  441. icon: "none"
  442. })
  443. })
  444. },
  445. // 设备数据监测
  446. getHomePageManage() {
  447. uni.showLoading({
  448. title: "加载中",
  449. mask: true,
  450. })
  451. API2.homePageManage({
  452. queryDate:this.queryDate,
  453. companyId: this.companyId,
  454. type: this.list[this.homePageManageType].value
  455. }).then((response) => {
  456. uni.hideLoading();
  457. this.meterList = response.data.meterList;
  458. // this.$nextTick(()=>{
  459. // this.$refs.mytree.toggle()
  460. // })
  461. this.homePageManageObj = response.data;
  462. this.getBarCharts()
  463. }).catch(error => {
  464. uni.showToast({
  465. title: error,
  466. icon: "none"
  467. })
  468. })
  469. },
  470. sectionChange(index) {
  471. this.clickType = index;
  472. this.homePageManageType = index;
  473. if (index == 5) {
  474. this.tabsFrom.show2 = true;
  475. this.params.day = false;
  476. } else {
  477. this.list[5].name = '指定月份'
  478. this.getHomePageManage()
  479. }
  480. },
  481. recursionList(list){
  482. if(list){
  483. for(var i in list){
  484. var obj=list[i]
  485. this.meterListShow[obj.id]=false
  486. this.recursionList(obj.childMeterList)
  487. }
  488. }
  489. },
  490. ifBtnShow(item){
  491. return this.meterListShow[item.id]
  492. },
  493. showBtn(item){
  494. var key=this.meterListShow[item.id];
  495. this.$set(this.meterListShow,item.id,!key)
  496. console.log("showBtn,",key)
  497. this.getHomePageManageChildMeter(item);
  498. this.$forceUpdate()
  499. },
  500. selector2reset(e) {
  501. console.log(e)
  502. this.tabsFrom.show2Text = '全部时间'
  503. this.tabsFrom.show2Index = '';
  504. if (e.day) {
  505. this.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  506. this.getHomePageManage();
  507. } else {
  508. this.homePageManageType = this.clickType;
  509. if (this.homePageManageType != 5) {
  510. this.list[5].name = '指定月份';
  511. }
  512. this.getHomePageManage();
  513. }
  514. },
  515. selector2cancel() {
  516. if(this.clickType != -1) {
  517. this.homePageManageType = this.clickType;
  518. }
  519. },
  520. selector2confirm(e) {
  521. this.tabsFrom.show2Text = e.year + "年" + e.month + "月"
  522. this.tabsFrom.show2Index = e.year + "-" + e.month
  523. if (e.day) {
  524. this.tabsFrom.show2Text += e.day + "日"
  525. this.tabsFrom.show2Index += '-' + e.day
  526. this.queryDateMethod(this.tabsFrom.show2Index, true)
  527. } else {
  528. this.queryDateMethod(this.tabsFrom.show2Index, false)
  529. }
  530. },
  531. queryDateMethod(queryTime, day) {
  532. if (day) {
  533. this.queryDate = queryTime;
  534. //this.FormData2.type =day?"9":"10"
  535. //this.value="-1"
  536. //this.getHomePageManage();
  537. } else {
  538. this.queryDate = queryTime + "-01";
  539. this.homePageManageType = "5";
  540. this.list[5].name = queryTime;
  541. this.getHomePageManage();
  542. }
  543. },
  544. getBarCharts() {
  545. if (!this.myBarChart) {
  546. this.myBarChart = echarts.init(document.getElementById('barEcharts'),null,{
  547. width:uni.upx2px(690),height:uni.upx2px(480)
  548. });
  549. }
  550. var thismax=Math.max(this.homePageManageObj.parkKwh,this.homePageManageObj.differenceKwh,this.homePageManageObj.childKwh)
  551. var option = {
  552. polar: {
  553. center:['35%','50%'],
  554. radius:[20, '70%']
  555. },
  556. angleAxis: {
  557. max: parseInt(thismax+thismax/10)+3 ,
  558. startAngle: 75
  559. },
  560. legend: {
  561. x:"65%",
  562. y: '0',
  563. data: ['园区电量', '表计电量', '电损量'],
  564. orient :'vertical'
  565. },
  566. radiusAxis: {
  567. type: 'category',
  568. data: ['']
  569. },
  570. tooltip: {},
  571. series: [
  572. {
  573. name:'园区电量',
  574. type: 'bar',
  575. data: [
  576. this.homePageManageObj.parkKwh,
  577. ],
  578. coordinateSystem: 'polar',
  579. label: {
  580. show: true,
  581. position: 'middle',
  582. formatter: '{c}度'
  583. }
  584. },
  585. {
  586. name:'表计电量',
  587. type: 'bar',
  588. data: [
  589. this.homePageManageObj.childKwh
  590. ],
  591. coordinateSystem: 'polar',
  592. label: {
  593. show: true,
  594. position: 'middle',
  595. formatter: '{c}度'
  596. }
  597. },
  598. {
  599. name:'电损量',
  600. type: 'bar',
  601. data: [
  602. this.homePageManageObj.differenceKwh
  603. ],
  604. coordinateSystem: 'polar',
  605. label: {
  606. show: true,
  607. position: 'middle',
  608. formatter: '{c}度'
  609. }
  610. }
  611. ]
  612. };
  613. console.log(option)
  614. this.myBarChart.setOption(option);
  615. },
  616. merchantChangeApi() {
  617. if (this.companyId) {
  618. this.getHomePageManage();
  619. }
  620. },
  621. change(index) {
  622. this.current = index;
  623. this.companyId = this.merchantList1[index].id;
  624. this.merchantChangeApi()
  625. },
  626. backStatistics() {
  627. uni.navigateBack()
  628. },
  629. toElectronicMonitoring(item) {
  630. uni.navigateTo({
  631. url: '/pages/equipmentDataMonitoring/electronicMonitoring?id=' + item.id + '&name=' + item
  632. .name +
  633. '&companyId=' + item.companyId
  634. })
  635. }
  636. }
  637. }
  638. </script>
  639. <style lang="scss" scoped>
  640. page {
  641. padding-bottom: 100rpx;
  642. }
  643. .back {
  644. z-index: 999;
  645. width: 200rpx;
  646. }
  647. /deep/.u-drawer-content {
  648. margin-top: 88rpx;
  649. }
  650. // /deep/.u-tab-item {
  651. // width: 25% !important;
  652. // flex: none !important;
  653. // }
  654. .tabs-box {
  655. background-color: #fff;
  656. display: flex;
  657. align-items: center;
  658. padding-right: 32rpx;
  659. justify-content: space-between;
  660. border-bottom: 1px solid rgba(232, 232, 232, 1);
  661. .tabs {
  662. width: 88%;
  663. }
  664. .icon {
  665. margin-left: auto;
  666. margin-right: 24rpx;
  667. }
  668. }
  669. .popup-tabs {
  670. background-color: #fff;
  671. display: flex;
  672. align-items: center;
  673. justify-content: space-between;
  674. padding-right: 32rpx;
  675. color: rgba(51, 51, 51, 1);
  676. font-size: 32rpx;
  677. padding-top: 32rpx;
  678. .tabs {
  679. width: 88%;
  680. }
  681. }
  682. .tabs-options {
  683. display: flex;
  684. padding: 64rpx 32rpx 0;
  685. flex-wrap: wrap;
  686. .item {
  687. width: 25%;
  688. margin-bottom: 40rpx;
  689. }
  690. }
  691. // 用电量合计
  692. .total {
  693. padding: 24rpx 32rpx;
  694. background: linear-gradient(90deg, rgba(49, 110, 207, 1) 2%, rgba(37, 138, 255, 1) 100%);
  695. .company {
  696. display: flex;
  697. align-items: center;
  698. justify-content: space-between;
  699. .name {
  700. color: rgba(255, 255, 255, 1);
  701. font-size: 36rpx;
  702. font-weight: bold;
  703. }
  704. .amount {
  705. color: #f2f4f6;
  706. margin-top: 4rpx;
  707. }
  708. }
  709. .infos {
  710. display: flex;
  711. justify-content: space-between;
  712. align-items: center;
  713. margin-top: 4rpx;
  714. width: 93%;
  715. .infos-item {
  716. display: flex;
  717. width: 33.3%;
  718. .number {
  719. color: rgba(255, 255, 255, 1);
  720. font-size: 32rpx;
  721. font-weight: bold;
  722. margin-left: 8rpx;
  723. }
  724. .time {
  725. color: #f2f4f6;
  726. }
  727. }
  728. }
  729. }
  730. // 用电量
  731. .main {
  732. background-color: #fff;
  733. padding: 26rpx 32rpx;
  734. .item:last-of-type {
  735. border: none;
  736. }
  737. .item {
  738. padding: 16rpx 0;
  739. display: flex;
  740. align-items: center;
  741. justify-content: space-between;
  742. border-bottom: 1px solid rgba(245, 245, 245, 1);
  743. .item-content {
  744. width: 93%;
  745. }
  746. .equipment {
  747. display: flex;
  748. align-items: center;
  749. .equipment1 {
  750. color: rgba(51, 51, 51, 1);
  751. font-size: 32rpx;
  752. max-width: 40%;
  753. font-weight: bold;
  754. white-space: nowrap;
  755. overflow: hidden;
  756. text-overflow: ellipsis;
  757. }
  758. .equipment2 {
  759. color: rgba(119, 119, 119, 1);
  760. margin-left: 16rpx;
  761. max-width: 40%;
  762. white-space: nowrap;
  763. overflow: hidden;
  764. text-overflow: ellipsis;
  765. }
  766. }
  767. // 状态
  768. .state {
  769. display: flex;
  770. align-items: center;
  771. color: rgba(255, 123, 0, 1);
  772. margin-left: auto;
  773. .dot {
  774. margin-right: 8rpx;
  775. width: 16rpx;
  776. height: 16rpx;
  777. background-color: rgba(255, 123, 0, 1);
  778. border-radius: 999px;
  779. margin-left: auto;
  780. }
  781. .off-line {
  782. background-color: rgba(255, 123, 0, 1);
  783. }
  784. .on-line {
  785. background-color: rgba(0, 185, 98, 1);
  786. }
  787. }
  788. .state2 {
  789. color: rgba(0, 185, 98, 1);
  790. }
  791. .electricity {
  792. display: flex;
  793. justify-content: space-between;
  794. align-items: center;
  795. margin-top: 8rpx;
  796. text-align: center;
  797. .electricity-item {
  798. display: flex;
  799. align-items: center;
  800. width: 33.3%;
  801. .number {
  802. color: rgba(51, 51, 51, 1);
  803. font-weight: bold;
  804. font-size: 32rpx;
  805. margin-left: 8rpx;
  806. }
  807. .date {
  808. color: rgba(119, 119, 119, 1);
  809. }
  810. }
  811. }
  812. }
  813. }
  814. .statistics-manage {
  815. border-radius: 8px;
  816. background-color: rgba(255, 255, 255, 1);
  817. box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
  818. margin: 32rpx;
  819. padding: 40rpx 0;
  820. .title,
  821. .chart,
  822. .search,
  823. .meter-statistic {
  824. padding: 0 32rpx;
  825. }
  826. // 图表
  827. .chart {
  828. /deep/.u-subsection {
  829. padding: 2px;
  830. }
  831. /deep/.u-item {
  832. padding: 0;
  833. font-size: 24rpx
  834. }
  835. .chat-box {
  836. margin-top: 24rpx;
  837. width: 100%;
  838. height: 480rpx;
  839. img {
  840. width: 100%;
  841. height: 100%;
  842. }
  843. }
  844. }
  845. .search {
  846. border-top: 1px solid rgba(242, 242, 242, 1);
  847. border-bottom: 1px solid rgba(242, 242, 242, 1);
  848. display: flex;
  849. align-items: center;
  850. justify-content: space-between;
  851. padding: 40rpx 32rpx;
  852. .switch {
  853. display: flex;
  854. align-items: center;
  855. text {
  856. margin-left: 8rpx;
  857. color: rgba(51, 51, 51, 1);
  858. }
  859. }
  860. .search-box {
  861. border-radius: 50px;
  862. background-color: rgba(242, 244, 246, 1);
  863. color: rgba(136, 136, 136, 1);
  864. height: 56rpx;
  865. line-height: 56rpx;
  866. padding-left: 16rpx;
  867. padding-right: 8rpx;
  868. flex: 1;
  869. margin-left: 28rpx;
  870. display: flex;
  871. align-items: center;
  872. justify-content: space-between;
  873. uni-input {
  874. height: 56rpx;
  875. line-height: 56rpx !important;
  876. font-size: 28rpx;
  877. width: 75%;
  878. }
  879. .icon {
  880. display: flex;
  881. align-items: center;
  882. justify-content: center;
  883. width: 64rpx;
  884. height: 40rpx;
  885. border-radius: 50px;
  886. background-color: rgba(22, 119, 255, 1);
  887. }
  888. }
  889. }
  890. }
  891. .meter-statistic {
  892. margin-top: 32rpx;
  893. .meter-statistic-main{
  894. display: flex;
  895. align-items: center;
  896. }
  897. .sum {
  898. .meter-name {
  899. color: rgba(51, 51, 51, 1);
  900. font-size: 32rpx;
  901. margin-left: 8rpx;
  902. font-weight: bold;
  903. }
  904. .icon {
  905. margin-right: 8rpx;
  906. img {
  907. width: 40rpx;
  908. height: 40rpx;
  909. vertical-align: middle;
  910. }
  911. }
  912. .meter-state {
  913. margin-left: 8rpx;
  914. width: 64rpx;
  915. height: 36rpx;
  916. line-height: 36rpx;
  917. border-radius: 4px;
  918. background-color: rgba(255, 255, 255, 1);
  919. color: rgba(0, 185, 98, 1);
  920. font-size: 22rpx;
  921. text-align: center;
  922. border: 1px solid rgba(0, 185, 98, 1);
  923. }
  924. .meter-state2 {
  925. border: 1px solid rgba(255, 123, 0, 1);
  926. color: rgba(255, 123, 0, 1);
  927. }
  928. .meter-number {
  929. margin-left: auto;
  930. color: rgba(51, 51, 51, 1);
  931. font-size: 32rpx;
  932. /deep/.u-icon--right {
  933. margin-left: 8rpx;
  934. }
  935. }
  936. }
  937. .sum2 {
  938. padding: 0 32rpx;
  939. margin-top: 8rpx;
  940. display: flex;
  941. align-items: center;
  942. justify-content: space-between;
  943. .title {
  944. color: rgba(119, 119, 119, 1);
  945. }
  946. .value {
  947. color: rgba(119, 119, 119, 1);
  948. }
  949. }
  950. .first-level-list{
  951. width: 100%;
  952. display: flex;
  953. align-items: center;
  954. }
  955. // 一级表
  956. .first-level {
  957. padding-left: 32rpx;
  958. margin-top: 20rpx;
  959. .meter-name {
  960. font-size: 28rpx
  961. }
  962. }
  963. // 二级表
  964. .second-level {
  965. padding-left: 64rpx;
  966. margin-top: 20rpx;
  967. .meter-name {
  968. font-size: 24rpx
  969. }
  970. }
  971. .else-switch {
  972. padding-left: 144rpx;
  973. .meter-name {
  974. font-size: 24rpx
  975. }
  976. .item {
  977. margin-top: 24rpx;
  978. }
  979. }
  980. }
  981. </style>