statistics.vue 89 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786
  1. <template>
  2. <view>
  3. <u-popup v-model="popShow1" duration="10" mode="bottom" border-radius="16">
  4. <view class="popShow1">
  5. <view class="title">
  6. {{companyInfo.name}}
  7. </view>
  8. <view class="popShowList">
  9. <scroll-view scroll-y="true" style="height: 500rpx;" >
  10. <view class="popShowItem" v-for="(item,i) in childCompanyList.list"
  11. @click="change3(i)"
  12. :class="{
  13. index:item.id==childInfo.id
  14. }" >
  15. <view class="online" :class="'online'+item.online">
  16. <view class="name">{{item.name}}</view>
  17. <view class="onlineChild" v-if="item.online==0"><view class="dot"></view>离线</view>
  18. <view class="onlineChild" v-if="item.online==1"><view class="dot"></view>在线</view>
  19. <view class="onlineChild" v-if="item.online==2">【多表】</view>
  20. <view class="onlineChild" v-if="item.online==3">【无表】</view>
  21. </view>
  22. <u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  23. </view>
  24. <u-divider nonetext="暂无数据" border-color="#CFD2D5">已经到底了</u-divider>
  25. </scroll-view>
  26. </view>
  27. </view>
  28. </u-popup>
  29. <u-picker-select title="日期选择" :maskCloseAble="true" v-model="tabsFrom.show2" :defaultTime="tabsFrom.show2Index" :endYear="endYear"
  30. mode="time" :params="params" @confirm="selector2confirm" @cancel="selector2cancel"
  31. @reset="selector2reset">
  32. </u-picker-select>
  33. <!--
  34. <u-select title="" v-model="tabsFrom.show1" :defaultValue="[current2]"
  35. :list="childCompanyList.list" value-name="id" label-name="name"
  36. @confirm="selector1confirm" >
  37. </u-select>
  38. -->
  39. <!-- 导航栏 -->
  40. <view class="navbar">
  41. <view class="title" v-if="companyInfotype==4">
  42. 能源管理
  43. <span style="padding-left: 4px;" >
  44. |
  45. </span>
  46. <span style="padding-left: 4px;" >
  47. {{datacompanyInfo.name}}
  48. </span>
  49. </view>
  50. <view class="title" v-else>
  51. 能源管理
  52. <span style="padding-left: 4px;" v-if="companyList.length>1&&current!=0">
  53. |
  54. </span>
  55. <span style="padding-left: 4px;" v-if="companyList.length>1&&current!=0">
  56. <template v-if="kWhList.length==1">
  57. {{kWhList[0].name}}
  58. </template>
  59. <template v-else>
  60. <!-- {{childList.length==1? : childInfo.name}} -->
  61. {{companyInfo.name}}
  62. </template>
  63. </span>
  64. <span style="padding-left: 4px;" v-if="companyList.length==1">
  65. |
  66. </span>
  67. <span style="padding-left: 4px;" v-if="companyList.length==1">
  68. <template v-if="kWhList.length==1">
  69. {{kWhList[0].name}}
  70. </template>
  71. <template v-else>
  72. {{childList.length==1?companyInfo.name : childInfo.name}}
  73. </template>
  74. </span>
  75. </view>
  76. </view>
  77. <view class="tabs-box tabs-box2" v-if="companyInfotype==4&&readingMeterNum&&monitorMeterNum" >
  78. <view class="tabs2" :class="'tabs-len-2'"
  79. :style="{width: '100%', }">
  80. <u-tabs-one :gutter="32"
  81. :list="companyInfotypeList" :is-scroll="false" active-color="#fff" inactive-color="#CCE2FF"
  82. bg-color="#1677FF" :current="1" @change="companyInfotypeChange"></u-tabs-one>
  83. </view>
  84. </view>
  85. <!-- 标签 -->
  86. <view class="tabs-box" v-else >
  87. <view class="tabs" :class="'tabs-len-'+merchantList1.length" v-show="companyList.length>1"
  88. :style="{width: companyList.length>3 ? '' : '100%'}">
  89. <u-tabs-one v-if="utabsone"
  90. :list="merchantList1" :is-scroll="false" active-color="#fff" inactive-color="#CCE2FF"
  91. bg-color="#1677FF" :current="current" @change="change"></u-tabs-one>
  92. </view>
  93. <view class="more" @click="popShow=true" v-if="companyList.length >= 4">
  94. <u-icon name="arrow-down" color="#fff" size="40"></u-icon>
  95. </view>
  96. </view>
  97. <!-- 标签弹出层 -->
  98. <u-popup v-model="popShow" duration="10" mode="top" :negative-top="88" border-radius="16">
  99. <view class="popup-tabs">
  100. <view class="tabs">
  101. <u-tabs
  102. :list="merchantList1" :is-scroll="false" :current="current" @change="change"></u-tabs>
  103. </view>
  104. <view class="more">
  105. <u-icon name="arrow-up" color="#777777" size="40" @click="popShow=false"></u-icon>
  106. </view>
  107. </view>
  108. <view class="tabs-options">
  109. <view class="item" v-for="(item, index) in merchantList2" :key="index"
  110. @click="merchantChange(item,index)">
  111. {{item.name}}
  112. </view>
  113. </view>
  114. </u-popup>
  115. <view class="main electronicMonitoring-123" v-show="kWhList.length==1" style="padding:32rpx 0;">
  116. <view class="electronicMonitoring-title3"
  117. v-if="companyType==5"
  118. v-show="childList&&childList.length>1" >
  119. <view style="padding:0 32rpx;">
  120. <u-tabs-one height="60" v-if="utabsone&&childList&&childList.length"
  121. :currentIndexBl="true" bg-color="#f2f4f6" key="B" :showBar="false"
  122. :list="childList" :is-scroll="false" :current="current2" @change="change2"></u-tabs-one>
  123. </view>
  124. </view>
  125. <view class="electronicMonitoring-title"
  126. @click="titleCk"
  127. v-else-if="childList&&childList.length>0" >
  128. <view class="view">
  129. {{childListName}}
  130. <template v-if="kWhList&&kWhList.length==1">
  131. <view class=" view dotview online0" v-if="!kWhList[0].online">
  132. <view class="dot online0"></view>
  133. <view class="text online0">离线</view>
  134. </view>
  135. <view class="view dotview online1" v-else>
  136. <view class="dot online1"></view>
  137. <view class="text online1">在线</view>
  138. </view>
  139. </template>
  140. <template v-if="kWhList&&kWhList.length>1">
  141. <view class="dotview view " >
  142. <!-- <view class="dot on-line"></view> -->
  143. <view class="text online2">【多表】</view>
  144. </view>
  145. </template>
  146. </view>
  147. <view v-show="childList.length>1"
  148. style="color: #777777;font-size: 24rpx;display: flex;align-items: center;"
  149. class="view">
  150. 切换<u-icon name="arrow-down" color="#777777"></u-icon>
  151. </view>
  152. </view>
  153. <electronicMonitoring v-show="kWhList.length" :ref="'refMyEm'+companyId"></electronicMonitoring>
  154. <u-divider :isnone="kWhList.length==0" nonetext="暂无数据" border-color="#CFD2D5">已经到底了</u-divider>
  155. </view>
  156. <view class="main current-123" v-show="(kWhList.length!=1)">
  157. <view class="electronicMonitoring-title"
  158. @click="titleCk"
  159. v-if="companyType==1"
  160. v-show="childList&&childList.length>0" >
  161. <view class="view">
  162. {{childListName}}
  163. <template v-if="kWhList&&kWhList.length>1">
  164. <view class="dotview view " >
  165. <!-- <view class="dot on-line"></view> -->
  166. <view class="text online2">【多表】</view>
  167. </view>
  168. </template>
  169. </view>
  170. <view v-show="childList.length>1"
  171. style="color: #777777;font-size: 24rpx;display: flex;align-items: center;"
  172. class="view">
  173. 切换<u-icon name="arrow-down" color="#777777"></u-icon>
  174. </view>
  175. </view>
  176. <view class="electronicMonitoring-title2"
  177. v-else
  178. v-show="childList&&childList.length>1" >
  179. <u-tabs-one height="60" :showBar="false" v-if="utabsone&&childList&&childList.length"
  180. :currentIndexBl="true" bg-color="#f2f4f6" key="A"
  181. :list="childList" :is-scroll="false" :current="current2" @change="change2"></u-tabs-one>
  182. </view>
  183. <!-- 电表运行情况 -->
  184. <view class="statistics-1 statistics point-meteroperation" v-show="anchorpointShow('point-meteroperation')">
  185. <view class="title">
  186. <view class="icon">
  187. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  188. </view>
  189. <view class="text">
  190. 设备运行情况
  191. </view>
  192. <view class="check-all" @click="toEquipmentConditionMonitoring">
  193. 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  194. </view>
  195. </view>
  196. <view class="item">
  197. <view v-if="alarmsForm.okNum||alarmsForm.errorNum">
  198. <u-circle-progress width="88" borderWidth="12" active-color="#2979ff" :percent="(alarmsForm.okNum/(alarmsForm.okNum+alarmsForm.errorNum)*100)">
  199. <view class="u-progress-content">
  200. <image class="img" style="width: 32rpx;height: 32rpx;margin-top: 8rpx;"
  201. src="@/assets/img/statistics/fa5-bolt-fas.svg"></image>
  202. </view>
  203. </u-circle-progress>
  204. </view>
  205. <!-- 累计 -->
  206. <view class="total">
  207. <view class="total2">
  208. 运行电表
  209. </view>
  210. <view class="total1">
  211. <view class="normal">
  212. 正常 <span style="color:#19be6b;margin: 0 8rpx;">{{alarmsForm.okNum}}</span> 台
  213. </view>
  214. <view class="abnormal">
  215. 异常 <span style="color:red;margin: 0 8rpx;">{{alarmsForm.errorNum}}</span> 台
  216. </view>
  217. </view>
  218. <view class="total2" v-if="false">
  219. 本月累计触发告警 <text class="total-number">{{alarmsForm.errorMonthNum}}</text> 次
  220. </view>
  221. </view>
  222. </view>
  223. <view class="item" v-if="alarmsFormWater.okNum||alarmsFormWater.errorNum">
  224. <view>
  225. <u-circle-progress width="88" borderWidth="12" active-color="#00B962" :percent="alarmsFormWater.okNum/(alarmsFormWater.okNum+alarmsFormWater.errorNum)*100">
  226. <view class="u-progress-content">
  227. <image class="img" style="width: 32rpx;height: 32rpx;margin-top: 8rpx;"
  228. src="@/assets/img/statistics/fas fa-tint.svg"></image>
  229. </view>
  230. </u-circle-progress>
  231. </view>
  232. <!-- 累计 -->
  233. <view class="total">
  234. <view class="total2">
  235. 运行水表
  236. </view>
  237. <view class="total1">
  238. <view class="normal">
  239. 正常 <span style="color:#19be6b;margin: 0 8rpx;">{{alarmsFormWater.okNum}}</span> 台
  240. </view>
  241. <view class="abnormal">
  242. 异常 <span style="color:red;margin: 0 8rpx;">{{alarmsFormWater.errorNum}}</span> 台
  243. </view>
  244. </view>
  245. <view class="total2" v-if="false">
  246. 本月累计触发告警 <text class="total-number">{{alarmsForm.errorMonthNum}}</text> 次
  247. </view>
  248. </view>
  249. </view>
  250. </view>
  251. <view class="" v-show="companyId==''&&companyList.length>1&&datacompanyInfo.type=='2'">
  252. <!-- 电表运行情况 -->
  253. <view class="statistics-1 statistics" >
  254. <view class="title">
  255. <view class="icon">
  256. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  257. </view>
  258. <view class="text">
  259. <!-- 在用园区与产权单位 -->
  260. 园区&产权单位
  261. </view>
  262. </view>
  263. <view class=" contractList" >
  264. <view class="contractListClass" v-for="(item,i) in companyList" :key="i"
  265. @click="change(i+1)">
  266. <view class="contractListClass1">
  267. {{item.name}}
  268. </view>
  269. <view class="contractListClass2">
  270. <u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  271. </view>
  272. </view>
  273. </view>
  274. </view>
  275. </view>
  276. <view class="point-PlatformRevenue" v-show="anchorpointShow('point-PlatformRevenue')" >
  277. <!-- 电表运行情况 -->
  278. <view class="statistics-1 statistics statistics-3" >
  279. <view class="title">
  280. <view class="icon">
  281. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  282. </view>
  283. <view class="text">
  284. {{!companyId?'平台':'园区营增'}}收入(元)
  285. </view>
  286. </view>
  287. <view class=" contractList" >
  288. <view class="content"
  289. style="display: flex;justify-content: center;margin: 40px 0;"
  290. v-if="!getPlatformRevenueReady">
  291. <div class="uni-toast" style="display: flex;font-size: 60rpx; color: rgb(192, 196, 204);" >
  292. <i class="uni-icon_toast uni-loading"
  293. style="
  294. width: 80rpx;
  295. height: 80rpx;
  296. "
  297. ></i><p class="uni-toast__content"> </p>加载中...</div>
  298. </view>
  299. <!-- -->
  300. <view class="contractListClass" v-for="(item,i) in platformRevenueList"
  301. @click="gotoUrl('/pages/platformRevenueStatistics/platformRevenueStatistics?id='+item.companyId+'&companyId='+companyId)"
  302. :key="i"
  303. >
  304. <view class="contractListClass1">
  305. <view class="class1">{{item.companyName}}</view>
  306. <view class="class2">{{month}}月预计收入</view>
  307. </view>
  308. <view class="contractListClass2">
  309. {{item.totalFee}}
  310. <u-icon name="arrow-right" style="margin-left: 12rpx;" size="24" color="#838383"></u-icon>
  311. </view>
  312. </view>
  313. </view>
  314. </view>
  315. </view>
  316. <view class="">
  317. <!-- 电表运行情况 -->
  318. <view class="statistics-1 statistics point-TenantManagement" v-show="anchorpointShow('point-TenantManagement')">
  319. <view class="title">
  320. <view class="icon">
  321. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  322. </view>
  323. <view class="text">
  324. 租户管理预警
  325. </view>
  326. </view>
  327. <view class=" contractList">
  328. <view class="contractListClass" @click="gotoUrl('/pages/tenantList/contractList?query=1&companyId='+companyId)">
  329. <view class="contractListClass1">
  330. <image class="img" src="@/assets/img/riLine-wallet-2-line.svg"></image>
  331. 账户余额不足 <span class="tenantListNum">{{tenantListNum1}}</span> 家
  332. </view>
  333. <view class="contractListClass2">
  334. <u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  335. </view>
  336. </view>
  337. <view class="contractListClass" @click="gotoUrl('/pages/tenantList/contractList?query=2&companyId='+companyId)">
  338. <view class="contractListClass1">
  339. <!-- <image class="img" src="@/assets/img/riLine-time-line2.svg"></image> -->
  340. <u-icon name="warning" class="img" size="32" color="#ef8132"></u-icon>
  341. 租赁费催缴提醒 <span class="tenantListNum">{{tenantListNum2}}</span> 家<span>(即将到期)</span>
  342. </view>
  343. <view class="contractListClass2">
  344. <u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  345. </view>
  346. </view>
  347. <view class="contractListClass" @click="gotoUrl('/pages/tenantList/contractList?query=3&companyId='+companyId)">
  348. <view class="contractListClass1">
  349. <image class="img" src="@/assets/img/riLine-time-line2.svg"></image>
  350. 租赁费催缴提醒 <span class="tenantListNum">{{tenantListNum3}}</span> 家<span>(已到期)</span>
  351. </view>
  352. <view class="contractListClass2">
  353. <u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  354. </view>
  355. </view>
  356. </view>
  357. </view>
  358. </view>
  359. <!-- 统计2 异常告警记录 -->
  360. <view class="statistics-2 statistics point-Poweroutagereminder" v-show="anchorpointShow('point-Poweroutagereminder')" >
  361. <view class="title">
  362. <view class="icon">
  363. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  364. </view>
  365. <view class="text">
  366. 租户断电提醒
  367. </view>
  368. <view class="check-all" @click="gotoUrl('/pages/tenantList/remindList?id='+companyId)">
  369. 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  370. </view>
  371. </view>
  372. <u-divider :isnone="abnormalRecordsList.length==0" nonetext="无记录"
  373. border-color="#fff"></u-divider>
  374. <!-- 异常 -->
  375. <view class="abnormal-item" v-for="(item,index) in abnormalRecordsList"
  376. :key="index"
  377. >
  378. <!-- @click="gotoUrl('/pages/abnormal/abnormalAlarmDetails?id='+item.id)"
  379. -->
  380. <view class="item-title">
  381. <view class="name">
  382. <span v-if="item.level==1" class="level level1 ">一级</span>
  383. <span v-if="item.level==2" class="level level2">二级</span>
  384. {{item.content}}
  385. </view>
  386. <view class="date" style="display: flex; justify-content: space-between;margin-top: 4rpx;">
  387. <view>{{item.title}}</view>
  388. <view>{{item.createTime}}</view>
  389. </view>
  390. </view>
  391. </view>
  392. </view>
  393. <!-- 能源管理 -->
  394. <view v-show="companyId" class="statistics statistics-manage">
  395. <view class="title">
  396. <view class="icon">
  397. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  398. </view>
  399. <view class="text">
  400. 能源管理
  401. </view>
  402. <view class="check-all switchWater" >
  403. <view class="s s1" :class="showAccountantWater?'':'index'"
  404. @click="showAccountantWaterBtn(0)" >电表</view>
  405. <view class="s s2" :class="showAccountantWater?'index':''"
  406. @click="showAccountantWaterBtn(1)" >水表</view>
  407. </view>
  408. </view>
  409. <!-- 图表 -->
  410. <view class="chart" v-show="getHomePageManageshowLoading">
  411. <view class="u-subsection">
  412. <u-subsection :list="list" :current="homePageManageType" @change="sectionChange"
  413. font-size="24"></u-subsection>
  414. <view style="margin-top: 18rpx;" v-if="homePageManageType==5&&tabsFrom.show2Text">
  415. 指定时间:{{tabsFrom.show2Text}}
  416. </view>
  417. </view>
  418. <view class="incomeExpenditureClass point-Accountant" v-show="anchorpointShow('point-Accountant')" >
  419. <view class="incomeRow" >
  420. <view class="isOpenClass" @click="isOpen1=!isOpen1">
  421. <view class="isOpenClass1">收支统计</view>
  422. <view class="isOpenClass2">
  423. <span class="span">{{isOpen1?'收起':'展开'}}</span>
  424. <u-icon name="arrow-up" color="rgb(164 156 156)" v-show="isOpen1" size="24"></u-icon>
  425. <u-icon name="arrow-down" color="rgb(164 156 156)" v-show="!isOpen1" size="24"></u-icon>
  426. </view>
  427. </view>
  428. </view>
  429. <view class="incomeRow" v-show="isOpen1" >
  430. <view class="income1">
  431. <view class="income11">
  432. 收入(元)
  433. </view>
  434. <view class="income12">
  435. {{incomeExpenditureObj.incomeFee}}
  436. <span class="income121" v-if="!incomeExpenditureObj.id">加载中...</span>
  437. </view>
  438. </view>
  439. <view class="income1">
  440. <view class="income11">
  441. 支出(元)
  442. </view>
  443. <view class="income12">
  444. {{incomeExpenditureObj.expenditureFee}}
  445. <span class="income121" v-if="!incomeExpenditureObj.id">加载中...</span>
  446. </view>
  447. </view>
  448. <view class="income1">
  449. <view class="income11">
  450. 营收(元)
  451. </view>
  452. <view class="income12" :style="incomeExpenditureObj.differenceFee>=0?'color:red':'color:#52b8aa'">
  453. {{incomeExpenditureObj.differenceFee>0?'+':''}}{{incomeExpenditureObj.differenceFee}}
  454. <span class="income121" v-if="!incomeExpenditureObj.id">加载中...</span>
  455. </view>
  456. </view>
  457. </view>
  458. <view class="incomeRow" v-show="isOpen1" >
  459. <view class="income1">
  460. <view class="income11">
  461. 增收电量(度)
  462. </view>
  463. <view class="income12">
  464. {{incomeExpenditureObj.addKwh}}
  465. <span class="income121" v-if="!incomeExpenditureObj.id">加载中...</span>
  466. </view>
  467. </view>
  468. <view class="income1">
  469. <view class="income11">
  470. 减支电量(度)
  471. </view>
  472. <view class="income12">
  473. {{incomeExpenditureObj.minusKwh}}
  474. <span class="income121" v-if="!incomeExpenditureObj.id">加载中...</span>
  475. </view>
  476. </view>
  477. <view class="income1">
  478. <view class="income11">
  479. 增收减支电量(度)
  480. </view>
  481. <view class="income12" :style="incomeExpenditureObj.addMinusKwh>=0?'color:red':'color:#52b8aa'">
  482. {{incomeExpenditureObj.addMinusKwh>0?'+':''}}{{incomeExpenditureObj.addMinusKwh}}
  483. <span class="income121" v-if="!incomeExpenditureObj.id">加载中...</span>
  484. </view>
  485. </view>
  486. </view>
  487. <view class="incomeRow" v-show="isOpen1" >
  488. <view class="income1">
  489. <view class="income11">
  490. 营增收入(元)
  491. </view>
  492. <view class="income12" style="color:#52b8aa">
  493. {{incomeExpenditureObj.totalFee}}
  494. <span class="income121" v-if="!incomeExpenditureObj.id">加载中...</span>
  495. </view>
  496. </view>
  497. <view class="income2">
  498. <view class="income11">
  499. 代缴费收入(元)
  500. </view>
  501. <view class="income12" style="color:#52b8aa">
  502. <view class="income12-1"></view>
  503. <view class="income12-2">
  504. {{incomeExpenditureObj.proxyFee}}
  505. </view>
  506. <view class="income12-3" @click="gotoUrl('/pages/proxy/proxyList?companyId='+companyId+'&sp='+childInfo.sp+'&type='+homePageManageType)" >
  507. <u>查看明细</u>
  508. </view>
  509. </view>
  510. </view>
  511. </view>
  512. </view>
  513. <view class="incomeExpenditureClass point-Accountant" v-show="anchorpointShow('point-Accountant-water')" >
  514. <view class="incomeRow" >
  515. <view class="isOpenClass" @click="isOpen1=!isOpen1">
  516. <view class="isOpenClass1">收支统计</view>
  517. <view class="isOpenClass2">
  518. <span class="span">{{isOpen1?'收起':'展开'}}</span>
  519. <u-icon name="arrow-up" color="rgb(164 156 156)" v-show="isOpen1" size="24"></u-icon>
  520. <u-icon name="arrow-down" color="rgb(164 156 156)" v-show="!isOpen1" size="24"></u-icon>
  521. </view>
  522. </view>
  523. </view>
  524. <view class="incomeRow" v-show="isOpen1">
  525. <view class="income1">
  526. <view class="income11">
  527. 收入(元)
  528. </view>
  529. <view class="income12">
  530. {{incomeExpenditureObjWater.incomeFee}}
  531. <span class="income121" v-if="!incomeExpenditureObjWater.id">加载中...</span>
  532. </view>
  533. </view>
  534. <view class="income1">
  535. <view class="income11">
  536. 支出(元)
  537. </view>
  538. <view class="income12">
  539. {{incomeExpenditureObjWater.expenditureFee}}
  540. <span class="income121" v-if="!incomeExpenditureObjWater.id">加载中...</span>
  541. </view>
  542. </view>
  543. <view class="income1">
  544. <view class="income11">
  545. 营收(元)
  546. </view>
  547. <view class="income12" :style="incomeExpenditureObjWater.differenceFee>=0?'color:red':'color:#52b8aa'">
  548. {{incomeExpenditureObjWater.differenceFee>0?'+':''}}{{incomeExpenditureObjWater.differenceFee}}
  549. <span class="income121" v-if="!incomeExpenditureObjWater.id">加载中...</span>
  550. </view>
  551. </view>
  552. </view>
  553. <view class="incomeRow" v-show="isOpen1">
  554. <view class="income1" style="width: 200%;">
  555. <view class="income11">
  556. 节约用水量(立方米)
  557. </view>
  558. <view class="income12" :style="incomeExpenditureObjWater.saveWaterConsumption>=0?'color:red':'color:#52b8aa'">
  559. {{incomeExpenditureObjWater.saveWaterConsumption}}
  560. <span class="income121" v-if="!incomeExpenditureObjWater.id">加载中...</span>
  561. </view>
  562. </view>
  563. <view class="income1">
  564. <view class="income11">
  565. 节约水费(元)
  566. </view>
  567. <view class="income12">
  568. {{incomeExpenditureObjWater.saveWaterFee}}
  569. <span class="income121" v-if="!incomeExpenditureObjWater.id">加载中...</span>
  570. </view>
  571. </view>
  572. </view>
  573. </view>
  574. <view v-show="anchorpointShow('point-Electricityconsumptiontype')" >
  575. <view class="incomeRow" >
  576. <view class="isOpenClass point-Electricityconsumptiontype" @click="isOpen2=!isOpen2">
  577. <view class="isOpenClass1">用电类型</view>
  578. <view class="isOpenClass2">
  579. <span class="span">{{isOpen2?'收起':'展开'}}</span>
  580. <u-icon name="arrow-up" color="rgb(164 156 156)" v-show="isOpen2" size="24"></u-icon>
  581. <u-icon name="arrow-down" color="rgb(164 156 156)" v-show="!isOpen2" size="24"></u-icon>
  582. </view>
  583. </view>
  584. </view>
  585. <view class="chat-box " v-show="isOpen2" id="barEcharts-statistics" >
  586. </view>
  587. </view>
  588. </view>
  589. <view class="search" v-if="false">
  590. <view class="switch">
  591. <u-switch v-model="checked" size="40"></u-switch><text>只看离线表</text>
  592. </view>
  593. <view class="search-box">
  594. <input type="text" placeholder="请输入电表查询" />
  595. <view class="icon">
  596. <img src="@/assets/img/riLine-search-line 1.svg" alt="" />
  597. </view>
  598. </view>
  599. </view>
  600. <view class="incomeExpenditureClass">
  601. <view class="incomeRow" >
  602. <view class="isOpenClass point-devices"
  603. v-show="anchorpointShow('point-devices')"
  604. style="padding: 0 16px;" v-if="getHomePageManageReady||getHomePageManageReadyWater" @click="isOpen3=!isOpen3">
  605. <view class="isOpenClass1">设备列表</view>
  606. <view class="isOpenClass2"><span class="span">{{isOpen3?'收起':'展开'}}</span>
  607. <u-icon name="arrow-up" color="rgb(164 156 156)" v-show="isOpen3" size="24"></u-icon>
  608. <u-icon name="arrow-down" color="rgb(164 156 156)" v-show="!isOpen3" size="24"></u-icon>
  609. </view>
  610. </view>
  611. </view>
  612. </view>
  613. <!-- 电表统计 -->
  614. <Tree-Body :meterList="meterList" ref="mytree"
  615. class="" v-show="isOpen3&&anchorpointShow('point-devices')&&!this.showAccountantWater"
  616. :showPark="homePageManageObj.showPark"
  617. :childInfo="childInfo"
  618. @query="getHomePageManageChildMeterA"
  619. v-if="getHomePageManageReady"
  620. :role="codes&&codes.indexOf('switch')!=-1"
  621. @switchBtn="switchBtnApi"
  622. ></Tree-Body>
  623. <Tree-Body-Water :meterList="meterListWater" ref="mytreeWater"
  624. class="" v-show="isOpen3&&anchorpointShow('point-devices')&&this.showAccountantWater"
  625. :showPark="homePageManageObjWater.showPark"
  626. :childInfo="childInfo"
  627. @query="getHomePageManageChildMeterB"
  628. v-if="getHomePageManageReadyWater"
  629. :role="codes&&codes.indexOf('switch')!=-1"
  630. @switchBtn="switchBtnApiWater"
  631. ></Tree-Body-Water>
  632. <template v-if="anchorpointShow('point-devices')">
  633. <view class="content"
  634. style="display: flex;justify-content: center;margin: 40px 0;"
  635. v-if="!getHomePageManageshowLoading">
  636. <div class="uni-toast" style="display: flex;font-size: 60rpx; color: rgb(192, 196, 204);" >
  637. <i class="uni-icon_toast uni-loading"
  638. style="
  639. width: 80rpx;
  640. height: 80rpx;
  641. "
  642. ></i><p class="uni-toast__content"> </p>加载中...</div>
  643. </view>
  644. <view class="content" v-else-if="getHomePageManageshowLoading&&(meterList.length == 0&&!showAccountantWater||meterListWater.length == 0&&showAccountantWater)">
  645. <u-divider :isnone="true" nonetext="无记录"
  646. border-color="#fff"></u-divider>
  647. </view>
  648. </template>
  649. </view>
  650. <!-- 用电量 -->
  651. <view class="statistics-e statistics" v-if="(!companyId)">
  652. <view class="title">
  653. <view class="icon">
  654. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  655. </view>
  656. <view class="text">
  657. 用电量 (度)
  658. </view>
  659. <view class="check-all" @click="toEquipmentElectricity">
  660. 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  661. </view>
  662. </view>
  663. <view class="content" style="display: flex;justify-content: center;margin: 40px 0;"
  664. v-if="getHomePageKwhshowLoading">
  665. <div class="uni-toast" style="display: flex;font-size: 60rpx; color: rgb(192, 196, 204);" >
  666. <i class="uni-icon_toast uni-loading"
  667. style="
  668. width: 80rpx;
  669. height: 80rpx;
  670. "
  671. ></i><p class="uni-toast__content"> </p>加载中...</div>
  672. </view>
  673. <view class="content" v-else-if="!getHomePageKwhshowLoading&&kWhListHome.length == 0">
  674. <u-divider :isnone="true" nonetext="无记录"
  675. border-color="#fff"></u-divider>
  676. </view>
  677. <view class="content" v-else >
  678. <view class="electricity">
  679. <view class="item" v-for="(item, index) in kWhListHome" :key="index"
  680. @click="toElectronicMonitoring(item)">
  681. <view class="item-content">
  682. <view class="equipment">
  683. <view class="equipment1 ">
  684. {{replaceLastTwoWords(item.name)}}
  685. </view>
  686. <view class="equipment2">
  687. {{item.installationAddressSimple}}
  688. </view>
  689. <view class="state" v-if="!item.online">
  690. <!-- <view class="dot off-line"></view> -->
  691. <view class="text">离线</view>
  692. </view>
  693. <view class="state state2" v-else>
  694. <!-- <view class="dot on-line"></view> -->
  695. <view class="text">在线</view>
  696. </view>
  697. </view>
  698. <view class="electricity">
  699. <view class="electricity-item electricity-item-day">
  700. <view class="date">
  701. 今日
  702. </view>
  703. <view class="number">
  704. {{item.thisDayKwh}}
  705. </view>
  706. </view>
  707. <view class="electricity-item">
  708. <view class="date">
  709. 本月
  710. </view>
  711. <view class="number">
  712. {{item.thisMonthKwh}}
  713. </view>
  714. </view>
  715. <view class="electricity-item">
  716. <view class="date">
  717. 上月
  718. </view>
  719. <view class="number">
  720. {{item.lastMonthKwh}}
  721. </view>
  722. </view>
  723. </view>
  724. </view>
  725. <view class="more">
  726. <u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  727. </view>
  728. </view>
  729. </view>
  730. </view>
  731. </view>
  732. <!-- 用电量 -->
  733. <view class="statistics-e statistics" v-if="(!companyId)&&kWhListHomeWater.length">
  734. <view class="title">
  735. <view class="icon">
  736. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  737. </view>
  738. <view class="text">
  739. 用水量 (立方米)
  740. </view>
  741. <view class="check-all" @click="toEquipmentElectricityWater()">
  742. 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  743. </view>
  744. </view>
  745. <view class="content" style="display: flex;justify-content: center;margin: 40px 0;"
  746. v-if="getHomePageKwhshowLoadingWater">
  747. <div class="uni-toast" style="display: flex;font-size: 60rpx; color: rgb(192, 196, 204);" >
  748. <i class="uni-icon_toast uni-loading"
  749. style="
  750. width: 80rpx;
  751. height: 80rpx;
  752. "
  753. ></i><p class="uni-toast__content"> </p>加载中...</div>
  754. </view>
  755. <view class="content" v-else-if="!getHomePageKwhshowLoadingWater&&kWhListHomeWater.length == 0">
  756. <u-divider :isnone="true" nonetext="无记录"
  757. border-color="#fff"></u-divider>
  758. </view>
  759. <view class="content" v-else >
  760. <view class="electricity">
  761. <view class="item" v-for="(item, index) in kWhListHomeWater" :key="index"
  762. @click="toElectronicMonitoringWater(item)">
  763. <view class="item-content">
  764. <view class="equipment">
  765. <view class="equipment1 ">
  766. {{replaceLastTwoWords(item.name)}}
  767. </view>
  768. <view class="equipment2">
  769. {{item.installationAddressSimple}}
  770. </view>
  771. <view class="state" v-if="!item.online">
  772. <!-- <view class="dot off-line"></view> -->
  773. <view class="text">离线</view>
  774. </view>
  775. <view class="state state2" v-else>
  776. <!-- <view class="dot on-line"></view> -->
  777. <view class="text">在线</view>
  778. </view>
  779. </view>
  780. <view class="electricity">
  781. <view class="electricity-item electricity-item-day">
  782. <view class="date">
  783. 今日
  784. </view>
  785. <view class="number">
  786. {{item.thisDayTotalConsumption}}
  787. </view>
  788. </view>
  789. <view class="electricity-item">
  790. <view class="date">
  791. 本月
  792. </view>
  793. <view class="number">
  794. {{item.thisMonthTotalConsumption}}
  795. </view>
  796. </view>
  797. <view class="electricity-item">
  798. <view class="date">
  799. 上月
  800. </view>
  801. <view class="number">
  802. {{item.lastMonthTotalConsumption}}
  803. </view>
  804. </view>
  805. </view>
  806. </view>
  807. <view class="more">
  808. <u-icon name="arrow-right" color="#d4d4d4" size="24"></u-icon>
  809. </view>
  810. </view>
  811. </view>
  812. </view>
  813. </view>
  814. <!-- 异常设备排名 -->
  815. <view class="statistics statistics-ranking" v-if="false">
  816. <view class="title">
  817. <view class="icon">
  818. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  819. </view>
  820. <view class="text">
  821. 异常设备排名
  822. </view>
  823. <view class="check-all">
  824. 查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
  825. </view>
  826. </view>
  827. <!-- 合计 -->
  828. <view class="total">
  829. 本年度共有<text> 42</text>次设备异常告警
  830. </view>
  831. <view class="ranking-main">
  832. <view class="item" v-for="(item,i) in 3" :key="i"
  833. @click="gotoUrl('/pages/equipmentDataMonitoring/electronicMonitoring?id='+'&name=')">
  834. <view class="ranking">
  835. 1
  836. </view>
  837. <view class="name">
  838. <view class="name1">
  839. 荆鹏软件园01
  840. </view>
  841. <view class="name2">
  842. 荆鹏集团
  843. </view>
  844. </view>
  845. <view class="time">
  846. 5次
  847. </view>
  848. </view>
  849. </view>
  850. <!-- 查看全部排名 -->
  851. <!-- <view class="check-all" @click="gotoUrl('/pages/abnormal/abnormalDeviceRanking')">
  852. 查看全部排名 <u-icon name="arrow-down" size="24" color="rgba(119,119,119,1)"></u-icon>
  853. </view> -->
  854. </view>
  855. <u-divider nonetext="暂无数据" border-color="#CFD2D5">已经到底了</u-divider>
  856. </view>
  857. <view class="anchorpoint" v-show="anchorpointListNum>3">
  858. <view class="point"
  859. v-for="(item,i) in anchorpointList" :key="i"
  860. @click="anchorpointCk(item)" v-show="anchorpointShow(item.key)"
  861. :class="{ index: anchorpointIndex==item.key }" v-html="anchorpointHtml(item.name)" >
  862. </view>
  863. </view>
  864. <energyCenterTabbar :current="0"></energyCenterTabbar>
  865. </view>
  866. </template>
  867. <script>
  868. import {
  869. parseUnixTime,
  870. beforeTimeStamp,
  871. getWeek,newDate
  872. } from '@/apis/utils'
  873. import energyCenterTabbar from '@/components/energyCenterTabbar.vue'
  874. import electronicMonitoring from '@/pages/equipmentDataMonitoring/electronicMonitoring.vue'
  875. import * as echarts from 'echarts';
  876. import * as API_water from '@/apis/pagejs/water.js'
  877. import * as API_index from '@/apis/pagejs/index.js'
  878. import * as API_tenantList from '@/apis/pagejs/tenantList.js'
  879. import * as API from '@/apis/pagejs/energyManage.js'
  880. import TreeBody from '@/components/tree/tree-body.vue';
  881. import TreeBodyWater from '@/components/treeWater/tree-body.vue';
  882. export default {
  883. components: {
  884. energyCenterTabbar,TreeBody,electronicMonitoring,TreeBodyWater
  885. },
  886. data() {
  887. return {
  888. abnormalRecordsList: [],
  889. queryDate: '',
  890. alarmsPercent: 0,
  891. alarmsForm: {
  892. okNum: 0,
  893. errorNum: 0,
  894. errorMonthNum: 0
  895. }, // 累计报警
  896. alarmsFormWater: {
  897. okNum: 0,
  898. errorNum: 0,
  899. errorMonthNum: 0
  900. }, // 累计报警
  901. companyId: '', // 商户ID
  902. pageIndexe: 1, // 设备数据检测
  903. totalPagee: 1,
  904. deviceList: [],
  905. pageIndexp: 1, // 用电量
  906. totalPagep: 1,
  907. kWhList: [],
  908. kWhListHome: [],
  909. kWhListHomeWater: [],
  910. codes: '', // 判断:reading用电量 detector设备数据检测
  911. merchantList1: [], // 商户
  912. merchantList2: [],
  913. companyListMain: [],
  914. companyList: [],
  915. datacompanyInfo:{},
  916. companyInfotypeCurrent:1,
  917. companyInfotypeList:[
  918. {
  919. name: '变压器巡检仪'
  920. },
  921. {
  922. name: '费控电表计量仪'
  923. }
  924. ],
  925. popShow: false,
  926. popShowtest: true,
  927. current: 0,
  928. current2: 0,
  929. myLineChart: null, // 图表
  930. myBarChart: null,
  931. myPieChart: null,
  932. intervalId: null, // 用于存储间隔ID
  933. intervalReady: false, // 用于存储间隔ID
  934. list: [{
  935. name: '上月',
  936. value: "2"
  937. },
  938. {
  939. name: '当月',
  940. value: "1"
  941. },
  942. {
  943. name: '今日',
  944. value: "4"
  945. }, {
  946. name: '当年',
  947. value: "3"
  948. }, {
  949. name: '合计',
  950. value: "0"
  951. },
  952. {
  953. name: '指定时间',
  954. value: "10"
  955. }
  956. ],
  957. checked: false,
  958. homePageManageType: 2,
  959. meterList: [],
  960. meterListWater: [],
  961. showPark:false,
  962. meterListShow:{},
  963. homePageManageObjWater:{},
  964. homePageManageObj: {
  965. chargeKwh: 0,
  966. lostKwh: 0,
  967. parkKwh: 0,
  968. freeKwh:0,
  969. publicKwh:0,
  970. },
  971. endYear: '',
  972. params: {
  973. year: true,
  974. month: true,
  975. day: false,
  976. hour: false,
  977. minute: false,
  978. second: false
  979. },
  980. value: '2',
  981. clickType: -1,
  982. tabsFrom: {
  983. show1: false,
  984. show1Index: 0,
  985. show2Index: '',
  986. show2: false,
  987. show1Text: "全部类型",
  988. show2Text: "",
  989. },
  990. getHomePageManageReady:false,
  991. getHomePageManageReadyWater:false,
  992. utabsone:true,
  993. incomeExpenditureObj:{},
  994. incomeExpenditureObjWater:{},
  995. getHomePageKwhshowLoading:false,
  996. getHomePageKwhshowLoadingWater:false,
  997. getHomePageManageshowLoading:false,
  998. companyInfotype:0,
  999. readingMeterNum:0, //计量仪
  1000. monitorMeterNum:0, //巡检仪
  1001. tenantListNum0:0,
  1002. tenantListNum1:0,
  1003. tenantListNum2:0,
  1004. tenantListNum3:0,
  1005. childList:[],
  1006. childInfo:{},
  1007. companyInfo:{},
  1008. month:0,
  1009. platformRevenueList:[],
  1010. getPlatformRevenueReady:false,
  1011. anchorpointIndex:"",
  1012. anchorpointNum:0,
  1013. isOpen1:true,
  1014. isOpen2:true,
  1015. isOpen3:true,
  1016. showAccountantWater:false,
  1017. anchorpointList:[
  1018. {
  1019. key:"point-meteroperation",name:"运行电表"
  1020. },
  1021. {
  1022. key:"point-PlatformRevenue",name:"收入统计"
  1023. },
  1024. {
  1025. key:"point-TenantManagement",name:"租户管理"
  1026. },
  1027. {
  1028. key:"point-Poweroutagereminder",name:"断电提醒"
  1029. },
  1030. {
  1031. key:"point-Accountant",name:"收支统计"
  1032. }
  1033. ,
  1034. {
  1035. key:"point-Accountant-water",name:"收支统计"
  1036. },{
  1037. key:"point-Electricityconsumptiontype",name:"用电类型"
  1038. },{
  1039. key:"point-devices",name:"设备列表"
  1040. }
  1041. ],
  1042. childCompanyList:{
  1043. id:"",
  1044. list:[]
  1045. },
  1046. popShow1:false,
  1047. userInfo:{},
  1048. }
  1049. },
  1050. onLoad() {
  1051. var date = new Date();
  1052. var year = date.getFullYear();
  1053. var month = date.getMonth() + 1 >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1);
  1054. this.month=date.getMonth() + 1
  1055. this.endYear = new Date().getFullYear();
  1056. this.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  1057. this.datacompanyInfo=this.carhelp.getPersonInfoPlus().companyInfo
  1058. this.userInfo=this.carhelp.getPersonInfo()
  1059. this.getfindByOpenId();
  1060. },
  1061. onReady() {
  1062. },
  1063. onUnload(){
  1064. this.clearTimer(); // 组件销毁前清除定时器
  1065. //console.log("组件销毁前清除定时器")
  1066. },
  1067. beforeDestroy() {
  1068. this.clearTimer(); // 组件销毁前清除定时器
  1069. //console.log("组件销毁前清除定时器")
  1070. },
  1071. onHide(){
  1072. this.intervalReady=false
  1073. this.clearTimer();
  1074. },
  1075. onShow(){
  1076. // if(!this.intervalReady&&this.companyList.length>1){
  1077. // this.startInterval();
  1078. // }
  1079. },
  1080. computed:{
  1081. anchorpointListNum(){
  1082. var num=0;
  1083. this.anchorpointList.forEach((item)=>{
  1084. if(this.anchorpointShow(item.key)){
  1085. num+=1;
  1086. }
  1087. })
  1088. return num
  1089. },
  1090. incomeExpenditureBl(){
  1091. //var bl=(this.childInfo.sp==1 ||this.childInfo.type!=4&&(this.childInfo.styleTemplate==1))&&!this.userInfo.authorizedMeterEnabled
  1092. var bl=(this.childInfo.sp==1 ||this.childInfo.type!=4&&(this.childInfo.styleTemplate==1||true))&&!this.userInfo.authorizedMeterEnabled
  1093. return bl;
  1094. },
  1095. childListName(){
  1096. return this.childInfo.name;
  1097. },
  1098. companyType(){
  1099. return this.companyInfo.type;
  1100. }
  1101. },
  1102. onPageScroll(e) {
  1103. this.anchorpointNum=e.scrollTop
  1104. },
  1105. methods: {
  1106. showAccountantWaterBtn(bl){
  1107. this.showAccountantWater=bl
  1108. this.getHomePageManage(0,this.companyId)
  1109. },
  1110. anchorpointShow(key){
  1111. if(this.childInfo.sp==1||this.companyId==''){
  1112. if(key=='point-meteroperation'){
  1113. return true
  1114. }
  1115. if(key=='point-PlatformRevenue'){
  1116. return this.getPlatformRevenueBl()
  1117. }
  1118. if(key=='point-TenantManagement0'){
  1119. return this.codes&&this.codes.indexOf('property')!=-1
  1120. }
  1121. if(key=='point-TenantManagement'){
  1122. return (this.companyListMain.length==1||this.companyId)&&this.anchorpointShow('point-TenantManagement0')
  1123. }
  1124. if(key=='point-Poweroutagereminder'){
  1125. return this.anchorpointShow('point-TenantManagement')&&(this.tenantListNum0)
  1126. }
  1127. }else{
  1128. if(key=='point-Electricityconsumptiontype'){
  1129. return this.incomeExpenditureBl&&this.childInfo.sp!=1&&!this.showAccountantWater
  1130. }
  1131. }
  1132. if(this.companyId&&(this.kWhList.length!=1)){
  1133. if(key=='point-Accountant'){
  1134. //console.log("point-Accountantpoint-Accountantpoint-Accountantpoint-Accountant")
  1135. return this.incomeExpenditureBl&&!this.showAccountantWater
  1136. }
  1137. if(key=='point-Accountant-water'){
  1138. //console.log("point-Accountantpoint-Accountantpoint-Accountantpoint-Accountant")
  1139. return this.incomeExpenditureBl&&this.showAccountantWater
  1140. }
  1141. if(this.childInfo.sp!=1){
  1142. if(key=='point-devices'){
  1143. return true
  1144. //&&!this.showAccountantWater
  1145. }
  1146. }
  1147. }
  1148. return false
  1149. },
  1150. anchorpointHtml(str){
  1151. if (!str || str.length === 0) {
  1152. return str; // 如果字符串为空或未定义,则直接返回
  1153. }
  1154. let result = '';
  1155. for (let i = 0; i < str.length; i += 2) {
  1156. result += str.substr(i, 2) + (i < str.length - 2 ? '<br/>' : '');
  1157. }
  1158. return result;
  1159. },
  1160. anchorpointCk(item){
  1161. this.anchorpointIndex=item.key
  1162. //const info = uni.getSystemInfoSync();
  1163. let that = this;
  1164. uni.createSelectorQuery().select("."+item.key).boundingClientRect(function(res){//定位到你要的class的位置
  1165. // console.log("标签获取====>",item.key+JSON.stringify(res),info.windowHeight)
  1166. var num=that.anchorpointNum+res.top-70
  1167. uni.pageScrollTo({
  1168. scrollTop:num,
  1169. duration: 300
  1170. });
  1171. }).exec()
  1172. },
  1173. titleCk() {
  1174. if(this.childCompanyList.id==this.companyInfo.id){
  1175. this.popShow1 = true
  1176. }else{
  1177. this.getChildCompanyList()
  1178. }
  1179. },
  1180. getChildCompanyList(){
  1181. uni.showLoading({
  1182. title: "加载中",
  1183. mask: true,
  1184. })
  1185. API.childCompanyList({
  1186. companyId:this.companyInfo.id
  1187. }).then((response) => {
  1188. uni.hideLoading();
  1189. this.childCompanyList={
  1190. id:this.companyInfo.id,
  1191. list:response.data.companyInfoList
  1192. }
  1193. this.popShow1 = true
  1194. //this.getTenantListReady=true
  1195. }).catch(error => {
  1196. uni.showToast({
  1197. title: error,
  1198. icon: "none"
  1199. })
  1200. })
  1201. },
  1202. stateBl(timekey,day){
  1203. var get=newDate(timekey)
  1204. var time=new Date()
  1205. if(!day){
  1206. return time>get;
  1207. }else{
  1208. var get2=newDate(timekey)
  1209. get2.setDate(get2.getDate() - day)
  1210. //console.log(timekey)
  1211. return get2<time&&get>time;
  1212. }
  1213. },
  1214. selectTypeMethod(tenant,selectType){
  1215. var selectType1=this.selectType;
  1216. if(selectType){
  1217. selectType1=selectType;
  1218. }
  1219. // if(){
  1220. // }
  1221. if(true){
  1222. var bl=false;
  1223. for(var j in tenant.tenantContractList){
  1224. var tenant1=tenant.tenantContractList[j]
  1225. ////console.log(tenant1.autoDeductFee)
  1226. // if(tenant1.autoDeductFee!=true){
  1227. // continue;
  1228. // }
  1229. if(selectType1==0){
  1230. return true
  1231. }
  1232. if(selectType1==1){
  1233. if(tenant1.autoDeductFee!=true){
  1234. continue;
  1235. }
  1236. return tenant.balance<tenant.minBalance
  1237. }
  1238. for(var k in tenant1.contractItemList){
  1239. var item=tenant1.contractItemList[k]
  1240. ////console.log(item.prepaidEndTime)
  1241. if(item.paymentMethod==1&&item.name!='电费'){
  1242. if(selectType1==2){
  1243. if(item.prepaidEndTime&&this.stateBl(item.prepaidEndTime,30)){
  1244. bl=true;
  1245. }
  1246. }
  1247. if(selectType1==3){
  1248. if(item.prepaidEndTime&&this.stateBl(item.prepaidEndTime)){
  1249. bl=true;
  1250. }
  1251. if(item.prepaidEndTime==null){
  1252. bl=true;
  1253. }
  1254. }
  1255. }
  1256. }
  1257. }
  1258. return bl
  1259. }
  1260. },
  1261. getTenantList(companyId){
  1262. // uni.showLoading({
  1263. // title: "加载中",
  1264. // mask: true,
  1265. // })
  1266. this.tenantListNum1=0
  1267. this.tenantListNum2=0
  1268. this.tenantListNum3=0
  1269. API_tenantList.tenantContractList({
  1270. companyId:this.childInfo.id,
  1271. queryParent:(this.childInfo.sp==1)?1:0
  1272. }).then((response) => {
  1273. uni.hideLoading();
  1274. //this.getTenantListReady=true
  1275. var tenantList=response.data.tenantInfoList;
  1276. this.tenantListNum0=tenantList.length
  1277. for(var i in tenantList){
  1278. var obj=tenantList[i]
  1279. if(this.selectTypeMethod(obj,1)){
  1280. this.tenantListNum1++;
  1281. }
  1282. if(this.selectTypeMethod(obj,2)){
  1283. this.tenantListNum2++;
  1284. }
  1285. if(this.selectTypeMethod(obj,3)){
  1286. this.tenantListNum3++;
  1287. }
  1288. }
  1289. this.getAbnormalAlarmRecord(this.companyId);
  1290. }).catch(error => {
  1291. uni.showToast({
  1292. title: error,
  1293. icon: "none"
  1294. })
  1295. })
  1296. },
  1297. //绑定权限
  1298. getfindByOpenId() {
  1299. API_index.findByOpenId({
  1300. openId: this.carhelp.getOpenId()
  1301. }).then((response) => {
  1302. if(response.data&&response.data.companyInfo){
  1303. this.datacompanyInfo=response.data.companyInfo
  1304. this.companyInfotype = response.data.companyInfo.type;
  1305. if(this.companyInfotype==4){
  1306. this.getFindMeterList()
  1307. }
  1308. }
  1309. if(response.data){
  1310. var token = response ? response.data.token : '';
  1311. this.carhelp.setPersonInfo(response.data.regUser );
  1312. this.carhelp.setToken(token);
  1313. this.carhelp.setPersonInfoPlus(response.data);
  1314. this.codes =response.data.regUser.codes
  1315. }
  1316. this.userInfo=this.carhelp.getPersonInfo()
  1317. this.getCompanyInfoList();
  1318. }).catch(error => {
  1319. uni.showToast({
  1320. title: error,
  1321. icon: "none"
  1322. })
  1323. })
  1324. },
  1325. getFindMeterList(){
  1326. API.findMeterList().then((response) => {
  1327. //readingMeterNum 计量仪 //monitorMeterNum 巡检仪
  1328. this.readingMeterNum=response.data.readingMeterNum
  1329. this.monitorMeterNum=response.data.monitorMeterNum
  1330. }).catch(error => {
  1331. uni.showToast({
  1332. title: error,
  1333. icon: "none"
  1334. })
  1335. })
  1336. },
  1337. switchBtnApiMethodWater(node,key){
  1338. uni.showLoading({
  1339. title: "加载中",
  1340. mask: true,
  1341. })
  1342. API_water.remoteSwitch({
  1343. meterId:node.id,
  1344. enabled:key
  1345. }).then((res) => {
  1346. uni.hideLoading();
  1347. node.switchStatus=key
  1348. }).catch(error => {
  1349. uni.showToast({
  1350. title: error,
  1351. icon: "none"
  1352. })
  1353. })
  1354. },
  1355. switchBtnApiMethod(node,key){
  1356. uni.showLoading({
  1357. title: "加载中",
  1358. mask: true,
  1359. })
  1360. API.remoteSwitch({
  1361. meterId:node.id,
  1362. enabled:key
  1363. }).then((res) => {
  1364. uni.hideLoading();
  1365. node.switchStatus=key
  1366. }).catch(error => {
  1367. uni.showToast({
  1368. title: error,
  1369. icon: "none"
  1370. })
  1371. })
  1372. },
  1373. switchBtnApi(node,key){
  1374. uni.showModal({
  1375. confirmColor:`${key?'#3CC51F':'red'}`,
  1376. confirmText:`${key?'开启':'关闭'}`,
  1377. content: `确认是否要"${key?'开启':'关闭'}"${this.replaceLastTwoWords(node.name)}`,
  1378. title: "提示",
  1379. success:res=> {
  1380. if(res.confirm){
  1381. this.switchBtnApiMethod(node,key);
  1382. }
  1383. }
  1384. })
  1385. //console.log(node,key)
  1386. },
  1387. switchBtnApiWater(node,key){
  1388. uni.showModal({
  1389. confirmColor:`${key?'#3CC51F':'red'}`,
  1390. confirmText:`${key?'开启':'关闭'}`,
  1391. content: `确认是否要"${key?'开启':'关闭'}"${this.replaceLastTwoWords(node.name)}`,
  1392. title: "提示",
  1393. success:res=> {
  1394. if(res.confirm){
  1395. this.switchBtnApiMethodWater(node,key);
  1396. }
  1397. }
  1398. })
  1399. //console.log(node,key)
  1400. },
  1401. getIncomeExpenditureWater(companyId){
  1402. API_water.incomeExpenditure({
  1403. //parentMeterId:item.id,
  1404. queryDate:this.queryDate,
  1405. companyId: companyId,
  1406. type: this.list[this.homePageManageType].value,
  1407. queryParent:this.childInfo.sp==1?1:0
  1408. }).then((response) => {
  1409. if(this.companyId!=companyId){
  1410. return
  1411. }
  1412. this.incomeExpenditureObjWater=response.data
  1413. this.incomeExpenditureObjWater.id=1
  1414. }).catch(error => {
  1415. uni.showToast({
  1416. title: error,
  1417. icon: "none"
  1418. })
  1419. })
  1420. },
  1421. getIncomeExpenditure(companyId){
  1422. if(!(this.anchorpointShow('point-Accountant')||this.anchorpointShow('point-Accountant-water'))){
  1423. return
  1424. }
  1425. API.incomeExpenditure({
  1426. //parentMeterId:item.id,
  1427. queryDate:this.queryDate,
  1428. companyId: companyId,
  1429. type: this.list[this.homePageManageType].value,
  1430. queryParent:this.childInfo.sp==1?1:0
  1431. }).then((response) => {
  1432. if(this.companyId!=companyId){
  1433. return
  1434. }
  1435. this.incomeExpenditureObj=response.data
  1436. this.incomeExpenditureObj.id=1
  1437. }).catch(error => {
  1438. uni.showToast({
  1439. title: error,
  1440. icon: "none"
  1441. })
  1442. })
  1443. },
  1444. // getHomePageManageChildMeter(item,bl,companyId) {
  1445. // if(this.showAccountantWater){
  1446. // this.getHomePageManageChildMeterB(item,bl,companyId)
  1447. // }else{
  1448. // this.getHomePageManageChildMeterA(item,bl,companyId)
  1449. // }
  1450. // },
  1451. getHomePageManageChildMeterB(item,bl,companyId) {
  1452. if(!this.anchorpointShow('point-devices')){
  1453. return
  1454. }
  1455. if(!companyId){
  1456. companyId=this.companyId
  1457. }
  1458. if(!bl){
  1459. // uni.showLoading({
  1460. // title: "加载中",
  1461. // mask: true,
  1462. // })
  1463. }
  1464. API_water.meterChildManage({
  1465. parentMeterId:item.id,
  1466. queryDate:this.queryDate,
  1467. companyId: companyId,
  1468. type: this.list[this.homePageManageType].value
  1469. }).then((response) => {
  1470. // if(!bl){
  1471. // uni.hideLoading();
  1472. // }
  1473. // this.meterList = response.data.meterList;
  1474. // if(!this.meterListShow.id){
  1475. // this.meterListShow.id=1
  1476. // this.recursionList(this.meterList)
  1477. // }
  1478. if(this.companyId!=companyId){
  1479. return
  1480. }
  1481. var childMeterList=response.data.childMeterList
  1482. item.childMeterList=childMeterList
  1483. if(!bl){
  1484. for(var i in childMeterList){
  1485. var obj=childMeterList[i]
  1486. this.getHomePageManageChildMeterB(obj,true,this.companyId)
  1487. }
  1488. }
  1489. }).catch(error => {
  1490. uni.showToast({
  1491. title: error,
  1492. icon: "none"
  1493. })
  1494. })
  1495. },
  1496. // 设备数据监测
  1497. getHomePageManageChildMeterA(item,bl,companyId) {
  1498. if(!this.anchorpointShow('point-devices')){
  1499. return
  1500. }
  1501. if(!companyId){
  1502. companyId=this.companyId
  1503. }
  1504. if(!bl){
  1505. // uni.showLoading({
  1506. // title: "加载中",
  1507. // mask: true,
  1508. // })
  1509. }
  1510. API.homePageManageChildMeter({
  1511. parentMeterId:item.id,
  1512. queryDate:this.queryDate,
  1513. companyId: companyId,
  1514. type: this.list[this.homePageManageType].value
  1515. }).then((response) => {
  1516. // if(!bl){
  1517. // uni.hideLoading();
  1518. // }
  1519. // this.meterList = response.data.meterList;
  1520. // if(!this.meterListShow.id){
  1521. // this.meterListShow.id=1
  1522. // this.recursionList(this.meterList)
  1523. // }
  1524. if(this.companyId!=companyId){
  1525. return
  1526. }
  1527. var childMeterList=response.data.childMeterList
  1528. item.childMeterList=childMeterList
  1529. if(!bl){
  1530. for(var i in childMeterList){
  1531. var obj=childMeterList[i]
  1532. this.getHomePageManageChildMeterA(obj,true,this.companyId)
  1533. }
  1534. }
  1535. }).catch(error => {
  1536. uni.showToast({
  1537. title: error,
  1538. icon: "none"
  1539. })
  1540. })
  1541. },
  1542. recursionList(list){
  1543. if(list){
  1544. for(var i in list){
  1545. var obj=list[i]
  1546. this.meterListShow[obj.id]=false
  1547. this.recursionList(obj.childMeterList)
  1548. }
  1549. }
  1550. },
  1551. ifBtnShow(item){
  1552. return this.meterListShow[item.id]
  1553. },
  1554. showBtn(item){
  1555. var key=this.meterListShow[item.id];
  1556. this.$set(this.meterListShow,item.id,!key)
  1557. //console.log("showBtn,",key)
  1558. this.$forceUpdate()
  1559. },
  1560. selector2reset(e) {
  1561. //console.log(e)
  1562. this.tabsFrom.show2Text = '全部时间'
  1563. this.tabsFrom.show2Index = '';
  1564. if (e.day) {
  1565. this.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  1566. this.getHomePageManage(0,this.companyId);
  1567. } else {
  1568. this.homePageManageType = this.clickType;
  1569. if (this.homePageManageType != 5) {
  1570. this.list[5].name = '指定时间';
  1571. }
  1572. this.getHomePageManage(0,this.companyId);
  1573. }
  1574. },
  1575. selector2cancel() {
  1576. if(this.clickType != -1) {
  1577. }
  1578. this.homePageManageType = this.clickType;
  1579. },
  1580. selector2confirm(e) {
  1581. this.tabsFrom.show2Text = e.year + "年" + e.month + "月"
  1582. this.tabsFrom.show2Index = e.year + "-" + e.month
  1583. if (e.day) {
  1584. this.tabsFrom.show2Text += e.day + "日"
  1585. this.tabsFrom.show2Index += '-' + e.day
  1586. this.queryDateMethod(this.tabsFrom.show2Index, true)
  1587. } else {
  1588. this.queryDateMethod(this.tabsFrom.show2Index, false)
  1589. }
  1590. },
  1591. queryDateMethod(queryTime, day) {
  1592. this.homePageManageType = "5";
  1593. if (day) {
  1594. this.queryDate = queryTime;
  1595. this.list[5].value = '9';
  1596. } else {
  1597. this.queryDate = queryTime + "-01";
  1598. this.list[5].value = '10';
  1599. }
  1600. //this.list[5].name = queryTime;
  1601. this.getHomePageManage(0,this.companyId);
  1602. },
  1603. clearTimer() {
  1604. if (this.intervalId) {
  1605. clearInterval(this.intervalId); // 清除定时器
  1606. this.intervalId = null; // 重置定时器ID
  1607. }
  1608. },
  1609. startInterval() {
  1610. this.clearTimer(); // 组件销毁前清除定时器
  1611. this.intervalId = setInterval(() => {
  1612. this.getHomePageKwh('', true)
  1613. }, 60000);
  1614. },
  1615. merchantChangeApi() {
  1616. this.popShow=false
  1617. this.getHomePageManageshowLoading=false;
  1618. this.meterList=[]
  1619. if (this.companyId) {
  1620. this.getHomePageKwh(this.companyId,true)
  1621. }else{
  1622. this.kWhList=[]
  1623. }
  1624. if(this.anchorpointShow('point-PlatformRevenue')){
  1625. this.getPlatformRevenue(this.companyId)
  1626. }
  1627. if(this.anchorpointShow('point-TenantManagement')){
  1628. this.getTenantList(this.companyId)
  1629. }
  1630. this.getDeviceStatus(this.companyId)
  1631. },
  1632. companyInfotypeChange(index){
  1633. if(index!=this.companyInfotypeCurrent){
  1634. var url=""
  1635. if(process.car.NODE_ENV=='dev'){
  1636. url='http://localhost:8081/#/'
  1637. }else if(process.car.NODE_ENV=='test'){
  1638. url='https://dgj.hbjp.com.cn/charging-prod/jp-housekeep-electric-test/#/'
  1639. }else{
  1640. url='https://dgj.hbjp.com.cn/charging-prod/jp-housekeep-electric/#/'
  1641. }
  1642. window.location.href=url+"pages/statistics/statistics"
  1643. }
  1644. },
  1645. change(index) {
  1646. this.current = index;
  1647. this.current2=0;
  1648. this.childList=[]
  1649. var company= this.merchantList1[index]
  1650. if(company.id!=''){
  1651. if(company.childList){
  1652. this.childList=[
  1653. ...company.childList
  1654. ];
  1655. if(company.type==5){
  1656. this.childList.unshift({
  1657. id: company.id,
  1658. name: '综合统计',
  1659. sp:1
  1660. });
  1661. }
  1662. }
  1663. if(this.childList&&this.childList.length){
  1664. this.companyId = this.childList[0].id;
  1665. this.childInfo=this.childList[0]
  1666. }else{
  1667. this.childList=[]
  1668. this.companyId =company.id
  1669. this.childInfo=company
  1670. }
  1671. }else{
  1672. this.companyId =''
  1673. }
  1674. console.log(this.childInfo)
  1675. this.companyInfo=company;
  1676. this.merchantChangeApi()
  1677. },
  1678. change2(index) {
  1679. this.current2=index;
  1680. this.companyId = this.childList[this.current2].id;
  1681. this.childInfo=this.childList[this.current2]
  1682. this.merchantChangeApi()
  1683. },
  1684. change3(index) {
  1685. //this.current2=index;
  1686. this.companyId = this.childCompanyList.list[index].id;
  1687. this.childInfo=this.childCompanyList.list[index]
  1688. this.popShow1=false;
  1689. this.merchantChangeApi()
  1690. },
  1691. merchantChange(company, index) {
  1692. if(this.current==0){
  1693. this.current=1;
  1694. }
  1695. var m = company;
  1696. var n = this.merchantList1[this.current];
  1697. this.merchantList1[this.current] = m;
  1698. this.merchantList2[index] = n;
  1699. //this.$forceUpdate()
  1700. this.utabsone=false
  1701. this.companyId = company.id;
  1702. this.companyInfo=company
  1703. //console.log(company.type+"!!!!!!!!")
  1704. if(company.id!=''){
  1705. if(company.childList){
  1706. this.childList=company.childList;
  1707. if(company.type==5){
  1708. this.childList.unshift({
  1709. id: company.id,
  1710. name: '综合统计',
  1711. sp:1
  1712. });
  1713. }
  1714. }
  1715. if(this.childList&&this.childList.length){
  1716. this.companyId = this.childList[0].id;
  1717. this.childInfo=this.childList[0]
  1718. }else{
  1719. this.childList=[]
  1720. this.companyId =company.id
  1721. this.childInfo=company
  1722. }
  1723. }else{
  1724. this.companyId =''
  1725. }
  1726. this.merchantChangeApi()
  1727. this.popShow = false;
  1728. },
  1729. getCompanyInfoList() {
  1730. // uni.showLoading({
  1731. // title: "加载中",
  1732. // mask: true,
  1733. // })
  1734. API.deviceCompanyList().then((response) => {
  1735. //uni.hideLoading();
  1736. var list = response.data.companyInfoList;
  1737. this.companyListMain=response.data.companyInfoList;
  1738. var mList1 = [];
  1739. var mList2 = [];
  1740. var sp=0
  1741. var id=""
  1742. if(list.length==1&&list[0].childList&&list[0].childList.length){
  1743. list=list[0].childList
  1744. sp=1;
  1745. id=this.companyListMain[0].id
  1746. this.companyId=id
  1747. }
  1748. mList1.push({
  1749. id:id,
  1750. name: '全部',
  1751. sp:sp
  1752. });
  1753. for (var i = 0; i < list.length; i++) {
  1754. if (i >= 3) {
  1755. mList2.push(list[i]);
  1756. } else {
  1757. mList1.push(list[i]);
  1758. }
  1759. }
  1760. this.companyList = list;
  1761. if(this.companyList&&this.companyList.length&&this.companyList.length==1){
  1762. this.childList=list[0].childList
  1763. if(!this.childList){
  1764. this.childList=[]
  1765. }
  1766. // this.childList=[
  1767. // ...list[0].childList,
  1768. // {
  1769. // name:'创客公寓',
  1770. // id:''
  1771. // },
  1772. // {
  1773. // name:'创客公寓',
  1774. // id:''
  1775. // }
  1776. // ]
  1777. }
  1778. if(sp==1){
  1779. this.childInfo=this.companyListMain[0]
  1780. this.companyInfo=this.companyListMain[0]
  1781. this.childInfo.sp=1
  1782. this.getHomePageKwh('')
  1783. // this.companyInfo.sp=1
  1784. }else if(this.companyList.length==1&&this.childList.length==0){
  1785. this.companyId=this.companyList[0].id
  1786. this.childInfo=this.companyList[0]
  1787. this.companyInfo=this.companyList[0]
  1788. }else if(this.companyList.length==1){
  1789. this.companyId=this.childList[0].id
  1790. this.childInfo=this.childList[0]
  1791. this.companyInfo=this.companyList[0]
  1792. }else{
  1793. this.getHomePageKwh('')
  1794. }
  1795. this.merchantList1 = mList1;
  1796. this.merchantList2 = mList2;
  1797. this.merchantChangeApi()
  1798. }).catch(error => {
  1799. uni.showToast({
  1800. title: error,
  1801. icon: "none"
  1802. })
  1803. })
  1804. },
  1805. sectionChange(index) {
  1806. this.clickType = this.homePageManageType ;
  1807. this.homePageManageType = index;
  1808. if (index == 5) {
  1809. this.tabsFrom.show2 = true;
  1810. //this.params.day = false;
  1811. } else {
  1812. this.list[5].name = '指定时间'
  1813. this.getHomePageManage(0,this.companyId)
  1814. }
  1815. },
  1816. getHomePageManage(bl,companyId) {
  1817. if(this.showAccountantWater){
  1818. //水表
  1819. this.getHomePageManageB(bl,companyId)
  1820. }else{
  1821. //电表
  1822. this.getHomePageManageA(bl,companyId)
  1823. }
  1824. },
  1825. getHomePageManageB(bl,companyId) {
  1826. this.getHomePageManageReadyWater=false
  1827. if(bl){
  1828. this.getHomePageManageshowLoading=false
  1829. }else{
  1830. uni.showLoading({
  1831. title: "加载中",
  1832. mask: true,
  1833. })
  1834. }
  1835. this.incomeExpenditureObj={}
  1836. var type=this.list[this.homePageManageType].value
  1837. API_water.meterManage({
  1838. queryDate:this.queryDate,
  1839. companyId: companyId ,
  1840. type: type
  1841. }).then((response) => {
  1842. this.getHomePageManageReadyWater=true
  1843. if(bl){
  1844. this.getHomePageManageshowLoading=true
  1845. }else{
  1846. uni.hideLoading();
  1847. }
  1848. if(this.companyId!=companyId){
  1849. return
  1850. }
  1851. this.meterListWater = response.data.meterList;
  1852. ////console.log(this.meterList)
  1853. this.homePageManageObjWater = response.data;
  1854. //this.$forceUpdate()
  1855. if(this.incomeExpenditureBl){
  1856. //&&this.homePageManageObj.showPark
  1857. // this.myBarChart=null;
  1858. // this.$nextTick(()=>{
  1859. // this.getBarCharts()
  1860. // })
  1861. this.getIncomeExpenditureWater(this.companyId);
  1862. }
  1863. }).catch(error => {
  1864. uni.showToast({
  1865. title: error,
  1866. icon: "none"
  1867. })
  1868. })
  1869. },
  1870. getHomePageManageA(bl,companyId) {
  1871. if(this.myBarChart){
  1872. this.myBarChart.clear()
  1873. }
  1874. this.getHomePageManageReady=false
  1875. if(bl){
  1876. this.getHomePageManageshowLoading=false
  1877. }else{
  1878. uni.showLoading({
  1879. title: "加载中",
  1880. mask: true,
  1881. })
  1882. }
  1883. this.incomeExpenditureObj={}
  1884. var type=this.list[this.homePageManageType].value
  1885. API.homePageManage({
  1886. queryDate:this.queryDate,
  1887. companyId: companyId ,
  1888. type: type
  1889. }).then((response) => {
  1890. this.getHomePageManageReady=true
  1891. if(bl){
  1892. this.getHomePageManageshowLoading=true
  1893. }else{
  1894. uni.hideLoading();
  1895. }
  1896. if(this.companyId!=companyId){
  1897. return
  1898. }
  1899. this.meterList = response.data.meterList;
  1900. ////console.log(this.meterList)
  1901. this.homePageManageObj = response.data;
  1902. //this.$forceUpdate()
  1903. if(this.incomeExpenditureBl){
  1904. //&&this.homePageManageObj.showPark
  1905. this.myBarChart=null;
  1906. this.$nextTick(()=>{
  1907. this.getBarCharts()
  1908. })
  1909. this.getIncomeExpenditure(this.companyId);
  1910. }
  1911. }).catch(error => {
  1912. uni.showToast({
  1913. title: error,
  1914. icon: "none"
  1915. })
  1916. })
  1917. },
  1918. // 报警
  1919. getAbnormalAlarmRecord(companyId) {
  1920. if(this.anchorpointShow('point-Poweroutagereminder')){
  1921. }else{
  1922. return
  1923. }
  1924. API.remindList({
  1925. configId: '',
  1926. pageIndex: 1,
  1927. pageSize: 3,
  1928. companyId: this.childInfo.id,
  1929. queryParent:this.childInfo.sp?1:0
  1930. }).then((response) => {
  1931. if(this.companyId!=companyId){
  1932. return
  1933. }
  1934. this.abnormalRecordsList = response.data.data;
  1935. }).catch(error => {
  1936. uni.showToast({
  1937. title: error,
  1938. icon: "none"
  1939. })
  1940. })
  1941. },
  1942. selector1confirm(e) {
  1943. //this.getHomePageKwh()
  1944. //console.log(e)
  1945. this.companyId=e[0].value
  1946. this.current2=e[0].i
  1947. this.childInfo=this.childList[this.current2];
  1948. uni.showLoading()
  1949. this.merchantChangeApi()
  1950. },
  1951. // 用电量
  1952. getHomePageKwh( companyId,interval) {
  1953. if (!interval) {
  1954. // uni.showLoading({
  1955. // title: "加载中",
  1956. // mask: true,
  1957. // })
  1958. this.getHomePageKwhshowLoading=true;
  1959. }
  1960. API.homePageKwh({
  1961. pageIndex: 1,
  1962. pageSize: 5,
  1963. companyId:companyId,
  1964. queryKwh:companyId?0:1,//是否查电量 默认查
  1965. queryXn:companyId?1:'',//是否查虚拟表 默认不查
  1966. }).then((response) => {
  1967. if (!interval) {
  1968. //uni.hideLoading();
  1969. this.getHomePageKwhshowLoading=false;
  1970. }
  1971. if(this.companyId!=companyId){
  1972. return
  1973. }
  1974. if(companyId){
  1975. this.kWhList = response.data.data;
  1976. if(this.kWhList.length==1){
  1977. var item=this.kWhList[0];
  1978. this.$refs['refMyEm'+companyId].init({
  1979. id:item.id,
  1980. name:item.name,
  1981. companyId:item.companyId,
  1982. ref:1,
  1983. })
  1984. setTimeout(()=>{
  1985. this.$nextTick(()=>{
  1986. this.utabsone=true
  1987. })
  1988. },200)
  1989. }else{
  1990. this.getHomePageManage(1,this.companyId)
  1991. }
  1992. }else{
  1993. this.getHomePageKwhWater(companyId,interval)
  1994. this.kWhListHome= response.data.data;
  1995. if (!interval) {
  1996. //this.startInterval(); // 组件挂载后开始间隔
  1997. }else{
  1998. this.intervalReady=true
  1999. }
  2000. setTimeout(()=>{
  2001. this.$nextTick(()=>{
  2002. this.utabsone=true
  2003. })
  2004. },200)
  2005. }
  2006. }).catch(error => {
  2007. uni.showToast({
  2008. title: error,
  2009. icon: "none"
  2010. })
  2011. })
  2012. },
  2013. // 用电量
  2014. getHomePageKwhWater( companyId,interval) {
  2015. if (!interval) {
  2016. // uni.showLoading({
  2017. // title: "加载中",
  2018. // mask: true,
  2019. // })
  2020. this.getHomePageKwhshowLoadingWater=true;
  2021. }
  2022. API_water.waterConsumption({
  2023. pageIndex: 1,
  2024. pageSize: 5,
  2025. companyId:companyId,
  2026. }).then((response) => {
  2027. if (!interval) {
  2028. //uni.hideLoading();
  2029. this.getHomePageKwhshowLoadingWater=false;
  2030. }
  2031. if(this.companyId!=companyId){
  2032. return
  2033. }
  2034. this.kWhListHomeWater= response.data.data;
  2035. }).catch(error => {
  2036. uni.showToast({
  2037. title: error,
  2038. icon: "none"
  2039. })
  2040. })
  2041. },
  2042. getPlatformRevenueBl(){
  2043. return this.datacompanyInfo.type=='2'
  2044. },
  2045. getPlatformRevenue(companyId){
  2046. if(this.getPlatformRevenueBl()){
  2047. }else{
  2048. return
  2049. }
  2050. this.platformRevenueList=[]
  2051. this.getPlatformRevenueReady=false
  2052. var queryDate =parseUnixTime(new Date(), '{y}-{m}-1');
  2053. API.platformRevenue({
  2054. queryDate:queryDate,
  2055. companyId:companyId,
  2056. queryParent:this.childInfo.sp==1?1:0
  2057. }).then((response) => {
  2058. if(companyId!=this.companyId){
  2059. return
  2060. }
  2061. this.getPlatformRevenueReady=true
  2062. this.platformRevenueList=response.data.incomeList
  2063. }).catch(error => {
  2064. uni.showToast({
  2065. title: error,
  2066. icon: "none"
  2067. })
  2068. })
  2069. },
  2070. // 累计报警
  2071. getDeviceStatus(companyId) {
  2072. this.alarmsForm ={
  2073. okNum:0,errorNum:0
  2074. }
  2075. API.deviceStatus({
  2076. companyId: companyId,
  2077. queryParent:this.childInfo.sp==1?1:0
  2078. }).then((response) => {
  2079. if(this.companyId!=companyId){
  2080. return
  2081. }
  2082. setTimeout(()=>{
  2083. this.$nextTick(()=>{
  2084. this.utabsone=true
  2085. })
  2086. },200)
  2087. this.alarmsForm = response.data;
  2088. if (this.alarmsForm.okNum != 0) {
  2089. }
  2090. // this.alarmsPercent = this.alarmsForm.okNum / (this.alarmsForm.okNum + this.alarmsForm
  2091. // .errorNum) * 100;
  2092. }).catch(error => {
  2093. uni.showToast({
  2094. title: error,
  2095. icon: "none"
  2096. })
  2097. })
  2098. this.alarmsFormWater ={
  2099. okNum:0,errorNum:0
  2100. }
  2101. API_water.deviceStatusOperation({
  2102. companyId: companyId,
  2103. queryParent:this.childInfo.sp==1?1:0
  2104. }).then((response) => {
  2105. if(this.companyId!=companyId){
  2106. return
  2107. }
  2108. this.alarmsFormWater = response.data;
  2109. // this.alarmsPercent = this.alarmsForm.okNum / (this.alarmsForm.okNum + this.alarmsForm
  2110. // .errorNum) * 100;
  2111. }).catch(error => {
  2112. uni.showToast({
  2113. title: error,
  2114. icon: "none"
  2115. })
  2116. })
  2117. },
  2118. // 故障类型
  2119. getBarCharts() {
  2120. if (!this.myBarChart) {
  2121. this.myBarChart = echarts.init(document.getElementById('barEcharts-statistics'),null,{
  2122. width:uni.upx2px(620),height:uni.upx2px(740)
  2123. });
  2124. }
  2125. this.myBarChart.clear()
  2126. var data=[
  2127. {
  2128. name:"总表电量",
  2129. key:"parkKwh",
  2130. color:"#307af6"
  2131. },
  2132. {
  2133. name:"计费电量",
  2134. key:"chargeKwh",
  2135. color:"#52b8aa"
  2136. },
  2137. {
  2138. name:"自用电量",
  2139. key:"freeKwh",
  2140. color:"#53b56b"
  2141. },
  2142. {
  2143. name:"公用电量",
  2144. key:"publicKwh",
  2145. color:"#ef8132"
  2146. },
  2147. {
  2148. name:"电损量",
  2149. key:"lostKwh",
  2150. color:"#dc4441"
  2151. }
  2152. ]
  2153. var dataName=[]
  2154. var dataSeries=[]
  2155. for(var i in data){
  2156. var it=data[i]
  2157. dataName.push(it.name)
  2158. dataSeries.push({})
  2159. }
  2160. for(var i in data){
  2161. var it=data[i]
  2162. dataSeries[data.length-i-1]={
  2163. name:it.name,
  2164. type: 'bar',
  2165. itemStyle:{
  2166. color:it.color
  2167. },
  2168. data: [
  2169. this.homePageManageObj[it.key]
  2170. ],
  2171. coordinateSystem: 'polar',
  2172. label: {
  2173. show: true,
  2174. position: 'start',
  2175. formatter: '{c}度'
  2176. }
  2177. }
  2178. }
  2179. var option = {
  2180. polar: {
  2181. center:['50%','58%'],
  2182. radius:[25, '80%']
  2183. },
  2184. angleAxis: {
  2185. startAngle: 75,
  2186. label: {
  2187. rotate: 45, // 旋转标签,使得重叠的概率降低
  2188. // margin: 5 // 设置标签与轴线之间的距离,增加空间
  2189. }
  2190. },
  2191. legend: {
  2192. itemGap:5,
  2193. data: dataName,
  2194. //orient :'vertical'
  2195. },
  2196. radiusAxis: {
  2197. type: 'category',
  2198. data: ['']
  2199. },
  2200. tooltip: {},
  2201. series: dataSeries
  2202. };
  2203. //console.log(option)
  2204. this.myBarChart.setOption(option);
  2205. },
  2206. toDataMonitoringList() {
  2207. uni.navigateTo({
  2208. url: '/pages/equipmentDataMonitoring/dataMonitoring-list'
  2209. })
  2210. },
  2211. toEquipmentConditionMonitoring() {
  2212. uni.navigateTo({
  2213. url: '/pages/equipmentInformation/equipmentConditionMonitoring?companyId='+this.companyId
  2214. })
  2215. },
  2216. toWorkOrderManagement() {
  2217. uni.navigateTo({
  2218. url: '/pages/workOrderManagement/workOrderManagement'
  2219. })
  2220. },
  2221. toEquipmentElectricity() {
  2222. uni.navigateTo({
  2223. url: '/pages/equipmentDataMonitoring/equipmentElectricity?companyId=' + this.companyId
  2224. })
  2225. },
  2226. toEquipmentElectricityWater() {
  2227. uni.navigateTo({
  2228. url: '/pages/equipmentDataMonitoring/equipmentElectricityWater?companyId=' + this.companyId
  2229. })
  2230. },
  2231. toElectronicMonitoring(item) {
  2232. uni.navigateTo({
  2233. url: '/pages/equipmentDataMonitoring/electronicMonitoring?id=' + item.id + '&name=' + item
  2234. .name +
  2235. '&companyId=' + item.companyId
  2236. })
  2237. },
  2238. toElectronicMonitoringWater(item) {
  2239. uni.navigateTo({
  2240. url: '/pages/equipmentDataMonitoring/electronicMonitoringWater?id=' + item.id + '&name=' + item
  2241. .name +
  2242. '&companyId=' + item.companyId
  2243. })
  2244. }
  2245. }
  2246. }
  2247. </script>
  2248. <style lang="scss" scoped>
  2249. .incomeExpenditureClass{
  2250. width: 100%;
  2251. //padding:16rpx 0;
  2252. .incomeRow{
  2253. display: flex;
  2254. justify-content: space-evenly;
  2255. }
  2256. .income1:last-child{
  2257. .income11,.income12{
  2258. border-right: 1px solid #c5c3c3;
  2259. }
  2260. }
  2261. .income2{
  2262. width: 200% !important;
  2263. .income12{
  2264. display: flex;
  2265. justify-content: space-between;
  2266. border-right: 1px solid #c5c3c3;
  2267. .income12-1{
  2268. width: 100%;
  2269. }
  2270. .income12-1{
  2271. width: 100%;
  2272. }
  2273. .income12-3{
  2274. width: 100%;
  2275. color: rgba(22,119,255,1);
  2276. font-size: 28rpx;
  2277. }
  2278. }
  2279. }
  2280. .income1,.income2{
  2281. .income121{
  2282. font-size: 24rpx;
  2283. color:#c5c3c3;
  2284. }
  2285. width: 100%;
  2286. text-align: center;
  2287. .income11{
  2288. padding:6rpx 0;
  2289. background-color: #1677FF ;
  2290. color:#fff;
  2291. font-size: 26rpx;
  2292. white-space: pre;
  2293. border-top: 1px solid #c5c3c3;
  2294. border-left: 1px solid #c5c3c3;
  2295. }
  2296. .income12{
  2297. padding:6rpx 0;
  2298. border-top: 1px solid #c5c3c3;
  2299. border-bottom: 1px solid #c5c3c3;
  2300. border-left: 1px solid #c5c3c3;
  2301. font-size: 40rpx;
  2302. line-height: 56rpx;
  2303. }
  2304. }
  2305. }
  2306. /deep/.u-drawer-content {
  2307. margin-top: 88rpx;
  2308. }
  2309. .popup-tabs {
  2310. background-color: #fff;
  2311. display: flex;
  2312. align-items: center;
  2313. justify-content: space-between;
  2314. padding-top: 32rpx;
  2315. padding-right: 32rpx;
  2316. color: rgba(51, 51, 51, 1);
  2317. font-size: 32rpx;
  2318. .tabs {
  2319. width: 88%;
  2320. }
  2321. }
  2322. // /deep/.u-tab-item {
  2323. // width: 25% !important;
  2324. // flex: none !important;
  2325. // }
  2326. .tabs-box{
  2327. .tabs-len-1{
  2328. }
  2329. .tabs-len-2{
  2330. /deep/.u-tab-item {
  2331. // max-width: 39% !important;
  2332. // flex: none !important;
  2333. }
  2334. }
  2335. .tabs-len-3{
  2336. /deep/.u-tab-item {
  2337. max-width: 39% !important;
  2338. flex: none !important;
  2339. }
  2340. }
  2341. .tabs-len-4{
  2342. /deep/.u-tab-item {
  2343. max-width: 26% !important;
  2344. flex: none !important;
  2345. }
  2346. }
  2347. .tabs{
  2348. /deep/.u-tab-item:first-child {
  2349. width: 20% !important;
  2350. flex: none !important;
  2351. }
  2352. }
  2353. }
  2354. // /deep/.u-tab-item2 {
  2355. // width: 33% !important;
  2356. // flex: none !important;
  2357. // }
  2358. .tabs-options {
  2359. display: flex;
  2360. padding: 24rpx 32rpx 0;
  2361. flex-wrap: wrap;
  2362. .item {
  2363. width: 25%;
  2364. margin-bottom: 40rpx;
  2365. }
  2366. }
  2367. // 导航栏
  2368. .navbar {
  2369. background-color: rgba(22, 119, 255, 1);
  2370. color: #fff;
  2371. line-height: 88rpx;
  2372. display: flex;
  2373. justify-content: space-between;
  2374. align-items: center;
  2375. padding: 0 32rpx;
  2376. color: rgba(255, 255, 255, 1);
  2377. font-size: 36rpx;
  2378. position: fixed;
  2379. left: 0;
  2380. right: 0;
  2381. top: 0;
  2382. z-index: 999999;
  2383. font-weight: bold;
  2384. .title{
  2385. overflow: hidden;
  2386. white-space: nowrap;
  2387. text-overflow: ellipsis;
  2388. }
  2389. .img {
  2390. width: 48rpx;
  2391. height: 48rpx;
  2392. vertical-align: middle;
  2393. }
  2394. }
  2395. // 标签
  2396. .tabs-box {
  2397. padding: 32rpx 0;
  2398. margin-top: 66rpx;
  2399. padding-right: 32rpx;
  2400. background-color: rgba(22, 119, 255, 1);
  2401. display: flex;
  2402. align-items: center;
  2403. justify-content: space-between;
  2404. .tabs {
  2405. width: 97%;
  2406. }
  2407. .more{
  2408. padding-right: 12rpx;
  2409. }
  2410. }
  2411. .main {
  2412. border-radius: 16px 16px 0px 0px;
  2413. background: linear-gradient(180deg, rgba(242, 244, 246, 1) 61%, rgba(255, 255, 255, 0) 100%);
  2414. margin-top: -24rpx;
  2415. padding: 32rpx 32rpx 32rpx 20rpx;
  2416. .statistics {
  2417. border-radius: 8px;
  2418. background-color: rgba(255, 255, 255, 1);
  2419. box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
  2420. margin-bottom: 24rpx;
  2421. padding: 40rpx;
  2422. .title {
  2423. display: flex;
  2424. align-items: center;
  2425. margin-bottom: 16rpx;
  2426. .img {
  2427. width: 36rpx;
  2428. height: 36rpx;
  2429. vertical-align: middle;
  2430. border-radius: 999px;
  2431. }
  2432. .change {
  2433. display: flex;
  2434. align-items: center;
  2435. .change-img {
  2436. width: 32rpx;
  2437. height: 32rpx;
  2438. vertical-align: middle;
  2439. }
  2440. text {
  2441. margin-left: 8rpx;
  2442. }
  2443. }
  2444. .text {
  2445. color: rgba(16, 16, 16, 1);
  2446. font-size: 36rpx;
  2447. margin-left: 16rpx;
  2448. font-weight: bold;
  2449. }
  2450. .change {
  2451. margin-left: 16rpx;
  2452. font-size: 24rpx;
  2453. color: #838383;
  2454. }
  2455. .check-all {
  2456. margin-left: auto;
  2457. color: rgba(131, 131, 131, 1);
  2458. font-size: 24rpx;
  2459. }
  2460. }
  2461. }
  2462. .switchWater{
  2463. display: flex;
  2464. margin-left: 8px;
  2465. .s{
  2466. border: 1px solid rgba(22,132,252,1);
  2467. color:rgba(22,132,252,1);
  2468. padding: 2px 8px;
  2469. }
  2470. .s2{
  2471. border-radius: 0 4px 4px 0;
  2472. }
  2473. .s1{
  2474. border-radius: 4px 0 0 4px;
  2475. }
  2476. .index{
  2477. background-color:rgba(22,132,252,1);
  2478. color: #fff;
  2479. }
  2480. }
  2481. // 用电量
  2482. .statistics-e {
  2483. padding: 40rpx;
  2484. .electricity {
  2485. background-color: #fff;
  2486. .item:last-of-type {
  2487. border: none;
  2488. padding-bottom: 0;
  2489. }
  2490. .item {
  2491. padding: 16rpx 0;
  2492. display: flex;
  2493. align-items: center;
  2494. justify-content: space-between;
  2495. border-bottom: 1px solid rgba(245, 245, 245, 1);
  2496. .item-content {
  2497. width: 93%;
  2498. }
  2499. .equipment {
  2500. display: flex;
  2501. align-items: center;
  2502. .equipment1 {
  2503. color: rgba(51, 51, 51, 1);
  2504. font-size: 32rpx;
  2505. max-width: 40%;
  2506. font-weight: bold;
  2507. white-space: nowrap;
  2508. overflow: hidden;
  2509. text-overflow: ellipsis;
  2510. }
  2511. .equipment2 {
  2512. color: rgba(119, 119, 119, 1);
  2513. margin-left: 16rpx;
  2514. max-width: 40%;
  2515. white-space: nowrap;
  2516. overflow: hidden;
  2517. text-overflow: ellipsis;
  2518. }
  2519. }
  2520. // 状态
  2521. .state {
  2522. white-space: pre;
  2523. //width: 64rpx;
  2524. //height: 36rpx;
  2525. padding: 0 4rpx;
  2526. line-height: 36rpx;
  2527. border-radius: 8rpx;
  2528. font-size: 22rpx;
  2529. text-align: center;
  2530. border: 1px solid rgba(255, 123, 0, 1);
  2531. color: rgba(255, 123, 0, 1);
  2532. margin-left: auto;
  2533. // .dot {
  2534. // margin-right: 8rpx;
  2535. // width: 16rpx;
  2536. // height: 16rpx;
  2537. // background-color: rgba(255, 123, 0, 1);
  2538. // border-radius: 999px;
  2539. // margin-left: auto;
  2540. // }
  2541. }
  2542. .state2 {
  2543. border: 1px solid rgba(0, 185, 98, 1);
  2544. color: rgba(0, 185, 98, 1);
  2545. }
  2546. .electricity {
  2547. display: flex;
  2548. justify-content: space-between;
  2549. align-items: center;
  2550. margin-top: 8rpx;
  2551. text-align: center;
  2552. .electricity-item {
  2553. display: flex;
  2554. align-items: center;
  2555. width: 33.3%;
  2556. height: 40rpx;
  2557. line-height: 40rpx;
  2558. .number {
  2559. color: rgba(51, 51, 51, 1);
  2560. font-weight: bold;
  2561. font-size: 24rpx;
  2562. margin-left: 8rpx;
  2563. }
  2564. .date {
  2565. color: rgba(119, 119, 119, 1);
  2566. font-size: 24rpx;
  2567. }
  2568. }
  2569. }
  2570. }
  2571. }
  2572. }
  2573. // 统计1
  2574. .statistics-1 {
  2575. background-color: rgba(255, 255, 255, 1);
  2576. width: 100%;
  2577. padding: 24rpx;
  2578. box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
  2579. border-radius: 8px;
  2580. margin-bottom: 24rpx;
  2581. .item {
  2582. margin-top: 24rpx;
  2583. display: flex;
  2584. align-items: center;
  2585. .item-progess {
  2586. }
  2587. .total {
  2588. margin-left: 24rpx;
  2589. color: rgba(119, 119, 119, 1);
  2590. .total1 {
  2591. display: flex;
  2592. color: rgba(51, 51, 51, 1);
  2593. font-size: 32rpx;
  2594. font-weight: bold;
  2595. .normal {
  2596. margin-bottom: 12rpx;
  2597. }
  2598. }
  2599. .total2 {
  2600. color: rgba(119, 119, 119, 1);
  2601. }
  2602. .abnormal {
  2603. margin-left: 24rpx;
  2604. }
  2605. }
  2606. .total-number {
  2607. color: rgba(255, 123, 0, 1);
  2608. margin: 0 8rpx;
  2609. font-weight: bold;
  2610. }
  2611. }
  2612. }
  2613. // 统计2异常报警记录
  2614. .statistics-2 {
  2615. .abnormal-item:last-of-type {
  2616. border-bottom: none !important;
  2617. padding-bottom: 0;
  2618. }
  2619. .abnormal-item {
  2620. display: flex;
  2621. justify-content: space-between;
  2622. align-items: center;
  2623. padding: 16rpx;
  2624. border-bottom: 1px solid rgba(245, 245, 245, 1);
  2625. .item-title {
  2626. .level{
  2627. color:#fff;
  2628. border-radius: 8rpx;
  2629. font-weight: 400;
  2630. padding: 4rpx 8rpx;
  2631. font-size: 22rpx;
  2632. margin-right: 2px;
  2633. }
  2634. .level1{
  2635. background: red;
  2636. }
  2637. .level2{
  2638. background-color: rgba(255,123,0,1);
  2639. }
  2640. color: rgba(51, 51, 51, 1);
  2641. width: 100%;
  2642. .img {
  2643. width: 32rpx;
  2644. height: 32rpx;
  2645. margin-right: 8rpx;
  2646. }
  2647. .name {
  2648. color: rgba(51, 51, 51, 1);
  2649. font-weight: bold;
  2650. overflow: hidden;
  2651. white-space: nowrap;
  2652. text-overflow: ellipsis;
  2653. }
  2654. .date {
  2655. color: rgba(119, 119, 119, 1);
  2656. font-size: 24rpx;
  2657. }
  2658. }
  2659. .item-value {
  2660. text-align: right;
  2661. display: flex;
  2662. align-items: center;
  2663. .more {
  2664. margin-left: 8rpx;
  2665. }
  2666. .value1 {
  2667. font-weight: bold;
  2668. color: rgba(51, 51, 51, 1);
  2669. }
  2670. .value2 {
  2671. color: rgba(119, 119, 119, 1);
  2672. font-size: 24rpx;
  2673. }
  2674. }
  2675. }
  2676. }
  2677. .statistics-3 {
  2678. }
  2679. .statistics-4 {
  2680. }
  2681. // 异常设备排名
  2682. .statistics-ranking {
  2683. .total {
  2684. color: rgba(16, 16, 16, 1);
  2685. padding-left: 52rpx;
  2686. text {
  2687. color: #1677FF;
  2688. padding: 0 8rpx;
  2689. }
  2690. }
  2691. .ranking-main {
  2692. margin-top: 40rpx;
  2693. border-radius: 16px;
  2694. background-color: #fff;
  2695. .item:last-of-type {
  2696. margin-bottom: 0;
  2697. }
  2698. .item {
  2699. display: flex;
  2700. align-items: center;
  2701. margin-bottom: 32rpx;
  2702. .ranking {
  2703. color: rgba(16, 16, 16, 1);
  2704. font-weight: bold;
  2705. }
  2706. .icon {
  2707. width: 72rpx;
  2708. height: 72rpx;
  2709. border-radius: 4px;
  2710. background-color: rgba(219, 234, 255, 1);
  2711. display: flex;
  2712. align-items: center;
  2713. justify-content: center;
  2714. margin-left: 24rpx;
  2715. .img {
  2716. width: 48rpx;
  2717. height: 48rpx;
  2718. }
  2719. }
  2720. .name {
  2721. margin-left: 16rpx;
  2722. .name1 {
  2723. color: rgba(51, 51, 51, 1);
  2724. font-weight: bold;
  2725. }
  2726. .name2 {
  2727. color: rgba(119, 119, 119, 1);
  2728. font-size: 24rpx;
  2729. margin-top: 4rpx;
  2730. }
  2731. }
  2732. .time {
  2733. color: rgba(16, 16, 16, 1);
  2734. margin-left: auto;
  2735. font-weight: bold;
  2736. }
  2737. }
  2738. }
  2739. // 查看全部排名
  2740. .check-all {
  2741. text-align: center;
  2742. color: rgba(119, 119, 119, 1);
  2743. font-size: 12px;
  2744. }
  2745. }
  2746. // 能源管理
  2747. .statistics-manage {
  2748. padding: 40rpx 0;
  2749. .title,
  2750. .chart,
  2751. .search,
  2752. .meter-statistic {
  2753. padding: 0 32rpx;
  2754. }
  2755. // 图表
  2756. .chart {
  2757. padding-top: 32rpx;
  2758. border-top: 1px solid rgba(242, 242, 242, 1);
  2759. /deep/.u-subsection {
  2760. padding: 2px;
  2761. }
  2762. /deep/.u-item {
  2763. padding: 0;
  2764. font-size: 24rpx
  2765. }
  2766. .chat-box {
  2767. //margin-top: 24rpx;
  2768. width: 100%;
  2769. //height: 480rpx;
  2770. img {
  2771. width: 100%;
  2772. height: 100%;
  2773. }
  2774. }
  2775. }
  2776. .search {
  2777. border-top: 1px solid rgba(242, 242, 242, 1);
  2778. border-bottom: 1px solid rgba(242, 242, 242, 1);
  2779. display: flex;
  2780. align-items: center;
  2781. justify-content: space-between;
  2782. padding: 40rpx 32rpx;
  2783. .switch {
  2784. display: flex;
  2785. align-items: center;
  2786. text {
  2787. margin-left: 8rpx;
  2788. color: rgba(51, 51, 51, 1);
  2789. }
  2790. }
  2791. .search-box {
  2792. border-radius: 50px;
  2793. background-color: rgba(242, 244, 246, 1);
  2794. color: rgba(136, 136, 136, 1);
  2795. height: 56rpx;
  2796. line-height: 56rpx;
  2797. padding-left: 16rpx;
  2798. padding-right: 8rpx;
  2799. flex: 1;
  2800. margin-left: 28rpx;
  2801. display: flex;
  2802. align-items: center;
  2803. justify-content: space-between;
  2804. uni-input {
  2805. height: 56rpx;
  2806. line-height: 56rpx !important;
  2807. font-size: 28rpx;
  2808. width: 75%;
  2809. }
  2810. .icon {
  2811. display: flex;
  2812. align-items: center;
  2813. justify-content: center;
  2814. width: 64rpx;
  2815. height: 40rpx;
  2816. border-radius: 50px;
  2817. background-color: rgba(22, 119, 255, 1);
  2818. }
  2819. }
  2820. }
  2821. }
  2822. // 电表统计
  2823. .meter-statistic {
  2824. margin-top: 32rpx;
  2825. .meter-statistic-main{
  2826. display: flex;
  2827. align-items: center;
  2828. }
  2829. .sum {
  2830. .meter-name {
  2831. color: rgba(51, 51, 51, 1);
  2832. font-size: 32rpx;
  2833. margin-left: 8rpx;
  2834. font-weight: bold;
  2835. }
  2836. .icon {
  2837. margin-right: 8rpx;
  2838. img {
  2839. width: 40rpx;
  2840. height: 40rpx;
  2841. vertical-align: middle;
  2842. }
  2843. }
  2844. .meter-state {
  2845. margin-left: 8rpx;
  2846. width: 64rpx;
  2847. height: 36rpx;
  2848. line-height: 36rpx;
  2849. border-radius: 4px;
  2850. background-color: rgba(255, 255, 255, 1);
  2851. color: rgba(0, 185, 98, 1);
  2852. font-size: 22rpx;
  2853. text-align: center;
  2854. border: 1px solid rgba(0, 185, 98, 1);
  2855. }
  2856. .meter-state2 {
  2857. border: 1px solid rgba(255, 123, 0, 1);
  2858. color: rgba(255, 123, 0, 1);
  2859. }
  2860. .meter-number {
  2861. margin-left: auto;
  2862. color: rgba(51, 51, 51, 1);
  2863. font-size: 32rpx;
  2864. /deep/.u-icon--right {
  2865. margin-left: 8rpx;
  2866. }
  2867. }
  2868. }
  2869. .sum2 {
  2870. padding: 0 32rpx;
  2871. margin-top: 8rpx;
  2872. display: flex;
  2873. align-items: center;
  2874. justify-content: space-between;
  2875. .title {
  2876. color: rgba(119, 119, 119, 1);
  2877. }
  2878. .value {
  2879. color: rgba(119, 119, 119, 1);
  2880. }
  2881. }
  2882. // 一级表
  2883. .first-level {
  2884. padding-left: 16rpx;
  2885. margin-top: 20rpx;
  2886. .meter-name {
  2887. font-size: 28rpx
  2888. }
  2889. }
  2890. .first-level-list{
  2891. width: 100%;
  2892. display: flex;
  2893. align-items: center;
  2894. }
  2895. // 二级表
  2896. .second-level {
  2897. padding-left: 32rpx;
  2898. margin-top: 20rpx;
  2899. .meter-name {
  2900. font-size: 24rpx
  2901. }
  2902. }
  2903. .else-switch {
  2904. padding-left: 72rpx;
  2905. .meter-name {
  2906. font-size: 24rpx
  2907. }
  2908. .item {
  2909. margin-top: 24rpx;
  2910. }
  2911. }
  2912. }
  2913. }
  2914. /deep/.u-drawer {
  2915. z-index: 999 !important;
  2916. }
  2917. .contractList{
  2918. font-weight: bold;
  2919. .contractListClass{
  2920. display: flex;
  2921. margin-top:16rpx;
  2922. justify-content: space-between;
  2923. color: rgba(51,51,51,1);
  2924. .img{
  2925. width: 32rpx;
  2926. height: 32rpx;
  2927. margin-right: 18rpx;
  2928. }
  2929. .contractListClass1{
  2930. display: flex;
  2931. align-items: center;
  2932. }
  2933. .tenantListNum{
  2934. margin: 0 8rpx;
  2935. color:#FF7B00 ;
  2936. }
  2937. }
  2938. }
  2939. .statistics-3 {
  2940. .contractListClass{
  2941. .contractListClass1{
  2942. display: block;
  2943. .class1{
  2944. font-size: 28rpx;
  2945. color: rgba(51,51,51,1);
  2946. }
  2947. .class2{
  2948. font-size: 24rpx;
  2949. color: rgba(119,119,119,1);
  2950. }
  2951. }
  2952. .contractListClass2{
  2953. font-size: 40rpx;
  2954. color: rgba(16,16,16,1);
  2955. font-weight: bold;
  2956. display: flex;
  2957. align-items: center;
  2958. }
  2959. }
  2960. }
  2961. .statistics-4 {
  2962. }
  2963. .electronicMonitoring-title2{
  2964. margin-bottom: 16rpx;
  2965. }
  2966. .electronicMonitoring-title3{
  2967. }
  2968. .electronicMonitoring-title{
  2969. display: flex;
  2970. margin: 0px 32rpx;
  2971. // background: #fff;
  2972. // border: 1px solid #bbbbbb;
  2973. border-radius: 4px;
  2974. padding: 4px;
  2975. //background: linear-gradient(180deg, #bbd8ff 0%, white 63%);
  2976. justify-content: space-between;
  2977. font-size:32rpx;
  2978. font-weight: bold;
  2979. .view{
  2980. display: flex;
  2981. justify-content: space-between;
  2982. margin-right: 12rpx;
  2983. }
  2984. // 状态
  2985. .state {
  2986. white-space: pre;
  2987. //width: 64rpx;
  2988. //height: 36rpx;
  2989. padding: 0 4rpx;
  2990. line-height: 36rpx;
  2991. border-radius: 8rpx;
  2992. font-size: 22rpx;
  2993. text-align: center;
  2994. border: 1px solid rgba(255, 123, 0, 1);
  2995. color: rgba(255, 123, 0, 1);
  2996. // .dot {
  2997. // margin-right: 8rpx;
  2998. // width: 16rpx;
  2999. // height: 16rpx;
  3000. // background-color: rgba(255, 123, 0, 1);
  3001. // border-radius: 999px;
  3002. // margin-left: auto;
  3003. // }
  3004. }
  3005. .state2 {
  3006. border: 1px solid rgba(0, 185, 98, 1);
  3007. color: rgba(0, 185, 98, 1);
  3008. }
  3009. }
  3010. .current-123{
  3011. .electronicMonitoring-title{
  3012. margin: 8rpx 0rpx 32rpx 0;
  3013. }
  3014. }
  3015. .electronicMonitoring-123{
  3016. }
  3017. .anchorpoint{
  3018. .index{
  3019. color: rgba(22,119,255,1);
  3020. }
  3021. background-color: rgba(0,0,0,0.25);
  3022. margin-top: 20rpx;
  3023. display: flex;
  3024. /* text-decoration: underline; */
  3025. // z-index: 999;
  3026. text-align: center;
  3027. position: fixed;
  3028. /* top: 40px; */
  3029. top: 200rpx;
  3030. right: 0px;
  3031. font-size: 24rpx;
  3032. //background: linear-gradient(95deg, #FF9800, #FF5722);
  3033. //box-shadow: 0 4rpx 24rpx 0 #FF5722;
  3034. //padding-top: 8px;
  3035. color: #fff;
  3036. border-radius: 25px;
  3037. flex-direction: column;
  3038. align-items: flex-end;
  3039. .point{
  3040. padding: 16rpx;
  3041. }
  3042. .point:last-child{
  3043. padding-bottom: 36rpx;;
  3044. }
  3045. .point:first-child{
  3046. padding-top: 36rpx;
  3047. }
  3048. }
  3049. .isOpenClass{
  3050. display: flex;
  3051. width: 100%;
  3052. justify-content: space-between;
  3053. margin: 12rpx 0;
  3054. align-items: center;
  3055. .isOpenClass1{
  3056. font-size: 28rpx;
  3057. font-weight: bold;
  3058. padding-bottom: 8rpx;
  3059. color: rgba(51,51,51,1);
  3060. }
  3061. .isOpenClass2{
  3062. font-size: 24rpx;
  3063. color: rgba(131,131,131,1);
  3064. .span{
  3065. margin-right: 8rpx;
  3066. }
  3067. }
  3068. }
  3069. .popShow1{
  3070. background-color: #f2f4f6;
  3071. padding: 32rpx;
  3072. .popShowList{
  3073. border-radius: 8px;
  3074. padding:0 10rpx;
  3075. background-color: #FFF;
  3076. }
  3077. .title{
  3078. text-align: center;
  3079. font-size: 44rpx;
  3080. padding: 20rpx;
  3081. font-weight: bold;
  3082. }
  3083. .popShowItem:first-child{
  3084. padding-top: 38rpx;
  3085. }
  3086. .popShowItem{
  3087. font-size: 32rpx;
  3088. display: flex;
  3089. margin: 24rpx;
  3090. justify-content: space-between;
  3091. }
  3092. .onlineChild{
  3093. margin:0 8rpx;
  3094. display: flex;
  3095. align-items: center;
  3096. font-size: 28rpx;
  3097. }
  3098. .online{
  3099. display: flex;
  3100. .name{
  3101. color: #777777 ;
  3102. }
  3103. }
  3104. .index{
  3105. .name{
  3106. color: #1677ff;
  3107. font-weight: bold;
  3108. }
  3109. }
  3110. }
  3111. .online0{
  3112. color: #ff7b00;
  3113. }
  3114. .online2{
  3115. color: #009688;
  3116. }
  3117. .online3{
  3118. color: #9E9E9E;
  3119. }
  3120. .online1{
  3121. color: #00b962;
  3122. .dot{
  3123. background-color: #00b962;
  3124. }
  3125. }
  3126. .dotview{
  3127. display: flex;
  3128. font-size: 28rpx;
  3129. align-items: center;
  3130. margin:0 8rpx;
  3131. .text{
  3132. font-size: 28rpx;
  3133. font-weight: 400;
  3134. }
  3135. }
  3136. .dot{
  3137. margin:0 8rpx;
  3138. width: 16rpx;
  3139. height:16rpx;
  3140. background-color: #ff7b00;
  3141. border-radius: 999px;
  3142. margin-left: auto;
  3143. }
  3144. </style>