PvDetailPages.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. <template>
  2. <el-dialog width="80%" @opened="opened()" @closed="closed()" :show-close="false" class="my-info-dialog">
  3. <template #title>
  4. <div style="margin-top: -10px; color: #ffffff">光伏详情</div>
  5. </template>
  6. <div class="pvDetail">
  7. <div class="pvLeftDetail">
  8. <div class="commonSty titleFont">
  9. <span>光伏板号:</span>
  10. <span style="width: 38%;color: #c3c3c3">{{windturbine.id}}</span>
  11. </div>
  12. <div class="commonSty titleFont">
  13. <span>逆变器状态</span>
  14. </div>
  15. <div v-for="(item, index) in nbqData" :key="index" class="commonSty arrSty">
  16. <div class="arrName">
  17. <span>{{item.name}}</span>
  18. </div>
  19. <div class="arrMsg">
  20. <span style="padding-right: 20px">{{item.value}}</span>
  21. <span style="width: 20%;color: #c3c3c3">{{item.tes}}</span>
  22. </div>
  23. </div>
  24. </div>
  25. <div class="pvRightDetail">
  26. <div class="pvRightDetail_top">
  27. <div class="pvRightTopTitle">
  28. <span>光伏板</span>
  29. <span>汇流箱</span>
  30. <span>逆变器</span>
  31. <span>电网</span>
  32. </div>
  33. <div class="pvRightBotImg">
  34. <div class="img1">
  35. <img src="../assets/img/PV/pv_pic.png" alt="">
  36. </div>
  37. <div class="imgCom">
  38. <img src="../assets/img/PV/pv_arrow_pic.png" alt="">
  39. </div>
  40. <div class="img2">
  41. <img src="../assets/img/PV/pv_box_pic.png" alt="">
  42. </div>
  43. <div class="imgCom">
  44. <img src="../assets/img/PV/pv_arrow_pic.png" alt="">
  45. </div>
  46. <div class="img3">
  47. <img src="../assets/img/PV/pv_nb_pic.png" alt="">
  48. </div>
  49. <div class="imgCom">
  50. <img src="../assets/img/PV/pv_arrow_pic.png" alt="">
  51. </div>
  52. <div>
  53. <img src="../assets/img/PV/pv_elec_pic.png" alt="">
  54. </div>
  55. </div>
  56. </div>
  57. <div class="pvRightDetail_bot">
  58. <div class="pvRightBotTitle">
  59. <span>功率曲线</span>
  60. </div>
  61. <div class="pvRightBotEchart" id="pvEchart"></div>
  62. </div>
  63. </div>
  64. </div>
  65. </el-dialog>
  66. </template>
  67. <script>
  68. import api from "api/index";
  69. import * as echarts from "echarts";
  70. export default {
  71. props: {
  72. windturbine: {
  73. type: Object,
  74. default: () => {
  75. return {}
  76. },
  77. },
  78. },
  79. watch: {
  80. windturbine: {
  81. handler: function (json) {
  82. if (json) {
  83. // this.initData();
  84. }
  85. },
  86. },
  87. },
  88. data() {
  89. return {
  90. nbqData: []
  91. };
  92. },
  93. created() {
  94. this.nbqData = [
  95. {
  96. name: '交流电压',
  97. value: 0,
  98. tes: 'V'
  99. },
  100. {
  101. name: '交流电流',
  102. value: 0,
  103. tes: 'A'
  104. },
  105. {
  106. name: '直流电压',
  107. value: 0,
  108. tes: 'V'
  109. },
  110. {
  111. name: '直流电流',
  112. value: 0,
  113. tes: 'A'
  114. },
  115. {
  116. name: '并网功率',
  117. value: 0,
  118. tes: 'KW'
  119. },
  120. {
  121. name: '电网频率',
  122. value: 0,
  123. tes: 'Hz'
  124. },
  125. {
  126. name: '功率因数',
  127. value: 0,
  128. tes: ''
  129. },
  130. {
  131. name: '日发电量',
  132. value: 0,
  133. tes: 'Kwh'
  134. },
  135. {
  136. name: '月发电量',
  137. value: 0,
  138. tes: 'Kwh'
  139. },
  140. {
  141. name: '年发电量',
  142. value: 0,
  143. tes: 'Kwh'
  144. },
  145. {
  146. name: '累计发电量',
  147. value: 0,
  148. tes: 'Kwh'
  149. },
  150. {
  151. name: '逆变器温度',
  152. value: 0,
  153. tes: '℃'
  154. },
  155. {
  156. name: '效率',
  157. value: 0,
  158. tes: '%'
  159. },
  160. ]
  161. },
  162. methods: {
  163. opened() {
  164. this.$nextTick(() =>{
  165. this.getEcharts()
  166. })
  167. },
  168. closed(){},
  169. // 获取曲线数据
  170. getEcharts() {
  171. let series = [
  172. {
  173. name: 'Email',
  174. type: 'line',
  175. stack: 'Total',
  176. data: [120, 132, 101, 134, 90, 230, 210]
  177. },
  178. {
  179. name: 'Union Ads',
  180. type: 'line',
  181. stack: 'Total',
  182. data: [220, 182, 191, 234, 290, 330, 310]
  183. },
  184. {
  185. name: 'Video Ads',
  186. type: 'line',
  187. stack: 'Total',
  188. data: [150, 232, 201, 154, 190, 330, 410]
  189. },
  190. {
  191. name: 'Direct',
  192. type: 'line',
  193. stack: 'Total',
  194. data: [320, 332, 301, 334, 390, 330, 320]
  195. },
  196. {
  197. name: 'Search Engine',
  198. type: 'line',
  199. stack: 'Total',
  200. data: [820, 932, 901, 934, 1290, 1330, 1320]
  201. }
  202. ]
  203. let xAxis = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  204. let legend = ['Email', 'Union Ads', 'Video Ads', 'Direct', 'Search Engine']
  205. this.getglobalLine('pvEchart', xAxis, legend, series)
  206. },
  207. getglobalLine(name, xAxis, legend, series) {
  208. let option = {
  209. backgroundColor: '#232d38',
  210. tooltip: {
  211. trigger: 'axis'
  212. },
  213. legend: {
  214. data: legend
  215. },
  216. grid: {
  217. left: '5%',
  218. right: '4%',
  219. bottom: '3%',
  220. containLabel: true
  221. },
  222. xAxis: {
  223. type: 'category',
  224. boundaryGap: false,
  225. data: xAxis
  226. },
  227. yAxis: {
  228. type: 'value',
  229. name: '万千瓦时(Wkw/h)'
  230. },
  231. series: series
  232. };
  233. // 基于准备好的dom,初始化echarts实例
  234. let dom = document.getElementById(name);
  235. let myChart = echarts.init(dom, 'dark');
  236. myChart.setOption(option);
  237. window.addEventListener("resize", function () {
  238. myChart.resize()
  239. })
  240. },
  241. }
  242. };
  243. </script>
  244. <style lang="less" scoped>
  245. .pvDetail {
  246. background-color: black;
  247. margin-top: -30px;
  248. margin-left: -10px;
  249. margin-right: -10px;
  250. margin-bottom: -30px;
  251. border-bottom: 20px solid rgb(36, 36, 36);
  252. display: flex;
  253. padding: 5px 10px;
  254. .pvLeftDetail{
  255. width: 20%;
  256. .commonSty{
  257. height: 40px;
  258. background:#232d38;
  259. border-radius: 10px;
  260. margin-top: 10px;
  261. span{
  262. color: #fff;
  263. position: relative;
  264. top: 8px;
  265. left: 16px;
  266. }
  267. }
  268. .titleFont{
  269. width: calc(100% - 20px);
  270. font-size: 16px;
  271. display: flex;
  272. padding-right: 20px;
  273. justify-content: space-between;
  274. }
  275. .arrSty{
  276. display: flex;
  277. justify-content: space-between;
  278. span{
  279. font-size: 14px;
  280. }
  281. .arrName{
  282. width: 40%;
  283. span{
  284. color: #c3c3c3;
  285. }
  286. }
  287. .arrMsg{
  288. width: 60%;
  289. display: flex;
  290. justify-content: end;
  291. padding-right: 20px;
  292. span{
  293. display: inline-block;
  294. }
  295. }
  296. }
  297. }
  298. .pvRightDetail{
  299. width: calc(80% - 10px);
  300. padding-left: 10px;
  301. .pvRightDetail_top{
  302. background:#232d38;
  303. border-radius: 10px;
  304. margin-top: 10px;
  305. .pvRightTopTitle{
  306. display: flex;
  307. justify-content: space-around;
  308. height: 30px;
  309. color: #253443;
  310. border-bottom: 1px solid #5c5b5b;
  311. padding: 5px 0;
  312. margin-bottom: 10px;
  313. span{
  314. color: #fff;
  315. margin-top: 3px;
  316. }
  317. }
  318. .pvRightBotImg{
  319. display: flex;
  320. justify-content: space-around;
  321. padding: 50px 0;
  322. .img1{
  323. margin-top: 40px;
  324. }
  325. .img2{
  326. margin-top: 35px;
  327. }
  328. .img3{
  329. margin-top: 20px;
  330. }
  331. .imgCom{
  332. margin-top: 50px;
  333. }
  334. }
  335. }
  336. .pvRightDetail_bot{
  337. background:#232d38;
  338. border-radius: 10px;
  339. margin-top: 10px;
  340. .pvRightBotTitle{
  341. text-align: center;
  342. height: 20px;
  343. color: #253443;
  344. border-bottom: 1px solid #5c5b5b;
  345. padding: 10px 0;
  346. margin-bottom: 10px;
  347. span{
  348. color: #fff;
  349. }
  350. }
  351. .pvRightBotEchart{
  352. width: 100%;
  353. height: 375px;
  354. }
  355. }
  356. }
  357. }
  358. </style>