statistics.vue 43 KB

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