electronicMonitoring.vue 26 KB

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