electronicMonitoring.vue 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745
  1. <template>
  2. <view>
  3. <view class="background" :style="ref?' height: 220rpx;':''">
  4. <!-- 日期选择器 -->
  5. <u-picker-select title="日期选择" v-model="tabsFrom.show2" :defaultTime="tabsFrom.show2Index" :endYear="endYear"
  6. mode="time" :params="params" :noselect="false" @confirm="selector2confirm" @cancel="selector2cancel"
  7. @reset="selector2reset">
  8. </u-picker-select>
  9. <view class="navbar-c">
  10. <view class="back" @click="backDataMonitoringList">
  11. <u-icon name="arrow-left" color="#fff" size="36"></u-icon>
  12. </view>
  13. <view class="title">
  14. {{tabsFrom.title}}
  15. </view>
  16. </view>
  17. </view>
  18. <!-- 设备选择器 -->
  19. <u-select title="设备选择" v-model="tabsFrom.show1" mode="mutil-column-auto" :list="tabsFrom.selector1"
  20. @confirm="selector1confirm" cancel-text="重置" @cancel="selector1cancel">
  21. </u-select>
  22. <!-- 用电量 -->
  23. <view class="electricity-consumption">
  24. <!-- 统计 -->
  25. <view class="statistics-content">
  26. <view class="statistics-item"
  27. @click="gotoUrl('/pages/equipmentDataMonitoring/electricityConsumptionDetail?id='
  28. +FormData.meterId+'&name='+tabsFrom.title+'&type='+FormData.type)">
  29. <view class="item-title">
  30. <image class="img" src="@/assets/img/meterStatistics@3x.png"></image>电量统计(度)
  31. </view>
  32. <view class="item-value">
  33. <text>{{electricity}}</text> <u-icon name="arrow-right" color="#cccccc" size="24" ></u-icon>
  34. </view>
  35. </view>
  36. <view class="statistics-item" >
  37. <view class="item-title item-title2">
  38. <image class="img" src="@/assets/img/electricityStatistics@3x.png"></image>电费统计(元)
  39. </view>
  40. <view class="item-value">
  41. {{fee}}
  42. </view>
  43. </view>
  44. </view>
  45. <view class="radio">
  46. <u-radio-group v-model="value" @change="radioGroupChange">
  47. <u-radio @change="radioChange" v-for="(item, index) in list" :key="index" :name="item.id"
  48. :disabled="item.disabled">
  49. {{item.name}}
  50. </u-radio>
  51. </u-radio-group>
  52. </view>
  53. </view>
  54. <!-- 远程控制电源开关 -->
  55. <view class="control"
  56. v-if="codes&&codes.indexOf('switch')!=-1&&meterDetail.type!=6&&meterDetail.allowSwitch">
  57. <view class="text" @click="gotoUrl('/pages/tenantList/switchDetail?id='+meterDetail.id)">
  58. 智能监控电源
  59. <u-icon name="arrow-right" color="#cccccc" size="24" ></u-icon>
  60. </view>
  61. <view class="icon" style=" display: flex;" >
  62. <span>关</span>
  63. <u-switch size="32" @change="switchBtnApi(meterDetail,$event)"
  64. v-model="meterDetail.switchStatus" inactive-color="#ff9900" ></u-switch >
  65. <span>开</span>
  66. <!-- <img src="@/assets/img/control.png"
  67. @tap.stop="switchBtnApi(meterDetail,0)"
  68. v-if="meterDetail.switchStatus"
  69. alt="" />
  70. <img @tap.stop="switchBtnApi(meterDetail,1)"
  71. v-else
  72. src="@/assets/img/switchClose.png" alt="" /> -->
  73. </view>
  74. </view>
  75. <!-- 各时段用电量 -->
  76. <view class="electricity-chart">
  77. <view class="title">
  78. <view class="icon">
  79. </view>
  80. <view class="text">
  81. 各时段电量 (度)
  82. </view>
  83. <view class="more" @click="tabsFrom.show2=true,params.day=true">
  84. {{queryDay}}<u-icon name="arrow-down" color="#bbbbbb"></u-icon>
  85. </view>
  86. </view>
  87. <view class="chart">
  88. <view id="barEcharts" style="min-height:440rpx;">
  89. </view>
  90. </view>
  91. <view class="total" >
  92. <view class="total-item">
  93. 电量合计:{{sumQuantity}}度
  94. </view>
  95. <view class="total-item">
  96. 电费合计:{{sumFee}}元
  97. </view>
  98. </view>
  99. </view>
  100. <!-- 异常告警 -->
  101. <view class="abnormal" v-if="abnormalRecordsList.length" >
  102. <view class="headline">
  103. <view class="title">
  104. <view class="icon">
  105. </view>
  106. <view class="text">
  107. 异常告警
  108. </view>
  109. </view>
  110. <view class="more" @click="gotoUrl('/pages/abnormal/abnormalAlarmRecord?id='+companyId)">
  111. 查看全部
  112. <u-icon name="arrow-right" size="24" color="#d4d4d4"></u-icon>
  113. </view>
  114. </view>
  115. <view class="details">
  116. <view class="item" v-for="(item, index) in abnormalRecordsList" :key="index"
  117. @click="gotoUrl('/pages/abnormal/abnormalAlarmDetails?id='+item.id)">
  118. <view class="name">
  119. {{item.configName}}
  120. </view>
  121. <view class="time">
  122. {{item.createTime}}
  123. <!-- 箭头 -->
  124. <view class="more">
  125. <u-icon name="arrow-right" color="#acacac" size="24"></u-icon>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. </view>
  131. <!-- 能源监测 -->
  132. <view class="energy-inspection">
  133. <view class="title">
  134. <view class="icon">
  135. </view>
  136. <view class="text">
  137. 能源监测
  138. </view>
  139. </view>
  140. <view class="grid">
  141. <u-grid :col="3" :border="false">
  142. <u-grid-item @click="gotoInfo('3PhaseCurrentDetails','A','三相电流')">
  143. <view class="icon icon1">
  144. <image class="img" src="@/assets/img/Image@1.png" mode=""></image>
  145. </view>
  146. <view class="grid-text">三相电流</view>
  147. </u-grid-item>
  148. <u-grid-item @click="gotoInfo('3PhaseCurrentDetails','V','三相电压')">
  149. <view class="icon icon2">
  150. <image class="img" src="@/assets/img/Image@2.png" mode=""></image>
  151. </view>
  152. <view class="grid-text">三相电压</view>
  153. </u-grid-item>
  154. <u-grid-item @click="gotoInfo('3PhaseCurrentDetails','T','三相温度')">
  155. <view class="icon icon3">
  156. <image class="img" src="@/assets/img/Image@3.png" mode=""></image>
  157. </view>
  158. <view class="grid-text">三相温度</view>
  159. </u-grid-item>
  160. <u-grid-item @click="gotoInfo('3PhaseCurrentDetails','P','三相有功功率')">
  161. <view class="icon icon4">
  162. <image class="img" src="@/assets/img/Image@4.png" mode=""></image>
  163. </view>
  164. <view class="grid-text">三相有功功率</view>
  165. </u-grid-item>
  166. <u-grid-item @click="gotoInfo('3PhaseCurrentDetails','F','三相功率因数')">
  167. <view class="icon icon5">
  168. <image class="img" src="@/assets/img/Image@5.png" mode=""></image>
  169. </view>
  170. <view class="grid-text">三相功率因数</view>
  171. </u-grid-item>
  172. <u-grid-item @click="gotoInfo('3PhaseCurrentDetails','AF','平均功率因数')">
  173. <view class="icon icon6">
  174. <image class="img" src="@/assets/img/Image@5.png" mode=""></image>
  175. </view>
  176. <view class="grid-text">平均功率因数</view>
  177. </u-grid-item>
  178. </u-grid>
  179. </view>
  180. </view>
  181. <!-- 数据分析 -->
  182. <view class="data-analysis">
  183. <view class="title">
  184. <view class="icon">
  185. </view>
  186. <view class="text">
  187. 数据分析
  188. </view>
  189. </view>
  190. <view class="grid">
  191. <u-grid :col="3" :border="false">
  192. <u-grid-item @click="gotoInfo('chartYoY','','')">
  193. <view class="icon icon7">
  194. <image class="img" src="@/assets/img/Image@7.png" mode=""></image>
  195. </view>
  196. <view class="grid-text">同比分析</view>
  197. </u-grid-item>
  198. <u-grid-item @click="gotoInfo('chartMoM','','')">
  199. <view class="icon icon8">
  200. <image class="img" src="@/assets/img/Image@8.png" mode=""></image>
  201. </view>
  202. <view class="grid-text">环比分析</view>
  203. </u-grid-item>
  204. <u-grid-item @click="gotoUrl('/pages/equipmentDataMonitoring/electricityStatistics?id='+meterId)">
  205. <view class="icon icon9">
  206. <image class="img" src="@/assets/img/Image@9.svg" mode=""></image>
  207. </view>
  208. <view class="grid-text">用电统计</view>
  209. </u-grid-item>
  210. </u-grid>
  211. </view>
  212. </view>
  213. <!-- 设备信息 -->
  214. <view class="equipment-information">
  215. <view class="title">
  216. <view class="icon">
  217. </view>
  218. <view class="text">
  219. 设备信息
  220. </view>
  221. <view class="more" @click="equipmentInfosShow=true">
  222. 查看全部<u-icon name="arrow-right" size="24" color="#d4d4d4"></u-icon>
  223. </view>
  224. </view>
  225. <view class="infos">
  226. <view class="item" style="width: 30%;">
  227. <view class="item-title">
  228. 设备类型
  229. </view>
  230. <view class="item-value">
  231. {{meterDetail.deviceTypeN}}
  232. </view>
  233. </view>
  234. <view class="border">
  235. </view>
  236. <view class="item" style="width: 30%;">
  237. <view class="item-title">
  238. 设备编号
  239. </view>
  240. <view class="item-value">
  241. {{meterDetail.deviceNo}}
  242. </view>
  243. </view>
  244. <view class="border">
  245. </view>
  246. <view class="item" style="width: 30%;">
  247. <view class="item-title">
  248. 设备地址
  249. </view>
  250. <view class="item-value">
  251. {{meterDetail.installationAddressSimple}}
  252. </view>
  253. </view>
  254. </view>
  255. </view>
  256. <!-- 设备信息弹窗 -->
  257. <view class="equipment-popup">
  258. <u-popup v-model="equipmentInfosShow" mode="bottom" border-radius="12">
  259. <view class="content">
  260. <view class="headline">
  261. 设备信息
  262. </view>
  263. <view class="infos">
  264. <view class="item">
  265. <view class="item-title">
  266. 设备名称
  267. </view>
  268. <view class="item-value">
  269. {{meterDetail.name}}
  270. </view>
  271. </view>
  272. <view class="item">
  273. <view class="item-title">
  274. 设备类型
  275. </view>
  276. <view class="item-value">
  277. {{meterDetail.deviceTypeN}}
  278. </view>
  279. </view>
  280. <view class="item">
  281. <view class="item-title">
  282. 设备编号
  283. </view>
  284. <view class="item-value">
  285. {{meterDetail.deviceNo}}
  286. </view>
  287. </view>
  288. <view class="item">
  289. <view class="item-title">
  290. 产权单位
  291. </view>
  292. <view class="item-value">
  293. {{meterDetail.companyFullName}}
  294. </view>
  295. </view>
  296. <view class="item" @click="toMeterLocation">
  297. <view class="item-title">
  298. 设备地址
  299. </view>
  300. <view class="item-value">
  301. <span>{{meterDetail.installationAddress}}</span>
  302. <image class="img" v-if="0"
  303. src="@/assets/img/riFill-navigation-fill 1.svg"></image>
  304. </view>
  305. </view>
  306. <view class="item">
  307. <view class="item-title">
  308. 地址简称
  309. </view>
  310. <view class="item-value">
  311. {{meterDetail.installationAddressSimple}}
  312. </view>
  313. </view>
  314. <view class="item">
  315. <view class="item-title">
  316. 使用单位
  317. </view>
  318. <view class="item-value">
  319. {{meterDetail.customer}}
  320. </view>
  321. </view>
  322. <view class="item">
  323. <view class="item-title">
  324. 启用时间
  325. </view>
  326. <view class="item-value">
  327. {{meterDetail.enablingTime}}
  328. </view>
  329. </view>
  330. </view>
  331. <button class="get" @click="equipmentInfosShow=false">知道了</button>
  332. </view>
  333. </u-popup>
  334. </view>
  335. <!-- 故障上报 -->
  336. <view class="create-order" v-if="false">
  337. <view class="img-box">
  338. <image class="img" src="@/assets/img/fas fa-exclamation-triangle Copy 2@3x.png" mode=""></image>
  339. </view>
  340. <view class="text">
  341. 故障上报
  342. </view>
  343. </view>
  344. </view>
  345. </template>
  346. <script>
  347. import {
  348. parseUnixTime,
  349. beforeTimeStamp,
  350. getWeek
  351. } from '@/apis/utils'
  352. import * as echarts from 'echarts';
  353. import * as API from '@/apis/pagejs/index.js'
  354. import * as API_energyManage from '@/apis/pagejs/energyManage.js'
  355. import * as API_electricityMeter from '@/apis/pagejs/electricityMeter.js'
  356. // import * as WxJsApi from '@/apis/utils/wxJsApi.js'
  357. export default {
  358. data() {
  359. return {
  360. meterDetail: {}, //设备信息
  361. electricity: 0, //电量统计
  362. fee: 0, //电费统计
  363. abnormalRecordsList: [], //异常list
  364. companyId: '', //企业id
  365. meterId: '', //设备id
  366. titleName: '',
  367. clickType: -1,
  368. sumQuantity: 0,
  369. sumFee: 0,
  370. equipmentInfosShow: false,
  371. kWhList: [],
  372. queryDay: '',
  373. showTop: [0, 0, 0, 0, 0, 0, 0, 0],
  374. FormData: {
  375. queryDate: '',
  376. meterId: '',
  377. type: 0
  378. },
  379. codes:"",
  380. FormData2: {
  381. queryDate: '',
  382. meterId: ''
  383. },
  384. myChart: null,
  385. endYear: '',
  386. equipmentShow: false,
  387. multiSelector: [],
  388. equipmentList: [],
  389. params: {
  390. year: true,
  391. month: true,
  392. day: true,
  393. hour: false,
  394. minute: false,
  395. second: false
  396. },
  397. tabsFrom: {
  398. show1: false,
  399. show1Index: 0,
  400. show2Index: '',
  401. show2: false,
  402. show1Text: "全部类型",
  403. show2Text: "全部时间",
  404. selector1: [{
  405. label: '全部类型',
  406. value: '',
  407. },
  408. {
  409. label: '线上充值',
  410. value: '1',
  411. },
  412. {
  413. label: '线下充值',
  414. value: '2',
  415. },
  416. ]
  417. },
  418. background: {
  419. backgroundColor: '#1677FF',
  420. },
  421. list: [{
  422. id: 1,
  423. name: '本月',
  424. disabled: false
  425. }, {
  426. id: 4,
  427. name: '今日',
  428. disabled: false
  429. }, {
  430. id: 2,
  431. name: '上月',
  432. disabled: false
  433. }, {
  434. id: 3,
  435. name: '本年',
  436. disabled: false
  437. }, {
  438. id: 0,
  439. name: '合计',
  440. disabled: false
  441. }, {
  442. id: 10,
  443. name: '指定月份',
  444. disabled: false
  445. }],
  446. value: '4',
  447. intervalId: null, // 用于存储间隔ID
  448. intervalReady: true, // 用于存储间隔ID
  449. ref:false,
  450. };
  451. },
  452. onLoad(op) {
  453. this.init(op)
  454. },
  455. onReady() {
  456. // WxJsApi.getWxConfig(['getLocation', 'openLocation', 'addEventListener', 'scanQRCode']).then((res) => {
  457. // // //(res)
  458. // }).catch(error => {
  459. // //(res)
  460. // })
  461. },
  462. beforeDestroy() {
  463. this.clearTimer(); // 组件销毁前清除定时器
  464. this.intervalReady = false;
  465. console.log("组件销毁前清除定时器")
  466. },
  467. methods: {
  468. init(op){
  469. if (op.id) {
  470. this.ref=op.ref;
  471. this.FormData.meterId = op.id;
  472. this.FormData2.meterId = op.id;
  473. this.tabsFrom.title = this.replaceLastTwoWords(op.name);
  474. this.meterId = op.id;
  475. this.titleName = this.replaceLastTwoWords(op.name);
  476. this.companyId = op.companyId;
  477. }
  478. this.endYear = new Date().getFullYear();
  479. this.FormData.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  480. this.FormData2.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  481. this.FormData.type = 4;
  482. this.getElectricityStatistics();
  483. this.getTimeSlotStatistics();
  484. this.getCompanyInfoList();
  485. this.getAbnormalAlarmRecord();
  486. this.getMeterDetails(this.meterId);
  487. },
  488. switchBtnApiMethod(node,key){
  489. uni.showLoading({
  490. title: "加载中",
  491. mask: true,
  492. })
  493. API_energyManage.remoteSwitch({
  494. meterId:node.id,
  495. enabled:key
  496. }).then((res) => {
  497. uni.hideLoading();
  498. node.switchStatus=key
  499. }).catch(error => {
  500. uni.showToast({
  501. title: error,
  502. icon: "none"
  503. })
  504. })
  505. },
  506. switchBtnApi(node,key){
  507. uni.showModal({
  508. confirmColor:`${key?'#3CC51F':'red'}`,
  509. confirmText:`${key?'开启':'关闭'}`,
  510. content: `确认是否要"${key?'开启':'关闭'}"${this.replaceLastTwoWords(node.name)}`,
  511. title: "提示",
  512. success:res=> {
  513. if(res.confirm){
  514. this.switchBtnApiMethod(node,key);
  515. }else{
  516. node.switchStatus=!key
  517. }
  518. }
  519. })
  520. console.log(node,key)
  521. },
  522. toMeterLocation() {
  523. // WxJsApi.openLocation({
  524. // latitude: parseFloat(this.meterDetail.latitude), //目的地latitude
  525. // longitude: parseFloat(this.meterDetail.longitude), //目的地longitude
  526. // name: this.meterDetail.name,
  527. // address: this.meterDetail.installationAddress,
  528. // scale: 15, //地图缩放大小,可根据情况具体调整
  529. // success(res) {
  530. // uni.hideLoading()
  531. // },
  532. // complete() {
  533. // // uni.hideLoading()
  534. // }
  535. // });
  536. },
  537. getMeterDetails(meterId) {
  538. uni.showLoading({
  539. title: "加载中",
  540. mask: true,
  541. })
  542. API_electricityMeter.meterDetails({
  543. meterId: meterId
  544. }).then((res) => {
  545. uni.hideLoading();
  546. this.meterDetail = res.data.meter;
  547. this.meterDetail.name=this.replaceLastTwoWords(this.meterDetail.name)
  548. this.codes =this.carhelp.getPersonInfo().codes;
  549. }).catch(error => {
  550. uni.showToast({
  551. title: error,
  552. icon: "none"
  553. })
  554. })
  555. },
  556. clearTimer() {
  557. if (this.intervalId) {
  558. clearInterval(this.intervalId); // 清除定时器
  559. this.intervalId = null; // 重置定时器ID
  560. }
  561. },
  562. startInterval() {
  563. this.clearTimer(); // 组件销毁前清除定时器
  564. this.intervalId = setInterval(() => {
  565. // 每隔5秒运行的代码
  566. // console.log('这段代码每隔5秒运行一次');
  567. this.getElectricityStatistics(true)
  568. this.getTimeSlotStatistics(true)
  569. }, 60000);
  570. },
  571. gotoInfo(path, type, name) {
  572. if (!this.FormData.meterId) {
  573. uni.showToast({
  574. title: "未查询到电表",
  575. icon: "none"
  576. })
  577. return
  578. }
  579. uni.navigateTo({
  580. url: "/pages/equipmentDataMonitoring/" + path + "?id=" + this.FormData.meterId + "&type=" + type +
  581. "&typeName=" + name+"&title="+this.tabsFrom.title
  582. })
  583. },
  584. // 异常告警记录
  585. getAbnormalAlarmRecord() {
  586. var queryDate = parseUnixTime(new Date(), '{y}-{m}');
  587. uni.showLoading({
  588. title: "加载中",
  589. mask: true,
  590. })
  591. API.alarmRecord({
  592. queryDate: queryDate,
  593. configId: '',
  594. pageIndex: 1,
  595. pageSize: 2,
  596. companyId: this.companyId,
  597. meterId: this.meterId
  598. }).then((res) => {
  599. uni.hideLoading();
  600. this.abnormalRecordsList = res.data.data;
  601. }).catch(error => {
  602. uni.showToast({
  603. title: error,
  604. icon: "none"
  605. })
  606. })
  607. },
  608. titleCk() {
  609. if(this.tabsFrom.selector1.length){
  610. this.tabsFrom.show1 = true
  611. }
  612. },
  613. selector1confirm(e) {
  614. console.log(e)
  615. // var index = e[2];
  616. // this.tabsFrom.show1Index = index;
  617. if (e[2].value != null) {
  618. this.tabsFrom.show1Text = e[2].label;
  619. this.tabsFrom.title = e[2].label;
  620. this.FormData.meterId = e[2].value;
  621. this.FormData.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  622. this.FormData2.meterId = e[2].value;
  623. this.FormData2.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  624. //this.meterId =e[2].value;
  625. this.FormData.type = 4;
  626. this.value = '4';
  627. this.getTimeSlotStatistics();
  628. this.getElectricityStatistics();
  629. this.getMeterDetails(e[2].value);
  630. }
  631. },
  632. selector1cancel() {
  633. this.tabsFrom.show1Text = this.titleName;
  634. this.tabsFrom.title = this.titleName;
  635. this.FormData.meterId = this.meterId;
  636. this.FormData.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  637. this.FormData2.meterId = this.meterId;
  638. this.FormData2.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  639. this.FormData.type = 4;
  640. this.value = '4';
  641. this.getTimeSlotStatistics();
  642. this.getElectricityStatistics();
  643. this.getMeterDetails(this.meterId);
  644. },
  645. queryDate(queryTime, day) {
  646. if (day) {
  647. this.FormData2.queryDate = queryTime;
  648. //this.FormData2.type =day?"9":"10"
  649. //this.value="-1"
  650. this.getTimeSlotStatistics();
  651. } else {
  652. this.FormData.queryDate = queryTime + "-01";
  653. this.FormData.type = 10;
  654. this.value = "10";
  655. this.list[5].name = queryTime;
  656. this.getElectricityStatistics();
  657. }
  658. },
  659. getCompanyInfoList() {
  660. uni.showLoading({
  661. title: "加载中",
  662. mask: true,
  663. })
  664. API.deviceCompanyList().then((response) => {
  665. uni.hideLoading();
  666. var list = response.data.companyInfoList;
  667. this.tabsFrom.selector1 = [];
  668. this.tabsFrom.selector1 = list.map(item => {
  669. if (item.remoteReadingMeterList.length != 0 && item.remoteMonitorMeterList.length != 0) {
  670. return {
  671. label: item.name,
  672. value: item.id,
  673. children: [{
  674. label: '抄表',
  675. value: '1',
  676. children: item.remoteReadingMeterList.map(item => {
  677. return {
  678. label: item.name,
  679. value: item.id,
  680. }
  681. })
  682. },
  683. {
  684. label: '监控表',
  685. value: '1',
  686. children: item.remoteMonitorMeterList.map(item => {
  687. return {
  688. label: item.name,
  689. value: item.id,
  690. }
  691. })
  692. }
  693. ]
  694. }
  695. } else if (item.remoteReadingMeterList.length != 0 && item.remoteMonitorMeterList.length == 0) {
  696. return {
  697. label: item.name,
  698. value: item.id,
  699. children: [{
  700. label: '抄表',
  701. value: '1',
  702. children: item.remoteReadingMeterList.map(item => {
  703. return {
  704. label: item.name,
  705. value: item.id,
  706. }
  707. })
  708. }]
  709. }
  710. } else if (item.remoteReadingMeterList.length == 0 && item.remoteMonitorMeterList.length != 0) {
  711. return {
  712. label: item.name,
  713. value: item.id,
  714. children: [{
  715. label: '监控表',
  716. value: '1',
  717. children: item.remoteMonitorMeterList.map(item => {
  718. return {
  719. label: item.name,
  720. value: item.id,
  721. }
  722. })
  723. }]
  724. }
  725. } else {
  726. }
  727. })
  728. }).catch(error => {
  729. uni.showToast({
  730. title: error,
  731. icon: "none"
  732. })
  733. })
  734. },
  735. getTimeSlotStatistics(interval) {
  736. if (!interval) {
  737. uni.showLoading({
  738. title: "加载中",
  739. mask: true,
  740. })
  741. }
  742. this.queryDay = parseUnixTime(new Date(this.FormData2.queryDate), '{y}年{m}月{d}日');
  743. API.timeSlotStatistics(this.FormData2).then((response) => {
  744. if (!interval) {
  745. uni.hideLoading();
  746. }
  747. this.hourMap = response.data.hourMap;
  748. this.sumQuantity = response.data.kwhMap.kwh;
  749. this.sumFee = response.data.kwhMap.fee;
  750. this.getBarCharts(this.hourMap, interval);
  751. if (!interval) {
  752. this.startInterval(); // 组件挂载后开始间隔
  753. }
  754. }).catch(error => {
  755. uni.showToast({
  756. title: error,
  757. icon: "none"
  758. })
  759. })
  760. },
  761. getElectricityStatistics(interval) {
  762. if (!interval) {
  763. uni.showLoading({
  764. title: "加载中",
  765. mask: true,
  766. })
  767. }
  768. var obj = {
  769. ...this.FormData
  770. }
  771. if (obj.type != 10) {
  772. this.list[5].name = '指定月份';
  773. }
  774. // if(obj.type==10){
  775. // obj.queryDate+="-01"
  776. // }
  777. API.electricityStatistics(obj).then((response) => {
  778. if (!interval) {
  779. uni.hideLoading();
  780. }
  781. this.showTop = [0, 0, 0, 0, 0, 0, 0, 0]
  782. var electricity = response.data.kwhMap.kwh + "";
  783. this.electricity = response.data.kwhMap.kwh;
  784. this.fee = response.data.kwhMap.fee;
  785. if (electricity) {
  786. var sz = electricity.split(".")
  787. var str1 = sz[0];
  788. var str2 = [];
  789. if (sz.length > 1) {
  790. str2 = sz[1];
  791. this.showTop[7] = str2[0];
  792. }
  793. var j = 0;
  794. for (var i in str1) {
  795. if (i != undefined) {
  796. this.showTop[6 - str1.length + j + 1] = str1[i]
  797. }
  798. j++;
  799. }
  800. this.$forceUpdate()
  801. }
  802. if (!interval) {
  803. this.startInterval(); // 组件挂载后开始间隔
  804. }
  805. }).catch(error => {
  806. uni.showToast({
  807. title: error,
  808. icon: "none"
  809. })
  810. })
  811. },
  812. getBarCharts(list, interval) {
  813. if (!this.myChart) {
  814. this.myChart = echarts.init(document.getElementById('barEcharts'), null, {
  815. // width: uni.upx2px(700),
  816. height: uni.upx2px(480)
  817. });
  818. }
  819. if (!interval) {
  820. this.myChart.clear();
  821. }
  822. var data1 = [];
  823. var data2 = [];
  824. // var sumQuantity=0
  825. for (var i in list) {
  826. data1.push(i)
  827. data2.push(list[i].kwh)
  828. // sumQuantity+=list[i]
  829. }
  830. var axisLabel = {
  831. rotate: 40,
  832. interval: 0,
  833. textStyle: {
  834. color: "#333"
  835. }
  836. }
  837. if (data1.length < 4) {
  838. axisLabel = {
  839. interval: 0,
  840. textStyle: {
  841. color: "#333"
  842. },
  843. }
  844. }
  845. // this.sumQuantity = sumQuantity.toFixed(2);
  846. var headitemby = "";
  847. var showkey = "";
  848. var option = {
  849. tooltip: {
  850. trigger: 'axis',
  851. axisPointer: {
  852. type: 'shadow'
  853. },
  854. formatter: (value) => {
  855. var name = value[0].name;
  856. var obj=list[name]
  857. var text= `<p>${name}</p>`
  858. if (obj.electricityPrice != undefined) {
  859. text += `<p>电价:${obj.electricityPrice}元/度</p>`
  860. }
  861. if (obj.kwh != undefined) {
  862. text += `电量:${obj.kwh}度`
  863. }
  864. if (obj.amount != undefined) {
  865. text += ` <p>电费:${obj.amount}元</p>`
  866. }
  867. return text
  868. }
  869. },
  870. grid: {
  871. top: 20,
  872. left: 5,
  873. right: 10,
  874. bottom: 20,
  875. containLabel: true
  876. },
  877. xAxis: {
  878. type: 'category',
  879. data: data1,
  880. axisLabel: axisLabel,
  881. },
  882. yAxis: {
  883. type: 'value',
  884. },
  885. series: [{
  886. name: '合计',
  887. data: data2,
  888. type: 'bar',
  889. label: {
  890. show: true,
  891. position: 'top',
  892. color: '#5C7BD9'
  893. }
  894. }]
  895. }
  896. console.log(option)
  897. this.myChart.setOption(option);
  898. },
  899. selector2confirm(e) {
  900. this.tabsFrom.show2Text = e.year + "年" + e.month + "月"
  901. this.tabsFrom.show2Index = e.year + "-" + e.month
  902. if (e.day) {
  903. this.tabsFrom.show2Text += e.day + "日"
  904. this.tabsFrom.show2Index += '-' + e.day
  905. this.queryDate(this.tabsFrom.show2Index, true)
  906. } else {
  907. this.queryDate(this.tabsFrom.show2Index, false)
  908. }
  909. },
  910. selector2cancel() {
  911. if(this.clickType != -1) {
  912. }
  913. this.value = this.clickType;
  914. },
  915. selector2reset(e) {
  916. console.log(e)
  917. this.tabsFrom.show2Text = '全部时间'
  918. this.tabsFrom.show2Index = '';
  919. if (e.day) {
  920. this.FormData2.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  921. this.queryDay = parseUnixTime(new Date(this.FormData2.queryDate), '{y}年{m}月{d}日');
  922. this.getTimeSlotStatistics();
  923. } else {
  924. this.clickType="4"
  925. this.FormData.type = this.clickType;
  926. this.value = this.clickType;
  927. this.getElectricityStatistics();
  928. }
  929. },
  930. // 选中某个单选框时,由radio时触发
  931. radioChange(e) {
  932. console.log(`选择前的值: ${this.value}`);
  933. },
  934. // 选中任一radio时,由radio-group触发
  935. radioGroupChange(e) {
  936. console.log(e)
  937. this.clickType = this.FormData.type;
  938. this.FormData.type = e;
  939. if (e == 10) {
  940. this.tabsFrom.show2 = true;
  941. this.params.day = false;
  942. } else {
  943. this.list[5].name = '指定月份'
  944. this.getElectricityStatistics();
  945. }
  946. },
  947. backDataMonitoringList() {
  948. uni.navigateBack()
  949. },
  950. }
  951. };
  952. </script>
  953. <style lang="scss" scoped>
  954. /deep/.u-select__header__title {
  955. font-size: 36rpx;
  956. font-weight: bold;
  957. }
  958. .navbar-c {
  959. background-color: rgba(22, 119, 255, 1);
  960. position: fixed;
  961. top: 0;
  962. left: 0;
  963. right: 0;
  964. z-index: 999;
  965. .back {
  966. z-index: 999;
  967. width: 200rpx;
  968. }
  969. .title {
  970. color: #fff;
  971. display: flex;
  972. align-items: center;
  973. justify-content: center;
  974. }
  975. .right {
  976. .img {
  977. width: 48rpx;
  978. height: 48rpx;
  979. }
  980. }
  981. }
  982. .navbar-d {
  983. background-color: rgba(22, 119, 255, 1);
  984. position: relative;
  985. top: -240rpx;
  986. left: 0;
  987. right: 0;
  988. z-index: 999;
  989. .back {
  990. z-index: 999;
  991. width: 200rpx;
  992. }
  993. .title {
  994. font-size: 36rpx;
  995. color: #fff;
  996. display: flex;
  997. align-items: center;
  998. justify-content: center;
  999. }
  1000. .right {
  1001. .img {
  1002. width: 48rpx;
  1003. height: 48rpx;
  1004. }
  1005. }
  1006. }
  1007. /deep/.uicon-nav-back {
  1008. color: #fff !important;
  1009. }
  1010. .background {
  1011. background-color: rgba(22, 119, 255, 1);
  1012. padding-top: 88rpx;
  1013. height: 300rpx;
  1014. //padding-bottom: 100rpx;
  1015. position: relative;
  1016. /deep/.u-border-bottom:after {
  1017. border: none;
  1018. }
  1019. .u-nav-slot {
  1020. margin-right: 32rpx;
  1021. .img {
  1022. width: 48rpx;
  1023. height: 48rpx;
  1024. vertical-align: middle;
  1025. }
  1026. }
  1027. }
  1028. .background::after {
  1029. content: '';
  1030. position: absolute;
  1031. bottom:-39rpx;
  1032. width: 100%;
  1033. height: 40rpx; /* 弧形的高度 */
  1034. background-color: rgba(22, 119, 255, 1); /* 弧形的颜色 */
  1035. border-radius: 50%; /* 创建圆形 */
  1036. border-top-left-radius: 0;
  1037. border-top-right-radius: 0;
  1038. }
  1039. // // 日期
  1040. .date-box {
  1041. display: flex;
  1042. align-items: center;
  1043. justify-content: space-between;
  1044. margin: 24rpx 32rpx;
  1045. .item {
  1046. border-radius: 8px;
  1047. background-color: rgba(255, 255, 255, 0.1);
  1048. border: 1px solid rgba(255, 255, 255, 0.15);
  1049. width: 120rpx;
  1050. height: 120rpx;
  1051. color: #fff;
  1052. text-align: center;
  1053. display: flex;
  1054. flex-direction: column;
  1055. justify-content: center;
  1056. .date {
  1057. font-size: 40rpx;
  1058. }
  1059. }
  1060. .item-today {
  1061. background-color: rgba(255, 255, 255, 1);
  1062. position: relative;
  1063. .date {
  1064. color: rgba(22, 119, 255, 1);
  1065. }
  1066. .week {
  1067. color: rgba(16, 16, 16, 1);
  1068. }
  1069. .dot {
  1070. width: 10rpx;
  1071. height: 10rpx;
  1072. background-color: rgba(255, 150, 0, 1);
  1073. border-radius: 999px;
  1074. position: absolute;
  1075. bottom: -5rpx;
  1076. left: 50%;
  1077. transform: translateX(-50%);
  1078. }
  1079. }
  1080. }
  1081. // 用电量
  1082. .electricity-consumption {
  1083. background-color: #fff;
  1084. padding: 32rpx 32rpx 0rpx;
  1085. border-radius: 8px;
  1086. margin: -188rpx 32rpx 0;
  1087. position: relative;
  1088. border: 1px solid rgba(255,255,255,1);
  1089. background: linear-gradient(180deg, rgba(187,216,255,1) 0%,rgba(255,255,255,1) 63%);
  1090. // 统计
  1091. .statistics-content{
  1092. display: flex;
  1093. align-items: center;
  1094. justify-content: space-between;
  1095. .statistics-item{
  1096. width: 300rpx;
  1097. padding: 24rpx 0 24rpx 24rpx;
  1098. border-radius: 8px;
  1099. box-shadow: 0px 0px 8px 0px rgba(22,119,255,0.3);
  1100. background-color: #fff;
  1101. }
  1102. .item-title{
  1103. color: rgba(22,119,255,1);
  1104. font-size: 32rpx;
  1105. display: flex;
  1106. align-items: center;
  1107. font-weight: bold;
  1108. .img{
  1109. width: 32rpx;
  1110. height: 32rpx;
  1111. vertical-align: middle;
  1112. margin-right: 4rpx;
  1113. }
  1114. }
  1115. .item-title2{
  1116. color: rgba(129,97,255,1);
  1117. }
  1118. .item-value{
  1119. color: rgba(16,16,16,1);
  1120. font-size: 48rpx;
  1121. font-weight: bold;
  1122. margin-top: 8rpx;
  1123. overflow: hidden;
  1124. white-space: nowrap;
  1125. text-overflow: ellipsis;
  1126. text{
  1127. display: inline-block;
  1128. width: 80%;
  1129. margin-right: 4rpx;
  1130. }
  1131. }
  1132. }
  1133. .title {
  1134. color: rgba(16, 16, 16, 1);
  1135. font-size: 36rpx;
  1136. }
  1137. .degree {
  1138. display: flex;
  1139. margin-top: 32rpx;
  1140. .item {
  1141. margin-right: 6rpx;
  1142. text-align: center;
  1143. .item-text {
  1144. color: rgba(16, 16, 16, 1);
  1145. }
  1146. .item-number {
  1147. margin-top: 24rpx;
  1148. width: 72rpx;
  1149. height: 96rpx;
  1150. background-color: rgba(16, 16, 16, 1);
  1151. color: #fff;
  1152. font-size: 72rpx;
  1153. }
  1154. .decimal {
  1155. background-color: #900005;
  1156. }
  1157. }
  1158. }
  1159. // .tab {
  1160. // width: 240rpx;
  1161. // height: 0;
  1162. // border-width: 0px 48rpx 72rpx 0px;
  1163. // border-radius: 8px 8px 0 0;
  1164. // border-style: none solid solid none;
  1165. // border-color: transparent transparent #fff;
  1166. // position: absolute;
  1167. // top: -72rpx;
  1168. // left: 0rpx;
  1169. // right: 0rpx;
  1170. // color: #101010;
  1171. // color: rgba(16, 16, 16, 1);
  1172. // text-align: center;
  1173. // line-height: 72rpx;
  1174. // z-index: 999;
  1175. // text-indent: 16rpx;
  1176. // }
  1177. // .tab2 {
  1178. // width: 240rpx;
  1179. // height: 0;
  1180. // border-width: 0px 48rpx 72rpx 0px;
  1181. // border-radius: 8px 8px 0 0;
  1182. // border-style: none solid solid none;
  1183. // border-color: transparent transparent #D4DBE4;
  1184. // position: absolute;
  1185. // top: -72rpx;
  1186. // left: 210rpx;
  1187. // right: 0rpx;
  1188. // color: #777777;
  1189. // text-align: center;
  1190. // line-height: 72rpx;
  1191. // text-indent: 16rpx;
  1192. // }
  1193. .radio {
  1194. margin-top: 24rpx;
  1195. padding-left: 8rpx;
  1196. /deep/.u-radio {
  1197. margin-bottom: 8px;
  1198. min-width: 25% !important;
  1199. }
  1200. /deep/.u-radio__label{
  1201. margin-left: 24rpx;
  1202. font-size: 28rpx; ;
  1203. }
  1204. }
  1205. }
  1206. // 远程控制电源开关
  1207. .control{
  1208. display: flex;
  1209. align-items: center;
  1210. justify-content: space-between;
  1211. margin: 24rpx 32rpx;
  1212. padding: 40rpx 32rpx;
  1213. background-color: #fff;
  1214. border-radius: 8px;
  1215. .text{
  1216. color: rgba(51,51,51,1);
  1217. font-size: 36rpx;
  1218. font-weight: bold;
  1219. }
  1220. .icon{
  1221. img{
  1222. width: 64rpx;
  1223. height: 64rpx;
  1224. }
  1225. }
  1226. }
  1227. //各时段用电量
  1228. .electricity-chart {
  1229. margin: 24rpx 32rpx;
  1230. padding: 40rpx 0rpx;
  1231. background-color: #fff;
  1232. border-radius: 8px;
  1233. .title {
  1234. display: flex;
  1235. align-items: center;
  1236. justify-content: space-between;
  1237. padding: 0 32rpx;
  1238. margin-bottom: 40rpx;
  1239. .icon {
  1240. width: 36rpx;
  1241. height: 36rpx;
  1242. background-color: rgba(182, 212, 255, 1);
  1243. border: 6px solid rgba(22, 119, 255, 1);
  1244. border-radius: 100px;
  1245. }
  1246. .text {
  1247. color: rgba(51, 51, 51, 1);
  1248. font-size: 36rpx;
  1249. margin-left: 16rpx;
  1250. font-weight: bold;
  1251. }
  1252. .more {
  1253. margin-left: auto;
  1254. border: 1px solid rgba(187,187,187,1);
  1255. border-radius: 4px;
  1256. padding: 8rpx;
  1257. font-size: 24rpx;
  1258. }
  1259. }
  1260. .total{
  1261. text-align: center;
  1262. color: rgba(51,51,51,1);
  1263. font-weight: bold;
  1264. }
  1265. .chart {
  1266. width: 100%;
  1267. height: 500rpx;
  1268. .img {
  1269. width: 100%;
  1270. height: 440rpx;
  1271. }
  1272. }
  1273. }
  1274. .equipment-information {
  1275. margin: 24rpx 32rpx;
  1276. padding: 40rpx 0rpx;
  1277. background-color: #fff;
  1278. border-radius: 8px;
  1279. .title {
  1280. display: flex;
  1281. align-items: center;
  1282. padding: 0 32rpx;
  1283. margin-bottom: 40rpx;
  1284. .icon {
  1285. width: 36rpx;
  1286. height: 36rpx;
  1287. background-color: rgba(182, 212, 255, 1);
  1288. border: 6px solid rgba(22, 119, 255, 1);
  1289. border-radius: 100px;
  1290. }
  1291. .text {
  1292. display: flex;
  1293. align-items: center;
  1294. color: rgba(51, 51, 51, 1);
  1295. font-size: 36rpx;
  1296. margin-left: 16rpx;
  1297. font-weight: bold;
  1298. }
  1299. .date {
  1300. margin-left: auto;
  1301. }
  1302. .more {
  1303. color: #838383;
  1304. font-size: 24rpx;
  1305. margin-left: auto;
  1306. }
  1307. }
  1308. .chart {
  1309. width: 100%;
  1310. height: 440rpx;
  1311. .img {
  1312. width: 100%;
  1313. height: 440rpx;
  1314. }
  1315. }
  1316. .infos {
  1317. padding: 0 32rpx;
  1318. display: flex;
  1319. justify-content: space-between;
  1320. text-align: center;
  1321. .border {
  1322. margin: auto 0;
  1323. height: 70rpx;
  1324. width: 2rpx;
  1325. background-color: rgba(204, 204, 204, 1);
  1326. ;
  1327. }
  1328. .item-title {
  1329. color: rgba(119, 119, 119, 1);
  1330. }
  1331. .item-value {
  1332. color: rgba(16, 16, 16, 1);
  1333. font-size: 32rpx;
  1334. margin-top: 16rpx;
  1335. }
  1336. }
  1337. }
  1338. // 异常告警
  1339. .abnormal {
  1340. margin: 24rpx 32rpx;
  1341. padding: 40rpx 32rpx;
  1342. background-color: #fff;
  1343. border-radius: 8px;
  1344. .headline {
  1345. display: flex;
  1346. align-items: center;
  1347. justify-content: space-between;
  1348. }
  1349. .title {
  1350. display: flex;
  1351. align-items: center;
  1352. font-weight: bold;
  1353. .icon {
  1354. width: 36rpx;
  1355. height: 36rpx;
  1356. background-color: rgba(182, 212, 255, 1);
  1357. border: 6px solid rgba(22, 119, 255, 1);
  1358. border-radius: 100px;
  1359. }
  1360. .text {
  1361. color: rgba(51, 51, 51, 1);
  1362. font-size: 36rpx;
  1363. margin-left: 16rpx;
  1364. }
  1365. }
  1366. .more {
  1367. color: #838383;
  1368. font-size: 24rpx
  1369. }
  1370. .details {
  1371. margin-top: 40rpx;
  1372. .item {
  1373. display: flex;
  1374. align-items: center;
  1375. justify-content: space-between;
  1376. margin-top: 32rpx;
  1377. .name {
  1378. color: rgba(51, 51, 51, 1);
  1379. }
  1380. .time {
  1381. color: rgba(119, 119, 119, 1);
  1382. font-size: 24rpx;
  1383. display: flex;
  1384. align-items: center;
  1385. .more{
  1386. margin-left: 4rpx;
  1387. }
  1388. }
  1389. }
  1390. }
  1391. }
  1392. // 能源监测
  1393. .energy-inspection,
  1394. .data-analysis {
  1395. margin: 24rpx 32rpx;
  1396. padding: 40rpx 32rpx;
  1397. background-color: #fff;
  1398. border-radius: 8px;
  1399. .title {
  1400. display: flex;
  1401. align-items: center;
  1402. font-weight: bold;
  1403. .icon {
  1404. width: 36rpx;
  1405. height: 36rpx;
  1406. background-color: rgba(182, 212, 255, 1);
  1407. border: 6px solid rgba(22, 119, 255, 1);
  1408. border-radius: 100px;
  1409. }
  1410. .text {
  1411. color: rgba(51, 51, 51, 1);
  1412. font-size: 36rpx;
  1413. margin-left: 16rpx;
  1414. }
  1415. }
  1416. .grid {
  1417. .icon {
  1418. width: 128rpx;
  1419. height: 128rpx;
  1420. border-radius: 12px;
  1421. background-color: rgba(35, 186, 178, 1);
  1422. display: flex;
  1423. align-items: center;
  1424. justify-content: center;
  1425. margin-bottom: 16rpx;
  1426. .img {
  1427. width: 80rpx;
  1428. height: 80rpx;
  1429. }
  1430. }
  1431. .icon2 {
  1432. background-color: rgba(42, 186, 72, 1);
  1433. }
  1434. .icon3 {
  1435. background-color: rgba(78, 96, 246, 1);
  1436. }
  1437. .icon4 {
  1438. background-color: rgba(22, 119, 255, 1);
  1439. }
  1440. .icon5 {
  1441. background-color: rgba(35, 186, 178, 1);
  1442. }
  1443. .icon6 {
  1444. background-color: rgba(42, 186, 72, 1);
  1445. }
  1446. .icon7 {
  1447. background-color: rgba(22, 119, 255, 1);
  1448. }
  1449. .icon8 {
  1450. background-color: rgba(35, 186, 178, 1);
  1451. }
  1452. .icon9 {
  1453. background-color: rgba(42, 186, 72, 1);
  1454. }
  1455. .grid-text {
  1456. color: #333333;
  1457. }
  1458. }
  1459. }
  1460. // 设备信息弹窗
  1461. .equipment-popup {
  1462. .content {
  1463. padding: 32rpx;
  1464. .headline {
  1465. color: rgba(16, 16, 16, 1);
  1466. font-size: 36rpx;
  1467. text-align: center;
  1468. font-weight: bold;
  1469. margin-bottom: 24rpx;
  1470. }
  1471. .infos {
  1472. //padding-bottom: 100rpx;
  1473. .item:last-of-type {
  1474. border: none;
  1475. }
  1476. .item {
  1477. display: flex;
  1478. align-items: center;
  1479. line-height: 48rpx;
  1480. padding: 24rpx 0;
  1481. border-bottom: 1px solid #cccccc;
  1482. .item-title {
  1483. color: rgba(51, 51, 51, 1);
  1484. width: 200rpx;
  1485. }
  1486. .item-value {
  1487. color: #666666;
  1488. flex: 1;
  1489. margin-left: 16rpx;
  1490. display: flex;
  1491. align-items: center;
  1492. justify-content: space-between;
  1493. .img{
  1494. width: 32rpx;
  1495. height: 32rpx;
  1496. transform: rotate(90deg);
  1497. margin-left: 96rpx;
  1498. }
  1499. }
  1500. }
  1501. }
  1502. .get {
  1503. height: 80rpx;
  1504. line-height: 80rpx;
  1505. border-radius: 4px;
  1506. background-color: rgba(22, 119, 255, 1);
  1507. color: rgba(255, 255, 255, 1);
  1508. font-size: 32rpx;
  1509. }
  1510. }
  1511. }
  1512. // 创建工单
  1513. .create-order {
  1514. width: 120rpx;
  1515. height: 120rpx;
  1516. border-radius: 20px;
  1517. background: linear-gradient(180.29deg, rgba(255, 124, 112, 1) 0.9%, rgba(255, 79, 63, 1) 100.4%);
  1518. box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
  1519. text-align: center;
  1520. display: flex;
  1521. flex-direction: column;
  1522. justify-content: center;
  1523. align-items: center;
  1524. position: fixed;
  1525. right: 32rpx;
  1526. bottom: 64rpx;
  1527. .img {
  1528. width: 56rpx;
  1529. height: 56rpx;
  1530. vertical-align: middle;
  1531. }
  1532. .text {
  1533. color: rgba(255, 255, 255, 1);
  1534. font-size: 22rpx;
  1535. }
  1536. }
  1537. </style>