equipmentElectricity.vue 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357
  1. <template>
  2. <view>
  3. <view class="navbar-c">
  4. <view class="back" @click="backStatistics">
  5. <u-icon name="arrow-left" color="#101010" size="36"></u-icon>
  6. </view>
  7. <view class="title">
  8. 用电量(度)
  9. <image class="img" src="@/assets/img/refresh-line.svg" @click="getList(true)"></image>
  10. </view>
  11. </view>
  12. <u-select title="" v-model="tabsFrom.show1" :defaultValue="[current2]"
  13. :list="childList" value-name="id" label-name="name"
  14. @confirm="selector1confirm" >
  15. </u-select>
  16. <u-picker-select title="日期选择" v-model="tabsFrom.show2" :defaultTime="tabsFrom.show2Index" :endYear="endYear"
  17. mode="time" :params="params" :noselect="false" @confirm="selector2confirm" @cancel="selector2cancel"
  18. @reset="selector2reset"></u-picker-select>
  19. <!-- 标签 -->
  20. <view class="tabs-box" >
  21. <view class="tabs" :class="'tabs-len-'+merchantList1.length" v-show="companyList.length>1"
  22. :style="{width: companyList.length>3 ? '' : '100%'}">
  23. <u-tabs-one v-if="utabsone"
  24. :list="merchantList1" :is-scroll="false" inactive-color="#999999" active-color="#666666"
  25. :current="current" @change="change"></u-tabs-one>
  26. </view>
  27. <view class="more" @click="popShow=true" v-if="companyList.length >= 4">
  28. <u-icon name="arrow-down" color="#fff" size="40"></u-icon>
  29. </view>
  30. </view>
  31. <!-- 标签弹出层 -->
  32. <u-popup v-model="popShow" duration="10" mode="top" :negative-top="88" border-radius="16">
  33. <view class="popup-tabs">
  34. <view class="tabs">
  35. <u-tabs :list="merchantList1" :is-scroll="false" :current="current" @change="change"></u-tabs>
  36. </view>
  37. <view class="more">
  38. <u-icon name="arrow-up" color="#777777" size="40" @click="popShow=false"></u-icon>
  39. </view>
  40. </view>
  41. <view class="tabs-options">
  42. <view class="item" v-for="(item, index) in merchantList2" :key="index"
  43. @click="merchantChange(item,index)">
  44. {{item.name}}
  45. </view>
  46. </view>
  47. </u-popup>
  48. <view class="electronicMonitoring-title"
  49. @click="titleCk"
  50. v-if="childList&&childList.length>0" >
  51. <view>
  52. {{childListName}}
  53. </view>
  54. <view v-show="childList.length>1">
  55. <u-icon name="arrow-down" color="#fff"></u-icon>
  56. </view>
  57. </view>
  58. <!-- 全部标签 -->
  59. <view class="main" >
  60. <view class="item" v-for="(item, index) in kWhList" :key="item.index"
  61. @click="toElectronicMonitoring(item)">
  62. <view class="item-content">
  63. <view class="equipment">
  64. <view class="equipment1 ">
  65. {{replaceLastTwoWords(item.name)}}
  66. </view>
  67. <view class="equipment2">
  68. {{item.installationAddressSimple}}
  69. </view>
  70. <view class="state" v-if="!item.online">
  71. <view class="dot off-line"></view>
  72. <view class="text">离线</view>
  73. </view>
  74. <view class="state state2" v-else>
  75. <view class="dot on-line"></view>
  76. <view class="text">在线</view>
  77. </view>
  78. </view>
  79. <view class="electricity">
  80. <view class="electricity-item electricity-item-day">
  81. <view class="date">
  82. 今日
  83. </view>
  84. <view class="number">
  85. {{item.thisDayKwh}}
  86. </view>
  87. </view>
  88. <view class="electricity-item">
  89. <view class="date">
  90. 本月
  91. </view>
  92. <view class="number">
  93. {{item.thisMonthKwh}}
  94. </view>
  95. </view>
  96. <view class="electricity-item">
  97. <view class="date">
  98. 上月
  99. </view>
  100. <view class="number">
  101. {{item.lastMonthKwh}}
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. <view class="more">
  107. <u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  108. </view>
  109. </view>
  110. </view>
  111. <u-divider :isnone="kWhList.length==0" nonetext="暂无数据" border-color="#CFD2D5">已经到底了</u-divider>
  112. </view>
  113. </template>
  114. <script>
  115. import * as API from '@/apis/pagejs/index.js'
  116. import * as API2 from '@/apis/pagejs/energyManage.js'
  117. import * as echarts from 'echarts';
  118. import {
  119. parseUnixTime,
  120. beforeTimeStamp,
  121. getWeek
  122. } from '@/apis/utils'
  123. import TreeBody from '@/components/tree/tree-body.vue';
  124. import electronicMonitoring from '@/pages/equipmentDataMonitoring/electronicMonitoring.vue'
  125. export default {
  126. components: {
  127. TreeBody,electronicMonitoring
  128. },
  129. data() {
  130. return {
  131. codes:"",
  132. getHomePageManageReady:false,
  133. getHomePageManageshowLoading:false,
  134. companyList: [], // 商户
  135. merchantList1: [],
  136. merchantList2: [],
  137. myLineChart: null, // 图表
  138. myBarChart: null,
  139. myPieChart: null,
  140. homePageManageType: 2,
  141. homePageManageObj: {
  142. chargeKwh: 0,
  143. lostKwh: 0,
  144. parkKwh: 0,
  145. freeKwh:0,
  146. publicKwh:0,
  147. },
  148. meterList: [],
  149. meterListShow:{},
  150. queryDate: '',
  151. kWhList: [], //设备
  152. companyId: '',
  153. popShow: false,
  154. current: 0,
  155. allKWhList: [],
  156. companyKwhList: [],
  157. pageIndex: 1,
  158. recordsTotal: 0,
  159. windowHeight: '',
  160. checked:false,
  161. list: [{
  162. name: '上月',
  163. value: "2"
  164. },
  165. {
  166. name: '当月',
  167. value: "1"
  168. },
  169. {
  170. name: '今日',
  171. value: "4"
  172. }, {
  173. name: '当年',
  174. value: "3"
  175. }, {
  176. name: '合计',
  177. value: "0"
  178. },
  179. {
  180. name: '指定月份',
  181. value: "10"
  182. }
  183. ],
  184. endYear: '',
  185. params: {
  186. year: true,
  187. month: true,
  188. day: true,
  189. hour: false,
  190. minute: false,
  191. second: false
  192. },
  193. value: '2',
  194. clickType: -1,
  195. tabsFrom: {
  196. show1: false,
  197. show1Index: 0,
  198. show2Index: '',
  199. show2: false,
  200. show1Text: "全部类型",
  201. show2Text: "全部时间",
  202. },
  203. utabsone:true,
  204. //companyType:0,
  205. incomeExpenditureObj:{},
  206. opCompanyId: '',
  207. childList:[],
  208. companyListMain:[],
  209. current2:0,
  210. childInfo:{},
  211. companyInfo:{}
  212. }
  213. },
  214. onReady() {
  215. },
  216. computed:{
  217. childListName(){
  218. return this.childInfo.name;
  219. },
  220. companyType(){
  221. return this.companyInfo.type;
  222. }
  223. },
  224. onLoad(op) {
  225. this.endYear = new Date().getFullYear();
  226. this.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  227. if(op.companyId){
  228. this.opCompanyId=op.companyId
  229. this.companyId=op.companyId
  230. }
  231. else{
  232. this.getCompanyInfoList();
  233. }
  234. this.getList();
  235. },
  236. onReachBottom() {
  237. if (this.kWhList.length < this.recordsTotal) {
  238. this.myLoadmore();
  239. }
  240. },
  241. methods: {
  242. titleCk() {
  243. if(this.childList.length>1){
  244. this.tabsFrom.show1 = true
  245. }
  246. },
  247. selector1confirm(e) {
  248. //this.getHomePageKwh()
  249. console.log(e)
  250. this.companyId=e[0].value
  251. this.current2=e[0].i
  252. this.childInfo=this.childList[this.current2];
  253. uni.showLoading()
  254. this.merchantChangeApi()
  255. },
  256. companyIdSet(val,item){
  257. this.companyType= 0
  258. if(val&&item){
  259. this.companyType= item.type
  260. }else{
  261. if(!val){
  262. }else{
  263. var bl=false
  264. this.companyList.find(item=>{
  265. if(item.id==val){
  266. this.companyType= item.type;
  267. }
  268. })
  269. }
  270. }
  271. },
  272. switchBtnApiMethod(node,key){
  273. uni.showLoading({
  274. title: "加载中",
  275. mask: true,
  276. })
  277. API2.remoteSwitch({
  278. meterId:node.id,
  279. enabled:key
  280. }).then((res) => {
  281. uni.hideLoading();
  282. node.switchStatus=key
  283. }).catch(error => {
  284. uni.showToast({
  285. title: error,
  286. icon: "none"
  287. })
  288. })
  289. },
  290. switchBtnApi(node,key){
  291. uni.showModal({
  292. confirmColor:`${key?'#3CC51F':'red'}`,
  293. confirmText:`${key?'开启':'关闭'}`,
  294. content: `确认是否要"${key?'开启':'关闭'}"${this.replaceLastTwoWords(node.name)}`,
  295. title: "提示",
  296. success:res=> {
  297. if(res.confirm){
  298. this.switchBtnApiMethod(node,key);
  299. }
  300. }
  301. })
  302. console.log(node,key)
  303. },
  304. refreshList() {
  305. // if (this.current != 0) {
  306. // } else {
  307. // this.getCompanyInfoList();
  308. // }
  309. this.getList(true);
  310. },
  311. companyChange(item, index) {
  312. this.current = index + 1;
  313. this.companyId = item.id;
  314. //this.companyIdSet(this.companyId)
  315. this.getList(true);
  316. },
  317. getCompanyInfoList() {
  318. this.companyKwhList = [];
  319. API.deviceCompanyList().then((response) => {
  320. var list = response.data.companyInfoList;
  321. this.companyListMain=response.data.companyInfoList;
  322. if(list.length==1&&list[0].childList&&list[0].childList.length){
  323. list=list[0].childList
  324. }
  325. this.companyList = list;
  326. var mList1 = [];
  327. var mList2 = [];
  328. mList1.push({
  329. id: '',
  330. name: '全部'
  331. });
  332. for (var i = 0; i < list.length; i++) {
  333. if (i >= 3) {
  334. mList2.push(list[i]);
  335. } else {
  336. mList1.push(list[i]);
  337. }
  338. }
  339. this.merchantList1 = mList1;
  340. this.merchantList2 = mList2;
  341. this.companyId = mList1[0].id;
  342. //this.companyIdSet(this.companyId)
  343. //this.getList();
  344. }).catch(error => {
  345. uni.showToast({
  346. title: error,
  347. icon: "none"
  348. })
  349. })
  350. },
  351. myLoadmore() {
  352. this.pageIndex += 1;
  353. this.getList();
  354. },
  355. getList(bl) {
  356. uni.showLoading({
  357. title: "加载中",
  358. mask: true,
  359. })
  360. if (bl) {
  361. this.kWhList = [];
  362. this.pageIndex = 1;
  363. }
  364. var data = {
  365. pageIndex: this.pageIndex,
  366. pageSize: 20,
  367. companyId: this.companyId
  368. };
  369. API.homePageKwh(data).then((res) => {
  370. uni.hideLoading();
  371. this.kWhList = [
  372. ...this.kWhList,
  373. ...res.data.data
  374. ];
  375. this.recordsTotal = res.data.recordsTotal;
  376. }).catch(error => {
  377. uni.showToast({
  378. title: error,
  379. icon: "none"
  380. })
  381. })
  382. },
  383. getHomePageKwh(companyId) {
  384. },
  385. merchantChange(item, index) {
  386. if(this.current==0){
  387. this.current=1;
  388. }
  389. var m = company;
  390. var n = this.merchantList1[this.current];
  391. this.merchantList1[this.current] = m;
  392. this.merchantList2[index] = n;
  393. //this.$forceUpdate()
  394. this.utabsone=false
  395. this.companyId = company.id;
  396. this.companyInfo=company
  397. if(company.id!=''){
  398. this.childList=company.childList;
  399. if(this.childList&&this.childList.length){
  400. this.companyId = this.childList[0].id;
  401. this.childInfo=this.childList[0]
  402. }else{
  403. this.childList=[]
  404. this.companyId =company.id
  405. this.childInfo=company
  406. }
  407. }else{
  408. this.companyId =''
  409. }
  410. this.merchantChangeApi()
  411. this.popShow = false;
  412. },
  413. // 设备数据监测
  414. getHomePageManageChildMeter(item,bl) {
  415. // if(!bl){
  416. // uni.showLoading({
  417. // title: "加载中",
  418. // mask: true,
  419. // })
  420. // }
  421. API2.homePageManageChildMeter({
  422. parentMeterId:item.id,
  423. queryDate:this.queryDate,
  424. companyId: this.companyId,
  425. type: this.list[this.homePageManageType].value
  426. }).then((response) => {
  427. // if(!bl){
  428. // uni.hideLoading();
  429. // }
  430. // this.meterList = response.data.meterList;
  431. // if(!this.meterListShow.id){
  432. // this.meterListShow.id=1
  433. // this.recursionList(this.meterList)
  434. // }
  435. var childMeterList=response.data.childMeterList
  436. item.childMeterList=childMeterList
  437. if(!bl){
  438. for(var i in childMeterList){
  439. var obj=childMeterList[i]
  440. this.getHomePageManageChildMeter(obj,true)
  441. }
  442. }
  443. }).catch(error => {
  444. uni.showToast({
  445. title: error,
  446. icon: "none"
  447. })
  448. })
  449. },
  450. getIncomeExpenditure(){
  451. API2.incomeExpenditure({
  452. //parentMeterId:item.id,
  453. queryDate:this.queryDate,
  454. companyId: this.companyId,
  455. type: this.list[this.homePageManageType].value
  456. }).then((response) => {
  457. this.incomeExpenditureObj=response.data
  458. this.incomeExpenditureObj.id=1
  459. }).catch(error => {
  460. uni.showToast({
  461. title: error,
  462. icon: "none"
  463. })
  464. })
  465. },
  466. // 设备数据监测
  467. // 设备数据监测
  468. getHomePageManage(bl) {
  469. this.getHomePageManageReady=false
  470. if(bl){
  471. this.getHomePageManageshowLoading=false
  472. }else{
  473. uni.showLoading({
  474. title: "加载中",
  475. mask: true,
  476. })
  477. }
  478. // uni.showLoading({
  479. // title: "加载中",
  480. // mask: true,
  481. // })
  482. this.incomeExpenditureObj={}
  483. API2.homePageManage({
  484. queryDate:this.queryDate,
  485. companyId: this.companyId,
  486. type: this.list[this.homePageManageType].value
  487. }).then((response) => {
  488. //uni.hideLoading();
  489. this.getHomePageManageReady=true
  490. if(bl){
  491. this.getHomePageManageshowLoading=true
  492. }else{
  493. uni.hideLoading();
  494. }
  495. this.utabsone=true;
  496. this.codes =this.carhelp.getPersonInfo().codes;
  497. this.meterList = response.data.meterList;
  498. // this.$nextTick(()=>{
  499. // this.$refs.mytree.toggle()
  500. // })
  501. this.homePageManageObj = response.data;
  502. if(this.companyType!=4&&this.homePageManageObj.showPark){
  503. this.$nextTick(()=>{
  504. this.myBarChart=null;
  505. this.getBarCharts()
  506. })
  507. this.getIncomeExpenditure();
  508. }
  509. }).catch(error => {
  510. uni.showToast({
  511. title: error,
  512. icon: "none"
  513. })
  514. })
  515. },
  516. sectionChange(index) {
  517. this.clickType = this.homePageManageType;
  518. this.homePageManageType = index;
  519. if (index == 5) {
  520. this.tabsFrom.show2 = true;
  521. this.params.day = false;
  522. } else {
  523. this.list[5].name = '指定月份'
  524. this.getHomePageManage()
  525. }
  526. },
  527. recursionList(list){
  528. if(list){
  529. for(var i in list){
  530. var obj=list[i]
  531. this.meterListShow[obj.id]=false
  532. this.recursionList(obj.childMeterList)
  533. }
  534. }
  535. },
  536. ifBtnShow(item){
  537. return this.meterListShow[item.id]
  538. },
  539. showBtn(item){
  540. var key=this.meterListShow[item.id];
  541. this.$set(this.meterListShow,item.id,!key)
  542. console.log("showBtn,",key)
  543. this.getHomePageManageChildMeter(item);
  544. this.$forceUpdate()
  545. },
  546. selector2reset(e) {
  547. console.log(e)
  548. this.tabsFrom.show2Text = '全部时间'
  549. this.tabsFrom.show2Index = '';
  550. if (e.day) {
  551. this.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  552. this.getHomePageManage();
  553. } else {
  554. this.homePageManageType = this.clickType;
  555. if (this.homePageManageType != 5) {
  556. this.list[5].name = '指定月份';
  557. }
  558. this.getHomePageManage();
  559. }
  560. },
  561. selector2cancel() {
  562. if(this.clickType != -1) {
  563. }
  564. this.homePageManageType = this.clickType;
  565. },
  566. selector2confirm(e) {
  567. this.tabsFrom.show2Text = e.year + "年" + e.month + "月"
  568. this.tabsFrom.show2Index = e.year + "-" + e.month
  569. if (e.day) {
  570. this.tabsFrom.show2Text += e.day + "日"
  571. this.tabsFrom.show2Index += '-' + e.day
  572. this.queryDateMethod(this.tabsFrom.show2Index, true)
  573. } else {
  574. this.queryDateMethod(this.tabsFrom.show2Index, false)
  575. }
  576. },
  577. queryDateMethod(queryTime, day) {
  578. if (day) {
  579. this.queryDate = queryTime;
  580. } else {
  581. this.queryDate = queryTime + "-01";
  582. this.homePageManageType = "5";
  583. this.list[5].name = queryTime;
  584. this.getHomePageManage();
  585. }
  586. },
  587. getBarCharts() {
  588. if (!this.myBarChart) {
  589. this.myBarChart = echarts.init(document.getElementById('barEcharts-statistics'),null,{
  590. width:uni.upx2px(620),height:uni.upx2px(740)
  591. });
  592. }
  593. this.myBarChart.clear()
  594. var data=[
  595. {
  596. name:"总表电量",
  597. key:"parkKwh",
  598. color:"#307af6"
  599. },
  600. {
  601. name:"计费电量",
  602. key:"chargeKwh",
  603. color:"#52b8aa"
  604. },
  605. {
  606. name:"自用电量",
  607. key:"freeKwh",
  608. color:"#53b56b"
  609. },
  610. {
  611. name:"公用电量",
  612. key:"publicKwh",
  613. color:"#ef8132"
  614. },
  615. {
  616. name:"电损量",
  617. key:"lostKwh",
  618. color:"#dc4441"
  619. }
  620. ]
  621. var dataName=[]
  622. var dataSeries=[]
  623. for(var i in data){
  624. var it=data[i]
  625. dataName.push(it.name)
  626. dataSeries.push({})
  627. }
  628. for(var i in data){
  629. var it=data[i]
  630. dataSeries[data.length-i-1]={
  631. name:it.name,
  632. type: 'bar',
  633. itemStyle:{
  634. color:it.color
  635. },
  636. data: [
  637. this.homePageManageObj[it.key]
  638. ],
  639. coordinateSystem: 'polar',
  640. label: {
  641. show: true,
  642. position: 'start',
  643. formatter: '{c}度'
  644. }
  645. }
  646. }
  647. var option = {
  648. polar: {
  649. center:['50%','58%'],
  650. radius:[25, '80%']
  651. },
  652. angleAxis: {
  653. startAngle: 75,
  654. label: {
  655. rotate: 45, // 旋转标签,使得重叠的概率降低
  656. // margin: 5 // 设置标签与轴线之间的距离,增加空间
  657. }
  658. },
  659. legend: {
  660. itemGap:5,
  661. data: dataName,
  662. //orient :'vertical'
  663. },
  664. radiusAxis: {
  665. type: 'category',
  666. data: ['']
  667. },
  668. tooltip: {},
  669. series: dataSeries
  670. };
  671. console.log(option)
  672. this.myBarChart.setOption(option);
  673. },
  674. merchantChangeApi() {
  675. this.popShow=false
  676. this.getList(true)
  677. },
  678. change(index) {
  679. this.current = index;
  680. this.current2=0;
  681. this.childList=[]
  682. var company= this.merchantList1[index]
  683. if(company.id!=''){
  684. this.childList=company.childList;
  685. if(this.childList&&this.childList.length){
  686. this.companyId = this.childList[0].id;
  687. this.childInfo=this.childList[0]
  688. }else{
  689. this.childList=[]
  690. this.companyId =company.id
  691. this.childInfo=company
  692. }
  693. }else{
  694. this.companyId =''
  695. }
  696. this.companyInfo=company;
  697. this.merchantChangeApi()
  698. },
  699. backStatistics() {
  700. uni.navigateBack()
  701. },
  702. toElectronicMonitoring(item) {
  703. uni.navigateTo({
  704. url: '/pages/equipmentDataMonitoring/electronicMonitoring?id=' + item.id + '&name=' + item
  705. .name +
  706. '&companyId=' + item.companyId
  707. })
  708. }
  709. }
  710. }
  711. </script>
  712. <style lang="scss" scoped>
  713. .incomeExpenditureClass{
  714. display: flex;
  715. justify-content: space-evenly;
  716. width: 100%;
  717. padding:32rpx 0;
  718. .income1:last-child{
  719. .income11,.income12{
  720. border-right: 1px solid #c5c3c3;
  721. }
  722. }
  723. .income1{
  724. .income121{
  725. font-size: 24rpx;
  726. color:#c5c3c3;
  727. }
  728. width: 33.33%;
  729. text-align: center;
  730. .income11{
  731. padding:12rpx 0;
  732. background-color: #1677FF ;
  733. color:#fff;
  734. // font-size: 36rpx;
  735. font-size: 32rpx;
  736. border-top: 1px solid #c5c3c3;
  737. border-left: 1px solid #c5c3c3;
  738. }
  739. .income12{
  740. padding:12rpx 0;
  741. border-top: 1px solid #c5c3c3;
  742. border-bottom: 1px solid #c5c3c3;
  743. border-left: 1px solid #c5c3c3;
  744. font-size: 40rpx;
  745. }
  746. }
  747. }
  748. .back {
  749. z-index: 999;
  750. width: 200rpx;
  751. }
  752. /deep/.u-drawer-content {
  753. margin-top: 88rpx;
  754. }
  755. // /deep/.u-tab-item {
  756. // width: 25% !important;
  757. // flex: none !important;
  758. // }
  759. .tabs-box {
  760. background-color: #fff;
  761. display: flex;
  762. align-items: center;
  763. padding-right: 32rpx;
  764. justify-content: space-between;
  765. border-bottom: 1px solid rgba(232, 232, 232, 1);
  766. .tabs {
  767. width: 97%;
  768. }
  769. .more{
  770. padding-right: 12rpx;
  771. }
  772. .icon {
  773. margin-left: auto;
  774. margin-right: 24rpx;
  775. }
  776. }
  777. .tabs-len-1{
  778. }
  779. .tabs-len-2{
  780. /deep/.u-tab-item {
  781. // max-width: 39% !important;
  782. // flex: none !important;
  783. }
  784. }
  785. .tabs-len-3{
  786. /deep/.u-tab-item {
  787. max-width: 39% !important;
  788. flex: none !important;
  789. }
  790. }
  791. .tabs-len-4{
  792. /deep/.u-tab-item {
  793. max-width: 26% !important;
  794. flex: none !important;
  795. }
  796. }
  797. /deep/.u-tab-item:first-child {
  798. width: 20% !important;
  799. flex: none !important;
  800. }
  801. .popup-tabs {
  802. background-color: #fff;
  803. display: flex;
  804. align-items: center;
  805. justify-content: space-between;
  806. padding-right: 32rpx;
  807. color: rgba(51, 51, 51, 1);
  808. font-size: 32rpx;
  809. padding-top: 32rpx;
  810. .tabs {
  811. width: 88%;
  812. }
  813. }
  814. .tabs-options {
  815. display: flex;
  816. padding: 64rpx 32rpx 0;
  817. flex-wrap: wrap;
  818. .item {
  819. width: 25%;
  820. margin-bottom: 40rpx;
  821. }
  822. }
  823. // 用电量合计
  824. .total {
  825. padding: 24rpx 32rpx;
  826. background: linear-gradient(90deg, rgba(49, 110, 207, 1) 2%, rgba(37, 138, 255, 1) 100%);
  827. .company {
  828. display: flex;
  829. align-items: center;
  830. justify-content: space-between;
  831. .name {
  832. color: rgba(255, 255, 255, 1);
  833. font-size: 36rpx;
  834. font-weight: bold;
  835. }
  836. .amount {
  837. color: #f2f4f6;
  838. margin-top: 4rpx;
  839. }
  840. }
  841. .infos {
  842. display: flex;
  843. justify-content: space-between;
  844. align-items: center;
  845. margin-top: 4rpx;
  846. width: 93%;
  847. .infos-item {
  848. display: flex;
  849. width: 33.3%;
  850. .number {
  851. color: rgba(255, 255, 255, 1);
  852. font-size: 32rpx;
  853. font-weight: bold;
  854. margin-left: 8rpx;
  855. }
  856. .time {
  857. color: #f2f4f6;
  858. }
  859. }
  860. }
  861. }
  862. // 用电量
  863. .main {
  864. background-color: #fff;
  865. padding: 26rpx 32rpx;
  866. .item:last-of-type {
  867. border: none;
  868. }
  869. .item {
  870. padding: 16rpx 0;
  871. display: flex;
  872. align-items: center;
  873. justify-content: space-between;
  874. border-bottom: 1px solid rgba(245, 245, 245, 1);
  875. .item-content {
  876. width: 93%;
  877. }
  878. .equipment {
  879. display: flex;
  880. align-items: center;
  881. .equipment1 {
  882. color: rgba(51, 51, 51, 1);
  883. font-size: 32rpx;
  884. max-width: 40%;
  885. font-weight: bold;
  886. white-space: nowrap;
  887. overflow: hidden;
  888. text-overflow: ellipsis;
  889. }
  890. .equipment2 {
  891. color: rgba(119, 119, 119, 1);
  892. margin-left: 16rpx;
  893. max-width: 40%;
  894. white-space: nowrap;
  895. overflow: hidden;
  896. text-overflow: ellipsis;
  897. }
  898. }
  899. // 状态
  900. .state {
  901. display: flex;
  902. align-items: center;
  903. color: rgba(255, 123, 0, 1);
  904. margin-left: auto;
  905. .dot {
  906. margin-right: 8rpx;
  907. width: 16rpx;
  908. height: 16rpx;
  909. background-color: rgba(255, 123, 0, 1);
  910. border-radius: 999px;
  911. margin-left: auto;
  912. }
  913. .off-line {
  914. background-color: rgba(255, 123, 0, 1);
  915. }
  916. .on-line {
  917. background-color: rgba(0, 185, 98, 1);
  918. }
  919. }
  920. .state2 {
  921. color: rgba(0, 185, 98, 1);
  922. }
  923. .electricity {
  924. display: flex;
  925. justify-content: space-between;
  926. align-items: center;
  927. margin-top: 8rpx;
  928. text-align: center;
  929. .electricity-item {
  930. display: flex;
  931. align-items: center;
  932. width: 33.3%;
  933. .number {
  934. color: rgba(51, 51, 51, 1);
  935. font-weight: bold;
  936. font-size: 32rpx;
  937. margin-left: 8rpx;
  938. }
  939. .date {
  940. color: rgba(119, 119, 119, 1);
  941. }
  942. }
  943. }
  944. }
  945. }
  946. .statistics-manage {
  947. border-radius: 8px;
  948. background-color: rgba(255, 255, 255, 1);
  949. box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
  950. margin: 32rpx;
  951. padding: 40rpx 0;
  952. .title,
  953. .chart,
  954. .search,
  955. .meter-statistic {
  956. padding: 0 32rpx;
  957. }
  958. // 图表
  959. .chart {
  960. /deep/.u-subsection {
  961. padding: 2px;
  962. }
  963. /deep/.u-item {
  964. padding: 0;
  965. font-size: 24rpx
  966. }
  967. .chat-box {
  968. //margin-top: 24rpx;
  969. width: 100%;
  970. //height: 480rpx;
  971. img {
  972. width: 100%;
  973. height: 100%;
  974. }
  975. }
  976. }
  977. .search {
  978. border-top: 1px solid rgba(242, 242, 242, 1);
  979. border-bottom: 1px solid rgba(242, 242, 242, 1);
  980. display: flex;
  981. align-items: center;
  982. justify-content: space-between;
  983. padding: 40rpx 32rpx;
  984. .switch {
  985. display: flex;
  986. align-items: center;
  987. text {
  988. margin-left: 8rpx;
  989. color: rgba(51, 51, 51, 1);
  990. }
  991. }
  992. .search-box {
  993. border-radius: 50px;
  994. background-color: rgba(242, 244, 246, 1);
  995. color: rgba(136, 136, 136, 1);
  996. height: 56rpx;
  997. line-height: 56rpx;
  998. padding-left: 16rpx;
  999. padding-right: 8rpx;
  1000. flex: 1;
  1001. margin-left: 28rpx;
  1002. display: flex;
  1003. align-items: center;
  1004. justify-content: space-between;
  1005. uni-input {
  1006. height: 56rpx;
  1007. line-height: 56rpx !important;
  1008. font-size: 28rpx;
  1009. width: 75%;
  1010. }
  1011. .icon {
  1012. display: flex;
  1013. align-items: center;
  1014. justify-content: center;
  1015. width: 64rpx;
  1016. height: 40rpx;
  1017. border-radius: 50px;
  1018. background-color: rgba(22, 119, 255, 1);
  1019. }
  1020. }
  1021. }
  1022. }
  1023. .meter-statistic {
  1024. margin-top: 32rpx;
  1025. .meter-statistic-main{
  1026. display: flex;
  1027. align-items: center;
  1028. }
  1029. .sum {
  1030. .meter-name {
  1031. color: rgba(51, 51, 51, 1);
  1032. font-size: 32rpx;
  1033. margin-left: 8rpx;
  1034. font-weight: bold;
  1035. }
  1036. .icon {
  1037. margin-right: 8rpx;
  1038. img {
  1039. width: 40rpx;
  1040. height: 40rpx;
  1041. vertical-align: middle;
  1042. }
  1043. }
  1044. .meter-state {
  1045. margin-left: 8rpx;
  1046. width: 64rpx;
  1047. height: 36rpx;
  1048. line-height: 36rpx;
  1049. border-radius: 4px;
  1050. background-color: rgba(255, 255, 255, 1);
  1051. color: rgba(0, 185, 98, 1);
  1052. font-size: 22rpx;
  1053. text-align: center;
  1054. border: 1px solid rgba(0, 185, 98, 1);
  1055. }
  1056. .meter-state2 {
  1057. border: 1px solid rgba(255, 123, 0, 1);
  1058. color: rgba(255, 123, 0, 1);
  1059. }
  1060. .meter-number {
  1061. margin-left: auto;
  1062. color: rgba(51, 51, 51, 1);
  1063. font-size: 32rpx;
  1064. /deep/.u-icon--right {
  1065. margin-left: 8rpx;
  1066. }
  1067. }
  1068. }
  1069. .sum2 {
  1070. padding: 0 32rpx;
  1071. margin-top: 8rpx;
  1072. display: flex;
  1073. align-items: center;
  1074. justify-content: space-between;
  1075. .title {
  1076. color: rgba(119, 119, 119, 1);
  1077. }
  1078. .value {
  1079. color: rgba(119, 119, 119, 1);
  1080. }
  1081. }
  1082. .first-level-list{
  1083. width: 100%;
  1084. display: flex;
  1085. align-items: center;
  1086. }
  1087. // 一级表
  1088. .first-level {
  1089. padding-left: 32rpx;
  1090. margin-top: 20rpx;
  1091. .meter-name {
  1092. font-size: 28rpx
  1093. }
  1094. }
  1095. // 二级表
  1096. .second-level {
  1097. padding-left: 64rpx;
  1098. margin-top: 20rpx;
  1099. .meter-name {
  1100. font-size: 24rpx
  1101. }
  1102. }
  1103. .else-switch {
  1104. padding-left: 144rpx;
  1105. .meter-name {
  1106. font-size: 24rpx
  1107. }
  1108. .item {
  1109. margin-top: 24rpx;
  1110. }
  1111. }
  1112. }
  1113. .electronicMonitoring-title{
  1114. display: flex;
  1115. align-items: center;
  1116. padding: 0px 32rpx;
  1117. justify-content: space-between;
  1118. height: 120rpx;
  1119. font-size: 36rpx;
  1120. background: linear-gradient(88.25deg, rgba(31,85,255,1) 0.65%,rgba(39,171,255,1) 99.34%);
  1121. color:#fff;
  1122. }
  1123. </style>