statistics.vue 84 KB

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