electronicMonitoring.vue 36 KB

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