equipmentElectricityWater.vue 27 KB

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