index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. <template>
  2. <div class="app-container bulletinBoard" style="background: #f0f2f5 !important;height:90vw">
  3. <div class="height100 component1" style="margin-left:10px;">
  4. <div class="type type1">
  5. <p class="color1">上海永天科技</p>
  6. <img src="@/assets/images/logo1.png" alt="">
  7. <p class="desc">站点名称</p>
  8. </div>
  9. </div>
  10. <div class="height100 component2">
  11. <div class="left">
  12. <p class="color2">0.98 <span>/0.88</span></p>
  13. </div>
  14. <div class="right">
  15. <p class="">平均功率因数</p>
  16. <p class="">2025年7月2日 起</p>
  17. </div>
  18. </div>
  19. <div class="height100 component1">
  20. <div class="type type1">
  21. <p class="color3">1023</p>
  22. <img src="@/assets/images/logo1.png" alt="">
  23. <p class="desc">运行天数</p>
  24. </div>
  25. </div>
  26. <div class="height100 component3" >
  27. <div class="type">
  28. <img src="@/assets/images/logo1.png" alt="">
  29. <div class="title color5">告警</div>
  30. <p class="desc3">平均功率因数</p>
  31. </div>
  32. </div>
  33. <div class="height100 component3">
  34. <div class="type">
  35. <img src="@/assets/images/logo1.png" alt="">
  36. <div class="title color1">在线</div>
  37. <p class="desc3">站点通讯状态</p>
  38. </div>
  39. </div>
  40. <div class="height100 component3">
  41. <div class="type">
  42. <img src="@/assets/images/logo1.png" alt="">
  43. <div class="title color1">正常</div>
  44. <p class="desc3">站点故障状态</p>
  45. </div>
  46. </div>
  47. <div class="height190 component4" style="margin-left:8px;">
  48. <div class="top">
  49. <p>今日用电<span>(kWh)</span></p>
  50. <img src="@/assets/images/day/31.png" alt="">
  51. </div>
  52. <div class="middle">
  53. 1968
  54. </div>
  55. <div class="bottom">
  56. <p>昨日同期<span>2775</span></p>
  57. <p><span>28.32%</span><span></span></p>
  58. </div>
  59. </div>
  60. <div class="height190 component4" style="display: inline-block;">
  61. <div class="top">
  62. <p>本月用电<span>(kWh)</span></p>
  63. <img src="@/assets/images/month/7.png" alt="">
  64. </div>
  65. <div class="middle">
  66. 247605
  67. </div>
  68. <div class="bottom">
  69. <p>上月同期<span>1322913</span></p>
  70. <p><span>28.32%</span><span></span></p>
  71. </div>
  72. </div>
  73. <div class="height190 component5 echarts" style="margin-top:-185px;width:62%;">
  74. <div class="top">
  75. <img src="@/assets/images/logo1.png" alt="">
  76. <span>今日用电趋势</span>
  77. </div>
  78. <chart :data="ydqs"/>
  79. </div>
  80. <div class="height190 component6 echarts" style="margin-top:-185px;height:380px;">
  81. <div class="top">
  82. <img src="@/assets/images/logo1.png" alt="">
  83. <span>告警处理统计</span>
  84. </div>
  85. <pie :data="alarm"/>
  86. </div>
  87. <div class="height190 component7 echarts" style="margin-left:10px;" >
  88. <div class="top">
  89. <img src="@/assets/images/logo1.png" alt="">
  90. <span>支路用能占比</span>
  91. </div>
  92. <div class="time">
  93. <div :class="['switch',dateType == '1' ? 'active': '']" @click="dateSwitch(1)">月</div>
  94. <div :class="['switch',dateType == '2' ? 'active': '']" @click="dateSwitch(2)">年</div>
  95. </div>
  96. <pie :data="zlydzb"/>
  97. </div>
  98. <div class="height190 component7 echarts" style="height:375px;width:28.3%;">
  99. <div class="top">
  100. <img src="@/assets/images/logo1.png" alt="">
  101. <span>事件告警列表</span>
  102. </div>
  103. <tableD :data="eventList"/>
  104. </div>
  105. <div class="height190 component5 echarts" style="height:375px !important;width:calc(50% - 23px)">
  106. <div class="top">
  107. <img src="@/assets/images/logo1.png" alt="">
  108. <span>有功功率</span>
  109. </div>
  110. <chart :data="ydqs"/>
  111. </div>
  112. <div class="height190 component5 echarts" style="margin-left:10px;width:calc(50% - 23px)">
  113. <div class="top">
  114. <img src="@/assets/images/logo1.png" alt="">
  115. <span>有功功率同比分析</span>
  116. </div>
  117. <chart :data="ydqs"/>
  118. </div>
  119. <div class="height190 component5 echarts" style="width:calc(50% - 23px)">
  120. <div class="top">
  121. <img src="@/assets/images/logo1.png" alt="">
  122. <span>功率因数</span>
  123. </div>
  124. <chart :data="ydqs"/>
  125. </div>
  126. <div class="height190 component5 echarts" style="margin-left:10px;width:calc(50% - 23px)">
  127. <div class="top">
  128. <img src="@/assets/images/logo1.png" alt="">
  129. <span>环境温湿度</span>
  130. </div>
  131. <chart :data="ydqs"/>
  132. </div>
  133. </div>
  134. </template>
  135. <script setup>
  136. import chart from './components/chart'
  137. import pie from './components/pie'
  138. import tableD from './components/tableD'
  139. import { ref } from 'vue'
  140. //用电趋势
  141. const ydqs = ref({
  142. xAxis:["00:00", "02:00", "04:00", "06:00", "08:00", "10:00", "12:00", "14:00", "16:00", "18:00", "20:00", "22:00"],
  143. type:["总有功功率1(kW)","总有功功率2(kW)","总有功功率3(kW)","总有功功率4(kW)","总有功功率5(kW)"],
  144. data:[
  145. [100, 101, 120, 50, 70, 95, 65, 120, 5, 14, 78, 32],
  146. [5, 4, 10, 15, 13, 14, 9, 12, 45, 25, 32],
  147. [100,89,101,110,99,94,45,89,99,100,110,102],
  148. [11,8,33,22,11,66,22,8,13,8,46,16],
  149. [50,51,15,20,45,35,35,40,45,20,15,6]
  150. ],
  151. unit:""
  152. })
  153. //告警统计
  154. const alarm = ref({
  155. data:[
  156. {name: '未确认', value: 3},
  157. {name: '已确认', value: 3 },
  158. ],
  159. color:["red","#10aaeb"],
  160. type:"1"
  161. })
  162. //支路用电占比
  163. const zlydzb = ref({
  164. data:[
  165. {name: '路灯照明', value: 3},
  166. {name: '站内用电', value: 4 },
  167. {name: '站外用电', value: 5 },
  168. ],
  169. color:["red","#10aaeb","#FF691C"],
  170. type:"2"
  171. })
  172. const dateType = ref(1)
  173. //事件告警列表
  174. const eventList = ref([
  175. { name:"事件名称", time:"2021-10-10 10:10:10", deviceName:"设备1", statue:"1" },
  176. { name:"事件名称", time:"2021-10-10 10:10:10", deviceName:"设备1", statue:"0" },
  177. { name:"事件名称", time:"2021-10-10 10:10:10", deviceName:"设备1", statue:"1" },
  178. { name:"事件名称", time:"2021-10-10 10:10:10", deviceName:"设备1", statue:"1" },
  179. { name:"事件名称", time:"2021-10-10 10:10:10", deviceName:"设备1", statue:"1" },
  180. { name:"事件名称", time:"2021-10-10 10:10:10", deviceName:"设备1", statue:"1" },
  181. { name:"事件名称", time:"2021-10-10 10:10:10", deviceName:"设备1", statue:"1" },
  182. { name:"事件名称", time:"2021-10-10 10:10:10", deviceName:"设备1", statue:"1" },
  183. { name:"事件名称", time:"2021-10-10 10:10:10", deviceName:"设备1", statue:"1" },
  184. { name:"事件名称", time:"2021-10-10 10:10:10", deviceName:"设备1", statue:"1" },
  185. { name:"事件名称", time:"2021-10-10 10:10:10", deviceName:"设备1", statue:"1" },
  186. ])
  187. function dateSwitch(type){
  188. dateType.value = type
  189. }
  190. </script>
  191. <style lang="scss" scoped>
  192. .bulletinBoard{
  193. padding:0;
  194. .height100{
  195. height:100px;
  196. margin-top:10px;
  197. margin-right:10px;
  198. border-radius: 6px;
  199. display: inline-block;
  200. vertical-align: top;
  201. position: relative;
  202. .type{
  203. padding:10px 8px;
  204. }
  205. .type1{
  206. img{
  207. position: absolute;
  208. right:8px;;
  209. top:25px;
  210. }
  211. p:nth-child(1){
  212. font-size: 24px;
  213. }
  214. .desc{
  215. position: absolute;
  216. bottom:-5px;
  217. color:#fff;
  218. }
  219. .desc2{
  220. position: absolute;
  221. bottom:15px;
  222. }
  223. .time{
  224. position: absolute;
  225. bottom:-5px;
  226. font-size: 12px;
  227. color:#333;
  228. }
  229. }
  230. }
  231. .component1{
  232. width:24.3%;
  233. background: linear-gradient(to right bottom, rgb(56, 148, 190), rgb(80, 227, 194));
  234. }
  235. .component2{
  236. width:24.3%;
  237. background:linear-gradient(to right bottom, rgb(27, 40, 52), rgb(27, 40, 52));
  238. >div{
  239. width:50%;
  240. display: inline-block;
  241. }
  242. .left{
  243. font-size: 40px;
  244. color:rgb(80, 227, 194);
  245. text-align: center;
  246. vertical-align: middle;
  247. margin-top:25px;
  248. span{
  249. font-size: 14px;
  250. color:rgb(126, 147, 166);
  251. vertical-align: top;
  252. margin-top:10px;
  253. display: inline-block;
  254. }
  255. }
  256. .right{
  257. color:rgb(126, 147, 166);
  258. vertical-align: middle;
  259. }
  260. }
  261. .component3{
  262. width:7.5%;
  263. background: #fff;
  264. text-align: center;
  265. .title{
  266. font-weight: 600;
  267. margin:6px 0;
  268. }
  269. }
  270. .height100:last-child{
  271. margin-right:0;
  272. }
  273. .component4{
  274. width:15%;
  275. height:185px;
  276. margin-top:10px;
  277. margin-right:10px;
  278. margin-left:10px;
  279. background: #fff;
  280. // display: inline-block;
  281. >div{
  282. height: 50px;
  283. }
  284. .top{
  285. position: relative;
  286. padding:15px;
  287. p{
  288. font-size: 20px;
  289. span{
  290. font-size: 12px;
  291. }
  292. }
  293. img{
  294. position: absolute;
  295. width:40px;
  296. top:15px;
  297. right:15px;
  298. }
  299. }
  300. .middle{
  301. font-size:34px;
  302. color:#10aaeb;
  303. padding:15px 15px 40px 15px;
  304. border-bottom:2px solid #eee;
  305. }
  306. .bottom{
  307. padding:15px;
  308. color:rgba(0,0,0,0.65);
  309. p:nth-child(1){
  310. span:nth-child(1){
  311. margin-left:10px;
  312. }
  313. }
  314. p:nth-child(2){
  315. span{
  316. vertical-align: middle;
  317. }
  318. span:nth-child(1){
  319. color:#1BCCC1;
  320. }
  321. span:nth-child(2){
  322. margin-left:10px;
  323. margin-top:-4px;
  324. display: inline-block;
  325. }
  326. span:nth-child(2)::after{
  327. display: inline-block;
  328. content: ""; /* 伪元素不包含内容 */
  329. width: 0; /* 必须设置为0,因为我们不显示宽度 */
  330. height: 0; /* 必须设置为0,因为我们不显示高度 */
  331. margin-left: -5px; /* 根据需要调整,这里是让箭头中心对齐 */
  332. margin-top:-10px;
  333. border-left: 5px solid transparent; /* 左边框透明 */
  334. border-right: 5px solid transparent; /* 右边框透明 */
  335. border-top: 5px solid #08b762; /* 上边框是三角形的颜色 */
  336. }
  337. }
  338. }
  339. }
  340. .component5{
  341. width:49%;
  342. height:380px !important;
  343. display: inline-block;
  344. vertical-align: top;
  345. }
  346. .component6{
  347. width:20%;
  348. }
  349. .component7{
  350. width:20%;
  351. .time{
  352. margin:6px;
  353. .switch{
  354. width:40px;
  355. height:30px;
  356. line-height: 26px;
  357. text-align: center;
  358. margin-right:6px;
  359. padding:2px;
  360. color:rgba(0,0,0,0.65);
  361. border: 1px solid #ccc;
  362. display: inline-block;
  363. cursor: pointer;
  364. }
  365. .active{
  366. background: #6c7fff;
  367. color:#fff;
  368. }
  369. }
  370. }
  371. }
  372. .echarts{
  373. margin-top:10px;
  374. margin-right:10px;
  375. display: inline-block;
  376. vertical-align: top;
  377. border-top:solid 1px #1890ff;
  378. background: #fff;
  379. .top{
  380. background: #fafafa;
  381. padding:8px;
  382. img{
  383. width:25px;
  384. }
  385. img,span{
  386. display: inline-block;
  387. vertical-align: middle;
  388. }
  389. span{
  390. font-size: 16px;
  391. margin-left:10px;
  392. }
  393. }
  394. }
  395. .color1{
  396. color:#1BCCC1;
  397. }
  398. .color2{
  399. color:#FF691C ;
  400. }
  401. .color3{
  402. color:#8942F5 ;
  403. }
  404. .color4{
  405. color:#FF397F ;
  406. span{
  407. color:#333;
  408. margin-left:10px;
  409. }
  410. }
  411. .color5{
  412. color:red
  413. }
  414. </style>