statistics.vue 59 KB

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