statistics.vue 71 KB

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