electronicMonitoring.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928
  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.getElectricityStatistics(true)
  270. }, 5000);
  271. },
  272. titleCk(){
  273. if(this.electricityMeterList.length>1){
  274. this.tabsFrom.show1=true
  275. }
  276. },
  277. selector1confirm(e){
  278. var index=e[0]
  279. this.tabsFrom.show1Index=index
  280. this.tabsFrom.show1Text=this.tabsFrom.selector1[index].label
  281. this.tabsFrom.title=this.tabsFrom.selector1[index].label
  282. this.FormData.meterId=this.tabsFrom.selector1[index].value
  283. this.FormData.queryDate=parseUnixTime(new Date(), '{y}-{m}-{d}')
  284. this.FormData2.meterId=this.tabsFrom.selector1[index].value
  285. this.FormData2.queryDate=parseUnixTime(new Date(), '{y}-{m}-{d}')
  286. this.FormData.type=1
  287. this.value="1"
  288. this.getTimeSlotStatistics()
  289. this.getElectricityStatistics()
  290. },
  291. queryDate(queryTime,day){
  292. if(day){
  293. this.FormData2.queryDate=queryTime;
  294. //this.FormData2.type =day?"9":"10"
  295. //this.value="-1"
  296. this.getTimeSlotStatistics()
  297. }else{
  298. this.FormData.queryDate=queryTime+"-01";
  299. this.FormData.type ="10"
  300. //this.value="-1"
  301. this.getElectricityStatistics()
  302. }
  303. },
  304. getElectricityStatistics(interval){
  305. // if(!this.intervalReady){
  306. // return
  307. // }
  308. if(!interval){
  309. uni.showLoading({
  310. title: "加载中",
  311. mask: true,
  312. })
  313. }
  314. var obj={
  315. ...this.FormData
  316. }
  317. // if(obj.type==10){
  318. // obj.queryDate+="-01"
  319. // }
  320. API.electricityStatistics(obj).then((response) => {
  321. if(!interval){
  322. uni.hideLoading();
  323. }
  324. this.showTop = [0, 0, 0, 0, 0, 0, 0, 0]
  325. var electricity = response.data.kwhMap.kwh+"";
  326. if (electricity) {
  327. var sz = electricity.split(".")
  328. var str1 = sz[0];
  329. var str2 = [];
  330. if (sz.length > 1) {
  331. str2 = sz[1];
  332. this.showTop[7] = str2[0];
  333. }
  334. var j = 0;
  335. for (var i in str1) {
  336. if (i != undefined) {
  337. this.showTop[6 - str1.length + j + 1] = str1[i]
  338. }
  339. j++;
  340. }
  341. this.$forceUpdate()
  342. }
  343. //this.electricityMeterList=response.data.meterList
  344. if(!interval){
  345. this.startInterval(); // 组件挂载后开始间隔
  346. }
  347. }).catch(error => {
  348. uni.showToast({
  349. title: error,
  350. icon: "none"
  351. })
  352. })
  353. },
  354. getTimeSlotStatistics(){
  355. uni.showLoading({
  356. title: "加载中",
  357. mask: true,
  358. })
  359. this.queryDay=parseUnixTime(new Date(this.FormData2.queryDate), '{y}年{m}月{d}日');
  360. API.timeSlotStatistics(this.FormData2).then((response) => {
  361. uni.hideLoading();
  362. this.hourMap=response.data.hourMap
  363. this.sumQuantity=response.data.allKwh
  364. this.getPle(this.hourMap)
  365. }).catch(error => {
  366. uni.showToast({
  367. title: error,
  368. icon: "none"
  369. })
  370. })
  371. },
  372. getPle(list){
  373. if (!this.myChart) {
  374. this.myChart = echarts.init(document.getElementById('pieEcharts'),null,{
  375. width:uni.upx2px(700),height:uni.upx2px(480)
  376. });
  377. }
  378. this.myChart.clear();
  379. var data1=[];
  380. var data2=[];
  381. var sumQuantity=0
  382. for(var i in list){
  383. data1.push(i)
  384. data2.push(list[i])
  385. sumQuantity+=list[i]
  386. }
  387. //this.sumQuantity=sumQuantity.toFixed(2)
  388. var headitemby=""
  389. var showkey = "";
  390. var option = {
  391. tooltip: {
  392. trigger: 'axis'
  393. },
  394. grid: {
  395. top: '6%',
  396. left: '3%',
  397. right: '8%',
  398. bottom: '8%',
  399. containLabel: true
  400. },
  401. xAxis: {
  402. type: 'category',
  403. data: data1,
  404. axisLabel: {
  405. rotate:40,
  406. interval:0,
  407. textStyle: {
  408. color: "#333"
  409. }
  410. },
  411. },
  412. yAxis: {
  413. type: 'value',
  414. },
  415. series: [
  416. {
  417. name: '电量',
  418. data: data2,
  419. type: 'bar'
  420. }
  421. ]
  422. }
  423. console.log(option)
  424. this.myChart.setOption(option);
  425. },
  426. getElectricityMeterList(){
  427. uni.showLoading({
  428. title: "加载中",
  429. mask: true,
  430. })
  431. API.electricityMeterList().then((response) => {
  432. uni.hideLoading();
  433. this.electricityMeterList=response.data.meterList
  434. if(this.electricityMeterList.length){
  435. this.FormData.meterId=this.electricityMeterList[0].id
  436. this.FormData2.meterId=this.electricityMeterList[0].id
  437. this.title=this.electricityMeterList[0].name
  438. // {
  439. // label: '全部类型',
  440. // value: '',
  441. // }
  442. this.tabsFrom.selector1=[]
  443. this.tabsFrom.selector1=this.electricityMeterList.map(item=>{
  444. return {
  445. label:item.name,
  446. value:item.id
  447. }
  448. })
  449. this.getTimeSlotStatistics()
  450. this.getElectricityStatistics()
  451. }else{
  452. uni.showModal({
  453. title:"提示",
  454. content:"未绑定电表,请联系管理员!",
  455. showCancel:false,
  456. success() {
  457. uni.navigateBack()
  458. }
  459. })
  460. }
  461. }).catch(error => {
  462. uni.showToast({
  463. title: error,
  464. icon: "none"
  465. })
  466. })
  467. },
  468. selector2confirm(e){
  469. this.tabsFrom.show2Text=e.year+"年"+e.month+"月"
  470. this.tabsFrom.show2Index=e.year+"-"+e.month
  471. if(e.day){
  472. this.tabsFrom.show2Text+=e.day+"日"
  473. this.tabsFrom.show2Index+='-'+e.day
  474. this.queryDate(this.tabsFrom.show2Index,true)
  475. }else{
  476. this.queryDate(this.tabsFrom.show2Index,false)
  477. }
  478. },
  479. selector2reset(e){
  480. console.log(e)
  481. this.tabsFrom.show2Text='全部时间'
  482. this.tabsFrom.show2Index='';
  483. this.selector2cancel()
  484. },
  485. // 选中某个单选框时,由radio时触发
  486. radioChange(e) {
  487. //console.log(e);
  488. },
  489. // 选中任一radio时,由radio-group触发
  490. selector2cancel(){
  491. this.value=this.oldvalue;
  492. },
  493. radioGroupChange(e) {
  494. console.log(e);
  495. this.FormData.type=e
  496. if(e==10){
  497. this.tabsFrom.show2=true
  498. this.params.day=false
  499. }else{
  500. this.oldvalue= this.FormData.type;
  501. this.getElectricityStatistics()
  502. }
  503. }
  504. }
  505. };
  506. </script>
  507. <style lang="scss" scoped>
  508. page {
  509. padding-bottom: 100rpx;
  510. }
  511. .background {
  512. background-color: rgba(22, 119, 255, 1);
  513. padding-bottom: 100rpx;
  514. /deep/.u-border-bottom:after {
  515. border: none;
  516. }
  517. .u-nav-slot {
  518. margin-right: 32rpx;
  519. .img {
  520. width: 48rpx;
  521. height: 48rpx;
  522. vertical-align: middle;
  523. }
  524. }
  525. }
  526. .background::after {
  527. content: '';
  528. position: absolute;
  529. width: 160%;
  530. height: 80px;
  531. background-color: rgba(22, 119, 255, 1);
  532. left: -30%;
  533. border-radius: 0 0 50% 50%;
  534. }
  535. // // 日期
  536. .date-box {
  537. display: flex;
  538. align-items: center;
  539. justify-content: space-between;
  540. margin: 24rpx 32rpx;
  541. .item {
  542. border-radius: 8px;
  543. background-color: rgba(255, 255, 255, 0.1);
  544. border: 1px solid rgba(255, 255, 255, 0.15);
  545. width: 120rpx;
  546. height: 120rpx;
  547. color: #fff;
  548. text-align: center;
  549. display: flex;
  550. flex-direction: column;
  551. justify-content: center;
  552. align-items: center;
  553. .date {
  554. font-size: 40rpx;
  555. }
  556. .dot{
  557. width: 10rpx;
  558. height: 10rpx;
  559. background-color: rgba(255,150,0,1);
  560. border-radius: 999px;
  561. bottom: -5rpx;
  562. left: 50%;
  563. transform: translateX(-50%);
  564. }
  565. }
  566. .item-today {
  567. background-color: rgba(255, 255, 255, 1);
  568. position: relative;
  569. .date {
  570. color: rgba(22, 119, 255, 1);
  571. }
  572. .week {
  573. color: rgba(16, 16, 16, 1);
  574. }
  575. }
  576. }
  577. // 用电量
  578. .electricity-consumption {
  579. background-color: #fff;
  580. padding: 40rpx 32rpx 0rpx;
  581. border-radius: 8px;
  582. margin: -88rpx 32rpx 0;
  583. position: relative;
  584. .title{
  585. color: rgba(16,16,16,1);
  586. font-size: 36rpx;
  587. }
  588. .degree{
  589. display: flex;
  590. margin-top: 32rpx;
  591. .item{
  592. margin-right: 6rpx;
  593. text-align: center;
  594. .item-text{
  595. color: rgba(16,16,16,1);
  596. }
  597. .item-number{
  598. margin-top: 24rpx;
  599. width: 72rpx;
  600. height: 96rpx;
  601. background-color: rgba(16,16,16,1);
  602. color: #fff;
  603. font-size: 72rpx;
  604. }
  605. .decimal{
  606. background-color: #900005;
  607. }
  608. }
  609. }
  610. // .tab {
  611. // width: 240rpx;
  612. // height: 0;
  613. // border-width: 0px 48rpx 72rpx 0px;
  614. // border-radius: 8px 8px 0 0;
  615. // border-style: none solid solid none;
  616. // border-color: transparent transparent #fff;
  617. // position: absolute;
  618. // top: -72rpx;
  619. // left: 0rpx;
  620. // right: 0rpx;
  621. // color: #101010;
  622. // color: rgba(16, 16, 16, 1);
  623. // text-align: center;
  624. // line-height: 72rpx;
  625. // z-index: 999;
  626. // text-indent: 16rpx;
  627. // }
  628. // .tab2 {
  629. // width: 240rpx;
  630. // height: 0;
  631. // border-width: 0px 48rpx 72rpx 0px;
  632. // border-radius: 8px 8px 0 0;
  633. // border-style: none solid solid none;
  634. // border-color: transparent transparent #D4DBE4;
  635. // position: absolute;
  636. // top: -72rpx;
  637. // left: 210rpx;
  638. // right: 0rpx;
  639. // color: #777777;
  640. // text-align: center;
  641. // line-height: 72rpx;
  642. // text-indent: 16rpx;
  643. // }
  644. .radio {
  645. margin-top: 24rpx;
  646. /deep/.u-radio__label {
  647. font-size: 24rpx
  648. }
  649. /deep/.u-radio {
  650. margin-bottom: 16px;
  651. width: 200rpx !important;
  652. }
  653. }
  654. }
  655. //各时段用电量
  656. .electricity-chart {
  657. margin: 24rpx 32rpx;
  658. padding: 40rpx 0rpx;
  659. background-color: #fff;
  660. border-radius: 8px;
  661. .title {
  662. display: flex;
  663. align-items: center;
  664. justify-content: space-between;
  665. padding: 0 12rpx;
  666. margin-bottom: 40rpx;
  667. .icon {
  668. width: 36rpx;
  669. height: 36rpx;
  670. background-color: rgba(22, 119, 255, 1);
  671. border: 6px solid rgba(182, 212, 255, 1);
  672. border-radius: 100px;
  673. }
  674. .text {
  675. display: flex;
  676. align-items: center;
  677. color: rgba(51, 51, 51, 1);
  678. font-size: 36rpx;
  679. margin-left: 16rpx;
  680. }
  681. }
  682. .chart {
  683. width: 100%;
  684. //height: 440rpx;
  685. .img {
  686. width: 100%;
  687. height: 440rpx;
  688. }
  689. }
  690. }
  691. // 异常
  692. .abnormal {
  693. margin: 24rpx 32rpx;
  694. padding: 40rpx 32rpx;
  695. background-color: #fff;
  696. border-radius: 8px;
  697. .headline {
  698. display: flex;
  699. align-items: center;
  700. justify-content: space-between;
  701. }
  702. .title {
  703. display: flex;
  704. align-items: center;
  705. .icon {
  706. width: 36rpx;
  707. height: 36rpx;
  708. background-color: rgba(22, 119, 255, 1);
  709. border: 6px solid rgba(182, 212, 255, 1);
  710. border-radius: 100px;
  711. }
  712. .text {
  713. color: rgba(51, 51, 51, 1);
  714. font-size: 36rpx;
  715. margin-left: 16rpx;
  716. }
  717. }
  718. .more {
  719. color: #838383;
  720. font-size: 24rpx
  721. }
  722. .details {
  723. margin-top: 40rpx;
  724. .item {
  725. display: flex;
  726. align-items: center;
  727. justify-content: space-between;
  728. margin-top: 32rpx;
  729. .name {
  730. color: rgba(51, 51, 51, 1);
  731. }
  732. .time {
  733. color: rgba(119, 119, 119, 1);
  734. font-size: 24rpx;
  735. }
  736. }
  737. }
  738. }
  739. // 能源监测
  740. .energy-inspection,.data-analysis {
  741. margin: 24rpx 32rpx;
  742. padding: 40rpx 32rpx;
  743. background-color: #fff;
  744. border-radius: 8px;
  745. .title {
  746. display: flex;
  747. align-items: center;
  748. .icon {
  749. width: 36rpx;
  750. height: 36rpx;
  751. background-color: rgba(22, 119, 255, 1);
  752. border: 6px solid rgba(182, 212, 255, 1);
  753. border-radius: 100px;
  754. }
  755. .text {
  756. color: rgba(51, 51, 51, 1);
  757. font-size: 36rpx;
  758. margin-left: 16rpx;
  759. }
  760. }
  761. .grid {
  762. .icon {
  763. width: 128rpx;
  764. height: 128rpx;
  765. border-radius: 12px;
  766. background-color: rgba(35, 186, 178, 1);
  767. display: flex;
  768. align-items: center;
  769. justify-content: center;
  770. margin-bottom: 16rpx;
  771. .img {
  772. width: 80rpx;
  773. height: 80rpx;
  774. }
  775. }
  776. .icon2{
  777. background-color: rgba(42,186,72,1);
  778. }
  779. .icon3{
  780. background-color: rgba(78,96,246,1);
  781. }
  782. .icon4{
  783. background-color: rgba(22,119,255,1);
  784. }
  785. .icon5{
  786. background-color: rgba(35,186,178,1);
  787. }
  788. .icon6{
  789. background-color: rgba(42,186,72,1);
  790. }
  791. .icon7{
  792. background-color: rgba(22,119,255,1);
  793. }
  794. .icon8{
  795. background-color: rgba(35,186,178,1);
  796. }
  797. .grid-text {
  798. color: #333333;
  799. }
  800. }
  801. }
  802. </style>