electronicMonitoring.vue 19 KB

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