statistics.vue 71 KB

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