statistics.vue 89 KB

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