statistics.vue 59 KB

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