electronicMonitoring.vue 26 KB

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