electronicMonitoring.vue 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309
  1. <template>
  2. <view>
  3. <view class="background">
  4. <u-picker v-model="tabsFrom.show1"
  5. :defaultSelector="[tabsFrom.show1Index]"
  6. mode="selector" :range="tabsFrom.selector1" range-key="label" @confirm="selector1confirm" ></u-picker>
  7. <u-picker-select title="日期选择" v-model="tabsFrom.show2"
  8. :defaultTime="tabsFrom.show2Index" :endYear="endYear" @cancel="selector2cancel"
  9. mode="time" :params="params" :noselect="false" @confirm="selector2confirm" @reset="selector2reset" ></u-picker-select>
  10. <u-navbar :background="background"
  11. @titleCk="titleCk" :title-icon="electricityMeterList.length>1?'arrow-down':''"
  12. back-icon-color="#fff" :title="title" title-color="#fff">
  13. <!-- <view class="u-nav-slot" slot="right" @click="tabsFrom.show2=true,params.day=true">
  14. <image class="img" src="@/assets/img/riLine-calendar-todo-line 1.svg" mode=""></image>
  15. </view> -->
  16. </u-navbar>
  17. <!-- 日期 -->
  18. <view class="date-box" v-if="false" >
  19. <view class="item" v-for="(item,i) in topDate"
  20. :class="{
  21. 'item-today':item.queryDate==FormData.queryDate
  22. }"
  23. @click="queryDate(item.queryDate,true)"
  24. :key="i">
  25. <view class="date">
  26. {{item.num}}
  27. </view>
  28. <view class="week">
  29. {{item.week}}
  30. </view>
  31. <view class="dot" v-if="item.today==0">
  32. </view>
  33. </view>
  34. <view class="item item-today" v-if="0">
  35. <view class="date">
  36. 26
  37. </view>
  38. <view class="week ">
  39. 今天
  40. </view>
  41. <view class="dot">
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <!-- 用电量 -->
  47. <view class="electricity-consumption">
  48. <view class="title">
  49. <view class="titleUnit">用电量统计(kW·h)</view>
  50. <view class="titleElectricity" v-if="electricity.id">
  51. <span class="spanradius" :class="{
  52. normal:electricity.online
  53. }" ></span>
  54. {{electricity.online?'电表在线':'电表离线'}}</view>
  55. </view>
  56. <view class="degree">
  57. <view class="item">
  58. <view class="item-text">
  59. 佰万
  60. </view>
  61. <view class="item-number" v-text="showTop[0]">
  62. 0
  63. </view>
  64. </view>
  65. <view class="item">
  66. <view class="item-text">
  67. 拾万
  68. </view>
  69. <view class="item-number" v-text="showTop[1]" >
  70. 0
  71. </view>
  72. </view>
  73. <view class="item">
  74. <view class="item-text">
  75. </view>
  76. <view class="item-number" v-text="showTop[2]">
  77. 0
  78. </view>
  79. </view>
  80. <view class="item">
  81. <view class="item-text">
  82. </view>
  83. <view class="item-number" v-text="showTop[3]">
  84. 0
  85. </view>
  86. </view>
  87. <view class="item">
  88. <view class="item-text">
  89. </view>
  90. <view class="item-number" v-text="showTop[4]">
  91. 0
  92. </view>
  93. </view>
  94. <view class="item">
  95. <view class="item-text">
  96. </view>
  97. <view class="item-number" v-text="showTop[5]">
  98. 7
  99. </view>
  100. </view>
  101. <view class="item">
  102. <view class="item-text">
  103. 1
  104. </view>
  105. <view class="item-number" v-text="showTop[6]">
  106. 7
  107. </view>
  108. </view>
  109. <view class="item">
  110. <view class="item-text">
  111. 0.1
  112. </view>
  113. <view class="item-number decimal" v-text="showTop[7]">
  114. 7
  115. </view>
  116. </view>
  117. </view>
  118. <view class="radio">
  119. <u-radio-group v-model="value" @change="radioGroupChange">
  120. <u-radio @change="radioChange" v-for="(item, index) in list" :key="index" :name="item.id"
  121. :disabled="item.disabled">
  122. {{item.name}}
  123. </u-radio>
  124. </u-radio-group>
  125. </view>
  126. </view>
  127. <!-- 各时段用电量 -->
  128. <view class="electricity-chart">
  129. <view class="title">
  130. <view class="text">
  131. <view class="icon-title">
  132. </view> 各时段用电量 (度)
  133. </view>
  134. <view @click="tabsFrom.show2=true,params.day=true" >
  135. {{queryDay}}<u-icon name="arrow-down"></u-icon>
  136. </view>
  137. </view>
  138. <view class="chart">
  139. <view id="pieEcharts" >
  140. </view>
  141. <view
  142. style="background: white; display: flex;justify-content: space-between;padding: 0 12px;" >
  143. <view>当日电量合计:{{sumQuantity}}度</view>
  144. <view>当日电费合计:{{sumFee}}元</view>
  145. </view>
  146. </view>
  147. </view>
  148. <!-- 设备信息 -->
  149. <view class="equipment-information">
  150. <view class="title">
  151. <view class="icon-title">
  152. </view>
  153. <view class="text">
  154. 设备信息
  155. </view>
  156. <view class="more" @click="equipmentInfosShow=true">
  157. 查看全部<u-icon name="arrow-right" size="24" color="#d4d4d4"></u-icon>
  158. </view>
  159. </view>
  160. <view class="infos">
  161. <view class="item" style="width: 30%;">
  162. <view class="item-title">
  163. 设备类型
  164. </view>
  165. <view class="item-value">
  166. {{meterDetail.deviceTypeN}}
  167. </view>
  168. </view>
  169. <view class="border">
  170. </view>
  171. <view class="item" style="width: 30%;">
  172. <view class="item-title">
  173. 设备编号
  174. </view>
  175. <view class="item-value">
  176. {{meterDetail.deviceNo}}
  177. </view>
  178. </view>
  179. <view class="border">
  180. </view>
  181. <view class="item" style="width: 30%;">
  182. <view class="item-title">
  183. 设备地址
  184. </view>
  185. <view class="item-value">
  186. {{meterDetail.installationAddressSimple}}
  187. </view>
  188. </view>
  189. </view>
  190. </view>
  191. <!-- 设备信息弹窗 -->
  192. <view class="equipment-popup">
  193. <u-popup v-model="equipmentInfosShow" mode="bottom" border-radius="12">
  194. <view class="content">
  195. <view class="headline">
  196. 设备信息
  197. </view>
  198. <view class="infos">
  199. <view class="item">
  200. <view class="item-title">
  201. 设备名称
  202. </view>
  203. <view class="item-value">
  204. {{meterDetail.name}}
  205. </view>
  206. </view>
  207. <view class="item">
  208. <view class="item-title">
  209. 设备类型
  210. </view>
  211. <view class="item-value">
  212. {{meterDetail.deviceTypeN}}
  213. </view>
  214. </view>
  215. <view class="item">
  216. <view class="item-title">
  217. 设备编号
  218. </view>
  219. <view class="item-value">
  220. {{meterDetail.deviceNo}}
  221. </view>
  222. </view>
  223. <view class="item">
  224. <view class="item-title">
  225. 产权单位
  226. </view>
  227. <view class="item-value">
  228. {{meterDetail.companyFullName}}
  229. </view>
  230. </view>
  231. <view class="item">
  232. <view class="item-title">
  233. 设备地址
  234. </view>
  235. <view class="item-value">
  236. <span>{{meterDetail.installationAddress}}</span>
  237. <image class="img" v-if="false" src="@/assets/img/riFill-navigation-fill 1.svg"></image>
  238. </view>
  239. </view>
  240. <view class="item">
  241. <view class="item-title">
  242. 地址简称
  243. </view>
  244. <view class="item-value">
  245. <span>{{meterDetail.installationAddressSimple}}</span>
  246. <image class="img" v-if="false" src="@/assets/img/riFill-navigation-fill 1.svg"></image>
  247. </view>
  248. </view>
  249. <view class="item">
  250. <view class="item-title">
  251. 使用单位
  252. </view>
  253. <view class="item-value">
  254. {{meterDetail.customer}}
  255. </view>
  256. </view>
  257. <view class="item">
  258. <view class="item-title">
  259. 上线时间
  260. </view>
  261. <view class="item-value">
  262. {{meterDetail.enablingTime}}
  263. </view>
  264. </view>
  265. </view>
  266. <button class="get" @click="equipmentInfosShow=false">知道了</button>
  267. </view>
  268. </u-popup>
  269. </view>
  270. </view>
  271. </template>
  272. <script>
  273. import {
  274. parseUnixTime,
  275. beforeTimeStamp,
  276. getWeek
  277. } from '@/apis/utils'
  278. import * as API from '@/apis/pagejs/tenantElectricityMeter.js'
  279. import * as echarts from "echarts";
  280. export default {
  281. data() {
  282. return {
  283. queryDay:'',
  284. title:"查询中",
  285. myChart:null,
  286. showTop: [0, 0, 0, 0, 0, 0, 0, 0],
  287. topDate:[],
  288. electricityMeterList:[],
  289. FormData:{
  290. },
  291. FormData2:{
  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. tabsFrom: {
  303. show1: false,
  304. show1Index:0,
  305. show2Index:'',
  306. show2: false,
  307. show1Text: "全部类型",
  308. show2Text: "全部时间",
  309. selector1:[
  310. {
  311. label: '全部类型',
  312. value: '',
  313. },
  314. {
  315. label: '线上充值',
  316. value: '1',
  317. },
  318. {
  319. label: '线下充值',
  320. value: '2',
  321. },
  322. ]
  323. },
  324. background: {
  325. backgroundColor: '#1677FF',
  326. },
  327. list: [
  328. {
  329. id:1,
  330. name: '当月用电量',
  331. disabled: false
  332. },
  333. {
  334. id:4,
  335. name: '当日用电量',
  336. disabled: false
  337. },
  338. {
  339. id:2,
  340. name: '上月用电量',
  341. disabled: false
  342. },
  343. {
  344. id:3,
  345. name: '当年用电量',
  346. disabled: false
  347. }, {
  348. id:0,
  349. name: '合计用电量',
  350. disabled: false
  351. }, {
  352. id:10,
  353. name: '指定月份',
  354. disabled: false
  355. }
  356. ],
  357. sumQuantity:0,
  358. sumFee:0,
  359. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  360. value: '2',
  361. oldvalue: '2',
  362. intervalId: null, // 用于存储间隔ID
  363. intervalReady: true, // 用于存储间隔ID
  364. electricity:{
  365. },
  366. meterDetail:{
  367. },
  368. equipmentInfosShow:false,
  369. };
  370. },
  371. onLoad() {
  372. this.endYear=new Date().getFullYear()
  373. this.FormData.queryDate=parseUnixTime(new Date(), '{y}-{m}-{d}')
  374. this.FormData2.queryDate=parseUnixTime(new Date(), '{y}-{m}-{d}')
  375. this.FormData.type=2
  376. this.getElectricityMeterList();
  377. // for(var i =4;i>=0;i--){
  378. // var time=new Date(beforeTimeStamp(i,new Date()));
  379. // this.topDate.push({
  380. // num:time.getDate(),
  381. // week:i==0?'今日':getWeek(time),
  382. // today:i,
  383. // queryDate:parseUnixTime(time, '{y}-{m}-{d}')
  384. // })
  385. // }
  386. // console.log( this.topDate)
  387. },
  388. beforeDestroy() {
  389. this.clearTimer(); // 组件销毁前清除定时器
  390. this.intervalReady=false;
  391. console.log( "组件销毁前清除定时器")
  392. },
  393. methods: {
  394. clearTimer() {
  395. if (this.intervalId) {
  396. clearInterval(this.intervalId); // 清除定时器
  397. this.intervalId = null; // 重置定时器ID
  398. }
  399. },
  400. startInterval(){
  401. this.clearTimer(); // 组件销毁前清除定时器
  402. this.intervalId = setInterval(() => {
  403. // 每隔5秒运行的代码
  404. console.log('这段代码每隔5秒运行一次');
  405. this.getTimeSlotStatistics(true)
  406. this.getElectricityStatistics(true)
  407. }, 60*1000);
  408. },
  409. titleCk(){
  410. if(this.electricityMeterList.length>1){
  411. this.tabsFrom.show1=true
  412. }
  413. },
  414. selector1confirm(e){
  415. var index=e[0]
  416. this.tabsFrom.show1Index=index
  417. this.tabsFrom.show1Text=this.tabsFrom.selector1[index].label
  418. this.title=this.tabsFrom.selector1[index].label
  419. this.FormData.meterId=this.tabsFrom.selector1[index].value
  420. this.FormData.queryDate=parseUnixTime(new Date(), '{y}-{m}-{d}')
  421. this.FormData2.meterId=this.tabsFrom.selector1[index].value
  422. this.FormData2.queryDate=parseUnixTime(new Date(), '{y}-{m}-{d}')
  423. this.FormData.type=2
  424. this.value="2"
  425. this.electricity=this.electricityMeterList[index]
  426. this.getMeterDetails()
  427. this.getTimeSlotStatistics()
  428. this.getElectricityStatistics()
  429. },
  430. queryDate(queryTime,day){
  431. if(day){
  432. this.FormData2.queryDate=queryTime;
  433. //this.FormData2.type =day?"9":"10"
  434. //this.value="-1"
  435. this.getTimeSlotStatistics()
  436. }else{
  437. this.FormData.queryDate=queryTime+"-01";
  438. this.FormData.type ="10"
  439. //this.value="-1"
  440. this.getElectricityStatistics()
  441. }
  442. },
  443. getElectricityStatistics(interval){
  444. // if(!this.intervalReady){
  445. // return
  446. // }
  447. if(!interval){
  448. uni.showLoading({
  449. title: "加载中",
  450. mask: true,
  451. })
  452. }
  453. var obj={
  454. ...this.FormData
  455. }
  456. // if(obj.type==10){
  457. // obj.queryDate+="-01"
  458. // }
  459. API.electricityStatistics(obj).then((response) => {
  460. if(!interval){
  461. uni.hideLoading();
  462. }
  463. this.showTop = [0, 0, 0, 0, 0, 0, 0, 0]
  464. var electricity = response.data.kwhMap.kwh+"";
  465. if (electricity) {
  466. var sz = electricity.split(".")
  467. var str1 = sz[0];
  468. var str2 = [];
  469. if (sz.length > 1) {
  470. str2 = sz[1];
  471. this.showTop[7] = str2[0];
  472. }
  473. var j = 0;
  474. for (var i in str1) {
  475. if (i != undefined) {
  476. this.showTop[6 - str1.length + j + 1] = str1[i]
  477. }
  478. j++;
  479. }
  480. this.$forceUpdate()
  481. }
  482. //this.electricityMeterList=response.data.meterList
  483. if(!interval){
  484. this.startInterval(); // 组件挂载后开始间隔
  485. }
  486. }).catch(error => {
  487. uni.showToast({
  488. title: error,
  489. icon: "none"
  490. })
  491. })
  492. },
  493. getMeterDetails(){
  494. API.meterDetails({
  495. meterId:this.FormData.meterId
  496. }).then((response) => {
  497. this.meterDetail=response.data.meter;
  498. }).catch(error => {
  499. uni.showToast({
  500. title: error,
  501. icon: "none"
  502. })
  503. })
  504. },
  505. getTimeSlotStatistics(interval){
  506. if(!interval){
  507. uni.showLoading({
  508. title: "加载中",
  509. mask: true,
  510. })
  511. }
  512. this.queryDay=parseUnixTime(new Date(this.FormData2.queryDate), '{y}年{m}月{d}日');
  513. API.timeSlotStatistics(this.FormData2).then((response) => {
  514. if(!interval){
  515. uni.hideLoading();
  516. }
  517. this.hourMap=response.data.hourMap
  518. this.sumQuantity=response.data.kwhMap.kwh
  519. this.sumFee=response.data.kwhMap.fee
  520. this.getPle(this.hourMap,interval)
  521. }).catch(error => {
  522. uni.showToast({
  523. title: error,
  524. icon: "none"
  525. })
  526. })
  527. },
  528. getPle(list,interval){
  529. if (!this.myChart) {
  530. this.myChart = echarts.init(document.getElementById('pieEcharts'),null,{
  531. width:uni.upx2px(700),height:uni.upx2px(480)
  532. });
  533. }
  534. if(!interval){
  535. this.myChart.clear();
  536. }
  537. var data1=[];
  538. var data2=[];
  539. for(var i in list){
  540. data1.push(i)
  541. data2.push(list[i].kwh)
  542. }
  543. var axisLabel={
  544. rotate:40,
  545. interval:0,
  546. textStyle: {
  547. color: "#333"
  548. }
  549. }
  550. if(data1.length<8){
  551. axisLabel={
  552. interval:0,
  553. textStyle: {
  554. color: "#333"
  555. },
  556. }
  557. }
  558. var headitemby=""
  559. var showkey = "";
  560. var option = {
  561. tooltip: {
  562. trigger: 'axis',
  563. formatter: (value) => {
  564. var name = value[0].name;
  565. var obj=list[name]
  566. var text= `<p>${name}</p>`
  567. if(obj.electricityPrice!=undefined){
  568. text+=`<p>电价:${obj.electricityPrice}元/度</p>`
  569. }
  570. if(obj.kwh!=undefined){
  571. text+=`<p>电量:${obj.kwh}度</p>`
  572. }
  573. if(obj.amount!=undefined){
  574. text+=` <p>电费:${obj.amount}元</p>`
  575. }
  576. return text
  577. }
  578. },
  579. grid: {
  580. top: 20,
  581. left: 0,
  582. right: 10,
  583. bottom: 20,
  584. containLabel: true
  585. },
  586. xAxis: {
  587. type: 'category',
  588. data: data1,
  589. axisLabel: axisLabel,
  590. },
  591. yAxis: {
  592. type: 'value',
  593. },
  594. series: [
  595. {
  596. name: '电量',
  597. data: data2,
  598. type: 'bar',
  599. label: {
  600. show: true,
  601. position: 'top',
  602. color: '#5C7BD9'
  603. }
  604. }
  605. ]
  606. }
  607. console.log(option)
  608. this.myChart.setOption(option);
  609. },
  610. getElectricityMeterList(){
  611. uni.showLoading({
  612. title: "加载中",
  613. mask: true,
  614. })
  615. API.electricityMeterList().then((response) => {
  616. uni.hideLoading();
  617. this.electricityMeterList=response.data.meterList
  618. if(this.electricityMeterList.length){
  619. this.electricity=this.electricityMeterList[0];
  620. this.FormData.meterId=this.electricityMeterList[0].id
  621. this.FormData2.meterId=this.electricityMeterList[0].id
  622. this.title=this.electricityMeterList[0].name
  623. // {
  624. // label: '全部类型',
  625. // value: '',
  626. // }
  627. this.tabsFrom.selector1=[]
  628. this.tabsFrom.selector1=this.electricityMeterList.map(item=>{
  629. return {
  630. label:item.name,
  631. value:item.id
  632. }
  633. })
  634. this.getMeterDetails();
  635. this.getTimeSlotStatistics()
  636. this.getElectricityStatistics()
  637. }else{
  638. uni.showModal({
  639. title:"提示",
  640. content:"未绑定电表,请联系管理员!",
  641. showCancel:false,
  642. success() {
  643. uni.navigateBack()
  644. }
  645. })
  646. }
  647. }).catch(error => {
  648. uni.showToast({
  649. title: error,
  650. icon: "none"
  651. })
  652. })
  653. },
  654. selector2confirm(e){
  655. this.tabsFrom.show2Text=e.year+"年"+e.month+"月"
  656. this.tabsFrom.show2Index=e.year+"-"+e.month
  657. if(e.day){
  658. this.tabsFrom.show2Text+=e.day+"日"
  659. this.tabsFrom.show2Index+='-'+e.day
  660. this.queryDate(this.tabsFrom.show2Index,true)
  661. }else{
  662. this.queryDate(this.tabsFrom.show2Index,false)
  663. }
  664. },
  665. selector2reset(e){
  666. console.log(e)
  667. this.tabsFrom.show2Text='全部时间'
  668. this.tabsFrom.show2Index='';
  669. if(this.params.day){
  670. this.FormData2.queryDate=parseUnixTime(new Date(), '{y}-{m}-{d}')
  671. this.getTimeSlotStatistics()
  672. }else{
  673. this.selector2cancel()
  674. }
  675. },
  676. // 选中某个单选框时,由radio时触发
  677. radioChange(e) {
  678. //console.log(e);
  679. },
  680. // 选中任一radio时,由radio-group触发
  681. selector2cancel(){
  682. this.value=this.oldvalue;
  683. },
  684. radioGroupChange(e) {
  685. console.log(e);
  686. this.FormData.type=e
  687. if(e==10){
  688. this.tabsFrom.show2=true
  689. this.params.day=false
  690. }else{
  691. this.oldvalue= this.FormData.type;
  692. this.getElectricityStatistics()
  693. }
  694. }
  695. }
  696. };
  697. </script>
  698. <style lang="scss" scoped>
  699. page {
  700. padding-bottom: 100rpx;
  701. }
  702. .background {
  703. background-color: rgba(22, 119, 255, 1);
  704. padding-bottom: 100rpx;
  705. /deep/.u-border-bottom:after {
  706. border: none;
  707. }
  708. .u-nav-slot {
  709. margin-right: 32rpx;
  710. .img {
  711. width: 48rpx;
  712. height: 48rpx;
  713. vertical-align: middle;
  714. }
  715. }
  716. }
  717. .background::after {
  718. content: '';
  719. position: absolute;
  720. width: 160%;
  721. height: 80px;
  722. background-color: rgba(22, 119, 255, 1);
  723. left: -30%;
  724. border-radius: 0 0 50% 50%;
  725. }
  726. // // 日期
  727. .date-box {
  728. display: flex;
  729. align-items: center;
  730. justify-content: space-between;
  731. margin: 24rpx 32rpx;
  732. .item {
  733. border-radius: 8px;
  734. background-color: rgba(255, 255, 255, 0.1);
  735. border: 1px solid rgba(255, 255, 255, 0.15);
  736. width: 120rpx;
  737. height: 120rpx;
  738. color: #fff;
  739. text-align: center;
  740. display: flex;
  741. flex-direction: column;
  742. justify-content: center;
  743. align-items: center;
  744. .date {
  745. font-size: 40rpx;
  746. }
  747. .dot{
  748. width: 10rpx;
  749. height: 10rpx;
  750. background-color: rgba(255,150,0,1);
  751. border-radius: 999px;
  752. bottom: -5rpx;
  753. left: 50%;
  754. transform: translateX(-50%);
  755. }
  756. }
  757. .item-today {
  758. background-color: rgba(255, 255, 255, 1);
  759. position: relative;
  760. .date {
  761. color: rgba(22, 119, 255, 1);
  762. }
  763. .week {
  764. color: rgba(16, 16, 16, 1);
  765. }
  766. }
  767. }
  768. // 用电量
  769. .electricity-consumption {
  770. background-color: #fff;
  771. padding: 40rpx 32rpx 0rpx;
  772. border-radius: 8px;
  773. margin: -88rpx 32rpx 0;
  774. position: relative;
  775. .title{
  776. display: flex;
  777. justify-content: space-between;
  778. .titleUnit{
  779. color: rgba(16,16,16,1);
  780. font-size: 36rpx;
  781. }
  782. .titleElectricity{
  783. color:#333333 100%;
  784. font-size: 28rpx;
  785. .spanradius{
  786. width: 20rpx;
  787. height: 20rpx;
  788. background-color: #FF7B00 ;
  789. color: #FF7B00 ;
  790. margin-right: 4rpx;
  791. border-radius: 50%; /* 将正方形变成圆形 */
  792. display: inline-block;
  793. }
  794. .normal{
  795. background-color: #00B962 ;
  796. color: #00B962 ;
  797. }
  798. }
  799. }
  800. .degree{
  801. display: flex;
  802. margin-top: 32rpx;
  803. .item{
  804. margin-right: 6rpx;
  805. text-align: center;
  806. .item-text{
  807. color: rgba(16,16,16,1);
  808. }
  809. .item-number{
  810. margin-top: 24rpx;
  811. width: 72rpx;
  812. height: 96rpx;
  813. background-color: rgba(16,16,16,1);
  814. color: #fff;
  815. font-size: 72rpx;
  816. }
  817. .decimal{
  818. background-color: #900005;
  819. }
  820. }
  821. }
  822. // .tab {
  823. // width: 240rpx;
  824. // height: 0;
  825. // border-width: 0px 48rpx 72rpx 0px;
  826. // border-radius: 8px 8px 0 0;
  827. // border-style: none solid solid none;
  828. // border-color: transparent transparent #fff;
  829. // position: absolute;
  830. // top: -72rpx;
  831. // left: 0rpx;
  832. // right: 0rpx;
  833. // color: #101010;
  834. // color: rgba(16, 16, 16, 1);
  835. // text-align: center;
  836. // line-height: 72rpx;
  837. // z-index: 999;
  838. // text-indent: 16rpx;
  839. // }
  840. // .tab2 {
  841. // width: 240rpx;
  842. // height: 0;
  843. // border-width: 0px 48rpx 72rpx 0px;
  844. // border-radius: 8px 8px 0 0;
  845. // border-style: none solid solid none;
  846. // border-color: transparent transparent #D4DBE4;
  847. // position: absolute;
  848. // top: -72rpx;
  849. // left: 210rpx;
  850. // right: 0rpx;
  851. // color: #777777;
  852. // text-align: center;
  853. // line-height: 72rpx;
  854. // text-indent: 16rpx;
  855. // }
  856. .radio {
  857. margin-top: 24rpx;
  858. /deep/.u-radio__label {
  859. font-size: 24rpx;
  860. margin-right:0;
  861. }
  862. /deep/.u-radio {
  863. margin-bottom: 16px;
  864. width: 200rpx !important;
  865. }
  866. }
  867. }
  868. //各时段用电量
  869. .electricity-chart {
  870. margin: 24rpx 32rpx;
  871. padding: 40rpx 0rpx;
  872. background-color: #fff;
  873. border-radius: 8px;
  874. .title {
  875. display: flex;
  876. align-items: center;
  877. justify-content: space-between;
  878. padding: 0 12rpx;
  879. margin-bottom: 40rpx;
  880. .icon {
  881. width: 36rpx;
  882. height: 36rpx;
  883. background-color: rgba(22, 119, 255, 1);
  884. border: 6px solid rgba(182, 212, 255, 1);
  885. border-radius: 100px;
  886. }
  887. .text {
  888. display: flex;
  889. align-items: center;
  890. color: rgba(51, 51, 51, 1);
  891. font-size: 36rpx;
  892. margin-left: 16rpx;
  893. }
  894. }
  895. .chart {
  896. width: 100%;
  897. //height: 440rpx;
  898. .img {
  899. width: 100%;
  900. height: 440rpx;
  901. }
  902. }
  903. }
  904. // 设备信息弹窗
  905. .equipment-popup {
  906. .content {
  907. padding: 32rpx;
  908. .headline {
  909. color: rgba(16, 16, 16, 1);
  910. font-size: 36rpx;
  911. text-align: center;
  912. font-weight: bold;
  913. margin-bottom: 24rpx;
  914. }
  915. .infos {
  916. padding-bottom: 100rpx;
  917. .item:last-of-type {
  918. border: none;
  919. }
  920. .item {
  921. display: flex;
  922. align-items: center;
  923. line-height: 48rpx;
  924. padding: 24rpx 0;
  925. border-bottom: 1px solid #cccccc;
  926. .item-title {
  927. color: rgba(51, 51, 51, 1);
  928. width: 200rpx;
  929. }
  930. .item-value {
  931. color: #666666;
  932. flex: 1;
  933. margin-left: 16rpx;
  934. display: flex;
  935. align-items: center;
  936. justify-content: space-between;
  937. .img{
  938. width: 32rpx;
  939. height: 32rpx;
  940. transform: rotate(90deg);
  941. margin-left: 96rpx;
  942. }
  943. }
  944. }
  945. }
  946. .get {
  947. height: 80rpx;
  948. line-height: 80rpx;
  949. border-radius: 4px;
  950. background-color: rgba(22, 119, 255, 1);
  951. color: rgba(255, 255, 255, 1);
  952. font-size: 32rpx;
  953. }
  954. }
  955. }
  956. // 异常
  957. .abnormal {
  958. margin: 24rpx 32rpx;
  959. padding: 40rpx 32rpx;
  960. background-color: #fff;
  961. border-radius: 8px;
  962. .headline {
  963. display: flex;
  964. align-items: center;
  965. justify-content: space-between;
  966. }
  967. .title {
  968. display: flex;
  969. align-items: center;
  970. .icon {
  971. width: 36rpx;
  972. height: 36rpx;
  973. background-color: rgba(22, 119, 255, 1);
  974. border: 6px solid rgba(182, 212, 255, 1);
  975. border-radius: 100px;
  976. }
  977. .text {
  978. color: rgba(51, 51, 51, 1);
  979. font-size: 36rpx;
  980. margin-left: 16rpx;
  981. }
  982. }
  983. .more {
  984. color: #838383;
  985. font-size: 24rpx
  986. }
  987. .details {
  988. margin-top: 40rpx;
  989. .item {
  990. display: flex;
  991. align-items: center;
  992. justify-content: space-between;
  993. margin-top: 32rpx;
  994. .name {
  995. color: rgba(51, 51, 51, 1);
  996. }
  997. .time {
  998. color: rgba(119, 119, 119, 1);
  999. font-size: 24rpx;
  1000. }
  1001. }
  1002. }
  1003. }
  1004. // 能源监测
  1005. .energy-inspection,.data-analysis {
  1006. margin: 24rpx 32rpx;
  1007. padding: 40rpx 32rpx;
  1008. background-color: #fff;
  1009. border-radius: 8px;
  1010. .title {
  1011. display: flex;
  1012. align-items: center;
  1013. .text {
  1014. color: rgba(51, 51, 51, 1);
  1015. font-size: 36rpx;
  1016. margin-left: 16rpx;
  1017. }
  1018. }
  1019. .grid {
  1020. .icon {
  1021. width: 128rpx;
  1022. height: 128rpx;
  1023. border-radius: 12px;
  1024. background-color: rgba(35, 186, 178, 1);
  1025. display: flex;
  1026. align-items: center;
  1027. justify-content: center;
  1028. margin-bottom: 16rpx;
  1029. .img {
  1030. width: 80rpx;
  1031. height: 80rpx;
  1032. }
  1033. }
  1034. .icon2{
  1035. background-color: rgba(42,186,72,1);
  1036. }
  1037. .icon3{
  1038. background-color: rgba(78,96,246,1);
  1039. }
  1040. .icon4{
  1041. background-color: rgba(22,119,255,1);
  1042. }
  1043. .icon5{
  1044. background-color: rgba(35,186,178,1);
  1045. }
  1046. .icon6{
  1047. background-color: rgba(42,186,72,1);
  1048. }
  1049. .icon7{
  1050. background-color: rgba(22,119,255,1);
  1051. }
  1052. .icon8{
  1053. background-color: rgba(35,186,178,1);
  1054. }
  1055. .grid-text {
  1056. color: #333333;
  1057. }
  1058. }
  1059. }
  1060. .icon-title{
  1061. width: 36rpx;
  1062. height: 36rpx;
  1063. background-color: rgba(182, 212, 255, 1);
  1064. border: 6px solid rgba(22, 119, 255, 1);
  1065. border-radius: 100px;
  1066. }
  1067. .equipment-information {
  1068. margin: 24rpx 32rpx;
  1069. padding: 40rpx 0rpx;
  1070. background-color: #fff;
  1071. border-radius: 8px;
  1072. .title {
  1073. display: flex;
  1074. align-items: center;
  1075. padding: 0 32rpx;
  1076. margin-bottom: 40rpx;
  1077. .text {
  1078. display: flex;
  1079. align-items: center;
  1080. color: rgba(51, 51, 51, 1);
  1081. font-size: 36rpx;
  1082. margin-left: 16rpx;
  1083. font-weight: bold;
  1084. }
  1085. .date {
  1086. margin-left: auto;
  1087. }
  1088. .more {
  1089. color: #838383;
  1090. font-size: 24rpx;
  1091. margin-left: auto;
  1092. }
  1093. }
  1094. .chart {
  1095. width: 100%;
  1096. height: 440rpx;
  1097. .img {
  1098. width: 100%;
  1099. height: 440rpx;
  1100. }
  1101. }
  1102. .infos {
  1103. padding: 0 32rpx;
  1104. display: flex;
  1105. justify-content: space-between;
  1106. text-align: center;
  1107. .border {
  1108. margin: auto 0;
  1109. height: 70rpx;
  1110. width: 2rpx;
  1111. background-color: rgba(204, 204, 204, 1);
  1112. ;
  1113. }
  1114. .item-title {
  1115. color: rgba(119, 119, 119, 1);
  1116. }
  1117. .item-value {
  1118. color: rgba(16, 16, 16, 1);
  1119. font-size: 32rpx;
  1120. margin-top: 16rpx;
  1121. }
  1122. }
  1123. }
  1124. </style>