statistics.vue 71 KB

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