electronicMonitoring.vue 27 KB

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