electronicMonitoring.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967
  1. <template>
  2. <view>
  3. <view class="background">
  4. <u-picker v-model="tabsFrom.show1" mode="selector" :range="tabsFrom.selector1" range-key="label" @confirm="selector1confirm" ></u-picker>
  5. <u-picker-select title="日期选择" v-model="tabsFrom.show2"
  6. :defaultTime="tabsFrom.show2Index" :endYear="endYear" @cancel="selector2cancel"
  7. mode="time" :params="params" :noselect="false" @confirm="selector2confirm" @reset="selector2reset" ></u-picker-select>
  8. <u-navbar :background="background"
  9. @titleCk="titleCk" :title-icon="electricityMeterList.length>1?'arrow-down':''"
  10. back-icon-color="#fff" :title="title" title-color="#fff">
  11. <!-- <view class="u-nav-slot" slot="right" @click="tabsFrom.show2=true,params.day=true">
  12. <image class="img" src="@/assets/img/riLine-calendar-todo-line 1.svg" mode=""></image>
  13. </view> -->
  14. </u-navbar>
  15. <!-- 日期 -->
  16. <view class="date-box" v-if="false" >
  17. <view class="item" v-for="(item,i) in topDate"
  18. :class="{
  19. 'item-today':item.queryDate==FormData.queryDate
  20. }"
  21. @click="queryDate(item.queryDate,true)"
  22. :key="i">
  23. <view class="date">
  24. {{item.num}}
  25. </view>
  26. <view class="week">
  27. {{item.week}}
  28. </view>
  29. <view class="dot" v-if="item.today==0">
  30. </view>
  31. </view>
  32. <view class="item item-today" v-if="0">
  33. <view class="date">
  34. 26
  35. </view>
  36. <view class="week ">
  37. 今天
  38. </view>
  39. <view class="dot">
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <!-- 用电量 -->
  45. <view class="electricity-consumption">
  46. <view class="title">
  47. 用电量统计(kW·h)
  48. </view>
  49. <view class="degree">
  50. <view class="item">
  51. <view class="item-text">
  52. 百万
  53. </view>
  54. <view class="item-number" v-text="showTop[0]">
  55. 0
  56. </view>
  57. </view>
  58. <view class="item">
  59. <view class="item-text">
  60. 拾万
  61. </view>
  62. <view class="item-number" v-text="showTop[1]" >
  63. 0
  64. </view>
  65. </view>
  66. <view class="item">
  67. <view class="item-text">
  68. </view>
  69. <view class="item-number" v-text="showTop[2]">
  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[3]">
  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[4]">
  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[5]">
  91. 7
  92. </view>
  93. </view>
  94. <view class="item">
  95. <view class="item-text">
  96. 1
  97. </view>
  98. <view class="item-number" v-text="showTop[6]">
  99. 7
  100. </view>
  101. </view>
  102. <view class="item">
  103. <view class="item-text">
  104. 0.1
  105. </view>
  106. <view class="item-number decimal" v-text="showTop[7]">
  107. 7
  108. </view>
  109. </view>
  110. </view>
  111. <view class="radio">
  112. <u-radio-group v-model="value" @change="radioGroupChange">
  113. <u-radio @change="radioChange" v-for="(item, index) in list" :key="index" :name="item.id"
  114. :disabled="item.disabled">
  115. {{item.name}}
  116. </u-radio>
  117. </u-radio-group>
  118. </view>
  119. </view>
  120. <!-- 各时段用电量 -->
  121. <view class="electricity-chart">
  122. <view class="title">
  123. <view class="text">
  124. <view class="icon">
  125. </view> 各时段用电量 (度)
  126. </view>
  127. <view @click="tabsFrom.show2=true,params.day=true" >
  128. {{queryDay}}<u-icon name="arrow-down"></u-icon>
  129. </view>
  130. </view>
  131. <view class="chart">
  132. <view id="pieEcharts" >
  133. </view>
  134. <view style="
  135. text-align: center;
  136. background: white;" >当日电量合计:{{sumQuantity}}度</view>
  137. </view>
  138. </view>
  139. </view>
  140. </template>
  141. <script>
  142. import {
  143. parseUnixTime,
  144. beforeTimeStamp,
  145. getWeek
  146. } from '@/apis/utils'
  147. import * as API from '@/apis/pagejs/tenantElectricityMeter.js'
  148. import * as echarts from "echarts";
  149. export default {
  150. data() {
  151. return {
  152. queryDay:'',
  153. title:"查询中",
  154. myChart:null,
  155. showTop: [0, 0, 0, 0, 0, 0, 0, 0],
  156. topDate:[],
  157. electricityMeterList:[],
  158. FormData:{
  159. },
  160. FormData2:{
  161. },
  162. endYear:'',
  163. params: {
  164. year: true,
  165. month: true,
  166. day: true,
  167. hour: false,
  168. minute: false,
  169. second: false
  170. },
  171. tabsFrom: {
  172. show1: false,
  173. show1Index:0,
  174. show2Index:'',
  175. show2: false,
  176. show1Text: "全部类型",
  177. show2Text: "全部时间",
  178. selector1:[
  179. {
  180. label: '全部类型',
  181. value: '',
  182. },
  183. {
  184. label: '线上充值',
  185. value: '1',
  186. },
  187. {
  188. label: '线下充值',
  189. value: '2',
  190. },
  191. ]
  192. },
  193. background: {
  194. backgroundColor: '#1677FF',
  195. },
  196. list: [
  197. {
  198. id:1,
  199. name: '当月用电量',
  200. disabled: false
  201. },
  202. {
  203. id:4,
  204. name: '当日用电量',
  205. disabled: false
  206. },
  207. {
  208. id:2,
  209. name: '上月用电量',
  210. disabled: false
  211. },
  212. {
  213. id:3,
  214. name: '当年用电量',
  215. disabled: false
  216. }, {
  217. id:0,
  218. name: '总用电量',
  219. disabled: false
  220. }, {
  221. id:10,
  222. name: '指定月份',
  223. disabled: false
  224. }
  225. ],
  226. sumQuantity:0,
  227. allKwh:0,
  228. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  229. value: '1',
  230. oldvalue: '1',
  231. intervalId: null, // 用于存储间隔ID
  232. intervalReady: true, // 用于存储间隔ID
  233. };
  234. },
  235. onLoad() {
  236. this.endYear=new Date().getFullYear()
  237. this.getElectricityMeterList();
  238. this.FormData.queryDate=parseUnixTime(new Date(), '{y}-{m}-{d}')
  239. this.FormData2.queryDate=parseUnixTime(new Date(), '{y}-{m}-{d}')
  240. this.FormData.type=1
  241. // for(var i =4;i>=0;i--){
  242. // var time=new Date(beforeTimeStamp(i,new Date()));
  243. // this.topDate.push({
  244. // num:time.getDate(),
  245. // week:i==0?'今日':getWeek(time),
  246. // today:i,
  247. // queryDate:parseUnixTime(time, '{y}-{m}-{d}')
  248. // })
  249. // }
  250. // console.log( this.topDate)
  251. },
  252. beforeDestroy() {
  253. this.clearTimer(); // 组件销毁前清除定时器
  254. this.intervalReady=false;
  255. console.log( "组件销毁前清除定时器")
  256. },
  257. methods: {
  258. clearTimer() {
  259. if (this.intervalId) {
  260. clearInterval(this.intervalId); // 清除定时器
  261. this.intervalId = null; // 重置定时器ID
  262. }
  263. },
  264. startInterval(){
  265. this.clearTimer(); // 组件销毁前清除定时器
  266. this.intervalId = setInterval(() => {
  267. // 每隔5秒运行的代码
  268. console.log('这段代码每隔5秒运行一次');
  269. this.getTimeSlotStatistics(true)
  270. this.getElectricityStatistics(true)
  271. }, 60*1000);
  272. },
  273. titleCk(){
  274. if(this.electricityMeterList.length>1){
  275. this.tabsFrom.show1=true
  276. }
  277. },
  278. selector1confirm(e){
  279. var index=e[0]
  280. this.tabsFrom.show1Index=index
  281. this.tabsFrom.show1Text=this.tabsFrom.selector1[index].label
  282. this.tabsFrom.title=this.tabsFrom.selector1[index].label
  283. this.FormData.meterId=this.tabsFrom.selector1[index].value
  284. this.FormData.queryDate=parseUnixTime(new Date(), '{y}-{m}-{d}')
  285. this.FormData2.meterId=this.tabsFrom.selector1[index].value
  286. this.FormData2.queryDate=parseUnixTime(new Date(), '{y}-{m}-{d}')
  287. this.FormData.type=1
  288. this.value="1"
  289. this.getTimeSlotStatistics()
  290. this.getElectricityStatistics()
  291. },
  292. queryDate(queryTime,day){
  293. if(day){
  294. this.FormData2.queryDate=queryTime;
  295. //this.FormData2.type =day?"9":"10"
  296. //this.value="-1"
  297. this.getTimeSlotStatistics()
  298. }else{
  299. this.FormData.queryDate=queryTime+"-01";
  300. this.FormData.type ="10"
  301. //this.value="-1"
  302. this.getElectricityStatistics()
  303. }
  304. },
  305. getElectricityStatistics(interval){
  306. // if(!this.intervalReady){
  307. // return
  308. // }
  309. if(!interval){
  310. uni.showLoading({
  311. title: "加载中",
  312. mask: true,
  313. })
  314. }
  315. var obj={
  316. ...this.FormData
  317. }
  318. // if(obj.type==10){
  319. // obj.queryDate+="-01"
  320. // }
  321. API.electricityStatistics(obj).then((response) => {
  322. if(!interval){
  323. uni.hideLoading();
  324. }
  325. this.showTop = [0, 0, 0, 0, 0, 0, 0, 0]
  326. var electricity = response.data.kwhMap.kwh+"";
  327. if (electricity) {
  328. var sz = electricity.split(".")
  329. var str1 = sz[0];
  330. var str2 = [];
  331. if (sz.length > 1) {
  332. str2 = sz[1];
  333. this.showTop[7] = str2[0];
  334. }
  335. var j = 0;
  336. for (var i in str1) {
  337. if (i != undefined) {
  338. this.showTop[6 - str1.length + j + 1] = str1[i]
  339. }
  340. j++;
  341. }
  342. this.$forceUpdate()
  343. }
  344. //this.electricityMeterList=response.data.meterList
  345. if(!interval){
  346. this.startInterval(); // 组件挂载后开始间隔
  347. }
  348. }).catch(error => {
  349. uni.showToast({
  350. title: error,
  351. icon: "none"
  352. })
  353. })
  354. },
  355. getTimeSlotStatistics(interval){
  356. if(!interval){
  357. uni.showLoading({
  358. title: "加载中",
  359. mask: true,
  360. })
  361. }
  362. this.queryDay=parseUnixTime(new Date(this.FormData2.queryDate), '{y}年{m}月{d}日');
  363. API.timeSlotStatistics(this.FormData2).then((response) => {
  364. if(!interval){
  365. uni.hideLoading();
  366. }
  367. this.hourMap=response.data.hourMap
  368. this.sumQuantity=response.data.allKwh
  369. this.getPle(this.hourMap,interval)
  370. }).catch(error => {
  371. uni.showToast({
  372. title: error,
  373. icon: "none"
  374. })
  375. })
  376. },
  377. getPle(list,interval){
  378. if (!this.myChart) {
  379. this.myChart = echarts.init(document.getElementById('pieEcharts'),null,{
  380. width:uni.upx2px(700),height:uni.upx2px(480)
  381. });
  382. }
  383. if(!interval){
  384. this.myChart.clear();
  385. }
  386. var data1=[];
  387. var data2=[];
  388. var sumQuantity=0
  389. for(var i in list){
  390. data1.push(i)
  391. data2.push(list[i].kwh)
  392. sumQuantity+=list[i]
  393. }
  394. var axisLabel={
  395. rotate:40,
  396. interval:0,
  397. textStyle: {
  398. color: "#333"
  399. }
  400. }
  401. if(data1.length<8){
  402. axisLabel={
  403. interval:0,
  404. textStyle: {
  405. color: "#333"
  406. },
  407. }
  408. }
  409. //this.sumQuantity=sumQuantity.toFixed(2)
  410. var headitemby=""
  411. var showkey = "";
  412. var option = {
  413. tooltip: {
  414. trigger: 'axis',
  415. formatter: (value) => {
  416. var name = value[0].name;
  417. var obj=list[name]
  418. var text= `<p>${name}</p>`
  419. if(obj.electricityPrice!=undefined){
  420. text+=`<p>电价:${obj.electricityPrice}元/度</p>`
  421. }
  422. if(obj.kwh!=undefined){
  423. text+=`用电量:${obj.kwh}度`
  424. }
  425. if(obj.amount!=undefined){
  426. text+=` <p>电费:${obj.amount}元</p>`
  427. }
  428. return text
  429. }
  430. },
  431. grid: {
  432. top: '6%',
  433. left: 0,
  434. right: 40,
  435. bottom: '8%',
  436. containLabel: true
  437. },
  438. xAxis: {
  439. type: 'category',
  440. data: data1,
  441. axisLabel: axisLabel,
  442. },
  443. yAxis: {
  444. type: 'value',
  445. },
  446. series: [
  447. {
  448. name: '电量',
  449. data: data2,
  450. type: 'bar'
  451. }
  452. ]
  453. }
  454. console.log(option)
  455. this.myChart.setOption(option);
  456. },
  457. getElectricityMeterList(){
  458. uni.showLoading({
  459. title: "加载中",
  460. mask: true,
  461. })
  462. API.electricityMeterList().then((response) => {
  463. uni.hideLoading();
  464. this.electricityMeterList=response.data.meterList
  465. if(this.electricityMeterList.length){
  466. this.FormData.meterId=this.electricityMeterList[0].id
  467. this.FormData2.meterId=this.electricityMeterList[0].id
  468. this.title=this.electricityMeterList[0].name
  469. // {
  470. // label: '全部类型',
  471. // value: '',
  472. // }
  473. this.tabsFrom.selector1=[]
  474. this.tabsFrom.selector1=this.electricityMeterList.map(item=>{
  475. return {
  476. label:item.name,
  477. value:item.id
  478. }
  479. })
  480. this.getTimeSlotStatistics()
  481. this.getElectricityStatistics()
  482. }else{
  483. uni.showModal({
  484. title:"提示",
  485. content:"未绑定电表,请联系管理员!",
  486. showCancel:false,
  487. success() {
  488. uni.navigateBack()
  489. }
  490. })
  491. }
  492. }).catch(error => {
  493. uni.showToast({
  494. title: error,
  495. icon: "none"
  496. })
  497. })
  498. },
  499. selector2confirm(e){
  500. this.tabsFrom.show2Text=e.year+"年"+e.month+"月"
  501. this.tabsFrom.show2Index=e.year+"-"+e.month
  502. if(e.day){
  503. this.tabsFrom.show2Text+=e.day+"日"
  504. this.tabsFrom.show2Index+='-'+e.day
  505. this.queryDate(this.tabsFrom.show2Index,true)
  506. }else{
  507. this.queryDate(this.tabsFrom.show2Index,false)
  508. }
  509. },
  510. selector2reset(e){
  511. console.log(e)
  512. this.tabsFrom.show2Text='全部时间'
  513. this.tabsFrom.show2Index='';
  514. this.selector2cancel()
  515. },
  516. // 选中某个单选框时,由radio时触发
  517. radioChange(e) {
  518. //console.log(e);
  519. },
  520. // 选中任一radio时,由radio-group触发
  521. selector2cancel(){
  522. this.value=this.oldvalue;
  523. },
  524. radioGroupChange(e) {
  525. console.log(e);
  526. this.FormData.type=e
  527. if(e==10){
  528. this.tabsFrom.show2=true
  529. this.params.day=false
  530. }else{
  531. this.oldvalue= this.FormData.type;
  532. this.getElectricityStatistics()
  533. }
  534. }
  535. }
  536. };
  537. </script>
  538. <style lang="scss" scoped>
  539. page {
  540. padding-bottom: 100rpx;
  541. }
  542. .background {
  543. background-color: rgba(22, 119, 255, 1);
  544. padding-bottom: 100rpx;
  545. /deep/.u-border-bottom:after {
  546. border: none;
  547. }
  548. .u-nav-slot {
  549. margin-right: 32rpx;
  550. .img {
  551. width: 48rpx;
  552. height: 48rpx;
  553. vertical-align: middle;
  554. }
  555. }
  556. }
  557. .background::after {
  558. content: '';
  559. position: absolute;
  560. width: 160%;
  561. height: 80px;
  562. background-color: rgba(22, 119, 255, 1);
  563. left: -30%;
  564. border-radius: 0 0 50% 50%;
  565. }
  566. // // 日期
  567. .date-box {
  568. display: flex;
  569. align-items: center;
  570. justify-content: space-between;
  571. margin: 24rpx 32rpx;
  572. .item {
  573. border-radius: 8px;
  574. background-color: rgba(255, 255, 255, 0.1);
  575. border: 1px solid rgba(255, 255, 255, 0.15);
  576. width: 120rpx;
  577. height: 120rpx;
  578. color: #fff;
  579. text-align: center;
  580. display: flex;
  581. flex-direction: column;
  582. justify-content: center;
  583. align-items: center;
  584. .date {
  585. font-size: 40rpx;
  586. }
  587. .dot{
  588. width: 10rpx;
  589. height: 10rpx;
  590. background-color: rgba(255,150,0,1);
  591. border-radius: 999px;
  592. bottom: -5rpx;
  593. left: 50%;
  594. transform: translateX(-50%);
  595. }
  596. }
  597. .item-today {
  598. background-color: rgba(255, 255, 255, 1);
  599. position: relative;
  600. .date {
  601. color: rgba(22, 119, 255, 1);
  602. }
  603. .week {
  604. color: rgba(16, 16, 16, 1);
  605. }
  606. }
  607. }
  608. // 用电量
  609. .electricity-consumption {
  610. background-color: #fff;
  611. padding: 40rpx 32rpx 0rpx;
  612. border-radius: 8px;
  613. margin: -88rpx 32rpx 0;
  614. position: relative;
  615. .title{
  616. color: rgba(16,16,16,1);
  617. font-size: 36rpx;
  618. }
  619. .degree{
  620. display: flex;
  621. margin-top: 32rpx;
  622. .item{
  623. margin-right: 6rpx;
  624. text-align: center;
  625. .item-text{
  626. color: rgba(16,16,16,1);
  627. }
  628. .item-number{
  629. margin-top: 24rpx;
  630. width: 72rpx;
  631. height: 96rpx;
  632. background-color: rgba(16,16,16,1);
  633. color: #fff;
  634. font-size: 72rpx;
  635. }
  636. .decimal{
  637. background-color: #900005;
  638. }
  639. }
  640. }
  641. // .tab {
  642. // width: 240rpx;
  643. // height: 0;
  644. // border-width: 0px 48rpx 72rpx 0px;
  645. // border-radius: 8px 8px 0 0;
  646. // border-style: none solid solid none;
  647. // border-color: transparent transparent #fff;
  648. // position: absolute;
  649. // top: -72rpx;
  650. // left: 0rpx;
  651. // right: 0rpx;
  652. // color: #101010;
  653. // color: rgba(16, 16, 16, 1);
  654. // text-align: center;
  655. // line-height: 72rpx;
  656. // z-index: 999;
  657. // text-indent: 16rpx;
  658. // }
  659. // .tab2 {
  660. // width: 240rpx;
  661. // height: 0;
  662. // border-width: 0px 48rpx 72rpx 0px;
  663. // border-radius: 8px 8px 0 0;
  664. // border-style: none solid solid none;
  665. // border-color: transparent transparent #D4DBE4;
  666. // position: absolute;
  667. // top: -72rpx;
  668. // left: 210rpx;
  669. // right: 0rpx;
  670. // color: #777777;
  671. // text-align: center;
  672. // line-height: 72rpx;
  673. // text-indent: 16rpx;
  674. // }
  675. .radio {
  676. margin-top: 24rpx;
  677. /deep/.u-radio__label {
  678. font-size: 24rpx
  679. }
  680. /deep/.u-radio {
  681. margin-bottom: 16px;
  682. width: 200rpx !important;
  683. }
  684. }
  685. }
  686. //各时段用电量
  687. .electricity-chart {
  688. margin: 24rpx 32rpx;
  689. padding: 40rpx 0rpx;
  690. background-color: #fff;
  691. border-radius: 8px;
  692. .title {
  693. display: flex;
  694. align-items: center;
  695. justify-content: space-between;
  696. padding: 0 12rpx;
  697. margin-bottom: 40rpx;
  698. .icon {
  699. width: 36rpx;
  700. height: 36rpx;
  701. background-color: rgba(22, 119, 255, 1);
  702. border: 6px solid rgba(182, 212, 255, 1);
  703. border-radius: 100px;
  704. }
  705. .text {
  706. display: flex;
  707. align-items: center;
  708. color: rgba(51, 51, 51, 1);
  709. font-size: 36rpx;
  710. margin-left: 16rpx;
  711. }
  712. }
  713. .chart {
  714. width: 100%;
  715. //height: 440rpx;
  716. .img {
  717. width: 100%;
  718. height: 440rpx;
  719. }
  720. }
  721. }
  722. // 异常
  723. .abnormal {
  724. margin: 24rpx 32rpx;
  725. padding: 40rpx 32rpx;
  726. background-color: #fff;
  727. border-radius: 8px;
  728. .headline {
  729. display: flex;
  730. align-items: center;
  731. justify-content: space-between;
  732. }
  733. .title {
  734. display: flex;
  735. align-items: center;
  736. .icon {
  737. width: 36rpx;
  738. height: 36rpx;
  739. background-color: rgba(22, 119, 255, 1);
  740. border: 6px solid rgba(182, 212, 255, 1);
  741. border-radius: 100px;
  742. }
  743. .text {
  744. color: rgba(51, 51, 51, 1);
  745. font-size: 36rpx;
  746. margin-left: 16rpx;
  747. }
  748. }
  749. .more {
  750. color: #838383;
  751. font-size: 24rpx
  752. }
  753. .details {
  754. margin-top: 40rpx;
  755. .item {
  756. display: flex;
  757. align-items: center;
  758. justify-content: space-between;
  759. margin-top: 32rpx;
  760. .name {
  761. color: rgba(51, 51, 51, 1);
  762. }
  763. .time {
  764. color: rgba(119, 119, 119, 1);
  765. font-size: 24rpx;
  766. }
  767. }
  768. }
  769. }
  770. // 能源监测
  771. .energy-inspection,.data-analysis {
  772. margin: 24rpx 32rpx;
  773. padding: 40rpx 32rpx;
  774. background-color: #fff;
  775. border-radius: 8px;
  776. .title {
  777. display: flex;
  778. align-items: center;
  779. .icon {
  780. width: 36rpx;
  781. height: 36rpx;
  782. background-color: rgba(22, 119, 255, 1);
  783. border: 6px solid rgba(182, 212, 255, 1);
  784. border-radius: 100px;
  785. }
  786. .text {
  787. color: rgba(51, 51, 51, 1);
  788. font-size: 36rpx;
  789. margin-left: 16rpx;
  790. }
  791. }
  792. .grid {
  793. .icon {
  794. width: 128rpx;
  795. height: 128rpx;
  796. border-radius: 12px;
  797. background-color: rgba(35, 186, 178, 1);
  798. display: flex;
  799. align-items: center;
  800. justify-content: center;
  801. margin-bottom: 16rpx;
  802. .img {
  803. width: 80rpx;
  804. height: 80rpx;
  805. }
  806. }
  807. .icon2{
  808. background-color: rgba(42,186,72,1);
  809. }
  810. .icon3{
  811. background-color: rgba(78,96,246,1);
  812. }
  813. .icon4{
  814. background-color: rgba(22,119,255,1);
  815. }
  816. .icon5{
  817. background-color: rgba(35,186,178,1);
  818. }
  819. .icon6{
  820. background-color: rgba(42,186,72,1);
  821. }
  822. .icon7{
  823. background-color: rgba(22,119,255,1);
  824. }
  825. .icon8{
  826. background-color: rgba(35,186,178,1);
  827. }
  828. .grid-text {
  829. color: #333333;
  830. }
  831. }
  832. }
  833. </style>