123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583 |
- <template>
- <view>
-
- <u-picker-select title="日期选择" :maskCloseAble="true" v-model="tabsFrom.show2" :defaultTime="tabsFrom.show2Index" :endYear="endYear"
- mode="time" :params="params" @confirm="selector2confirm" @cancel="selector2cancel"
- @reset="selector2reset">
- </u-picker-select>
- <u-select title="" v-model="tabsFrom.show1" :defaultValue="[current2]"
- :list="childList" value-name="id" label-name="name"
- @confirm="selector1confirm" >
- </u-select>
- <!-- 导航栏 -->
- <view class="navbar">
- <view class="title" v-if="companyInfotype==4">
- 能源管理
- <span style="padding-left: 4px;" >
- |
- </span>
- <span style="padding-left: 4px;" >
- {{datacompanyInfo.name}}
- </span>
- </view>
- <view class="title" v-else>
- 能源管理
- <span style="padding-left: 4px;" v-if="companyList.length>1&¤t!=0">
- |
- </span>
- <span style="padding-left: 4px;" v-if="companyList.length>1&¤t!=0">
-
- <template v-if="kWhList.length==1">
- {{kWhList[0].name}}
- </template>
- <template v-else>
- <!-- {{childList.length==1? : childInfo.name}} -->
- {{companyInfo.name}}
- </template>
- </span>
- <span style="padding-left: 4px;" v-if="companyList.length==1">
- |
- </span>
- <span style="padding-left: 4px;" v-if="companyList.length==1">
-
- <template v-if="kWhList.length==1">
- {{kWhList[0].name}}
- </template>
- <template v-else>
- {{childList.length==1?companyInfo.name : childInfo.name}}
- </template>
- </span>
-
- </view>
- </view>
- <view class="tabs-box tabs-box2" v-if="companyInfotype==4&&readingMeterNum&&monitorMeterNum" >
-
- <view class="tabs2" :class="'tabs-len-2'"
- :style="{width: '100%', }">
- <u-tabs-one :gutter="32"
- :list="companyInfotypeList" :is-scroll="false" active-color="#fff" inactive-color="#CCE2FF"
- bg-color="#1677FF" :current="1" @change="companyInfotypeChange"></u-tabs-one>
- </view>
-
- </view>
-
- <!-- 标签 -->
- <view class="tabs-box" v-else >
-
- <view class="tabs" :class="'tabs-len-'+merchantList1.length" v-show="companyList.length>1"
- :style="{width: companyList.length>3 ? '' : '100%'}">
- <u-tabs-one v-if="utabsone"
- :list="merchantList1" :is-scroll="false" active-color="#fff" inactive-color="#CCE2FF"
- bg-color="#1677FF" :current="current" @change="change"></u-tabs-one>
- </view>
- <view class="more" @click="popShow=true" v-if="companyList.length >= 4">
- <u-icon name="arrow-down" color="#fff" size="40"></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 electronicMonitoring-123" v-show="kWhList.length==1" style="padding:32rpx 0;">
-
- <view class="electronicMonitoring-title3"
- v-if="companyType==5"
- v-show="childList&&childList.length>1" >
- <view style="padding:0 32rpx;">
- <u-tabs-one height="60" v-if="utabsone&&childList&&childList.length"
- :currentIndexBl="true" bg-color="#f2f4f6" key="B" :showBar="false"
- :list="childList" :is-scroll="false" :current="current2" @change="change2"></u-tabs-one>
-
- </view>
-
- </view>
- <view class="electronicMonitoring-title"
- @click="titleCk"
- v-else-if="childList&&childList.length>0" >
- <view>
- {{childListName}}
- </view>
- <view v-show="childList.length>1">
- <u-icon name="arrow-down"></u-icon>
- </view>
- </view>
- <electronicMonitoring v-show="kWhList.length" :ref="'refMyEm'+companyId"></electronicMonitoring>
-
- <u-divider :isnone="kWhList.length==0" nonetext="暂无数据" border-color="#CFD2D5">已经到底了</u-divider>
-
- </view>
-
- <view class="main current-123" v-show="(kWhList.length!=1)">
-
- <view class="electronicMonitoring-title"
- @click="titleCk"
- v-if="companyType==1"
- v-show="childList&&childList.length>0" >
- <view>
- {{childListName}}
- </view>
- <view v-show="childList.length>1">
- <u-icon name="arrow-down"></u-icon>
- </view>
- </view>
- <view class="electronicMonitoring-title2"
- v-else
- v-show="childList&&childList.length>1" >
-
- <u-tabs-one height="60" :showBar="false" v-if="utabsone&&childList&&childList.length"
- :currentIndexBl="true" bg-color="#f2f4f6" key="A"
- :list="childList" :is-scroll="false" :current="current2" @change="change2"></u-tabs-one>
- </view>
-
-
- <!-- 电表运行情况 -->
- <view class="statistics-1 statistics">
- <view class="title">
- <view class="icon">
- <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
- </view>
- <view class="text">
- 电表运行情况
- </view>
- <view class="check-all" @click="toEquipmentConditionMonitoring">
- 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
- </view>
- </view>
- <view class="item">
- <view class="item-progess">
- <view class="img-box">
- <u-circle-progress active-color="#2979ff" :percent="alarmsPercent" width="88">
- </u-circle-progress>
- </view>
- </view>
- <!-- 累计 -->
- <view class="total">
- <view class="total1">
- <view class="normal">
- 正常 <span style="color:#19be6b;margin: 0 8rpx;">{{alarmsForm.okNum}}</span> 台
- </view>
- <view class="abnormal">
- 异常 <span style="color:red;margin: 0 8rpx;">{{alarmsForm.errorNum}}</span> 台
- </view>
- </view>
- <view class="total2" v-if="false">
- 本月累计触发告警 <text class="total-number">{{alarmsForm.errorMonthNum}}</text> 次
- </view>
- </view>
- </view>
- </view>
-
- <view class="" v-show="companyId==''&&companyList.length>1&&datacompanyInfo.type=='2'">
- <!-- 电表运行情况 -->
- <view class="statistics-1 statistics" >
- <view class="title">
- <view class="icon">
- <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
- </view>
- <view class="text">
- 在用园区与产权单位
- </view>
-
- </view>
- <view class=" contractList" >
- <view class="contractListClass" v-for="(item,i) in companyList" :key="i"
- @click="change(i+1)">
- <view class="contractListClass1">
- {{item.name}}
- </view>
- <view class="contractListClass2">
- <u-icon name="arrow-right" size="24" color="#838383"></u-icon>
- </view>
- </view>
-
-
- </view>
- </view>
- </view>
-
- <view class="" v-show="getPlatformRevenueBl()">
- <!-- 电表运行情况 -->
- <view class="statistics-1 statistics statistics-3" >
- <view class="title">
- <view class="icon">
- <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
- </view>
- <view class="text">
- 平台预计收入(元)
- </view>
-
- </view>
- <view class=" contractList" >
- <view class="content"
- style="display: flex;justify-content: center;margin: 40px 0;"
- v-if="!getPlatformRevenueReady">
-
- <div class="uni-toast" style="display: flex;font-size: 60rpx; color: rgb(192, 196, 204);" >
- <i class="uni-icon_toast uni-loading"
- style="
- width: 80rpx;
- height: 80rpx;
-
- "
- ></i><p class="uni-toast__content"> </p>加载中...</div>
-
- </view>
- <!-- @click="gotoUrl('/pages/tenantList/contractList?query=1')" -->
- <view class="contractListClass" v-for="(item,i) in platformRevenueList" :key="i"
- >
- <view class="contractListClass1">
- <view class="class1">{{item.name}}</view>
- <view class="class2">{{month}}月预计收入</view>
- </view>
- <view class="contractListClass2">
- {{item.incomeFee}}
- <u-icon name="arrow-right" v-if="0" style="margin-left: 12rpx;" size="24" color="#838383"></u-icon>
- </view>
- </view>
-
-
- </view>
- </view>
- </view>
-
- <view class="">
- <!-- 电表运行情况 -->
- <view class="statistics-1 statistics" v-show="companyId&&codes&&codes.indexOf('property')!=-1&&(tenantListNum0)">
- <view class="title">
- <view class="icon">
- <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
- </view>
- <view class="text">
- 租户管理预警
- </view>
-
- </view>
- <view class=" contractList">
- <view class="contractListClass" @click="gotoUrl('/pages/tenantList/contractList?query=1&companyId='+companyId)">
- <view class="contractListClass1">
- <image class="img" src="@/assets/img/riLine-wallet-2-line.svg"></image>
- 账户余额不足 <span class="tenantListNum">{{tenantListNum1}}</span> 家
-
- </view>
- <view class="contractListClass2">
- <u-icon name="arrow-right" size="24" color="#838383"></u-icon>
- </view>
- </view>
- <view class="contractListClass" @click="gotoUrl('/pages/tenantList/contractList?query=2&companyId='+companyId)">
- <view class="contractListClass1">
- <!-- <image class="img" src="@/assets/img/riLine-time-line2.svg"></image> -->
- <u-icon name="warning" class="img" size="32" color="#ef8132"></u-icon>
- 租赁费催缴提醒 <span class="tenantListNum">{{tenantListNum2}}</span> 家<span>(即将到期)</span>
-
- </view>
- <view class="contractListClass2">
- <u-icon name="arrow-right" size="24" color="#838383"></u-icon>
- </view>
- </view>
- <view class="contractListClass" @click="gotoUrl('/pages/tenantList/contractList?query=3&companyId='+companyId)">
- <view class="contractListClass1">
- <image class="img" src="@/assets/img/riLine-time-line2.svg"></image>
- 租赁费催缴提醒 <span class="tenantListNum">{{tenantListNum3}}</span> 家<span>(已到期)</span>
-
- </view>
- <view class="contractListClass2">
- <u-icon name="arrow-right" size="24" color="#838383"></u-icon>
- </view>
- </view>
- </view>
- </view>
- </view>
-
- <!-- 统计2 异常告警记录 -->
- <view class="statistics-2 statistics" v-show="companyId&&codes&&codes.indexOf('property')!=-1&&(tenantListNum0)" >
- <view class="title">
- <view class="icon">
- <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
- </view>
- <view class="text">
- 租户断电提醒
- </view>
- <view class="check-all" @click="gotoUrl('/pages/tenantList/remindList?id='+companyId)">
- 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
- </view>
- </view>
- <u-divider :isnone="abnormalRecordsList.length==0" nonetext="无记录"
- border-color="#fff"></u-divider>
- <!-- 异常 -->
- <view class="abnormal-item" v-for="(item,index) in abnormalRecordsList"
- :key="index"
-
- >
- <!-- @click="gotoUrl('/pages/abnormal/abnormalAlarmDetails?id='+item.id)"
- -->
- <view class="item-title">
-
- <view class="name">
- {{item.content}}
- </view>
- <view class="date" style="display: flex; justify-content: space-between;margin-top: 4rpx;">
- <view>{{item.title}}</view>
- <view>{{item.createTime}}</view>
-
- </view>
- </view>
-
- </view>
-
-
- </view>
- <!-- 能源管理 -->
- <view v-show="companyId" class="statistics statistics-manage">
- <view class="title">
- <view class="icon">
- <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
- </view>
- <view class="text">
- 能源管理
- </view>
- <view class="check-all" @click="toEquipmentElectricity">
- 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
- </view>
- </view>
-
- <view class="content"
- style="display: flex;justify-content: center;margin: 40px 0;"
- v-if="!getHomePageManageshowLoading">
-
- <div class="uni-toast" style="display: flex;font-size: 60rpx; color: rgb(192, 196, 204);" >
- <i class="uni-icon_toast uni-loading"
- style="
- width: 80rpx;
- height: 80rpx;
-
- "
- ></i><p class="uni-toast__content"> </p>加载中...</div>
-
- </view>
- <view class="content" v-else-if="getHomePageManageshowLoading&&meterList.length == 0">
- <u-divider :isnone="true" nonetext="无记录"
- border-color="#fff"></u-divider>
- </view>
-
- <!-- 图表 -->
- <view class="chart" v-show="getHomePageManageshowLoading">
- <view class="u-subsection">
- <u-subsection :list="list" :current="homePageManageType" @change="sectionChange"
- font-size="24"></u-subsection>
- <view style="margin-top: 18rpx;" v-if="homePageManageType==5&&tabsFrom.show2Text">
- 指定时间:{{tabsFrom.show2Text}}
- </view>
- </view>
- <view class="incomeExpenditureClass" v-show="childInfo.type!=4" >
- <view class="incomeRow" >
- <view class="income1">
- <view class="income11">
- 电费收入 (元)
- </view>
- <view class="income12">
- {{incomeExpenditureObj.incomeFee}}
- <span class="income121" v-if="!incomeExpenditureObj.id">加载中...</span>
- </view>
- </view>
- <view class="income1">
- <view class="income11">
- 电费支出 (元)
- </view>
- <view class="income12">
- {{incomeExpenditureObj.expenditureFee}}
- <span class="income121" v-if="!incomeExpenditureObj.id">加载中...</span>
- </view>
- </view>
- </view>
- <view class="incomeRow" >
- <view class="income1">
- <view class="income11">
- 收支情况 (元)
- </view>
- <view class="income12" :style="incomeExpenditureObj.differenceFee>=0?'color:red':'color:#52b8aa'">
- {{incomeExpenditureObj.differenceFee>0?'+':''}}{{incomeExpenditureObj.differenceFee}}
- <span class="income121" v-if="!incomeExpenditureObj.id">加载中...</span>
- </view>
- </view>
- <view class="income1">
- <view class="income11">
- 节约电费 (元)
- </view>
- <view class="income12" style="color:#52b8aa">
- {{incomeExpenditureObj.saveFee}}
- <span class="income121" v-if="!incomeExpenditureObj.id">加载中...</span>
- </view>
- </view>
- </view>
-
- </view>
- <view class="chat-box" id="barEcharts-statistics" v-show="childInfo.type!=4">
- </view>
- </view>
- <view class="search" v-if="false">
- <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"
- :showPark="homePageManageObj.showPark"
- @query="getHomePageManageChildMeter"
- v-if="getHomePageManageReady"
- :role="codes&&codes.indexOf('switch')!=-1"
- @switchBtn="switchBtnApi"
- ></Tree-Body>
-
-
- </view>
- <!-- 用电量 -->
- <view class="statistics-e statistics" v-if="!companyId">
- <view class="title">
- <view class="icon">
- <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
- </view>
- <view class="text">
- 用电量 (度)
- </view>
- <view class="check-all" @click="toEquipmentElectricity">
- 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
- </view>
- </view>
- <view class="content" style="display: flex;justify-content: center;margin: 40px 0;"
- v-if="getHomePageKwhshowLoading">
-
- <div class="uni-toast" style="display: flex;font-size: 60rpx; color: rgb(192, 196, 204);" >
- <i class="uni-icon_toast uni-loading"
- style="
- width: 80rpx;
- height: 80rpx;
-
- "
- ></i><p class="uni-toast__content"> </p>加载中...</div>
-
- </view>
- <view class="content" v-else-if="!getHomePageKwhshowLoading&&kWhListHome.length == 0">
- <u-divider :isnone="true" nonetext="无记录"
- border-color="#fff"></u-divider>
- </view>
-
- <view class="content" v-else >
- <view class="electricity">
- <view class="item" v-for="(item, index) in kWhListHome" :key="index"
- @click="toElectronicMonitoring(item)">
- <view class="item-content">
- <view class="equipment">
- <view class="equipment1 ">
- {{replaceLastTwoWords(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>
- </view>
- </view>
-
- <!-- 异常设备排名 -->
- <view class="statistics statistics-ranking" v-if="false">
- <view class="title">
- <view class="icon">
- <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
- </view>
- <view class="text">
- 异常设备排名
- </view>
- <view class="check-all">
- 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
- </view>
- </view>
- <!-- 合计 -->
- <view class="total">
- 本年度共有<text> 42</text>次设备异常告警
- </view>
- <view class="ranking-main">
- <view class="item" v-for="(item,i) in 3" :key="i"
- @click="gotoUrl('/pages/equipmentDataMonitoring/electronicMonitoring?id='+'&name=')">
- <view class="ranking">
- 1
- </view>
- <view class="name">
- <view class="name1">
- 荆鹏软件园01
- </view>
- <view class="name2">
- 荆鹏集团
- </view>
- </view>
- <view class="time">
- 5次
- </view>
- </view>
- </view>
- <!-- 查看全部排名 -->
- <!-- <view class="check-all" @click="gotoUrl('/pages/abnormal/abnormalDeviceRanking')">
- 查看全部排名 <u-icon name="arrow-down" size="24" color="rgba(119,119,119,1)"></u-icon>
- </view> -->
- </view>
- <u-divider nonetext="暂无数据" border-color="#CFD2D5">已经到底了</u-divider>
-
- </view>
- <energyCenterTabbar :current="0"></energyCenterTabbar>
- </view>
- </template>
- <script>
-
- import {
- parseUnixTime,
- beforeTimeStamp,
- getWeek,newDate
- } from '@/apis/utils'
- import energyCenterTabbar from '@/components/energyCenterTabbar.vue'
- import electronicMonitoring from '@/pages/equipmentDataMonitoring/electronicMonitoring.vue'
-
-
- import * as echarts from 'echarts';
- import * as API_index from '@/apis/pagejs/index.js'
- import * as API_tenantList from '@/apis/pagejs/tenantList.js'
-
- import * as API from '@/apis/pagejs/energyManage.js'
- import TreeBody from '@/components/tree/tree-body.vue';
- export default {
- components: {
- energyCenterTabbar,TreeBody,electronicMonitoring
- },
- data() {
- return {
- abnormalRecordsList: [],
- queryDate: '',
-
- alarmsPercent: 0,
- alarmsForm: {
- okNum: 0,
- errorNum: 0,
- errorMonthNum: 0
- }, // 累计报警
- companyId: '', // 商户ID
- pageIndexe: 1, // 设备数据检测
- totalPagee: 1,
- deviceList: [],
- pageIndexp: 1, // 用电量
- totalPagep: 1,
- kWhList: [],
- kWhListHome: [],
- codes: '', // 判断:reading用电量 detector设备数据检测
- merchantList1: [], // 商户
- merchantList2: [],
- companyListMain: [],
- companyList: [],
- datacompanyInfo:{},
- companyInfotypeCurrent:1,
- companyInfotypeList:[
- {
- name: '变压器巡检仪'
- },
- {
- name: '费控电表计量仪'
- }
- ],
- popShow: false,
- popShowtest: true,
- current: 0,
- current2: 0,
- myLineChart: null, // 图表
- myBarChart: null,
- myPieChart: null,
- intervalId: null, // 用于存储间隔ID
- intervalReady: false, // 用于存储间隔ID
- list: [{
- name: '上月',
- value: "2"
- },
- {
- name: '当月',
- value: "1"
- },
- {
- name: '今日',
- value: "4"
- }, {
- name: '当年',
- value: "3"
- }, {
- name: '合计',
- value: "0"
- },
- {
- name: '指定时间',
- value: "10"
- }
- ],
- checked: false,
- homePageManageType: 2,
- meterList: [],
- showPark:false,
- meterListShow:{},
- homePageManageObj: {
- chargeKwh: 0,
- lostKwh: 0,
- parkKwh: 0,
- freeKwh:0,
- publicKwh:0,
- },
- endYear: '',
- params: {
- year: true,
- month: true,
- day: false,
- hour: false,
- minute: false,
- second: false
- },
- value: '2',
- clickType: -1,
- tabsFrom: {
- show1: false,
- show1Index: 0,
- show2Index: '',
- show2: false,
- show1Text: "全部类型",
- show2Text: "",
-
- },
- getHomePageManageReady:false,
-
- utabsone:true,
-
- incomeExpenditureObj:{},
- getHomePageKwhshowLoading:false,
- getHomePageManageshowLoading:false,
- companyInfotype:0,
- readingMeterNum:0, //计量仪
- monitorMeterNum:0, //巡检仪
- tenantListNum0:0,
- tenantListNum1:0,
- tenantListNum2:0,
- tenantListNum3:0,
- childList:[],
- childInfo:{},
- companyInfo:{},
- month:0,
- platformRevenueList:[],
- getPlatformRevenueReady:false,
- }
- },
- onLoad() {
- var date = new Date();
- var year = date.getFullYear();
- var month = date.getMonth() + 1 >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1);
- this.month=date.getMonth() + 1
- this.endYear = new Date().getFullYear();
- this.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
-
- this.getfindByOpenId();
- this.getCompanyInfoList();
-
-
- },
- onReady() {
-
- },
- onUnload(){
- this.clearTimer(); // 组件销毁前清除定时器
-
- console.log("组件销毁前清除定时器")
- },
-
- beforeDestroy() {
- this.clearTimer(); // 组件销毁前清除定时器
-
- console.log("组件销毁前清除定时器")
- },
-
-
- onHide(){
- this.intervalReady=false
- this.clearTimer();
- },
- onShow(){
- if(!this.intervalReady&&this.companyList.length>1){
- this.startInterval();
- }
- },
- computed:{
- childListName(){
- return this.childInfo.name;
- },
- companyType(){
-
-
- return this.companyInfo.type;
- }
- },
- methods: {
- titleCk() {
- if(this.childList.length>1){
- this.tabsFrom.show1 = true
- }
-
- },
- stateBl(timekey,day){
- var get=newDate(timekey)
- var time=new Date()
- if(!day){
-
- return time>get;
- }else{
-
- var get2=newDate(timekey)
- get2.setDate(get2.getDate() - day)
- console.log(timekey)
- return get2<time&&get>time;
- }
- },
- selectTypeMethod(tenant,selectType){
- var selectType1=this.selectType;
- if(selectType){
- selectType1=selectType;
- }
-
- // if(){
-
- // }
- if(true){
- var bl=false;
- for(var j in tenant.tenantContractList){
-
-
- var tenant1=tenant.tenantContractList[j]
- //console.log(tenant1.autoDeductFee)
- if(tenant1.autoDeductFee!=true){
- continue;
- }
- if(selectType1==0){
- return true
- }
- if(selectType1==1){
- return tenant.balance<tenant.minBalance
- }
- for(var k in tenant1.contractItemList){
-
- var item=tenant1.contractItemList[k]
- //console.log(item.prepaidEndTime)
-
- if(item.paymentMethod==1&&item.name!='电费'){
-
- if(selectType1==2){
- if(item.prepaidEndTime&&this.stateBl(item.prepaidEndTime,30)){
- bl=true;
- }
- }
- if(selectType1==3){
- if(item.prepaidEndTime&&this.stateBl(item.prepaidEndTime)){
- bl=true;
- }
- if(item.prepaidEndTime==null){
- bl=true;
- }
- }
-
- }
- }
-
- }
- return bl
- }
- },
- getTenantList(){
- // uni.showLoading({
- // title: "加载中",
- // mask: true,
- // })
- this.tenantListNum1=0
- this.tenantListNum2=0
- this.tenantListNum3=0
- API_tenantList.tenantContractList({
- companyId:this.companyId
- }).then((response) => {
- uni.hideLoading();
- //this.getTenantListReady=true
- var tenantList=response.data.tenantInfoList;
- this.tenantListNum0=tenantList.length
-
- for(var i in tenantList){
- var obj=tenantList[i]
- if(this.selectTypeMethod(obj,1)){
- this.tenantListNum1++;
- }
-
-
- if(this.selectTypeMethod(obj,2)){
- this.tenantListNum2++;
- }
- if(this.selectTypeMethod(obj,3)){
- this.tenantListNum3++;
- }
- }
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- //绑定权限
- getfindByOpenId() {
-
- API_index.findByOpenId({
- openId: this.carhelp.getOpenId()
- }).then((response) => {
- if(response.data&&response.data.companyInfo){
- this.datacompanyInfo=response.data.companyInfo
- this.companyInfotype = response.data.companyInfo.type;
- if(this.companyInfotype==4){
- this.getFindMeterList()
- }
-
-
- }
- if(response.data){
- var token = response ? response.data.token : '';
- this.carhelp.setPersonInfo(response.data.regUser );
-
- this.carhelp.setToken(token);
- this.carhelp.setPersonInfoPlus(response.data);
-
- this.codes =response.data.regUser.codes
- if(this.companyId&&this.codes&&this.codes.indexOf('property')!=-1){
- this.getTenantList()
- }
-
- }
-
-
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- getFindMeterList(){
-
- API.findMeterList().then((response) => {
- //readingMeterNum 计量仪 //monitorMeterNum 巡检仪
- this.readingMeterNum=response.data.readingMeterNum
- this.monitorMeterNum=response.data.monitorMeterNum
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
-
- switchBtnApiMethod(node,key){
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- API.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?'开启':'关闭'}"${this.replaceLastTwoWords(node.name)}`,
- title: "提示",
- success:res=> {
- if(res.confirm){
- this.switchBtnApiMethod(node,key);
- }
- }
- })
- console.log(node,key)
- },
- getIncomeExpenditure(){
-
- API.incomeExpenditure({
- //parentMeterId:item.id,
- queryDate:this.queryDate,
- companyId: this.companyId,
- type: this.list[this.homePageManageType].value
- }).then((response) => {
-
- this.incomeExpenditureObj=response.data
- this.incomeExpenditureObj.id=1
-
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- // 设备数据监测
- getHomePageManageChildMeter(item,bl) {
- if(!bl){
- // uni.showLoading({
- // title: "加载中",
- // mask: true,
- // })
- }
-
- API.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"
- })
- })
- },
- 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.$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) {
- this.homePageManageType = "5";
-
- if (day) {
- this.queryDate = queryTime;
- this.list[5].value = '9';
- } else {
-
- this.queryDate = queryTime + "-01";
-
-
- this.list[5].value = '10';
- }
- //this.list[5].name = queryTime;
- this.getHomePageManage();
- },
- clearTimer() {
- if (this.intervalId) {
- clearInterval(this.intervalId); // 清除定时器
- this.intervalId = null; // 重置定时器ID
- }
- },
- startInterval() {
- this.clearTimer(); // 组件销毁前清除定时器
-
-
- this.intervalId = setInterval(() => {
-
- this.getHomePageKwh('', true)
- }, 60000);
- },
- merchantChangeApi() {
- this.popShow=false
-
-
- if (this.companyId) {
-
- if(this.companyId&&this.codes&&this.codes.indexOf('property')!=-1){
- this.getTenantList()
- }
- this.getHomePageKwh(this.companyId)
- this.getAbnormalAlarmRecord();
-
- }else{
- this.kWhList=[]
-
- this.getPlatformRevenue()
-
- }
- this.getDeviceStatus()
- },
- companyInfotypeChange(index){
- if(index!=this.companyInfotypeCurrent){
- var url=""
- if(process.car.NODE_ENV=='dev'){
-
- url='http://localhost:8081/#/'
-
- }else if(process.car.NODE_ENV=='test'){
-
- url='https://dgj.hbjp.com.cn/charging-prod/jp-housekeep-electric-test/#/'
-
- }else{
- url='https://dgj.hbjp.com.cn/charging-prod/jp-housekeep-electric/#/'
-
- }
-
- window.location.href=url+"pages/statistics/statistics"
- }
- },
- change(index) {
- this.current = index;
- this.current2=0;
- this.childList=[]
- var company= this.merchantList1[index]
- if(company.id!=''){
- this.childList=company.childList;
- if(this.childList&&this.childList.length){
- this.companyId = this.childList[0].id;
- this.childInfo=this.childList[0]
- }else{
- this.childList=[]
- this.companyId =company.id
- this.childInfo=company
- }
-
-
- }else{
- this.companyId =''
-
- }
- this.companyInfo=company;
-
- this.merchantChangeApi()
- },
- change2(index) {
-
- this.current2=index;
-
- this.companyId = this.childList[this.current2].id;
-
- this.childInfo=this.childList[this.current2]
-
- this.merchantChangeApi()
- },
- merchantChange(company, index) {
- if(this.current==0){
- this.current=1;
- }
- var m = company;
- var n = this.merchantList1[this.current];
- this.merchantList1[this.current] = m;
- this.merchantList2[index] = n;
- //this.$forceUpdate()
- this.utabsone=false
- this.companyId = company.id;
-
- this.companyInfo=company
-
-
- if(company.id!=''){
- this.childList=company.childList;
- if(this.childList&&this.childList.length){
- this.companyId = this.childList[0].id;
- this.childInfo=this.childList[0]
- }else{
- this.childList=[]
- this.companyId =company.id
- this.childInfo=company
- }
- }else{
- this.companyId =''
- }
-
- this.merchantChangeApi()
- this.popShow = false;
- },
-
- getCompanyInfoList() {
- // uni.showLoading({
- // title: "加载中",
- // mask: true,
- // })
- API.deviceCompanyList().then((response) => {
- //uni.hideLoading();
- var list = response.data.companyInfoList;
- this.companyListMain=response.data.companyInfoList;
- if(list.length==1&&list[0].childList&&list[0].childList.length){
- list=list[0].childList
-
- }
-
- 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.companyList = list;
-
-
- if(this.companyList&&this.companyList.length&&this.companyList.length==1){
-
- this.childList=list[0].childList
- if(!this.childList){
- this.childList=[]
- }
- // this.childList=[
-
- // ...list[0].childList,
- // {
- // name:'创客公寓',
- // id:''
- // },
- // {
- // name:'创客公寓',
- // id:''
- // }
- // ]
- }
-
- if(this.companyList.length==1&&this.childList.length==0){
- this.companyId=this.companyList[0].id
-
- this.childInfo=this.companyList[0]
- this.companyInfo=this.companyList[0]
- }else if(this.companyList.length==1){
- this.companyId=this.childList[0].id
-
- this.childInfo=this.childList[0]
- this.companyInfo=this.companyList[0]
-
-
-
- }else{
- this.getHomePageKwh('')
- }
- this.merchantList1 = mList1;
- this.merchantList2 = mList2;
- this.merchantChangeApi()
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- sectionChange(index) {
- this.clickType = this.homePageManageType ;
- this.homePageManageType = index;
- if (index == 5) {
- this.tabsFrom.show2 = true;
- //this.params.day = false;
- } else {
- this.list[5].name = '指定时间'
- this.getHomePageManage()
- }
-
-
- },
-
- getHomePageManage(bl) {
- this.getHomePageManageReady=false
- if(bl){
- this.getHomePageManageshowLoading=false
-
- }else{
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- }
-
- this.incomeExpenditureObj={}
- var type=this.list[this.homePageManageType].value
-
- API.homePageManage({
- queryDate:this.queryDate,
- companyId: this.companyId,
- type: type
- }).then((response) => {
- this.getHomePageManageReady=true
- if(bl){
-
- this.getHomePageManageshowLoading=true
- }else{
- uni.hideLoading();
- }
-
-
-
-
- this.meterList = response.data.meterList;
- //console.log(this.meterList)
- this.homePageManageObj = response.data;
- //this.$forceUpdate()
- if(this.childInfo.type!=4){
- //&&this.homePageManageObj.showPark
- this.myBarChart=null;
- this.$nextTick(()=>{
- this.getBarCharts()
- })
-
- this.getIncomeExpenditure();
- }
-
-
-
-
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
-
- // 报警
- getAbnormalAlarmRecord() {
- if(this.companyId&&this.codes&&this.codes.indexOf('property')!=-1){
-
- }else{
- return
- }
- API.remindList({
-
- configId: '',
- pageIndex: 1,
- pageSize: 3,
- companyId: this.companyId
- }).then((response) => {
-
- this.abnormalRecordsList = response.data.data;
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- selector1confirm(e) {
- //this.getHomePageKwh()
-
- console.log(e)
- this.companyId=e[0].value
-
- this.current2=e[0].i
-
- this.childInfo=this.childList[this.current2];
- uni.showLoading()
-
- this.merchantChangeApi()
- },
- // 用电量
- getHomePageKwh( companyId,interval) {
-
-
- if (!interval) {
- // uni.showLoading({
- // title: "加载中",
- // mask: true,
- // })
- this.getHomePageKwhshowLoading=true;
- }
- API.homePageKwh({
- pageIndex: 1,
- pageSize: 5,
- companyId:companyId
- }).then((response) => {
- if (!interval) {
- //uni.hideLoading();
- this.getHomePageKwhshowLoading=false;
- }
-
- if(companyId){
- this.kWhList = response.data.data;
-
- if(this.kWhList.length==1){
-
- var item=this.kWhList[0];
- this.$refs['refMyEm'+companyId].init({
- id:item.id,
- name:item.name,
- companyId:item.companyId,
-
- ref:1,
- })
- setTimeout(()=>{
- this.$nextTick(()=>{
- this.utabsone=true
- })
- },200)
-
- }else{
- this.getHomePageManage(1)
-
- this.getAbnormalAlarmRecord();
- }
- }else{
-
- this.kWhListHome= response.data.data;
- if (!interval) {
- this.startInterval(); // 组件挂载后开始间隔
- }else{
- this.intervalReady=true
- }
- setTimeout(()=>{
- this.$nextTick(()=>{
- this.utabsone=true
- })
- },200)
- }
-
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- getPlatformRevenueBl(){
- console.log("getPlatformRevenueBl",this.datacompanyInfo)
- return this.companyId==''&&this.companyList.length>1&&this.datacompanyInfo.type=='2'
- },
- getPlatformRevenue(){
- if(this.getPlatformRevenueBl()){
-
- }else{
-
- return
- }
- this.getPlatformRevenueReady=false
- var queryDate =parseUnixTime(new Date(), '{y}-{m}-1');
- API.platformRevenue({
- queryDate:queryDate
- }).then((response) => {
- this.getPlatformRevenueReady=true
- this.platformRevenueList=response.data.companyInfoList
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- // 累计报警
- getDeviceStatus() {
-
- API.deviceStatus({
- companyId: this.companyId
- }).then((response) => {
-
- setTimeout(()=>{
- this.$nextTick(()=>{
- this.utabsone=true
- })
- },200)
- this.alarmsForm = response.data;
- if (this.alarmsForm.okNum != 0) {
- this.alarmsPercent = this.alarmsForm.okNum / (this.alarmsForm.okNum + this.alarmsForm
- .errorNum) * 100;
- }
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- // 故障类型
- getBarCharts() {
- if (!this.myBarChart) {
- this.myBarChart = echarts.init(document.getElementById('barEcharts-statistics'),null,{
- width:uni.upx2px(620),height:uni.upx2px(740)
- });
- }
- this.myBarChart.clear()
- var data=[
-
-
- {
- name:"总表电量",
- key:"parkKwh",
- color:"#307af6"
- },
- {
- name:"计费电量",
- key:"chargeKwh",
- color:"#52b8aa"
- },
- {
- name:"自用电量",
- key:"freeKwh",
- color:"#53b56b"
- },
- {
- name:"公用电量",
- key:"publicKwh",
- color:"#ef8132"
- },
-
- {
- name:"电损量",
- key:"lostKwh",
- color:"#dc4441"
- }
- ]
- var dataName=[]
- var dataSeries=[]
- for(var i in data){
- var it=data[i]
- dataName.push(it.name)
- dataSeries.push({})
- }
- for(var i in data){
- var it=data[i]
- dataSeries[data.length-i-1]={
- name:it.name,
- type: 'bar',
- itemStyle:{
- color:it.color
- },
- data: [
-
- this.homePageManageObj[it.key]
- ],
- coordinateSystem: 'polar',
- label: {
- show: true,
- position: 'start',
- formatter: '{c}度'
- }
- }
-
- }
-
-
-
-
-
-
-
- var option = {
-
- polar: {
- center:['50%','58%'],
- radius:[25, '80%']
- },
- angleAxis: {
-
- startAngle: 75,
- label: {
- rotate: 45, // 旋转标签,使得重叠的概率降低
- // margin: 5 // 设置标签与轴线之间的距离,增加空间
- }
- },
-
- legend: {
- itemGap:5,
-
- data: dataName,
- //orient :'vertical'
- },
- radiusAxis: {
- type: 'category',
- data: ['']
- },
- tooltip: {},
-
- series: dataSeries
- };
- console.log(option)
- this.myBarChart.setOption(option);
- },
-
- toDataMonitoringList() {
- uni.navigateTo({
- url: '/pages/equipmentDataMonitoring/dataMonitoring-list'
- })
- },
- toEquipmentConditionMonitoring() {
- uni.navigateTo({
- url: '/pages/equipmentInformation/equipmentConditionMonitoring?companyId='+this.companyId
- })
- },
- toWorkOrderManagement() {
-
- uni.navigateTo({
- url: '/pages/workOrderManagement/workOrderManagement'
- })
- },
- toEquipmentElectricity() {
- uni.navigateTo({
- url: '/pages/equipmentDataMonitoring/equipmentElectricity?companyId=' + this.companyId
- })
- },
- toElectronicMonitoring(item) {
- uni.navigateTo({
- url: '/pages/equipmentDataMonitoring/electronicMonitoring?id=' + item.id + '&name=' + item
- .name +
- '&companyId=' + item.companyId
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .incomeExpenditureClass{
-
- width: 100%;
- padding:16rpx 0;
- .incomeRow{
- display: flex;
- justify-content: space-evenly;
- }
- .income1:last-child{
- .income11,.income12{
- border-right: 1px solid #c5c3c3;
-
- }
-
- }
- .income1{
- .income121{
- font-size: 24rpx;
- color:#c5c3c3;
- }
- width: 50%;
- text-align: center;
- .income11{
- padding:12rpx 0;
- background-color: #1677FF ;
- color:#fff;
- font-size: 32rpx;
- border-top: 1px solid #c5c3c3;
- border-left: 1px solid #c5c3c3;
- }
-
- .income12{
- padding:12rpx 0;
- border-top: 1px solid #c5c3c3;
- border-bottom: 1px solid #c5c3c3;
- border-left: 1px solid #c5c3c3;
- font-size: 40rpx;
- }
-
- }
-
-
- }
-
- /deep/.u-drawer-content {
- margin-top: 88rpx;
- }
- .popup-tabs {
- background-color: #fff;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding-top: 32rpx;
- padding-right: 32rpx;
- color: rgba(51, 51, 51, 1);
- font-size: 32rpx;
- .tabs {
- width: 88%;
- }
- }
- // /deep/.u-tab-item {
- // width: 25% !important;
- // flex: none !important;
- // }
- .tabs-box{
- .tabs-len-1{
-
- }
- .tabs-len-2{
- /deep/.u-tab-item {
- // max-width: 39% !important;
- // flex: none !important;
- }
- }
- .tabs-len-3{
- /deep/.u-tab-item {
- max-width: 39% !important;
- flex: none !important;
- }
- }
- .tabs-len-4{
- /deep/.u-tab-item {
- max-width: 26% !important;
- flex: none !important;
- }
- }
- .tabs{
- /deep/.u-tab-item:first-child {
- width: 20% !important;
- flex: none !important;
- }
-
- }
- }
- // /deep/.u-tab-item2 {
- // width: 33% !important;
- // flex: none !important;
- // }
- .tabs-options {
- display: flex;
- padding: 24rpx 32rpx 0;
- flex-wrap: wrap;
- .item {
- width: 25%;
- margin-bottom: 40rpx;
- }
- }
- // 导航栏
- .navbar {
-
-
- background-color: rgba(22, 119, 255, 1);
- color: #fff;
- line-height: 88rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 32rpx;
- color: rgba(255, 255, 255, 1);
- font-size: 36rpx;
- position: fixed;
- left: 0;
- right: 0;
- top: 0;
- z-index: 999999;
- font-weight: bold;
- .title{
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .img {
- width: 48rpx;
- height: 48rpx;
- vertical-align: middle;
- }
- }
- // 标签
- .tabs-box {
- padding: 32rpx 0;
- margin-top: 66rpx;
- padding-right: 32rpx;
- background-color: rgba(22, 119, 255, 1);
- display: flex;
- align-items: center;
- justify-content: space-between;
- .tabs {
- width: 97%;
- }
- .more{
- padding-right: 12rpx;
- }
- }
- .main {
- border-radius: 16px 16px 0px 0px;
- background: linear-gradient(180deg, rgba(242, 244, 246, 1) 61%, rgba(255, 255, 255, 0) 100%);
- margin-top: -24rpx;
- padding: 32rpx;
- .statistics {
- border-radius: 8px;
- background-color: rgba(255, 255, 255, 1);
- box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
- margin-bottom: 24rpx;
- padding: 40rpx;
- .title {
- display: flex;
- align-items: center;
- margin-bottom: 20rpx;
- .img {
- width: 36rpx;
- height: 36rpx;
- vertical-align: middle;
- border-radius: 999px;
- }
- .change {
- display: flex;
- align-items: center;
- .change-img {
- width: 32rpx;
- height: 32rpx;
- vertical-align: middle;
- }
- text {
- margin-left: 8rpx;
- }
- }
- .text {
- color: rgba(16, 16, 16, 1);
- font-size: 36rpx;
- margin-left: 16rpx;
- font-weight: bold;
- }
- .change {
- margin-left: 16rpx;
- font-size: 24rpx;
- color: #838383;
- }
- .check-all {
- margin-left: auto;
- color: rgba(131, 131, 131, 1);
- font-size: 24rpx;
- }
- }
- }
- // 用电量
- .statistics-e {
- padding: 40rpx;
- .electricity {
- background-color: #fff;
- .item:last-of-type {
- border: none;
- padding-bottom: 0;
- }
- .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 {
- white-space: pre;
- //width: 64rpx;
- //height: 36rpx;
- padding: 0 4rpx;
- line-height: 36rpx;
- border-radius: 8rpx;
- font-size: 22rpx;
- text-align: center;
- border: 1px solid rgba(255, 123, 0, 1);
- 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;
- // }
- }
- .state2 {
- border: 1px solid rgba(0, 185, 98, 1);
- 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%;
- height: 40rpx;
- line-height: 40rpx;
- .number {
- color: rgba(51, 51, 51, 1);
- font-weight: bold;
- font-size: 24rpx;
- margin-left: 8rpx;
- }
- .date {
- color: rgba(119, 119, 119, 1);
- font-size: 24rpx;
- }
- }
- }
- }
- }
- }
- // 统计1
- .statistics-1 {
- background-color: rgba(255, 255, 255, 1);
- width: 100%;
- padding: 24rpx;
- box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
- border-radius: 8px;
- margin-bottom: 24rpx;
- .item {
- margin-top: 32rpx;
- display: flex;
- align-items: center;
- .item-progess {
- display: flex;
- align-items: center;
- .img {
- width: 88rpx;
- height: 88rpx;
- margin-right: 24rpx;
- vertical-align: middle;
- }
- }
- .total {
- margin-left: 24rpx;
- color: rgba(119, 119, 119, 1);
- .total1 {
- display: flex;
- color: rgba(51, 51, 51, 1);
- font-size: 32rpx;
- font-weight: bold;
- .normal {
- margin-bottom: 12rpx;
- }
- }
- .total2 {
- color: rgba(119, 119, 119, 1);
- }
- .abnormal {
- margin-left: 24rpx;
- }
- }
- .total-number {
- color: rgba(255, 123, 0, 1);
- margin: 0 8rpx;
- font-weight: bold;
- }
- }
- }
- // 统计2异常报警记录
- .statistics-2 {
- .abnormal-item:last-of-type {
- border-bottom: none !important;
- padding-bottom: 0;
- }
- .abnormal-item {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 16rpx;
- border-bottom: 1px solid rgba(245, 245, 245, 1);
- .item-title {
- color: rgba(51, 51, 51, 1);
- .img {
- width: 32rpx;
- height: 32rpx;
- margin-right: 8rpx;
- }
- .name {
- color: rgba(51, 51, 51, 1);
- font-weight: bold;
- }
- .date {
- color: rgba(119, 119, 119, 1);
- font-size: 24rpx;
- }
- }
- .item-value {
- text-align: right;
- display: flex;
- align-items: center;
- .more {
- margin-left: 8rpx;
- }
- .value1 {
- font-weight: bold;
- color: rgba(51, 51, 51, 1);
- }
- .value2 {
- color: rgba(119, 119, 119, 1);
- font-size: 24rpx;
- }
- }
- }
- }
-
- .statistics-3 {
-
- }
-
- .statistics-4 {
-
- }
-
- // 异常设备排名
- .statistics-ranking {
- .total {
- color: rgba(16, 16, 16, 1);
- padding-left: 52rpx;
- text {
- color: #1677FF;
- padding: 0 8rpx;
- }
- }
- .ranking-main {
- margin-top: 40rpx;
- border-radius: 16px;
- background-color: #fff;
- .item:last-of-type {
- margin-bottom: 0;
- }
- .item {
- display: flex;
- align-items: center;
- margin-bottom: 32rpx;
- .ranking {
- color: rgba(16, 16, 16, 1);
- font-weight: bold;
- }
- .icon {
- width: 72rpx;
- height: 72rpx;
- border-radius: 4px;
- background-color: rgba(219, 234, 255, 1);
- display: flex;
- align-items: center;
- justify-content: center;
- margin-left: 24rpx;
- .img {
- width: 48rpx;
- height: 48rpx;
- }
- }
- .name {
- margin-left: 16rpx;
- .name1 {
- color: rgba(51, 51, 51, 1);
- font-weight: bold;
- }
- .name2 {
- color: rgba(119, 119, 119, 1);
- font-size: 24rpx;
- margin-top: 4rpx;
- }
- }
- .time {
- color: rgba(16, 16, 16, 1);
- margin-left: auto;
- font-weight: bold;
- }
- }
- }
- // 查看全部排名
- .check-all {
- text-align: center;
- color: rgba(119, 119, 119, 1);
- font-size: 12px;
- }
- }
- // 能源管理
- .statistics-manage {
- padding: 40rpx 0;
- .title,
- .chart,
- .search,
- .meter-statistic {
- padding: 0 32rpx;
- }
- // 图表
- .chart {
- padding-top: 32rpx;
- border-top: 1px solid rgba(242, 242, 242, 1);
- /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 {
- padding-left: 16rpx;
- margin-top: 20rpx;
-
- .meter-name {
- font-size: 28rpx
- }
- }
- .first-level-list{
- width: 100%;
- display: flex;
- align-items: center;
- }
- // 二级表
- .second-level {
- padding-left: 32rpx;
- margin-top: 20rpx;
- .meter-name {
- font-size: 24rpx
- }
- }
- .else-switch {
- padding-left: 72rpx;
- .meter-name {
- font-size: 24rpx
- }
- .item {
- margin-top: 24rpx;
- }
- }
- }
- }
- /deep/.u-drawer {
- z-index: 999 !important;
- }
-
- .contractList{
- font-weight: bold;
- .contractListClass{
- display: flex;
- margin-top:24rpx;
- justify-content: space-between;
- color: rgba(51,51,51,1);
- .img{
- width: 32rpx;
- height: 32rpx;
- margin-right: 18rpx;
- }
- .contractListClass1{
- display: flex;
- align-items: center;
- }
- .tenantListNum{
- margin: 0 8rpx;
- color:#FF7B00 ;
- }
-
- }
- }
-
- .statistics-3 {
- .contractListClass{
- .contractListClass1{
- display: block;
- .class1{
- font-size: 28rpx;
- color: rgba(51,51,51,1);
- }
- .class2{
- font-size: 24rpx;
- color: rgba(119,119,119,1);
-
- }
- }
- .contractListClass2{
- font-size: 40rpx;
- color: rgba(16,16,16,1);
- font-weight: bold;
-
- display: flex;
- align-items: center;
- }
- }
-
-
- }
-
-
- .statistics-4 {
-
-
- }
- .electronicMonitoring-title2{
- margin-bottom: 16rpx;
- }
- .electronicMonitoring-title3{
-
- }
- .electronicMonitoring-title{
- display: flex;
- margin: 0px 32rpx;
- justify-content: space-between;
- }
- .current-123{
- .electronicMonitoring-title{
- margin: 8rpx 0rpx 32rpx 0;
- }
- }
- .electronicMonitoring-123{
-
- }
- </style>
|