electronicMonitoring.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979
  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 dataIndex = value[0].dataIndex;
  417. var name2=''
  418. if(dataIndex+1==data1.length){
  419. name2="24:00"
  420. }else{
  421. name2=data1[dataIndex+1];
  422. }
  423. var name = value[0].name;
  424. var obj=this.hourMap[name]
  425. var text= `<p>${name}</p>`
  426. if(data1.length<8){
  427. text= `<p>${name}-${name2}</p>`
  428. }
  429. if(obj.electricityPrice!=undefined){
  430. text+=`<p>电价:${obj.electricityPrice}元/度</p>`
  431. }
  432. if(obj.kwh!=undefined){
  433. text+=`用电量:${obj.kwh}度`
  434. }
  435. if(obj.amount!=undefined){
  436. text+=` <p>电费:${obj.amount}元</p>`
  437. }
  438. return text
  439. }
  440. },
  441. grid: {
  442. top: '6%',
  443. left: 0,
  444. right: 40,
  445. bottom: '8%',
  446. containLabel: true
  447. },
  448. xAxis: {
  449. type: 'category',
  450. data: data1,
  451. axisLabel: axisLabel,
  452. },
  453. yAxis: {
  454. type: 'value',
  455. },
  456. series: [
  457. {
  458. name: '电量',
  459. data: data2,
  460. type: 'bar'
  461. }
  462. ]
  463. }
  464. console.log(option)
  465. this.myChart.setOption(option);
  466. },
  467. getElectricityMeterList(){
  468. uni.showLoading({
  469. title: "加载中",
  470. mask: true,
  471. })
  472. API.electricityMeterList().then((response) => {
  473. uni.hideLoading();
  474. this.electricityMeterList=response.data.meterList
  475. if(this.electricityMeterList.length){
  476. this.FormData.meterId=this.electricityMeterList[0].id
  477. this.FormData2.meterId=this.electricityMeterList[0].id
  478. this.title=this.electricityMeterList[0].name
  479. // {
  480. // label: '全部类型',
  481. // value: '',
  482. // }
  483. this.tabsFrom.selector1=[]
  484. this.tabsFrom.selector1=this.electricityMeterList.map(item=>{
  485. return {
  486. label:item.name,
  487. value:item.id
  488. }
  489. })
  490. this.getTimeSlotStatistics()
  491. this.getElectricityStatistics()
  492. }else{
  493. uni.showModal({
  494. title:"提示",
  495. content:"未绑定电表,请联系管理员!",
  496. showCancel:false,
  497. success() {
  498. uni.navigateBack()
  499. }
  500. })
  501. }
  502. }).catch(error => {
  503. uni.showToast({
  504. title: error,
  505. icon: "none"
  506. })
  507. })
  508. },
  509. selector2confirm(e){
  510. this.tabsFrom.show2Text=e.year+"年"+e.month+"月"
  511. this.tabsFrom.show2Index=e.year+"-"+e.month
  512. if(e.day){
  513. this.tabsFrom.show2Text+=e.day+"日"
  514. this.tabsFrom.show2Index+='-'+e.day
  515. this.queryDate(this.tabsFrom.show2Index,true)
  516. }else{
  517. this.queryDate(this.tabsFrom.show2Index,false)
  518. }
  519. },
  520. selector2reset(e){
  521. console.log(e)
  522. this.tabsFrom.show2Text='全部时间'
  523. this.tabsFrom.show2Index='';
  524. this.selector2cancel()
  525. },
  526. // 选中某个单选框时,由radio时触发
  527. radioChange(e) {
  528. //console.log(e);
  529. },
  530. // 选中任一radio时,由radio-group触发
  531. selector2cancel(){
  532. this.value=this.oldvalue;
  533. },
  534. radioGroupChange(e) {
  535. console.log(e);
  536. this.FormData.type=e
  537. if(e==10){
  538. this.tabsFrom.show2=true
  539. this.params.day=false
  540. }else{
  541. this.oldvalue= this.FormData.type;
  542. this.getElectricityStatistics()
  543. }
  544. }
  545. }
  546. };
  547. </script>
  548. <style lang="scss" scoped>
  549. page {
  550. padding-bottom: 100rpx;
  551. }
  552. .background {
  553. background-color: rgba(22, 119, 255, 1);
  554. padding-bottom: 100rpx;
  555. /deep/.u-border-bottom:after {
  556. border: none;
  557. }
  558. .u-nav-slot {
  559. margin-right: 32rpx;
  560. .img {
  561. width: 48rpx;
  562. height: 48rpx;
  563. vertical-align: middle;
  564. }
  565. }
  566. }
  567. .background::after {
  568. content: '';
  569. position: absolute;
  570. width: 160%;
  571. height: 80px;
  572. background-color: rgba(22, 119, 255, 1);
  573. left: -30%;
  574. border-radius: 0 0 50% 50%;
  575. }
  576. // // 日期
  577. .date-box {
  578. display: flex;
  579. align-items: center;
  580. justify-content: space-between;
  581. margin: 24rpx 32rpx;
  582. .item {
  583. border-radius: 8px;
  584. background-color: rgba(255, 255, 255, 0.1);
  585. border: 1px solid rgba(255, 255, 255, 0.15);
  586. width: 120rpx;
  587. height: 120rpx;
  588. color: #fff;
  589. text-align: center;
  590. display: flex;
  591. flex-direction: column;
  592. justify-content: center;
  593. align-items: center;
  594. .date {
  595. font-size: 40rpx;
  596. }
  597. .dot{
  598. width: 10rpx;
  599. height: 10rpx;
  600. background-color: rgba(255,150,0,1);
  601. border-radius: 999px;
  602. bottom: -5rpx;
  603. left: 50%;
  604. transform: translateX(-50%);
  605. }
  606. }
  607. .item-today {
  608. background-color: rgba(255, 255, 255, 1);
  609. position: relative;
  610. .date {
  611. color: rgba(22, 119, 255, 1);
  612. }
  613. .week {
  614. color: rgba(16, 16, 16, 1);
  615. }
  616. }
  617. }
  618. // 用电量
  619. .electricity-consumption {
  620. background-color: #fff;
  621. padding: 40rpx 32rpx 0rpx;
  622. border-radius: 8px;
  623. margin: -88rpx 32rpx 0;
  624. position: relative;
  625. .title{
  626. color: rgba(16,16,16,1);
  627. font-size: 36rpx;
  628. }
  629. .degree{
  630. display: flex;
  631. margin-top: 32rpx;
  632. .item{
  633. margin-right: 6rpx;
  634. text-align: center;
  635. .item-text{
  636. color: rgba(16,16,16,1);
  637. }
  638. .item-number{
  639. margin-top: 24rpx;
  640. width: 72rpx;
  641. height: 96rpx;
  642. background-color: rgba(16,16,16,1);
  643. color: #fff;
  644. font-size: 72rpx;
  645. }
  646. .decimal{
  647. background-color: #900005;
  648. }
  649. }
  650. }
  651. // .tab {
  652. // width: 240rpx;
  653. // height: 0;
  654. // border-width: 0px 48rpx 72rpx 0px;
  655. // border-radius: 8px 8px 0 0;
  656. // border-style: none solid solid none;
  657. // border-color: transparent transparent #fff;
  658. // position: absolute;
  659. // top: -72rpx;
  660. // left: 0rpx;
  661. // right: 0rpx;
  662. // color: #101010;
  663. // color: rgba(16, 16, 16, 1);
  664. // text-align: center;
  665. // line-height: 72rpx;
  666. // z-index: 999;
  667. // text-indent: 16rpx;
  668. // }
  669. // .tab2 {
  670. // width: 240rpx;
  671. // height: 0;
  672. // border-width: 0px 48rpx 72rpx 0px;
  673. // border-radius: 8px 8px 0 0;
  674. // border-style: none solid solid none;
  675. // border-color: transparent transparent #D4DBE4;
  676. // position: absolute;
  677. // top: -72rpx;
  678. // left: 210rpx;
  679. // right: 0rpx;
  680. // color: #777777;
  681. // text-align: center;
  682. // line-height: 72rpx;
  683. // text-indent: 16rpx;
  684. // }
  685. .radio {
  686. margin-top: 24rpx;
  687. /deep/.u-radio__label {
  688. font-size: 24rpx
  689. }
  690. /deep/.u-radio {
  691. margin-bottom: 16px;
  692. width: 200rpx !important;
  693. }
  694. }
  695. }
  696. //各时段用电量
  697. .electricity-chart {
  698. margin: 24rpx 32rpx;
  699. padding: 40rpx 0rpx;
  700. background-color: #fff;
  701. border-radius: 8px;
  702. .title {
  703. display: flex;
  704. align-items: center;
  705. justify-content: space-between;
  706. padding: 0 12rpx;
  707. margin-bottom: 40rpx;
  708. .icon {
  709. width: 36rpx;
  710. height: 36rpx;
  711. background-color: rgba(22, 119, 255, 1);
  712. border: 6px solid rgba(182, 212, 255, 1);
  713. border-radius: 100px;
  714. }
  715. .text {
  716. display: flex;
  717. align-items: center;
  718. color: rgba(51, 51, 51, 1);
  719. font-size: 36rpx;
  720. margin-left: 16rpx;
  721. }
  722. }
  723. .chart {
  724. width: 100%;
  725. //height: 440rpx;
  726. .img {
  727. width: 100%;
  728. height: 440rpx;
  729. }
  730. }
  731. }
  732. // 异常
  733. .abnormal {
  734. margin: 24rpx 32rpx;
  735. padding: 40rpx 32rpx;
  736. background-color: #fff;
  737. border-radius: 8px;
  738. .headline {
  739. display: flex;
  740. align-items: center;
  741. justify-content: space-between;
  742. }
  743. .title {
  744. display: flex;
  745. align-items: center;
  746. .icon {
  747. width: 36rpx;
  748. height: 36rpx;
  749. background-color: rgba(22, 119, 255, 1);
  750. border: 6px solid rgba(182, 212, 255, 1);
  751. border-radius: 100px;
  752. }
  753. .text {
  754. color: rgba(51, 51, 51, 1);
  755. font-size: 36rpx;
  756. margin-left: 16rpx;
  757. }
  758. }
  759. .more {
  760. color: #838383;
  761. font-size: 24rpx
  762. }
  763. .details {
  764. margin-top: 40rpx;
  765. .item {
  766. display: flex;
  767. align-items: center;
  768. justify-content: space-between;
  769. margin-top: 32rpx;
  770. .name {
  771. color: rgba(51, 51, 51, 1);
  772. }
  773. .time {
  774. color: rgba(119, 119, 119, 1);
  775. font-size: 24rpx;
  776. }
  777. }
  778. }
  779. }
  780. // 能源监测
  781. .energy-inspection,.data-analysis {
  782. margin: 24rpx 32rpx;
  783. padding: 40rpx 32rpx;
  784. background-color: #fff;
  785. border-radius: 8px;
  786. .title {
  787. display: flex;
  788. align-items: center;
  789. .icon {
  790. width: 36rpx;
  791. height: 36rpx;
  792. background-color: rgba(22, 119, 255, 1);
  793. border: 6px solid rgba(182, 212, 255, 1);
  794. border-radius: 100px;
  795. }
  796. .text {
  797. color: rgba(51, 51, 51, 1);
  798. font-size: 36rpx;
  799. margin-left: 16rpx;
  800. }
  801. }
  802. .grid {
  803. .icon {
  804. width: 128rpx;
  805. height: 128rpx;
  806. border-radius: 12px;
  807. background-color: rgba(35, 186, 178, 1);
  808. display: flex;
  809. align-items: center;
  810. justify-content: center;
  811. margin-bottom: 16rpx;
  812. .img {
  813. width: 80rpx;
  814. height: 80rpx;
  815. }
  816. }
  817. .icon2{
  818. background-color: rgba(42,186,72,1);
  819. }
  820. .icon3{
  821. background-color: rgba(78,96,246,1);
  822. }
  823. .icon4{
  824. background-color: rgba(22,119,255,1);
  825. }
  826. .icon5{
  827. background-color: rgba(35,186,178,1);
  828. }
  829. .icon6{
  830. background-color: rgba(42,186,72,1);
  831. }
  832. .icon7{
  833. background-color: rgba(22,119,255,1);
  834. }
  835. .icon8{
  836. background-color: rgba(35,186,178,1);
  837. }
  838. .grid-text {
  839. color: #333333;
  840. }
  841. }
  842. }
  843. </style>