statistics.vue 67 KB

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