statistics.vue 50 KB

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