statistics.vue 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344
  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. 正常 <span style="color:#19be6b;margin: 0 8rpx;">{{alarmsForm.okNum}}</span> 台
  111. </view>
  112. <view class="abnormal">
  113. 异常 <span style="color:red;margin: 0 8rpx;">{{alarmsForm.errorNum}}</span> 台
  114. </view>
  115. </view>
  116. <view class="total2" v-if="false">
  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. {{replaceLastTwoWords(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" v-if="codes&&codes.indexOf('property')!=-1" >
  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?'开启':'关闭'}"${this.replaceLastTwoWords(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. if(this.codes&&this.codes.indexOf('property')!=-1){
  1001. }else{
  1002. return
  1003. }
  1004. API.remindList({
  1005. // queryDate: this.queryDateMonth,
  1006. configId: '',
  1007. pageIndex: 1,
  1008. pageSize: 5,
  1009. companyId: this.companyId
  1010. }).then((response) => {
  1011. this.abnormalRecordsList = response.data.data;
  1012. }).catch(error => {
  1013. uni.showToast({
  1014. title: error,
  1015. icon: "none"
  1016. })
  1017. })
  1018. },
  1019. // 用电量
  1020. getHomePageKwh( companyId,interval) {
  1021. if (!interval) {
  1022. // uni.showLoading({
  1023. // title: "加载中",
  1024. // mask: true,
  1025. // })
  1026. this.getHomePageKwhshowLoading=true;
  1027. }
  1028. API.homePageKwh({
  1029. pageIndex: 1,
  1030. pageSize: 5,
  1031. companyId:companyId
  1032. }).then((response) => {
  1033. if (!interval) {
  1034. //uni.hideLoading();
  1035. this.getHomePageKwhshowLoading=false;
  1036. }
  1037. if(companyId){
  1038. this.kWhList = response.data.data;
  1039. if(this.kWhList.length==1){
  1040. var item=this.kWhList[0];
  1041. this.$refs['refMyEm'+companyId].init({
  1042. id:item.id,
  1043. name:item.name,
  1044. companyId:item.companyId,
  1045. ref:1,
  1046. })
  1047. }else{
  1048. this.getHomePageManage(1)
  1049. this.getDeviceStatus()
  1050. this.getAbnormalAlarmRecord();
  1051. }
  1052. }else{
  1053. this.kWhListHome= response.data.data;
  1054. if (!interval) {
  1055. this.startInterval(); // 组件挂载后开始间隔
  1056. }else{
  1057. this.intervalReady=true
  1058. }
  1059. }
  1060. }).catch(error => {
  1061. uni.showToast({
  1062. title: error,
  1063. icon: "none"
  1064. })
  1065. })
  1066. },
  1067. // 累计报警
  1068. getDeviceStatus() {
  1069. API.deviceStatus({
  1070. companyId: this.companyId
  1071. }).then((response) => {
  1072. this.utabsone=true
  1073. this.alarmsForm = response.data;
  1074. if (this.alarmsForm.okNum != 0) {
  1075. this.alarmsPercent = this.alarmsForm.okNum / (this.alarmsForm.okNum + this.alarmsForm
  1076. .errorNum) * 100;
  1077. }
  1078. }).catch(error => {
  1079. uni.showToast({
  1080. title: error,
  1081. icon: "none"
  1082. })
  1083. })
  1084. },
  1085. // 故障类型
  1086. getBarCharts() {
  1087. if (!this.myBarChart) {
  1088. this.myBarChart = echarts.init(document.getElementById('barEcharts-statistics'),null,{
  1089. width:uni.upx2px(620),height:uni.upx2px(740)
  1090. });
  1091. }
  1092. this.myBarChart.clear()
  1093. var data=[
  1094. {
  1095. name:"总表电量",
  1096. key:"parkKwh",
  1097. color:"#307af6"
  1098. },
  1099. {
  1100. name:"计费电量",
  1101. key:"chargeKwh",
  1102. color:"#52b8aa"
  1103. },
  1104. {
  1105. name:"自用电量",
  1106. key:"freeKwh",
  1107. color:"#53b56b"
  1108. },
  1109. {
  1110. name:"公用电量",
  1111. key:"publicKwh",
  1112. color:"#ef8132"
  1113. },
  1114. {
  1115. name:"电损量",
  1116. key:"lostKwh",
  1117. color:"#dc4441"
  1118. }
  1119. ]
  1120. var dataName=[]
  1121. var dataSeries=[]
  1122. for(var i in data){
  1123. var it=data[i]
  1124. dataName.push(it.name)
  1125. dataSeries.push({})
  1126. }
  1127. for(var i in data){
  1128. var it=data[i]
  1129. dataSeries[data.length-i-1]={
  1130. name:it.name,
  1131. type: 'bar',
  1132. itemStyle:{
  1133. color:it.color
  1134. },
  1135. data: [
  1136. this.homePageManageObj[it.key]
  1137. ],
  1138. coordinateSystem: 'polar',
  1139. label: {
  1140. show: true,
  1141. position: 'start',
  1142. formatter: '{c}度'
  1143. }
  1144. }
  1145. }
  1146. var option = {
  1147. polar: {
  1148. center:['50%','58%'],
  1149. radius:[25, '80%']
  1150. },
  1151. angleAxis: {
  1152. startAngle: 75,
  1153. label: {
  1154. rotate: 45, // 旋转标签,使得重叠的概率降低
  1155. // margin: 5 // 设置标签与轴线之间的距离,增加空间
  1156. }
  1157. },
  1158. legend: {
  1159. itemGap:5,
  1160. data: dataName,
  1161. //orient :'vertical'
  1162. },
  1163. radiusAxis: {
  1164. type: 'category',
  1165. data: ['']
  1166. },
  1167. tooltip: {},
  1168. series: dataSeries
  1169. };
  1170. console.log(option)
  1171. this.myBarChart.setOption(option);
  1172. },
  1173. toDataMonitoringList() {
  1174. uni.navigateTo({
  1175. url: '/pages/equipmentDataMonitoring/dataMonitoring-list'
  1176. })
  1177. },
  1178. toEquipmentConditionMonitoring() {
  1179. uni.navigateTo({
  1180. url: '/pages/equipmentInformation/equipmentConditionMonitoring?companyId='+this.companyId
  1181. })
  1182. },
  1183. toWorkOrderManagement() {
  1184. uni.navigateTo({
  1185. url: '/pages/workOrderManagement/workOrderManagement'
  1186. })
  1187. },
  1188. toEquipmentElectricity() {
  1189. uni.navigateTo({
  1190. url: '/pages/equipmentDataMonitoring/equipmentElectricity'
  1191. })
  1192. },
  1193. toElectronicMonitoring(item) {
  1194. uni.navigateTo({
  1195. url: '/pages/equipmentDataMonitoring/electronicMonitoring?id=' + item.id + '&name=' + item
  1196. .name +
  1197. '&companyId=' + item.companyId
  1198. })
  1199. }
  1200. }
  1201. }
  1202. </script>
  1203. <style lang="scss" scoped>
  1204. .incomeExpenditureClass{
  1205. display: flex;
  1206. justify-content: space-evenly;
  1207. width: 100%;
  1208. padding:32rpx 0;
  1209. .income1:last-child{
  1210. .income11,.income12{
  1211. border-right: 1px solid #c5c3c3;
  1212. }
  1213. }
  1214. .income1{
  1215. .income121{
  1216. font-size: 24rpx;
  1217. color:#c5c3c3;
  1218. }
  1219. width: 33.33%;
  1220. text-align: center;
  1221. .income11{
  1222. padding:12rpx 0;
  1223. background-color: #1677FF ;
  1224. color:#fff;
  1225. font-size: 32rpx;
  1226. border-top: 1px solid #c5c3c3;
  1227. border-left: 1px solid #c5c3c3;
  1228. }
  1229. .income12{
  1230. padding:12rpx 0;
  1231. border-top: 1px solid #c5c3c3;
  1232. border-bottom: 1px solid #c5c3c3;
  1233. border-left: 1px solid #c5c3c3;
  1234. font-size: 40rpx;
  1235. }
  1236. }
  1237. }
  1238. /deep/.u-drawer-content {
  1239. margin-top: 88rpx;
  1240. }
  1241. .popup-tabs {
  1242. background-color: #fff;
  1243. display: flex;
  1244. align-items: center;
  1245. justify-content: space-between;
  1246. padding-top: 32rpx;
  1247. padding-right: 32rpx;
  1248. color: rgba(51, 51, 51, 1);
  1249. font-size: 32rpx;
  1250. .tabs {
  1251. width: 88%;
  1252. }
  1253. }
  1254. // /deep/.u-tab-item {
  1255. // width: 25% !important;
  1256. // flex: none !important;
  1257. // }
  1258. .tabs-len-1{
  1259. }
  1260. .tabs-len-2{
  1261. /deep/.u-tab-item {
  1262. // max-width: 39% !important;
  1263. // flex: none !important;
  1264. }
  1265. }
  1266. .tabs-len-3{
  1267. /deep/.u-tab-item {
  1268. max-width: 39% !important;
  1269. flex: none !important;
  1270. }
  1271. }
  1272. .tabs-len-4{
  1273. /deep/.u-tab-item {
  1274. max-width: 26% !important;
  1275. flex: none !important;
  1276. }
  1277. }
  1278. .tabs{
  1279. /deep/.u-tab-item:first-child {
  1280. width: 20% !important;
  1281. flex: none !important;
  1282. }
  1283. }
  1284. // /deep/.u-tab-item2 {
  1285. // width: 33% !important;
  1286. // flex: none !important;
  1287. // }
  1288. .tabs-options {
  1289. display: flex;
  1290. padding: 24rpx 32rpx 0;
  1291. flex-wrap: wrap;
  1292. .item {
  1293. width: 25%;
  1294. margin-bottom: 40rpx;
  1295. }
  1296. }
  1297. // 导航栏
  1298. .navbar {
  1299. background-color: rgba(22, 119, 255, 1);
  1300. color: #fff;
  1301. line-height: 88rpx;
  1302. display: flex;
  1303. justify-content: space-between;
  1304. align-items: center;
  1305. padding: 0 32rpx;
  1306. color: rgba(255, 255, 255, 1);
  1307. font-size: 36rpx;
  1308. position: fixed;
  1309. left: 0;
  1310. right: 0;
  1311. top: 0;
  1312. z-index: 999999;
  1313. font-weight: bold;
  1314. .title{
  1315. overflow: hidden;
  1316. white-space: nowrap;
  1317. text-overflow: ellipsis;
  1318. }
  1319. .img {
  1320. width: 48rpx;
  1321. height: 48rpx;
  1322. vertical-align: middle;
  1323. }
  1324. }
  1325. // 标签
  1326. .tabs-box {
  1327. padding: 32rpx 0;
  1328. margin-top: 88rpx;
  1329. padding-right: 32rpx;
  1330. background-color: rgba(22, 119, 255, 1);
  1331. display: flex;
  1332. align-items: center;
  1333. justify-content: space-between;
  1334. .tabs {
  1335. width: 97%;
  1336. }
  1337. .more{
  1338. padding-right: 12rpx;
  1339. }
  1340. }
  1341. .main {
  1342. border-radius: 16px 16px 0px 0px;
  1343. background: linear-gradient(180deg, rgba(242, 244, 246, 1) 61%, rgba(255, 255, 255, 0) 100%);
  1344. margin-top: -24rpx;
  1345. padding: 32rpx;
  1346. .statistics {
  1347. border-radius: 8px;
  1348. background-color: rgba(255, 255, 255, 1);
  1349. box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
  1350. margin-bottom: 24rpx;
  1351. padding: 40rpx;
  1352. .title {
  1353. display: flex;
  1354. align-items: center;
  1355. margin-bottom: 20rpx;
  1356. .img {
  1357. width: 36rpx;
  1358. height: 36rpx;
  1359. vertical-align: middle;
  1360. border-radius: 999px;
  1361. }
  1362. .change {
  1363. display: flex;
  1364. align-items: center;
  1365. .change-img {
  1366. width: 32rpx;
  1367. height: 32rpx;
  1368. vertical-align: middle;
  1369. }
  1370. text {
  1371. margin-left: 8rpx;
  1372. }
  1373. }
  1374. .text {
  1375. color: rgba(16, 16, 16, 1);
  1376. font-size: 36rpx;
  1377. margin-left: 16rpx;
  1378. font-weight: bold;
  1379. }
  1380. .change {
  1381. margin-left: 16rpx;
  1382. font-size: 24rpx;
  1383. color: #838383;
  1384. }
  1385. .check-all {
  1386. margin-left: auto;
  1387. color: rgba(131, 131, 131, 1);
  1388. font-size: 24rpx;
  1389. }
  1390. }
  1391. }
  1392. // 用电量
  1393. .statistics-e {
  1394. padding: 40rpx;
  1395. .electricity {
  1396. background-color: #fff;
  1397. .item:last-of-type {
  1398. border: none;
  1399. padding-bottom: 0;
  1400. }
  1401. .item {
  1402. padding: 16rpx 0;
  1403. display: flex;
  1404. align-items: center;
  1405. justify-content: space-between;
  1406. border-bottom: 1px solid rgba(245, 245, 245, 1);
  1407. .item-content {
  1408. width: 93%;
  1409. }
  1410. .equipment {
  1411. display: flex;
  1412. align-items: center;
  1413. .equipment1 {
  1414. color: rgba(51, 51, 51, 1);
  1415. font-size: 32rpx;
  1416. max-width: 40%;
  1417. font-weight: bold;
  1418. white-space: nowrap;
  1419. overflow: hidden;
  1420. text-overflow: ellipsis;
  1421. }
  1422. .equipment2 {
  1423. color: rgba(119, 119, 119, 1);
  1424. margin-left: 16rpx;
  1425. max-width: 40%;
  1426. white-space: nowrap;
  1427. overflow: hidden;
  1428. text-overflow: ellipsis;
  1429. }
  1430. }
  1431. // 状态
  1432. .state {
  1433. white-space: pre;
  1434. //width: 64rpx;
  1435. //height: 36rpx;
  1436. padding: 0 4rpx;
  1437. line-height: 36rpx;
  1438. border-radius: 8rpx;
  1439. font-size: 22rpx;
  1440. text-align: center;
  1441. border: 1px solid rgba(255, 123, 0, 1);
  1442. color: rgba(255, 123, 0, 1);
  1443. margin-left: auto;
  1444. // .dot {
  1445. // margin-right: 8rpx;
  1446. // width: 16rpx;
  1447. // height: 16rpx;
  1448. // background-color: rgba(255, 123, 0, 1);
  1449. // border-radius: 999px;
  1450. // margin-left: auto;
  1451. // }
  1452. }
  1453. .state2 {
  1454. border: 1px solid rgba(0, 185, 98, 1);
  1455. color: rgba(0, 185, 98, 1);
  1456. }
  1457. .electricity {
  1458. display: flex;
  1459. justify-content: space-between;
  1460. align-items: center;
  1461. margin-top: 8rpx;
  1462. text-align: center;
  1463. .electricity-item {
  1464. display: flex;
  1465. align-items: center;
  1466. width: 33.3%;
  1467. height: 40rpx;
  1468. line-height: 40rpx;
  1469. .number {
  1470. color: rgba(51, 51, 51, 1);
  1471. font-weight: bold;
  1472. font-size: 24rpx;
  1473. margin-left: 8rpx;
  1474. }
  1475. .date {
  1476. color: rgba(119, 119, 119, 1);
  1477. font-size: 24rpx;
  1478. }
  1479. }
  1480. }
  1481. }
  1482. }
  1483. }
  1484. // 统计1
  1485. .statistics-1 {
  1486. background-color: rgba(255, 255, 255, 1);
  1487. width: 100%;
  1488. padding: 24rpx;
  1489. box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
  1490. border-radius: 8px;
  1491. margin-bottom: 24rpx;
  1492. .item {
  1493. margin-top: 32rpx;
  1494. display: flex;
  1495. align-items: center;
  1496. .item-progess {
  1497. display: flex;
  1498. align-items: center;
  1499. .img {
  1500. width: 88rpx;
  1501. height: 88rpx;
  1502. margin-right: 24rpx;
  1503. vertical-align: middle;
  1504. }
  1505. }
  1506. .total {
  1507. margin-left: 24rpx;
  1508. color: rgba(119, 119, 119, 1);
  1509. .total1 {
  1510. display: flex;
  1511. color: rgba(51, 51, 51, 1);
  1512. font-size: 32rpx;
  1513. font-weight: bold;
  1514. .normal {
  1515. margin-bottom: 12rpx;
  1516. }
  1517. }
  1518. .total2 {
  1519. color: rgba(119, 119, 119, 1);
  1520. }
  1521. .abnormal {
  1522. margin-left: 24rpx;
  1523. }
  1524. }
  1525. .total-number {
  1526. color: rgba(255, 123, 0, 1);
  1527. margin: 0 8rpx;
  1528. font-weight: bold;
  1529. }
  1530. }
  1531. }
  1532. // 统计2异常报警记录
  1533. .statistics-2 {
  1534. .abnormal-item:last-of-type {
  1535. border-bottom: none !important;
  1536. padding-bottom: 0;
  1537. }
  1538. .abnormal-item {
  1539. display: flex;
  1540. justify-content: space-between;
  1541. align-items: center;
  1542. padding: 16rpx;
  1543. border-bottom: 1px solid rgba(245, 245, 245, 1);
  1544. .item-title {
  1545. color: rgba(51, 51, 51, 1);
  1546. .img {
  1547. width: 32rpx;
  1548. height: 32rpx;
  1549. margin-right: 8rpx;
  1550. }
  1551. .name {
  1552. color: rgba(51, 51, 51, 1);
  1553. font-weight: bold;
  1554. }
  1555. .date {
  1556. color: rgba(119, 119, 119, 1);
  1557. font-size: 24rpx;
  1558. }
  1559. }
  1560. .item-value {
  1561. text-align: right;
  1562. display: flex;
  1563. align-items: center;
  1564. .more {
  1565. margin-left: 8rpx;
  1566. }
  1567. .value1 {
  1568. font-weight: bold;
  1569. color: rgba(51, 51, 51, 1);
  1570. }
  1571. .value2 {
  1572. color: rgba(119, 119, 119, 1);
  1573. font-size: 24rpx;
  1574. }
  1575. }
  1576. }
  1577. }
  1578. // 统计3设备实时监控
  1579. .statistics-3 {
  1580. .monitoring-item {
  1581. padding: 16rpx 0;
  1582. border-bottom: 1px solid rgba(245, 245, 245, 1);
  1583. .item-title {
  1584. display: flex;
  1585. align-items: center;
  1586. .text1 {
  1587. color: rgba(51, 51, 51, 1);
  1588. }
  1589. }
  1590. .company-name {
  1591. color: rgba(119, 119, 119, 1);
  1592. font-size: 24rpx;
  1593. display: flex;
  1594. align-items: center;
  1595. .state {
  1596. margin-left: 12rpx;
  1597. display: flex;
  1598. align-items: center;
  1599. color: rgba(255, 123, 0, 1);
  1600. text {
  1601. margin-right: 8rpx;
  1602. display: inline-block;
  1603. width: 16rpx;
  1604. height: 16rpx;
  1605. border-radius: 999px;
  1606. }
  1607. .off-line {
  1608. background-color: rgba(255, 123, 0, 1);
  1609. }
  1610. .on-line {
  1611. background-color: rgba(0, 185, 98, 1);
  1612. }
  1613. }
  1614. .state2 {
  1615. color: rgba(0, 185, 98, 1);
  1616. }
  1617. }
  1618. .state {
  1619. margin-left: auto;
  1620. display: flex;
  1621. .state1,
  1622. .state2 {
  1623. display: flex;
  1624. align-items: center;
  1625. margin-left: 24rpx;
  1626. }
  1627. .more {
  1628. margin-left: 8rpx;
  1629. }
  1630. .img {
  1631. width: 32rpx;
  1632. height: 32rpx;
  1633. vertical-align: middle;
  1634. margin-right: 8rpx;
  1635. }
  1636. }
  1637. // 监控信息
  1638. .infos {
  1639. margin-top: 8rpx;
  1640. display: flex;
  1641. align-items: center;
  1642. justify-content: space-between;
  1643. flex-wrap: wrap;
  1644. .infos-item {
  1645. width: 38%;
  1646. display: flex;
  1647. align-items: center;
  1648. color: rgba(51, 51, 51, 1);
  1649. font-size: 22rpx;
  1650. // margin-right: 16rpx;
  1651. margin-bottom: 8rpx;
  1652. .icon {}
  1653. }
  1654. .text {
  1655. font-weight: bold;
  1656. }
  1657. }
  1658. }
  1659. }
  1660. // 设备状态
  1661. .statistics-4 {
  1662. .chat-img {
  1663. width: 100%;
  1664. height: 620rpx;
  1665. }
  1666. }
  1667. // 故障类型
  1668. .statistics-5,
  1669. .statistics-6 {
  1670. .chat-img {
  1671. width: 100%;
  1672. height: 410rpx;
  1673. }
  1674. }
  1675. // 异常设备排名
  1676. .statistics-ranking {
  1677. .total {
  1678. color: rgba(16, 16, 16, 1);
  1679. padding-left: 52rpx;
  1680. text {
  1681. color: #1677FF;
  1682. padding: 0 8rpx;
  1683. }
  1684. }
  1685. .ranking-main {
  1686. margin-top: 40rpx;
  1687. border-radius: 16px;
  1688. background-color: #fff;
  1689. .item:last-of-type {
  1690. margin-bottom: 0;
  1691. }
  1692. .item {
  1693. display: flex;
  1694. align-items: center;
  1695. margin-bottom: 32rpx;
  1696. .ranking {
  1697. color: rgba(16, 16, 16, 1);
  1698. font-weight: bold;
  1699. }
  1700. .icon {
  1701. width: 72rpx;
  1702. height: 72rpx;
  1703. border-radius: 4px;
  1704. background-color: rgba(219, 234, 255, 1);
  1705. display: flex;
  1706. align-items: center;
  1707. justify-content: center;
  1708. margin-left: 24rpx;
  1709. .img {
  1710. width: 48rpx;
  1711. height: 48rpx;
  1712. }
  1713. }
  1714. .name {
  1715. margin-left: 16rpx;
  1716. .name1 {
  1717. color: rgba(51, 51, 51, 1);
  1718. font-weight: bold;
  1719. }
  1720. .name2 {
  1721. color: rgba(119, 119, 119, 1);
  1722. font-size: 24rpx;
  1723. margin-top: 4rpx;
  1724. }
  1725. }
  1726. .time {
  1727. color: rgba(16, 16, 16, 1);
  1728. margin-left: auto;
  1729. font-weight: bold;
  1730. }
  1731. }
  1732. }
  1733. // 查看全部排名
  1734. .check-all {
  1735. text-align: center;
  1736. color: rgba(119, 119, 119, 1);
  1737. font-size: 12px;
  1738. }
  1739. }
  1740. // 能源管理
  1741. .statistics-manage {
  1742. padding: 40rpx 0;
  1743. .title,
  1744. .chart,
  1745. .search,
  1746. .meter-statistic {
  1747. padding: 0 32rpx;
  1748. }
  1749. // 图表
  1750. .chart {
  1751. padding-top: 32rpx;
  1752. border-top: 1px solid rgba(242, 242, 242, 1);
  1753. /deep/.u-subsection {
  1754. padding: 2px;
  1755. }
  1756. /deep/.u-item {
  1757. padding: 0;
  1758. font-size: 24rpx
  1759. }
  1760. .chat-box {
  1761. //margin-top: 24rpx;
  1762. width: 100%;
  1763. //height: 480rpx;
  1764. img {
  1765. width: 100%;
  1766. height: 100%;
  1767. }
  1768. }
  1769. }
  1770. .search {
  1771. border-top: 1px solid rgba(242, 242, 242, 1);
  1772. border-bottom: 1px solid rgba(242, 242, 242, 1);
  1773. display: flex;
  1774. align-items: center;
  1775. justify-content: space-between;
  1776. padding: 40rpx 32rpx;
  1777. .switch {
  1778. display: flex;
  1779. align-items: center;
  1780. text {
  1781. margin-left: 8rpx;
  1782. color: rgba(51, 51, 51, 1);
  1783. }
  1784. }
  1785. .search-box {
  1786. border-radius: 50px;
  1787. background-color: rgba(242, 244, 246, 1);
  1788. color: rgba(136, 136, 136, 1);
  1789. height: 56rpx;
  1790. line-height: 56rpx;
  1791. padding-left: 16rpx;
  1792. padding-right: 8rpx;
  1793. flex: 1;
  1794. margin-left: 28rpx;
  1795. display: flex;
  1796. align-items: center;
  1797. justify-content: space-between;
  1798. uni-input {
  1799. height: 56rpx;
  1800. line-height: 56rpx !important;
  1801. font-size: 28rpx;
  1802. width: 75%;
  1803. }
  1804. .icon {
  1805. display: flex;
  1806. align-items: center;
  1807. justify-content: center;
  1808. width: 64rpx;
  1809. height: 40rpx;
  1810. border-radius: 50px;
  1811. background-color: rgba(22, 119, 255, 1);
  1812. }
  1813. }
  1814. }
  1815. }
  1816. // 电表统计
  1817. .meter-statistic {
  1818. margin-top: 32rpx;
  1819. .meter-statistic-main{
  1820. display: flex;
  1821. align-items: center;
  1822. }
  1823. .sum {
  1824. .meter-name {
  1825. color: rgba(51, 51, 51, 1);
  1826. font-size: 32rpx;
  1827. margin-left: 8rpx;
  1828. font-weight: bold;
  1829. }
  1830. .icon {
  1831. margin-right: 8rpx;
  1832. img {
  1833. width: 40rpx;
  1834. height: 40rpx;
  1835. vertical-align: middle;
  1836. }
  1837. }
  1838. .meter-state {
  1839. margin-left: 8rpx;
  1840. width: 64rpx;
  1841. height: 36rpx;
  1842. line-height: 36rpx;
  1843. border-radius: 4px;
  1844. background-color: rgba(255, 255, 255, 1);
  1845. color: rgba(0, 185, 98, 1);
  1846. font-size: 22rpx;
  1847. text-align: center;
  1848. border: 1px solid rgba(0, 185, 98, 1);
  1849. }
  1850. .meter-state2 {
  1851. border: 1px solid rgba(255, 123, 0, 1);
  1852. color: rgba(255, 123, 0, 1);
  1853. }
  1854. .meter-number {
  1855. margin-left: auto;
  1856. color: rgba(51, 51, 51, 1);
  1857. font-size: 32rpx;
  1858. /deep/.u-icon--right {
  1859. margin-left: 8rpx;
  1860. }
  1861. }
  1862. }
  1863. .sum2 {
  1864. padding: 0 32rpx;
  1865. margin-top: 8rpx;
  1866. display: flex;
  1867. align-items: center;
  1868. justify-content: space-between;
  1869. .title {
  1870. color: rgba(119, 119, 119, 1);
  1871. }
  1872. .value {
  1873. color: rgba(119, 119, 119, 1);
  1874. }
  1875. }
  1876. // 一级表
  1877. .first-level {
  1878. padding-left: 16rpx;
  1879. margin-top: 20rpx;
  1880. .meter-name {
  1881. font-size: 28rpx
  1882. }
  1883. }
  1884. .first-level-list{
  1885. width: 100%;
  1886. display: flex;
  1887. align-items: center;
  1888. }
  1889. // 二级表
  1890. .second-level {
  1891. padding-left: 32rpx;
  1892. margin-top: 20rpx;
  1893. .meter-name {
  1894. font-size: 24rpx
  1895. }
  1896. }
  1897. .else-switch {
  1898. padding-left: 72rpx;
  1899. .meter-name {
  1900. font-size: 24rpx
  1901. }
  1902. .item {
  1903. margin-top: 24rpx;
  1904. }
  1905. }
  1906. }
  1907. }
  1908. /deep/.u-drawer {
  1909. z-index: 999 !important;
  1910. }
  1911. .contractList{
  1912. font-weight: bold;
  1913. .contractListClass{
  1914. display: flex;
  1915. margin-top:24rpx;
  1916. justify-content: space-between;
  1917. color: rgba(51,51,51,1);
  1918. .img{
  1919. width: 32rpx;
  1920. height: 32rpx;
  1921. margin-right: 18rpx;
  1922. }
  1923. .contractListClass1{
  1924. display: flex;
  1925. align-items: center;
  1926. }
  1927. .tenantListNum{
  1928. margin: 0 8rpx;
  1929. color:#FF7B00 ;
  1930. }
  1931. }
  1932. }
  1933. </style>