electronicMonitoring.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818
  1. <template>
  2. <view>
  3. <view class="background">
  4. <!-- 设备选择器 -->
  5. <u-picker title="设备选择" v-model="equipmentShow"
  6. mode="multiSelector" :default-selector='[0, 1]' :range="multiSelector"></u-picker>
  7. <!-- 日期选择器 -->
  8. <u-picker-select title="日期选择" v-model="tabsFrom.show2"
  9. :defaultTime="tabsFrom.show2Index" :endYear="endYear"
  10. mode="time" :params="params" @confirm="selector2confirm" @reset="selector2reset" ></u-picker-select>
  11. <!-- <u-navbar :background="background" back-icon-color="#fff" title="联通公司" title-color="#fff">
  12. <view class="u-nav-slot" slot="right" @click="tabsFrom.show2=true,params.day=true">
  13. <image class="img" src="@/assets/img/riLine-calendar-todo-line 1.svg" mode=""></image>
  14. </view>
  15. </u-navbar> -->
  16. <view class="navbar-c">
  17. <view class="back">
  18. <u-icon name="arrow-left" color="#fff" size="36"></u-icon>
  19. </view>
  20. <view class="title" @click="equipmentShow=true">
  21. 荆鹏软件园01<u-icon name="arrow-down" color="#fff" size="24"></u-icon>
  22. </view>
  23. <view class="right" @click="tabsFrom.show2=true">
  24. <image class="img" src="@/assets/img/riLine-calendar-todo-line 1.svg" mode=""></image>
  25. </view>
  26. </view>
  27. <!-- 日期 -->
  28. <view class="date-box">
  29. <view class="item item-today">
  30. <view class="date">
  31. 26
  32. </view>
  33. <view class="week ">
  34. 今天
  35. </view>
  36. <view class="dot">
  37. </view>
  38. </view>
  39. <view class="item">
  40. <view class="date">
  41. 27
  42. </view>
  43. <view class="week">
  44. 周六
  45. </view>
  46. </view>
  47. <view class="item">
  48. <view class="date">
  49. 28
  50. </view>
  51. <view class="week">
  52. 周日
  53. </view>
  54. </view>
  55. <view class="item">
  56. <view class="date">
  57. 29
  58. </view>
  59. <view class="week">
  60. 周一
  61. </view>
  62. </view>
  63. <view class="item">
  64. <view class="date">
  65. 30
  66. </view>
  67. <view class="week">
  68. 周二
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. <!-- 用电量 -->
  74. <view class="electricity-consumption">
  75. <view class="title">
  76. 用电量统计 (度)
  77. </view>
  78. <view class="degree">
  79. <view class="item">
  80. <view class="item-text">
  81. 百万
  82. </view>
  83. <view class="item-number">
  84. 0
  85. </view>
  86. </view>
  87. <view class="item">
  88. <view class="item-text">
  89. 拾万
  90. </view>
  91. <view class="item-number">
  92. 0
  93. </view>
  94. </view>
  95. <view class="item">
  96. <view class="item-text">
  97. </view>
  98. <view class="item-number">
  99. 0
  100. </view>
  101. </view>
  102. <view class="item">
  103. <view class="item-text">
  104. </view>
  105. <view class="item-number">
  106. 0
  107. </view>
  108. </view>
  109. <view class="item">
  110. <view class="item-text">
  111. </view>
  112. <view class="item-number">
  113. 0
  114. </view>
  115. </view>
  116. <view class="item">
  117. <view class="item-text">
  118. </view>
  119. <view class="item-number">
  120. 7
  121. </view>
  122. </view>
  123. <view class="item">
  124. <view class="item-text">
  125. 1
  126. </view>
  127. <view class="item-number">
  128. 7
  129. </view>
  130. </view>
  131. <view class="item">
  132. <view class="item-text">
  133. 0.1
  134. </view>
  135. <view class="item-number decimal">
  136. 7
  137. </view>
  138. </view>
  139. </view>
  140. <view class="radio">
  141. <u-radio-group v-model="value" @change="radioGroupChange">
  142. <u-radio @change="radioChange" v-for="(item, index) in list" :key="index" :name="item.id"
  143. :disabled="item.disabled">
  144. {{item.name}}
  145. </u-radio>
  146. </u-radio-group>
  147. </view>
  148. </view>
  149. <!-- 各时段用电量 -->
  150. <view class="electricity-chart">
  151. <view class="title">
  152. <view class="icon">
  153. </view>
  154. <view class="text">
  155. 各时段用电量 (度)
  156. </view>
  157. </view>
  158. <view class="chart">
  159. <image class="img" src="@/assets/img/chart@1x.png" mode=""></image>
  160. </view>
  161. </view>
  162. <!-- 异常波动 -->
  163. <view class="abnormal" >
  164. <view class="headline">
  165. <view class="title">
  166. <view class="icon">
  167. </view>
  168. <view class="text">
  169. 异常告警
  170. </view>
  171. </view>
  172. <view class="more">
  173. 查看全部
  174. <u-icon name="arrow-right" size="24" color="#d4d4d4"></u-icon>
  175. </view>
  176. </view>
  177. <view class="details">
  178. <view class="item">
  179. <view class="name">
  180. 温度异常告警
  181. </view>
  182. <view class="time">
  183. 2024-01-25 15:00:00
  184. </view>
  185. </view>
  186. <view class="item">
  187. <view class="name">
  188. 三厢功率因数异常告警
  189. </view>
  190. <view class="time">
  191. 2024-01-05 20:00:00
  192. </view>
  193. </view>
  194. </view>
  195. </view>
  196. <!-- 能源监测 -->
  197. <view class="energy-inspection" >
  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>
  208. <view class="icon icon1">
  209. <image class="img" src="@/assets/img/Image@1.png" mode=""></image>
  210. </view>
  211. <view class="grid-text">三相电流</view>
  212. </u-grid-item>
  213. <u-grid-item>
  214. <view class="icon icon2">
  215. <image class="img" src="@/assets/img/Image@2.png" mode=""></image>
  216. </view>
  217. <view class="grid-text">三相电压</view>
  218. </u-grid-item>
  219. <u-grid-item>
  220. <view class="icon icon3">
  221. <image class="img" src="@/assets/img/Image@3.png" mode=""></image>
  222. </view>
  223. <view class="grid-text">三相温度</view>
  224. </u-grid-item>
  225. <u-grid-item>
  226. <view class="icon icon4">
  227. <image class="img" src="@/assets/img/Image@4.png" mode=""></image>
  228. </view>
  229. <view class="grid-text">三相有功功率</view>
  230. </u-grid-item>
  231. <u-grid-item>
  232. <view class="icon icon5">
  233. <image class="img" src="@/assets/img/Image@5.png" mode=""></image>
  234. </view>
  235. <view class="grid-text">三相功率因数</view>
  236. </u-grid-item>
  237. <u-grid-item>
  238. <view class="icon icon6">
  239. <image class="img" src="@/assets/img/Image@5.png" mode=""></image>
  240. </view>
  241. <view class="grid-text">平均功率因数</view>
  242. </u-grid-item>
  243. </u-grid>
  244. </view>
  245. </view>
  246. <!-- 数据分析 -->
  247. <view class="data-analysis" >
  248. <view class="title">
  249. <view class="icon">
  250. </view>
  251. <view class="text">
  252. 数据分析
  253. </view>
  254. </view>
  255. <view class="grid">
  256. <u-grid :col="3" :border="false">
  257. <u-grid-item>
  258. <view class="icon icon7">
  259. <image class="img" src="@/assets/img/Image@7.png" mode=""></image>
  260. </view>
  261. <view class="grid-text">同比分析</view>
  262. </u-grid-item>
  263. <u-grid-item>
  264. <view class="icon icon8">
  265. <image class="img" src="@/assets/img/Image@8.png" mode=""></image>
  266. </view>
  267. <view class="grid-text">环比分析</view>
  268. </u-grid-item>
  269. <u-grid-item>
  270. <view class="icon icon9">
  271. <image class="img" src="@/assets/img/Image@9.svg" mode=""></image>
  272. </view>
  273. <view class="grid-text">用电统计</view>
  274. </u-grid-item>
  275. </u-grid>
  276. </view>
  277. </view>
  278. <!-- 创建工单 -->
  279. <view class="create-order">
  280. <view class="img-box">
  281. <image class="img" src="@/assets/img/riFill-file-add-fill.svg" mode=""></image>
  282. </view>
  283. <view class="text">
  284. 创建工单
  285. </view>
  286. </view>
  287. </view>
  288. </template>
  289. <script>
  290. export default {
  291. data() {
  292. return {
  293. endYear:'',
  294. equipmentShow:false,
  295. multiSelector: [
  296. ['荆鹏集团', '玉桥公园', '全季酒店'],
  297. [ '荆鹏软件园01','青少年宫02','御河社区03','荆州院子04']
  298. ],
  299. params: {
  300. year: true,
  301. month: true,
  302. day: true,
  303. hour: false,
  304. minute: false,
  305. second: false
  306. },
  307. tabsFrom: {
  308. show1: false,
  309. show1Index:0,
  310. show2Index:'',
  311. show2: false,
  312. show1Text: "全部类型",
  313. show2Text: "全部时间",
  314. selector1:[
  315. {
  316. label: '全部类型',
  317. value: '',
  318. },
  319. {
  320. label: '线上充值',
  321. value: '1',
  322. },
  323. {
  324. label: '线下充值',
  325. value: '2',
  326. },
  327. ]
  328. },
  329. background: {
  330. backgroundColor: '#1677FF',
  331. },
  332. list: [{
  333. id:0,
  334. name: '本月用电量',
  335. disabled: false
  336. },
  337. {
  338. id:1,
  339. name: '上月用电量',
  340. disabled: false
  341. },
  342. {
  343. id:2,
  344. name: '本年用电量',
  345. disabled: false
  346. }, {
  347. id:3,
  348. name: '上年用电量',
  349. disabled: false
  350. }, {
  351. id:4,
  352. name: '总用电量',
  353. disabled: false
  354. }, {
  355. id:5,
  356. name: '指定月份',
  357. disabled: false
  358. }
  359. ],
  360. value: '本月用电量',
  361. };
  362. },
  363. onLoad() {
  364. this.endYear=new Date().getFullYear()
  365. },
  366. methods: {
  367. selector2confirm(e){
  368. this.tabsFrom.show2Text=e.year+"年"+e.month+"月"
  369. this.tabsFrom.show2Index=e.year+"-"+e.month
  370. if(e.day){
  371. this.tabsFrom.show2Text+=e.day+"日"
  372. this.tabsFrom.show2Index+='-'+e.day
  373. }
  374. },
  375. selector2reset(e){
  376. console.log(e)
  377. this.tabsFrom.show2Text='全部时间'
  378. this.tabsFrom.show2Index='';
  379. },
  380. // 选中某个单选框时,由radio时触发
  381. radioChange(e) {
  382. //console.log(e);
  383. },
  384. // 选中任一radio时,由radio-group触发
  385. radioGroupChange(e) {
  386. console.log(e);
  387. if(e==5){
  388. this.tabsFrom.show2=true
  389. this.params.day=false
  390. }
  391. }
  392. }
  393. };
  394. </script>
  395. <style lang="scss" scoped>
  396. page {
  397. padding-bottom: 184rpx;
  398. }
  399. .navbar-c{
  400. background-color: rgba(22,119,255,1);
  401. .title{
  402. color: #fff;
  403. display: flex;
  404. align-items: center;
  405. justify-content: center;
  406. }
  407. .right{
  408. .img{
  409. width: 48rpx;
  410. height: 48rpx;
  411. }
  412. }
  413. }
  414. /deep/.uicon-nav-back{
  415. color: #fff !important;
  416. }
  417. .background {
  418. background-color: rgba(22, 119, 255, 1);
  419. padding-bottom: 100rpx;
  420. /deep/.u-border-bottom:after {
  421. border: none;
  422. }
  423. .u-nav-slot {
  424. margin-right: 32rpx;
  425. .img {
  426. width: 48rpx;
  427. height: 48rpx;
  428. vertical-align: middle;
  429. }
  430. }
  431. }
  432. .background::after {
  433. content: '';
  434. position: absolute;
  435. width: 160%;
  436. height: 80px;
  437. background-color: rgba(22, 119, 255, 1);
  438. left: -30%;
  439. border-radius: 0 0 50% 50%;
  440. }
  441. // // 日期
  442. .date-box {
  443. display: flex;
  444. align-items: center;
  445. justify-content: space-between;
  446. margin: 24rpx 32rpx;
  447. .item {
  448. border-radius: 8px;
  449. background-color: rgba(255, 255, 255, 0.1);
  450. border: 1px solid rgba(255, 255, 255, 0.15);
  451. width: 120rpx;
  452. height: 120rpx;
  453. color: #fff;
  454. text-align: center;
  455. display: flex;
  456. flex-direction: column;
  457. justify-content: center;
  458. .date {
  459. font-size: 40rpx;
  460. }
  461. }
  462. .item-today {
  463. background-color: rgba(255, 255, 255, 1);
  464. position: relative;
  465. .date {
  466. color: rgba(22, 119, 255, 1);
  467. }
  468. .week {
  469. color: rgba(16, 16, 16, 1);
  470. }
  471. .dot{
  472. width: 10rpx;
  473. height: 10rpx;
  474. background-color: rgba(255,150,0,1);
  475. border-radius: 999px;
  476. position: absolute;
  477. bottom: -5rpx;
  478. left: 50%;
  479. transform: translateX(-50%);
  480. }
  481. }
  482. }
  483. // 用电量
  484. .electricity-consumption {
  485. background-color: #fff;
  486. padding: 40rpx 32rpx 0rpx;
  487. border-radius: 8px;
  488. margin: -88rpx 32rpx 0;
  489. position: relative;
  490. .title{
  491. color: rgba(16,16,16,1);
  492. font-size: 36rpx;
  493. }
  494. .degree{
  495. display: flex;
  496. margin-top: 32rpx;
  497. .item{
  498. margin-right: 6rpx;
  499. text-align: center;
  500. .item-text{
  501. color: rgba(16,16,16,1);
  502. }
  503. .item-number{
  504. margin-top: 24rpx;
  505. width: 72rpx;
  506. height: 96rpx;
  507. background-color: rgba(16,16,16,1);
  508. color: #fff;
  509. font-size: 72rpx;
  510. }
  511. .decimal{
  512. background-color: #900005;
  513. }
  514. }
  515. }
  516. // .tab {
  517. // width: 240rpx;
  518. // height: 0;
  519. // border-width: 0px 48rpx 72rpx 0px;
  520. // border-radius: 8px 8px 0 0;
  521. // border-style: none solid solid none;
  522. // border-color: transparent transparent #fff;
  523. // position: absolute;
  524. // top: -72rpx;
  525. // left: 0rpx;
  526. // right: 0rpx;
  527. // color: #101010;
  528. // color: rgba(16, 16, 16, 1);
  529. // text-align: center;
  530. // line-height: 72rpx;
  531. // z-index: 999;
  532. // text-indent: 16rpx;
  533. // }
  534. // .tab2 {
  535. // width: 240rpx;
  536. // height: 0;
  537. // border-width: 0px 48rpx 72rpx 0px;
  538. // border-radius: 8px 8px 0 0;
  539. // border-style: none solid solid none;
  540. // border-color: transparent transparent #D4DBE4;
  541. // position: absolute;
  542. // top: -72rpx;
  543. // left: 210rpx;
  544. // right: 0rpx;
  545. // color: #777777;
  546. // text-align: center;
  547. // line-height: 72rpx;
  548. // text-indent: 16rpx;
  549. // }
  550. .radio {
  551. margin-top: 24rpx;
  552. /deep/.u-radio__label {
  553. font-size: 24rpx
  554. }
  555. /deep/.u-radio {
  556. margin-bottom: 16px;
  557. width: 200rpx !important;
  558. }
  559. }
  560. }
  561. //各时段用电量
  562. .electricity-chart {
  563. margin: 24rpx 32rpx;
  564. padding: 40rpx 0rpx;
  565. background-color: #fff;
  566. border-radius: 8px;
  567. .title {
  568. display: flex;
  569. align-items: center;
  570. padding: 0 32rpx;
  571. margin-bottom: 40rpx;
  572. font-weight: bold;
  573. .icon {
  574. width: 36rpx;
  575. height: 36rpx;
  576. background-color: rgba(22, 119, 255, 1);
  577. border: 6px solid rgba(182, 212, 255, 1);
  578. border-radius: 100px;
  579. }
  580. .text {
  581. color: rgba(51, 51, 51, 1);
  582. font-size: 36rpx;
  583. margin-left: 16rpx;
  584. }
  585. }
  586. .chart {
  587. width: 100%;
  588. height: 440rpx;
  589. .img {
  590. width: 100%;
  591. height: 440rpx;
  592. }
  593. }
  594. }
  595. // 异常
  596. .abnormal {
  597. margin: 24rpx 32rpx;
  598. padding: 40rpx 32rpx;
  599. background-color: #fff;
  600. border-radius: 8px;
  601. .headline {
  602. display: flex;
  603. align-items: center;
  604. justify-content: space-between;
  605. }
  606. .title {
  607. display: flex;
  608. align-items: center;
  609. font-weight: bold;
  610. .icon {
  611. width: 36rpx;
  612. height: 36rpx;
  613. background-color: rgba(22, 119, 255, 1);
  614. border: 6px solid rgba(182, 212, 255, 1);
  615. border-radius: 100px;
  616. }
  617. .text {
  618. color: rgba(51, 51, 51, 1);
  619. font-size: 36rpx;
  620. margin-left: 16rpx;
  621. }
  622. }
  623. .more {
  624. color: #838383;
  625. font-size: 24rpx
  626. }
  627. .details {
  628. margin-top: 40rpx;
  629. .item {
  630. display: flex;
  631. align-items: center;
  632. justify-content: space-between;
  633. margin-top: 32rpx;
  634. .name {
  635. color: rgba(51, 51, 51, 1);
  636. }
  637. .time {
  638. color: rgba(119, 119, 119, 1);
  639. font-size: 24rpx;
  640. }
  641. }
  642. }
  643. }
  644. // 能源监测
  645. .energy-inspection,.data-analysis {
  646. margin: 24rpx 32rpx;
  647. padding: 40rpx 32rpx;
  648. background-color: #fff;
  649. border-radius: 8px;
  650. .title {
  651. display: flex;
  652. align-items: center;
  653. font-weight: bold;
  654. .icon {
  655. width: 36rpx;
  656. height: 36rpx;
  657. background-color: rgba(22, 119, 255, 1);
  658. border: 6px solid rgba(182, 212, 255, 1);
  659. border-radius: 100px;
  660. }
  661. .text {
  662. color: rgba(51, 51, 51, 1);
  663. font-size: 36rpx;
  664. margin-left: 16rpx;
  665. }
  666. }
  667. .grid {
  668. .icon {
  669. width: 128rpx;
  670. height: 128rpx;
  671. border-radius: 12px;
  672. background-color: rgba(35, 186, 178, 1);
  673. display: flex;
  674. align-items: center;
  675. justify-content: center;
  676. margin-bottom: 16rpx;
  677. .img {
  678. width: 80rpx;
  679. height: 80rpx;
  680. }
  681. }
  682. .icon2{
  683. background-color: rgba(42,186,72,1);
  684. }
  685. .icon3{
  686. background-color: rgba(78,96,246,1);
  687. }
  688. .icon4{
  689. background-color: rgba(22,119,255,1);
  690. }
  691. .icon5{
  692. background-color: rgba(35,186,178,1);
  693. }
  694. .icon6{
  695. background-color: rgba(42,186,72,1);
  696. }
  697. .icon7{
  698. background-color: rgba(22,119,255,1);
  699. }
  700. .icon8{
  701. background-color: rgba(35,186,178,1);
  702. }
  703. .icon9{
  704. background-color: rgba(42,186,72,1);
  705. }
  706. .grid-text {
  707. color: #333333;
  708. }
  709. }
  710. }
  711. // 创建工单
  712. .create-order{
  713. width: 120rpx;
  714. height: 120rpx;
  715. border-radius: 20px;
  716. background: linear-gradient(180deg, rgba(121,172,255,1) 0%,rgba(57,132,255,1) 100%);
  717. box-shadow: 0px 2px 6px 0px rgba(0,0,0,0.4);
  718. text-align: center;
  719. display: flex;
  720. flex-direction: column;
  721. justify-content: center;
  722. align-items: center;
  723. position: fixed;
  724. right: 32rpx;
  725. bottom: 64rpx;
  726. .img{
  727. width: 56rpx;
  728. height: 56rpx;
  729. }
  730. .text{
  731. color: rgba(255,255,255,1);
  732. font-size: 22rpx;
  733. }
  734. }
  735. </style>