statistics.vue 50 KB

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