12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211 |
- <template>
- <view>
- <view class="navbar-c">
- <view class="back" @click="backStatistics">
- <u-icon name="arrow-left" color="#101010" size="36"></u-icon>
- </view>
- <view class="title">
- 用电量(度)
- <image class="img" src="@/assets/img/refresh-line.svg" @click="getList(true)"></image>
- </view>
- </view>
- <u-picker-select title="日期选择" v-model="tabsFrom.show2" :defaultTime="tabsFrom.show2Index" :endYear="endYear"
- mode="time" :params="params" :noselect="false" @confirm="selector2confirm" @cancel="selector2cancel"
- @reset="selector2reset"></u-picker-select>
- <!-- 标签 -->
- <view class="tabs-box" >
- <view class="tabs" :style="{width: companyList.length>4 ? '' : '100%'}">
- <u-tabs :list="merchantList1" :is-scroll="false" inactive-color="#999999" active-color="#666666"
- :current="current" @change="change"></u-tabs>
- </view>
- <view class="icon" @click="popShow=true" v-if="companyList.length >= 4">
- <u-icon name="arrow-down" color="#999999"></u-icon>
- </view>
- </view>
- <!-- 标签弹出层 -->
- <u-popup v-model="popShow" duration="10" mode="top" :negative-top="88" border-radius="16">
- <view class="popup-tabs">
- <view class="tabs">
- <u-tabs :list="merchantList1" :is-scroll="false" :current="current" @change="change"></u-tabs>
- </view>
- <view class="more">
- <u-icon name="arrow-up" color="#777777" size="40" @click="popShow=false"></u-icon>
- </view>
- </view>
- <view class="tabs-options">
- <view class="item" v-for="(item, index) in merchantList2" :key="index"
- @click="merchantChange(item,index)">
- {{item.name}}
- </view>
- </view>
- </u-popup>
-
- <!-- 全部标签 -->
- <view class="main" v-show="current==0" >
- <view class="item" v-for="(item, index) in kWhList" :key="item.index" v-if="current==0"
- @click="toElectronicMonitoring(item)">
- <view class="item-content">
- <view class="equipment">
- <view class="equipment1 ">
- {{item.name}}
- </view>
- <view class="equipment2">
- {{item.installationAddressSimple}}
- </view>
- <view class="state" v-if="!item.online">
- <view class="dot off-line"></view>
- <view class="text">离线</view>
- </view>
- <view class="state state2" v-else>
- <view class="dot on-line"></view>
- <view class="text">在线</view>
- </view>
- </view>
- <view class="electricity">
- <view class="electricity-item electricity-item-day">
- <view class="date">
- 今日
- </view>
- <view class="number">
- {{item.thisDayKwh}}
- </view>
- </view>
- <view class="electricity-item">
- <view class="date">
- 本月
- </view>
- <view class="number">
- {{item.thisMonthKwh}}
- </view>
- </view>
- <view class="electricity-item">
- <view class="date">
- 上月
- </view>
- <view class="number">
- {{item.lastMonthKwh}}
- </view>
- </view>
- </view>
- </view>
- <view class="more">
- <u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
- </view>
- </view>
-
- </view>
- <u-divider v-show="current==0" :isnone="kWhList.length==0" nonetext="暂无数据" border-color="#CFD2D5">已经到底了</u-divider>
-
- <!-- 子项标签 -->
- <view class="statistics-manage" v-if="current==1" >
-
- <!-- 图表 -->
- <view class="chart">
- <view class="u-subsection">
- <u-subsection :list="list" :current="homePageManageType" @change="sectionChange" font-size="24"></u-subsection>
- </view>
- <view class="chat-box" id="barEcharts">
-
- </view>
- </view>
- <view class="search" v-if="0">
- <view class="switch">
- <u-switch v-model="checked" size="40"></u-switch><text>只看离线表</text>
- </view>
- <view class="search-box" >
- <input type="text" placeholder="请输入电表查询" />
- <view class="icon">
- <img src="@/assets/img/riLine-search-line 1.svg" alt="" />
- </view>
- </view>
- </view>
-
- <!-- 电表统计 -->
- <Tree-Body :meterList="meterList" ref="mytree"
- @query="getHomePageManageChildMeter"
- v-if="getHomePageManageReady"
- :role="codes.indexOf('switch')!=-1"
- @switchBtn="switchBtnApi"
- ></Tree-Body>
- <!-- 电表统计 -->
- <view class="meter-statistic" v-if="false">
- <!-- 总计 -->
- <view v-for="(item,i) in meterList" :key="i">
- <view class="sum meter-statistic-main">
- <view class="icon" @click="showBtn(item)" v-if="item.childMeterList&&item.childMeterList.length" >
- <u-icon name="arrow-up" color="#d4d4d4" v-show="ifBtnShow(item)" size="24"></u-icon>
- <u-icon name="arrow-down" color="#d4d4d4" v-show="!ifBtnShow(item)" size="24"></u-icon>
-
- </view>
-
- <view class="meter-name" >
- {{item.name}}
- </view>
- <view class="meter-state" v-if="item.online">
- 在线
- </view>
- <view class="meter-state meter-state2" v-else>
- 离线
- </view>
- <view class="meter-number" @click="toElectronicMonitoring(item)">
- {{item.kwh}}度<u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
- </view>
- </view>
- <view class="sum2">
- <view class="title">
- {{item.name}}用电(未扣除)
- </view>
- <view class="value">
- {{item.childKwh}}度
-
- </view>
- </view>
-
- <!-- 一级表 -->
- <view class="sum first-level" v-if="item.childMeterList&&item.childMeterList.length"
- v-show="ifBtnShow(item)" v-for="(item2,j) in item.childMeterList" :key="j" >
- <view class="first-level-list">
- <view class="icon" @click="showBtn(item2)" v-if="item2.childMeterList&&item2.childMeterList.length" >
- <u-icon name="arrow-up" color="#d4d4d4" v-show="ifBtnShow(item2)" size="24"></u-icon>
- <u-icon name="arrow-down" color="#d4d4d4" v-show="!ifBtnShow(item2)" size="24"></u-icon>
-
- </view>
- <view class="icon">
- <img src="@/assets/img/switchIcon.png" alt="" />
- </view>
- <view class="meter-name" >
- {{item2.name}}
- </view>
- <view class="meter-state" v-if="item2.online">
- 在线
- </view>
- <view class="meter-state meter-state2" v-else>
- 离线
- </view>
- <view class="meter-number" @click="toElectronicMonitoring(item2)" >
- {{item2.kwh}}度<u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
- </view>
- </view>
- <!-- 二级表 -->
- <view class="sum second-level" v-if="item2.childMeterList&&item2.childMeterList.length"
- v-show="ifBtnShow(item2)" v-for="(item3,k) in item2.childMeterList" :key="k"
- >
- <view class="first-level-list">
- <view class="icon" @click="showBtn(item3)" v-if="item3.childMeterList&&item3.childMeterList.length" >
- <u-icon name="arrow-up" color="#d4d4d4" v-show="ifBtnShow(item3)" size="24"></u-icon>
- <u-icon name="arrow-down" color="#d4d4d4" v-show="!ifBtnShow(item3)" size="24"></u-icon>
-
- </view>
- <view class="icon">
- <img src="@/assets/img/switchIcon.png" alt="" />
- </view>
- <view class="meter-name">
- {{item3.name}}
- </view>
- <view class="meter-state" v-if="item3.online">
- 在线
- </view>
- <view class=" meter-state meter-state2" v-else>
- 离线
- </view>
- <view class="meter-number" @click="toElectronicMonitoring(item3)">
- {{item3.kwh}}度<u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
- </view>
- </view>
- <!-- 开关 -->
- <view class="else-switch " v-if="item3.childMeterList&&item3.childMeterList.length"
- v-show="ifBtnShow(item3)" v-for="(item4,h) in item3.childMeterList" :key="h" >
- <view class="sum item first-level-list">
-
- <view class="icon">
- <img src="@/assets/img/switchIcon.png" alt="" />
- <!-- switchClose -->
- </view>
- <view class="meter-name">
- {{item4.name}}
- </view>
- <view class="meter-state" v-if="item4.online">
- 在线
- </view>
- <view class=" meter-state meter-state2" v-else>
- 离线
- </view>
- <view class="meter-number" @click="toElectronicMonitoring(item4)" >
- {{item4.kwh}}度<u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
- </view>
- </view>
-
-
- </view>
- </view>
- </view>
-
- </view>
-
-
- </view>
- </view>
- </view>
- </template>
- <script>
- import * as API from '@/apis/pagejs/index.js'
- import * as API2 from '@/apis/pagejs/energyManage.js'
- import * as echarts from 'echarts';
- import {
- parseUnixTime,
- beforeTimeStamp,
- getWeek
- } from '@/apis/utils'
- import TreeBody from '@/components/tree/tree-body.vue';
-
-
- export default {
- components: {
- TreeBody
- },
- data() {
- return {
- codes:"",
- getHomePageManageReady:false,
- companyList: [], // 商户
- merchantList1: [],
- merchantList2: [],
- myLineChart: null, // 图表
- myBarChart: null,
- myPieChart: null,
- homePageManageType: 0,
- homePageManageObj: {
- childKwh: 0,
- differenceKwh: 0,
- parkKwh: 0
- },
- meterList: [],
- meterListShow:{},
- queryDate: '',
- kWhList: [], //设备
- companyId: '',
- popShow: false,
- current: 0,
- allKWhList: [],
- companyKwhList: [],
- pageIndex: 1,
- recordsTotal: 0,
- windowHeight: '',
- checked:false,
- list: [{
- name: '上月',
- value: "2"
- },
- {
- name: '当月',
- value: "1"
- },
- {
- name: '当日',
- value: "4"
- }, {
- name: '当年',
- value: "3"
- }, {
- name: '合计',
- value: "0"
- },
- {
- name: '指定月份',
- value: "10"
- }
- ],
- endYear: '',
- params: {
- year: true,
- month: true,
- day: true,
- hour: false,
- minute: false,
- second: false
- },
- value: '2',
- clickType: -1,
- tabsFrom: {
- show1: false,
- show1Index: 0,
- show2Index: '',
- show2: false,
- show1Text: "全部类型",
- show2Text: "全部时间",
-
- },
- }
- },
- onReady() {
-
- this.endYear = new Date().getFullYear();
- this.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
-
- this.getCompanyInfoList();
- },
- onReachBottom() {
- if (this.kWhList.length < this.recordsTotal) {
- this.myLoadmore();
- }
- },
- methods: {
- switchBtnApiMethod(node,key){
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- API2.remoteSwitch({
- meterId:node.id,
- enabled:key
- }).then((res) => {
- uni.hideLoading();
- node.switchStatus=key
-
- }).catch(error => {
-
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- switchBtnApi(node,key){
- uni.showModal({
- confirmColor:`${key?'#3CC51F':'red'}`,
- confirmText:`${key?'开启':'关闭'}`,
- content: `确认是否要"${key?'开启':'关闭'}"${node.name}`,
- title: "提示",
- success:res=> {
- if(res.confirm){
- this.switchBtnApiMethod(node,key);
- }
- }
- })
- console.log(node,key)
- },
- refreshList() {
- if (this.current != 0) {
- this.getList(true);
- } else {
- this.getCompanyInfoList();
- }
- },
- companyChange(item, index) {
- this.current = index + 1;
- this.companyId = item.id;
- this.getList(true);
- },
-
- getCompanyInfoList() {
- this.companyKwhList = [];
- API.deviceCompanyList().then((response) => {
- var list = response.data.companyInfoList;
- this.companyList = list;
- var mList1 = [];
- var mList2 = [];
- mList1.push({
- id: '',
- name: '全部'
- });
- for (var i = 0; i < list.length; i++) {
- if (i >= 3) {
- mList2.push(list[i]);
- } else {
- mList1.push(list[i]);
- }
-
- }
- this.merchantList1 = mList1;
- this.merchantList2 = mList2;
- this.companyId = mList1[0].id;
- this.getList();
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- myLoadmore() {
- this.pageIndex += 1;
- this.getList();
- },
- getList(bl) {
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- if (bl) {
- this.kWhList = [];
- this.pageIndex = 1;
- }
- var data = {
- pageIndex: this.pageIndex,
- pageSize: 20,
- companyId: this.companyId
- };
- API.homePageKwh(data).then((res) => {
- uni.hideLoading();
- this.kWhList = [
- ...this.kWhList,
- ...res.data.data
- ];
- this.recordsTotal = res.data.recordsTotal;
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- merchantChange(item, index) {
- var m = item;
- var n = this.merchantList1[this.current];
- this.merchantList1[this.current] = m;
- this.merchantList2[index] = n;
- this.companyId = item.id;
- this.popShow = false;
- //this.getList(true);
- this.merchantChangeApi()
-
- },
- // 设备数据监测
- getHomePageManageChildMeter(item,bl) {
- // if(!bl){
- // uni.showLoading({
- // title: "加载中",
- // mask: true,
- // })
- // }
-
- API2.homePageManageChildMeter({
- parentMeterId:item.id,
- queryDate:this.queryDate,
- companyId: this.companyId,
- type: this.list[this.homePageManageType].value
- }).then((response) => {
- // if(!bl){
- // uni.hideLoading();
- // }
- // this.meterList = response.data.meterList;
- // if(!this.meterListShow.id){
- // this.meterListShow.id=1
- // this.recursionList(this.meterList)
- // }
-
- var childMeterList=response.data.childMeterList
- item.childMeterList=childMeterList
-
-
- if(!bl){
- for(var i in childMeterList){
- var obj=childMeterList[i]
- this.getHomePageManageChildMeter(obj,true)
- }
- }
-
-
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- // 设备数据监测
- getHomePageManage() {
-
-
- this.getHomePageManageReady=false
-
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- API2.homePageManage({
- queryDate:this.queryDate,
- companyId: this.companyId,
- type: this.list[this.homePageManageType].value
- }).then((response) => {
- uni.hideLoading();
- this.getHomePageManageReady=true
-
- this.codes =this.carhelp.getPersonInfo().codes;
-
- this.meterList = response.data.meterList;
- // this.$nextTick(()=>{
- // this.$refs.mytree.toggle()
- // })
-
- this.homePageManageObj = response.data;
- this.getBarCharts()
-
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- sectionChange(index) {
- this.clickType = index;
- this.homePageManageType = index;
- if (index == 5) {
- this.tabsFrom.show2 = true;
- this.params.day = false;
- } else {
- this.list[5].name = '指定月份'
- this.getHomePageManage()
- }
-
-
- },
- recursionList(list){
- if(list){
- for(var i in list){
- var obj=list[i]
-
- this.meterListShow[obj.id]=false
- this.recursionList(obj.childMeterList)
- }
- }
- },
- ifBtnShow(item){
- return this.meterListShow[item.id]
- },
- showBtn(item){
- var key=this.meterListShow[item.id];
-
- this.$set(this.meterListShow,item.id,!key)
- console.log("showBtn,",key)
- this.getHomePageManageChildMeter(item);
- this.$forceUpdate()
- },
- selector2reset(e) {
- console.log(e)
- this.tabsFrom.show2Text = '全部时间'
- this.tabsFrom.show2Index = '';
-
- if (e.day) {
- this.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
-
- this.getHomePageManage();
- } else {
-
- this.homePageManageType = this.clickType;
- if (this.homePageManageType != 5) {
- this.list[5].name = '指定月份';
- }
- this.getHomePageManage();
- }
- },
- selector2cancel() {
- if(this.clickType != -1) {
- this.homePageManageType = this.clickType;
- }
- },
- selector2confirm(e) {
- this.tabsFrom.show2Text = e.year + "年" + e.month + "月"
-
- this.tabsFrom.show2Index = e.year + "-" + e.month
- if (e.day) {
- this.tabsFrom.show2Text += e.day + "日"
- this.tabsFrom.show2Index += '-' + e.day
-
- this.queryDateMethod(this.tabsFrom.show2Index, true)
- } else {
- this.queryDateMethod(this.tabsFrom.show2Index, false)
- }
- },
- queryDateMethod(queryTime, day) {
-
- if (day) {
- this.queryDate = queryTime;
- //this.FormData2.type =day?"9":"10"
- //this.value="-1"
-
-
- //this.getHomePageManage();
- } else {
-
- this.queryDate = queryTime + "-01";
-
- this.homePageManageType = "5";
- this.list[5].name = queryTime;
-
- this.getHomePageManage();
- }
- },
- getBarCharts() {
- if (!this.myBarChart) {
- this.myBarChart = echarts.init(document.getElementById('barEcharts'),null,{
- width:uni.upx2px(690),height:uni.upx2px(480)
- });
- }
- var thismax=Math.max(this.homePageManageObj.parkKwh,this.homePageManageObj.differenceKwh,this.homePageManageObj.childKwh)
-
- var option = {
-
- polar: {
- center:['35%','50%'],
- radius:[20, '70%']
- },
- angleAxis: {
- max: parseInt(thismax+thismax/10)+3 ,
- startAngle: 75
- },
-
- legend: {
- x:"65%",
- y: '0',
-
-
- data: ['园区电量', '表计电量', '电损量'],
- orient :'vertical'
- },
- radiusAxis: {
- type: 'category',
- data: ['']
- },
- tooltip: {},
- series: [
- {
- name:'园区电量',
- type: 'bar',
- data: [
- this.homePageManageObj.parkKwh,
-
- ],
- coordinateSystem: 'polar',
- label: {
- show: true,
- position: 'middle',
- formatter: '{c}度'
- }
- },
- {
- name:'表计电量',
- type: 'bar',
- data: [
-
- this.homePageManageObj.childKwh
-
- ],
- coordinateSystem: 'polar',
- label: {
- show: true,
- position: 'middle',
- formatter: '{c}度'
- }
- },
- {
- name:'电损量',
- type: 'bar',
- data: [
-
- this.homePageManageObj.differenceKwh
- ],
- coordinateSystem: 'polar',
- label: {
- show: true,
- position: 'middle',
- formatter: '{c}度'
- }
- }
- ]
- };
- console.log(option)
- this.myBarChart.setOption(option);
- },
- merchantChangeApi() {
-
-
- if (this.companyId) {
-
- this.getHomePageManage();
- }
- },
- change(index) {
- this.current = index;
- this.companyId = this.merchantList1[index].id;
- this.merchantChangeApi()
- },
- backStatistics() {
- uni.navigateBack()
- },
- toElectronicMonitoring(item) {
- uni.navigateTo({
- url: '/pages/equipmentDataMonitoring/electronicMonitoring?id=' + item.id + '&name=' + item
- .name +
- '&companyId=' + item.companyId
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- page {
- padding-bottom: 100rpx;
- }
- .back {
- z-index: 999;
- width: 200rpx;
- }
- /deep/.u-drawer-content {
- margin-top: 88rpx;
- }
- // /deep/.u-tab-item {
- // width: 25% !important;
- // flex: none !important;
- // }
- .tabs-box {
- background-color: #fff;
- display: flex;
- align-items: center;
-
- padding-right: 32rpx;
- justify-content: space-between;
- border-bottom: 1px solid rgba(232, 232, 232, 1);
- .tabs {
- width: 88%;
- }
- .icon {
- margin-left: auto;
- margin-right: 24rpx;
- }
- }
- .popup-tabs {
- background-color: #fff;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding-right: 32rpx;
- color: rgba(51, 51, 51, 1);
- font-size: 32rpx;
- padding-top: 32rpx;
- .tabs {
- width: 88%;
- }
- }
- .tabs-options {
- display: flex;
- padding: 64rpx 32rpx 0;
- flex-wrap: wrap;
- .item {
- width: 25%;
- margin-bottom: 40rpx;
- }
- }
- // 用电量合计
- .total {
- padding: 24rpx 32rpx;
- background: linear-gradient(90deg, rgba(49, 110, 207, 1) 2%, rgba(37, 138, 255, 1) 100%);
- .company {
- display: flex;
- align-items: center;
- justify-content: space-between;
- .name {
- color: rgba(255, 255, 255, 1);
- font-size: 36rpx;
- font-weight: bold;
- }
- .amount {
- color: #f2f4f6;
- margin-top: 4rpx;
- }
- }
- .infos {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 4rpx;
- width: 93%;
- .infos-item {
- display: flex;
- width: 33.3%;
- .number {
- color: rgba(255, 255, 255, 1);
- font-size: 32rpx;
- font-weight: bold;
- margin-left: 8rpx;
- }
- .time {
- color: #f2f4f6;
- }
- }
- }
- }
- // 用电量
- .main {
- background-color: #fff;
- padding: 26rpx 32rpx;
- .item:last-of-type {
- border: none;
- }
- .item {
- padding: 16rpx 0;
- display: flex;
- align-items: center;
- justify-content: space-between;
- border-bottom: 1px solid rgba(245, 245, 245, 1);
- .item-content {
- width: 93%;
- }
- .equipment {
- display: flex;
- align-items: center;
- .equipment1 {
- color: rgba(51, 51, 51, 1);
- font-size: 32rpx;
- max-width: 40%;
- font-weight: bold;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .equipment2 {
- color: rgba(119, 119, 119, 1);
- margin-left: 16rpx;
- max-width: 40%;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- // 状态
- .state {
- display: flex;
- align-items: center;
- color: rgba(255, 123, 0, 1);
- margin-left: auto;
- .dot {
- margin-right: 8rpx;
- width: 16rpx;
- height: 16rpx;
- background-color: rgba(255, 123, 0, 1);
- border-radius: 999px;
- margin-left: auto;
- }
- .off-line {
- background-color: rgba(255, 123, 0, 1);
- }
- .on-line {
- background-color: rgba(0, 185, 98, 1);
- }
- }
- .state2 {
- color: rgba(0, 185, 98, 1);
- }
- .electricity {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 8rpx;
- text-align: center;
- .electricity-item {
- display: flex;
- align-items: center;
- width: 33.3%;
- .number {
- color: rgba(51, 51, 51, 1);
- font-weight: bold;
- font-size: 32rpx;
- margin-left: 8rpx;
- }
- .date {
- color: rgba(119, 119, 119, 1);
- }
- }
- }
- }
- }
- .statistics-manage {
- border-radius: 8px;
- background-color: rgba(255, 255, 255, 1);
- box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
- margin: 32rpx;
- padding: 40rpx 0;
-
- .title,
- .chart,
- .search,
- .meter-statistic {
- padding: 0 32rpx;
- }
- // 图表
- .chart {
-
- /deep/.u-subsection {
- padding: 2px;
- }
- /deep/.u-item {
- padding: 0;
- font-size: 24rpx
- }
- .chat-box {
- margin-top: 24rpx;
- width: 100%;
- height: 480rpx;
- img {
- width: 100%;
- height: 100%;
- }
- }
- }
- .search {
- border-top: 1px solid rgba(242, 242, 242, 1);
- border-bottom: 1px solid rgba(242, 242, 242, 1);
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 40rpx 32rpx;
- .switch {
- display: flex;
- align-items: center;
- text {
- margin-left: 8rpx;
- color: rgba(51, 51, 51, 1);
- }
- }
- .search-box {
- border-radius: 50px;
- background-color: rgba(242, 244, 246, 1);
- color: rgba(136, 136, 136, 1);
- height: 56rpx;
- line-height: 56rpx;
- padding-left: 16rpx;
- padding-right: 8rpx;
- flex: 1;
- margin-left: 28rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- uni-input {
- height: 56rpx;
- line-height: 56rpx !important;
- font-size: 28rpx;
- width: 75%;
- }
- .icon {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 64rpx;
- height: 40rpx;
- border-radius: 50px;
- background-color: rgba(22, 119, 255, 1);
- }
- }
- }
- }
- .meter-statistic {
- margin-top: 32rpx;
- .meter-statistic-main{
- display: flex;
- align-items: center;
- }
- .sum {
-
- .meter-name {
- color: rgba(51, 51, 51, 1);
- font-size: 32rpx;
- margin-left: 8rpx;
- font-weight: bold;
- }
- .icon {
- margin-right: 8rpx;
- img {
- width: 40rpx;
- height: 40rpx;
- vertical-align: middle;
- }
- }
- .meter-state {
- margin-left: 8rpx;
- width: 64rpx;
- height: 36rpx;
- line-height: 36rpx;
- border-radius: 4px;
- background-color: rgba(255, 255, 255, 1);
- color: rgba(0, 185, 98, 1);
- font-size: 22rpx;
- text-align: center;
- border: 1px solid rgba(0, 185, 98, 1);
- }
- .meter-state2 {
- border: 1px solid rgba(255, 123, 0, 1);
- color: rgba(255, 123, 0, 1);
- }
- .meter-number {
- margin-left: auto;
- color: rgba(51, 51, 51, 1);
- font-size: 32rpx;
- /deep/.u-icon--right {
- margin-left: 8rpx;
- }
- }
- }
- .sum2 {
- padding: 0 32rpx;
- margin-top: 8rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .title {
- color: rgba(119, 119, 119, 1);
- }
- .value {
- color: rgba(119, 119, 119, 1);
- }
- }
- .first-level-list{
- width: 100%;
- display: flex;
- align-items: center;
- }
- // 一级表
- .first-level {
- padding-left: 32rpx;
- margin-top: 20rpx;
- .meter-name {
- font-size: 28rpx
- }
- }
- // 二级表
- .second-level {
- padding-left: 64rpx;
- margin-top: 20rpx;
- .meter-name {
- font-size: 24rpx
- }
- }
- .else-switch {
- padding-left: 144rpx;
- .meter-name {
- font-size: 24rpx
- }
- .item {
- margin-top: 24rpx;
- }
- }
- }
- </style>
|