Home.vue 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273
  1. <template>
  2. <div class="home">
  3. <Row type="flex" style="height: 55vh">
  4. <div class="top-left-panel">
  5. <Row type="flex" class="weather">
  6. <Col :span="24">
  7. <com-panel
  8. :title="tqmap.name || 'yc'"
  9. :sub-title="nowTime + ' 实况'"
  10. icon="fa fa-map-marker"
  11. >
  12. <weather :data="tqmap" />
  13. </com-panel>
  14. </Col>
  15. </Row>
  16. <Row type="flex" class="plan">
  17. <Col :span="24">
  18. <com-panel title="预测电量" sub-title="(单位:万kWh)">
  19. <list-bar-chart-2 :list="ForecastPower" height="15.7407vh" />
  20. </com-panel>
  21. </Col>
  22. </Row>
  23. <Row type="flex" class="power">
  24. <Col :span="24">
  25. <com-panel title="功率负荷" sub-title="(单位:MW)">
  26. <power-review
  27. :data="powerData"
  28. :id="wpId"
  29. @chartClick="showPowerChart"
  30. />
  31. </com-panel>
  32. </Col>
  33. </Row>
  34. </div>
  35. <div class="top-mid-panel">
  36. <Map
  37. :wpId="wpId"
  38. :day="String(jczbmap.aqts || '---')"
  39. :data="fcmap"
  40. :xtData="xtmap"
  41. @mapClick="changeShowType"
  42. ></Map>
  43. </div>
  44. <div class="top-right-panel">
  45. <Row type="flex">
  46. <Col :span="24">
  47. <com-panel title="电量分析" sub-title="(单位:万kWh)">
  48. <coulometric-analysis />
  49. </com-panel>
  50. </Col>
  51. </Row>
  52. <Row type="flex">
  53. <Col :span="24">
  54. <com-panel title="计划电量完成情况" sub-title="(单位:万kWh)">
  55. <power-plan
  56. :data="planData"
  57. :title="planBtnName"
  58. :showSingle="powerplanShowSingle"
  59. :id="wpId"
  60. @chartClick="showDoneChart"
  61. />
  62. </com-panel>
  63. </Col>
  64. </Row>
  65. </div>
  66. </Row>
  67. <Row type="flex" style="height: calc(40vh - 236px); margin-top: 20px">
  68. <Col :span="12">
  69. <toolbar-panel title="日发电量">
  70. <!-- <template v-slot:tools>
  71. <div class="tools">
  72. <div class="tool-block">
  73. <div class="legend bg-green"></div>
  74. <div class="legend-text">日发电量(单位:万kWh)</div>
  75. </div>
  76. <div class="tool-block">
  77. <div class="legend bg-purple"></div>
  78. <div class="legend-text">上网电量(单位:万kWh)</div>
  79. </div>
  80. <div class="tool-block">
  81. <div class="legend bg-orange"></div>
  82. <div class="legend-text">购网电量(单位:万kWh)</div>
  83. </div>
  84. </div>
  85. </template> -->
  86. <template v-slot:default>
  87. <!-- 日发电量 -->
  88. <multiple-bar-chart
  89. :list="DayPower.value"
  90. :units="DayPower.units"
  91. height="100%"
  92. :showLegend="true"
  93. @click="
  94. showDoneChart({
  95. data: DayPower,
  96. dialogTitle: '日发电量',
  97. dialogType: 'doneLineChart',
  98. })
  99. "
  100. />
  101. </template>
  102. </toolbar-panel>
  103. </Col>
  104. <Col :span="12">
  105. <toolbar-panel title="72小时功率趋势图">
  106. <!-- <template v-slot:tools>
  107. <div class="tools">
  108. <div class="tools">
  109. <div class="tool-block">
  110. <div class="legend long bg-green"></div>
  111. <div class="legend-text">应发功率</div>
  112. </div>
  113. <div class="tool-block">
  114. <div class="legend long bg-yellow"></div>
  115. <div class="legend-text">实发功率</div>
  116. </div>
  117. <div class="tool-block">
  118. <div class="legend long bg-purple"></div>
  119. <div class="legend-text">理论功率</div>
  120. </div>
  121. </div>
  122. </div>
  123. </template> -->
  124. <template v-slot:default>
  125. <multiple-line-chart
  126. height="100%"
  127. :list="Powertrend"
  128. units="(MW)"
  129. :showLegend="true"
  130. :hoverType="'axis'"
  131. @click="
  132. showPowerChart({
  133. data: Powertrend,
  134. dialogTitle: '72小时功率趋势图',
  135. dialogType: 'powerLineChart',
  136. })
  137. "
  138. />
  139. </template>
  140. </toolbar-panel>
  141. </Col>
  142. </Row>
  143. <Row type="flex" style="margin-top: 20px">
  144. <!-- 下方 table -->
  145. <Col :span="16" class="table-card-panel">
  146. <row>
  147. <Col>
  148. <com-panel>
  149. <table class="table-card">
  150. <tr class="">
  151. <td class="text gray">装机容量</td>
  152. <td class="value green">{{ jczbmap.zjrl }}</td>
  153. <td class="unit gray">MW</td>
  154. </tr>
  155. <tr class="">
  156. <td class="text gray">上网电量(日)</td>
  157. <td class="value green">{{ jczbmap.swdl }}</td>
  158. <td class="unit gray">万kWh</td>
  159. </tr>
  160. <tr class="">
  161. <td class="text gray">
  162. {{ wpId === "0" ? "减排二氧化硫" : "年运行小时" }}
  163. </td>
  164. <td class="value green">
  165. {{ wpId === "0" ? jczbmap.jpeyhl : gxkmap.nyxxs }}
  166. </td>
  167. <td class="unit gray">
  168. {{ wpId === "0" ? "万吨" : "小时" }}
  169. </td>
  170. </tr>
  171. <tr class="">
  172. <td class="text gray">
  173. {{ wpId === "0" ? "减排二氧化碳" : "年等效科利用系数" }}
  174. </td>
  175. <td class="value green">
  176. {{ wpId === "0" ? jczbmap.jpeyht : gxkmap.ndxkyss }}
  177. </td>
  178. <td class="unit gray">{{ wpId === "0" ? "万吨" : "%" }}</td>
  179. </tr>
  180. <tr class="">
  181. <td class="text gray">
  182. {{ wpId === "0" ? "节约用水" : "年故障小时" }}
  183. </td>
  184. <td class="value green">
  185. {{ wpId === "0" ? jczbmap.jys : gxkmap.ngzxs }}
  186. </td>
  187. <td class="unit gray">
  188. {{ wpId === "0" ? "万吨" : "小时" }}
  189. </td>
  190. </tr>
  191. <tr class="">
  192. <td class="text gray">
  193. {{ wpId === "0" ? "节约标煤" : "年待机小时" }}
  194. </td>
  195. <td class="value green">
  196. {{ wpId === "0" ? jczbmap.jybm : gxkmap.ndjxs }}
  197. </td>
  198. <td class="unit gray">
  199. {{ wpId === "0" ? "万吨" : "小时" }}
  200. </td>
  201. </tr>
  202. </table>
  203. </com-panel>
  204. </Col>
  205. <Col>
  206. <com-panel>
  207. <table class="table-card">
  208. <tr class="">
  209. <td class="text gray">综合厂用电率</td>
  210. <td class="value green">{{ gxkmap.yzhcydl }}</td>
  211. <td class="unit gray">%</td>
  212. </tr>
  213. <tr class="">
  214. <td class="text gray">利用小时(月)</td>
  215. <td class="value green">{{ jczbmap.ylyxs }}</td>
  216. <td class="unit gray">小时</td>
  217. </tr>
  218. <tr class="">
  219. <td class="text gray">利用小时(年)</td>
  220. <td class="value green">{{ jczbmap.nlyxs }}</td>
  221. <td class="unit gray gray">小时</td>
  222. </tr>
  223. <tr class="">
  224. <td class="text gray">设备可利用率</td>
  225. <td class="value green">{{ gxkmap.ysbklyl }}</td>
  226. <td class="unit gray">%</td>
  227. </tr>
  228. <tr class="">
  229. <td class="text gray">MTBF(日)</td>
  230. <td class="value green">{{ jczbmap.mtbf }}</td>
  231. <td class="unit gray">小时</td>
  232. </tr>
  233. <tr class="">
  234. <td class="text gray">MTTR(日)</td>
  235. <td class="value green">{{ jczbmap.mttr }}</td>
  236. <td class="unit gray">小时</td>
  237. </tr>
  238. </table>
  239. </com-panel>
  240. </Col>
  241. <Col>
  242. <com-panel>
  243. <table class="table-card">
  244. <tr
  245. class="curP"
  246. @click="
  247. openDialog(
  248. '日发电量详情',
  249. 'genreset/findDayInfo',
  250. 'rfdl',
  251. 'table'
  252. )
  253. "
  254. >
  255. <td class="text gray">日发电量</td>
  256. <td class="value green">{{ jczbmap.rfdl }}</td>
  257. <td class="unit gray">万kWh</td>
  258. </tr>
  259. <tr
  260. class="curP"
  261. @click="
  262. openDialog(
  263. '日故障损失详情',
  264. 'genreset/findDayInfo',
  265. 'rgzssdl',
  266. 'table'
  267. )
  268. "
  269. >
  270. <td class="text gray">日故障损失电量</td>
  271. <td class="value green">{{ wxssmap.rgzssdl }}</td>
  272. <td class="unit gray">万kWh</td>
  273. </tr>
  274. <tr
  275. class="curP"
  276. @click="
  277. openDialog(
  278. '日维护损失详情',
  279. 'genreset/findDayInfo',
  280. 'rjxssdl',
  281. 'table'
  282. )
  283. "
  284. >
  285. <td class="text gray">日维护损失电量</td>
  286. <td class="value green">{{ wxssmap.rjxssdl }}</td>
  287. <td class="unit gray">万kWh</td>
  288. </tr>
  289. <tr
  290. class="curP"
  291. @click="
  292. openDialog(
  293. '日限电损失详情',
  294. 'genreset/findDayInfo',
  295. 'rxdssdl',
  296. 'table'
  297. )
  298. "
  299. >
  300. <td class="text gray">日限电损失电量</td>
  301. <td class="value green">{{ wxssmap.rxdssdl }}</td>
  302. <td class="unit gray gray">万kWh</td>
  303. </tr>
  304. <tr
  305. class="curP"
  306. @click="
  307. openDialog(
  308. '日受累损失详情',
  309. 'genreset/findDayInfo',
  310. 'rslssdl',
  311. 'table'
  312. )
  313. "
  314. >
  315. <td class="text gray">日受累损失电量</td>
  316. <td class="value green">{{ wxssmap.rslssdl }}</td>
  317. <td class="unit gray">万kWh</td>
  318. </tr>
  319. <tr
  320. class="curP"
  321. @click="
  322. openDialog(
  323. '日性能损失详情',
  324. 'genreset/findDayInfo',
  325. 'rxnssdl',
  326. 'table'
  327. )
  328. "
  329. >
  330. <td class="text gray">日性能损失电量</td>
  331. <td class="value green">{{ wxssmap.rqfssdl }}</td>
  332. <td class="unit gray">万kWh</td>
  333. </tr>
  334. </table>
  335. </com-panel>
  336. </Col>
  337. <Col>
  338. <com-panel>
  339. <table class="table-card">
  340. <tr
  341. class="curP"
  342. @click="
  343. openDialog(
  344. '月发电量详情',
  345. 'genreset/findMonthInfo',
  346. 'yfdl',
  347. 'table'
  348. )
  349. "
  350. >
  351. <td class="text gray">月发电量</td>
  352. <td class="value green">{{ jczbmap.yfdl }}</td>
  353. <td class="unit gray gray">万kWh</td>
  354. </tr>
  355. <tr
  356. class="curP"
  357. @click="
  358. openDialog(
  359. '月故障损失详情',
  360. 'genreset/findMonthInfo',
  361. 'ygzssdl',
  362. 'table'
  363. )
  364. "
  365. >
  366. <td class="text gray">月故障损失</td>
  367. <td class="value green">{{ wxssmap.ygzssdl }}</td>
  368. <td class="unit gray">万kWh</td>
  369. </tr>
  370. <tr
  371. class="curP"
  372. @click="
  373. openDialog(
  374. '月维护损失详情',
  375. 'genreset/findMonthInfo',
  376. 'yjxssdl',
  377. 'table'
  378. )
  379. "
  380. >
  381. <td class="text gray">月维护损失</td>
  382. <td class="value green">{{ wxssmap.yjxssdl }}</td>
  383. <td class="unit gray">万kWh</td>
  384. </tr>
  385. <tr
  386. class="curP"
  387. @click="
  388. openDialog(
  389. '月限电损失详情',
  390. 'genreset/findMonthInfo',
  391. 'yxdssdl',
  392. 'table'
  393. )
  394. "
  395. >
  396. <td class="text gray">月限电损失</td>
  397. <td class="value green">{{ wxssmap.yxdssdl }}</td>
  398. <td class="unit gray gray">万kWh</td>
  399. </tr>
  400. <tr
  401. class="curP"
  402. @click="
  403. openDialog(
  404. '月受累损失详情',
  405. 'genreset/findMonthInfo',
  406. 'yslssdl',
  407. 'table'
  408. )
  409. "
  410. >
  411. <td class="text gray">月受累损失</td>
  412. <td class="value green">{{ wxssmap.yslssdl }}</td>
  413. <td class="unit gray">万kWh</td>
  414. </tr>
  415. <tr
  416. class="curP"
  417. @click="
  418. openDialog(
  419. '月性能损失详情',
  420. 'genreset/findMonthInfo',
  421. 'yxnssdl',
  422. 'table'
  423. )
  424. "
  425. >
  426. <td class="text gray">月性能损失</td>
  427. <td class="value green">{{ wxssmap.yqfssdl }}</td>
  428. <td class="unit gray">万kWh</td>
  429. </tr>
  430. </table>
  431. </com-panel>
  432. </Col>
  433. <Col>
  434. <com-panel>
  435. <table class="table-card">
  436. <tr
  437. class="curP"
  438. @click="
  439. openDialog(
  440. '年发电量详情',
  441. 'genreset/findYearInfo',
  442. 'nfdl',
  443. 'table'
  444. )
  445. "
  446. >
  447. <td class="text gray">年发电量</td>
  448. <td class="value green">{{ jczbmap.nfdl }}</td>
  449. <td class="unit gray">万kWh</td>
  450. </tr>
  451. <tr
  452. class="curP"
  453. @click="
  454. openDialog(
  455. '年故障损失详情',
  456. 'genreset/findYearInfo',
  457. 'ngzssdl',
  458. 'table'
  459. )
  460. "
  461. >
  462. <td class="text gray">年故障损失</td>
  463. <td class="value green">{{ wxssmap.ngzssdl }}</td>
  464. <td class="unit gray">万kWh</td>
  465. </tr>
  466. <tr
  467. class="curP"
  468. @click="
  469. openDialog(
  470. '年维护损失详情',
  471. 'genreset/findYearInfo',
  472. 'njxssdl',
  473. 'table'
  474. )
  475. "
  476. >
  477. <td class="text gray">年维护损失</td>
  478. <td class="value green">{{ wxssmap.njxssdl }}</td>
  479. <td class="unit gray">万kWh</td>
  480. </tr>
  481. <tr
  482. class="curP"
  483. @click="
  484. openDialog(
  485. '年限电损失详情',
  486. 'genreset/findYearInfo',
  487. 'nxdssdl',
  488. 'table'
  489. )
  490. "
  491. >
  492. <td class="text gray">年限电损失</td>
  493. <td class="value green">{{ wxssmap.nxdssdl }}</td>
  494. <td class="unit gray gray">万kWh</td>
  495. </tr>
  496. <tr
  497. class="curP"
  498. @click="
  499. openDialog(
  500. '年受累损失详情',
  501. 'genreset/findYearInfo',
  502. 'nslssdl',
  503. 'table'
  504. )
  505. "
  506. >
  507. <td class="text gray">年受累损失</td>
  508. <td class="value green">{{ wxssmap.nslssdl }}</td>
  509. <td class="unit gray">万kWh</td>
  510. </tr>
  511. <tr
  512. class="curP"
  513. @click="
  514. openDialog(
  515. '年性能损失详情',
  516. 'genreset/findYearInfo',
  517. 'nxnssdl',
  518. 'table'
  519. )
  520. "
  521. >
  522. <td class="text gray">年性能损失</td>
  523. <td class="value green">{{ wxssmap.nqfssdl }}</td>
  524. <td class="unit gray">万kWh</td>
  525. </tr>
  526. </table>
  527. </com-panel>
  528. </Col>
  529. </row>
  530. </Col>
  531. <!-- 右下角 panel -->
  532. <Col :span="8">
  533. <panel-3 class="situation">
  534. <div class="situation-body">
  535. <row align="middle">
  536. <div class="situation-item fengji">
  537. <div class="icon fengji-icon svg-icon svg-icon-white">
  538. <svg-icon class="" svgid="svg-风机" />
  539. </div>
  540. <div class="info">
  541. <div class="title green">接入设备</div>
  542. <div class="value">{{ mxztmap.jrts }}</div>
  543. </div>
  544. </div>
  545. <div class="situation-item">
  546. <div class="icon svg-icon svg-icon-green">
  547. <svg-icon class="" svgid="svg-待机图标" />
  548. </div>
  549. <div class="info">
  550. <div class="title green">待机</div>
  551. <div class="value">
  552. <span class="text gray">待风</span>
  553. <span>{{ mxztmap.djts }}</span>
  554. </div>
  555. <div class="value">
  556. <span class="text gray">手动停机</span>
  557. <span>{{ mxztmap.sdtjts }}</span>
  558. </div>
  559. </div>
  560. </div>
  561. <div class="situation-item">
  562. <div class="icon svg-icon svg-icon-purple">
  563. <svg-icon class="" svgid="svg-运行图标" />
  564. </div>
  565. <div class="info">
  566. <div class="title green">运行</div>
  567. <div class="value">
  568. <span class="text gray">正常发电</span>
  569. <span>{{ mxztmap.yxts }}</span>
  570. </div>
  571. <div class="value">
  572. <span class="text gray">降出力运行</span>
  573. <span>{{ mxztmap.fdjclts }}</span>
  574. </div>
  575. </div>
  576. </div>
  577. <div class="situation-item">
  578. <div class="icon svg-icon svg-icon-pink">
  579. <svg-icon class="" svgid="svg-限电图标" />
  580. </div>
  581. <div class="info">
  582. <div class="title green">限电</div>
  583. <div class="value">
  584. <span class="text gray">限电降出力</span>
  585. <span>{{ mxztmap.xdjclts }}</span>
  586. </div>
  587. <div class="value">
  588. <span class="text gray">停机</span>
  589. <span>{{ mxztmap.xdtjts }}</span>
  590. </div>
  591. </div>
  592. </div>
  593. </row>
  594. <row align="middle">
  595. <div class="situation-item">
  596. <div class="icon svg-icon svg-icon-red">
  597. <svg-icon class="" svgid="svg-故障图标" />
  598. </div>
  599. <div class="info">
  600. <div class="title green">故障</div>
  601. <div class="value">
  602. <span class="text gray">故障停机</span>
  603. <span>{{ mxztmap.gzts }}</span>
  604. </div>
  605. <div class="value">
  606. <span class="text gray">场内受累</span>
  607. <span>{{ mxztmap.cnslgzts }}</span>
  608. </div>
  609. </div>
  610. </div>
  611. <div class="situation-item">
  612. <div class="icon svg-icon svg-icon-orange">
  613. <svg-icon class="" svgid="svg-检修图标" />
  614. </div>
  615. <div class="info">
  616. <div class="title green">检修</div>
  617. <div class="value">
  618. <span class="text gray">检修停机</span>
  619. <span>{{ mxztmap.jxts }}</span>
  620. </div>
  621. <div class="value">
  622. <span class="text gray">场内受累</span>
  623. <span>{{ mxztmap.cnsljxts }}</span>
  624. </div>
  625. </div>
  626. </div>
  627. <div class="situation-item">
  628. <div class="icon svg-icon svg-icon-white">
  629. <svg-icon class="" svgid="svg-受累图标" />
  630. </div>
  631. <div class="info">
  632. <div class="title green">受累</div>
  633. <div class="value">
  634. <span class="text gray">电网</span>
  635. <span>{{ mxztmap.dwslts }}</span>
  636. </div>
  637. <div class="value">
  638. <span class="text gray">环境</span>
  639. <span>{{ mxztmap.hjslts }}</span>
  640. </div>
  641. </div>
  642. </div>
  643. <div class="situation-item">
  644. <div class="icon svg-icon svg-icon-gray">
  645. <svg-icon class="" svgid="svg-离线图标" />
  646. </div>
  647. <div class="info">
  648. <div class="title green">离线</div>
  649. <div class="value">
  650. <span class="text gray">离线</span>
  651. <span>{{ mxztmap.lxts }}</span>
  652. </div>
  653. <div class="value">
  654. <span class="text gray">未知</span>
  655. <span>---</span>
  656. </div>
  657. </div>
  658. </div>
  659. </row>
  660. </div>
  661. </panel-3>
  662. </Col>
  663. </Row>
  664. <el-dialog
  665. :title="dialogTitle"
  666. v-model="dialogShow"
  667. width="70%"
  668. top="10vh"
  669. custom-class="modal"
  670. :close-on-click-modal="true"
  671. @closed="dialogType = ''"
  672. >
  673. <Table :data="dialogData" v-if="dialogType === 'table'" />
  674. <MultipleLineChart
  675. height="500px"
  676. unit="(MW)"
  677. :list="powerLineChartData"
  678. :showLegend="true"
  679. v-if="dialogType === 'powerLineChart'"
  680. />
  681. <multiple-bar-chart
  682. height="500px"
  683. :units="doneLineChartData.units"
  684. :list="doneLineChartData.value"
  685. v-if="dialogType === 'doneLineChart'"
  686. />
  687. </el-dialog>
  688. </div>
  689. </template>
  690. <script>
  691. // @ is an alias to /src
  692. import Row from "../../components/coms/grid/row.vue";
  693. import Col from "../../components/coms/grid/col.vue";
  694. import ComPanel from "../../components/coms/panel/panel";
  695. // import ListBarChart from "../../components/chart/bar/list-bar-chart.vue";
  696. import ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
  697. import MultipleBarChart from "../../components/chart/bar/multiple-bar-chart.vue";
  698. import MultipleLineChart from "../../components/chart/line/double-line-chart.vue";
  699. import Panel3 from "../../components/coms/panel/panel3.vue";
  700. import SvgIcon from "../../components/coms/icon/svg-icon.vue";
  701. import CoulometricAnalysis from "./components/coulometric-analysis.vue";
  702. import Weather from "./components/weather.vue";
  703. import PowerReview from "./components/power-review.vue";
  704. import PowerPlan from "./components/power-plan.vue";
  705. import Map from "./components/map.vue";
  706. import ListBarChart2 from "../../components/chart/bar/list-bar-chart2.vue";
  707. import Table from "./dialog/table.vue";
  708. export default {
  709. name: "Home",
  710. components: {
  711. Row,
  712. Col,
  713. ComPanel,
  714. Weather,
  715. CoulometricAnalysis,
  716. // ListBarChart,
  717. PowerReview,
  718. ToolbarPanel,
  719. PowerPlan,
  720. MultipleBarChart,
  721. MultipleLineChart,
  722. Panel3,
  723. SvgIcon,
  724. Map,
  725. ListBarChart2,
  726. Table,
  727. },
  728. data() {
  729. return {
  730. timmer: null, // 计时器
  731. timmer2: null,
  732. timmer3: null,
  733. jczbmap: {},
  734. wxssmap: {},
  735. gxkmap: {},
  736. mxztmap: {},
  737. planData: {},
  738. powerData: {},
  739. tqmap: {},
  740. nowTime: "",
  741. planBtnName: "全部",
  742. powerLineChartData: {
  743. // 图表所用单位
  744. units: [""],
  745. value: [
  746. {
  747. title: "",
  748. yAxisIndex: 0, // 使用单位
  749. value: [],
  750. },
  751. ],
  752. },
  753. doneLineChartData: {
  754. // 图表所用单位
  755. units: [""],
  756. value: [
  757. {
  758. title: "",
  759. yAxisIndex: 0, // 使用单位
  760. value: [],
  761. },
  762. ],
  763. },
  764. dialogType: null,
  765. wpId: "0",
  766. fcmap: {},
  767. xtmap: {},
  768. dialogShow: false,
  769. dialogTitle: "",
  770. dialogData: {},
  771. // 预测电量
  772. ForecastPower: [],
  773. // 日发电量
  774. DayPower: {
  775. // 图表所用单位
  776. units: [""],
  777. value: [
  778. {
  779. title: "",
  780. yAxisIndex: 0, // 使用单位
  781. value: [],
  782. },
  783. ],
  784. },
  785. // 72小时功率趋势图
  786. Powertrend: [
  787. {
  788. title: "",
  789. yAxisIndex: 0, // 使用单位
  790. value: [],
  791. },
  792. ],
  793. };
  794. },
  795. methods: {
  796. // 请求服务
  797. requestData(showLoading) {
  798. let that = this;
  799. that.API.requestData({
  800. showLoading,
  801. method: "POST",
  802. subUrl: "genreset/findBasicDataInfo",
  803. timeout: 60000,
  804. data: {
  805. id: that.wpId,
  806. },
  807. success(res) {
  808. that.powerData = [
  809. {
  810. title: "风速",
  811. value: res.data.jczbmap.ssfs,
  812. dialogTitle: "风速详情",
  813. subUrl: "genreset/findGLDetail",
  814. targetName: "ssfs",
  815. dialogType: "powerLineChart",
  816. max: 30,
  817. },
  818. {
  819. title: "保证功率",
  820. value: res.data.jczbmap.bzgl,
  821. dialogTitle: "保证功率详情",
  822. subUrl: "genreset/findGLDetail",
  823. targetName: "bzgl",
  824. dialogType: "powerLineChart",
  825. max: res.data.jczbmap.zjts,
  826. },
  827. {
  828. title: "应发功率",
  829. value: res.data.jczbmap.yfgl,
  830. dialogTitle: "应发功率详情",
  831. subUrl: "genreset/findGLDetail",
  832. targetName: "yfgl",
  833. dialogType: "powerLineChart",
  834. max: res.data.jczbmap.zjts,
  835. },
  836. {
  837. title: "实际功率",
  838. value: res.data.jczbmap.sjgl,
  839. dialogTitle: "实际功率详情",
  840. subUrl: "genreset/findGLDetail",
  841. targetName: "sjgl",
  842. dialogType: "powerLineChart",
  843. max: res.data.jczbmap.zjts,
  844. },
  845. ];
  846. that.jczbmap = res.data.jczbmap;
  847. that.wxssmap = res.data.wxssmap;
  848. that.gxkmap = res.data.gxkmap;
  849. that.mxztmap = res.data.mxztmap;
  850. that.fcmap = res.data.fcmap;
  851. that.xtmap = res.data.xtmap;
  852. that.tqmap = res.data.tqmap;
  853. that.ForecastPower = [
  854. {
  855. name: "当日预测电量",
  856. value: res.data.jczbmap.rycfdl,
  857. total: res.data.jczbmap.rfdlsx,
  858. },
  859. {
  860. name: "实际发电量",
  861. value: res.data.jczbmap.rfdl,
  862. total: res.data.jczbmap.rfdlsx,
  863. },
  864. {
  865. name: "当月预测电量",
  866. value: res.data.jczbmap.yycfdl,
  867. total: res.data.jczbmap.yfdlsx,
  868. },
  869. {
  870. name: "实际发电量",
  871. value: res.data.jczbmap.yfdl,
  872. total: res.data.jczbmap.yfdlsx,
  873. },
  874. ];
  875. that.planData = {
  876. yfdl: res.data.jczbmap.yfdl,
  877. nfdl: res.data.jczbmap.nfdl,
  878. yfdljh: res.data.gxkmap.yfdljh,
  879. nfdljh: res.data.gxkmap.nfdljh,
  880. ywcl: res.data.gxkmap.ywcl,
  881. nwcl: res.data.gxkmap.nwcl,
  882. };
  883. },
  884. });
  885. },
  886. getCharts() {
  887. let that = this;
  888. that.API.requestData({
  889. method: "POST",
  890. subUrl: "genreset/findPowerInfo",
  891. timeout: 60000,
  892. data: {
  893. id: that.wpId,
  894. },
  895. success(res) {
  896. let rdlKey = ["value1", "value2", "value3", "speed"];
  897. let DayPower = {
  898. // 图表所用单位
  899. units: ["(万kWh)", "(m/s)"],
  900. value: [
  901. {
  902. title: "发电量",
  903. yAxisIndex: 0,
  904. value: [],
  905. },
  906. {
  907. title: "上网电量",
  908. yAxisIndex: 0,
  909. value: [],
  910. },
  911. {
  912. title: "购网电量",
  913. yAxisIndex: 0,
  914. value: [],
  915. },
  916. {
  917. title: "实时风速",
  918. yAxisIndex: 1,
  919. value: [],
  920. },
  921. ],
  922. };
  923. let glKey = [
  924. "value1",
  925. "value2",
  926. "value3",
  927. "value4",
  928. "value5",
  929. "value6",
  930. "value7",
  931. ];
  932. let Powertrend = [
  933. {
  934. title: "应发功率",
  935. smooth: true,
  936. value: [],
  937. },
  938. {
  939. title: "实发功率",
  940. smooth: true,
  941. value: [],
  942. },
  943. {
  944. title: "理论功率",
  945. smooth: true,
  946. value: [],
  947. },
  948. {
  949. title: "4小时预测功率",
  950. smooth: true,
  951. value: [],
  952. },
  953. {
  954. title: "保证功率",
  955. smooth: true,
  956. value: [],
  957. },
  958. {
  959. title: "平均风速",
  960. smooth: true,
  961. value: [],
  962. },
  963. {
  964. title: "24小时预测功率",
  965. smooth: true,
  966. value: [],
  967. },
  968. ];
  969. rdlKey.forEach((keyEle, keyIndex) => {
  970. res.data.rdlvos.forEach((cEle) => {
  971. DayPower.value[keyIndex].value.push({
  972. text: cEle.timestr,
  973. value: cEle[keyEle],
  974. });
  975. });
  976. });
  977. glKey.forEach((keyEle, keyIndex) => {
  978. res.data.glvos.forEach((cEle) => {
  979. Powertrend[keyIndex].value.push({
  980. text: new Date(cEle.time).formatDate("hh:mm"),
  981. value: cEle[keyEle],
  982. });
  983. });
  984. });
  985. that.DayPower = DayPower;
  986. that.Powertrend = Powertrend;
  987. },
  988. });
  989. },
  990. // 点击地图展示类型
  991. changeShowType(wpId, planBtnName) {
  992. this.planBtnName = planBtnName;
  993. this.jczbmap = {};
  994. clearInterval(this.timmer);
  995. this.timmer = null;
  996. this.wpId = wpId;
  997. this.requestData(false);
  998. this.timmer = setInterval(() => {
  999. this.requestData(false);
  1000. }, this.$store.state.websocketTimeSec);
  1001. },
  1002. // 打开弹窗
  1003. openDialog(dialogTitle, subUrl, targetName, dialogType) {
  1004. this.dialogTitle = dialogTitle;
  1005. let that = this;
  1006. that.API.requestData({
  1007. method: "POST",
  1008. subUrl,
  1009. data: {
  1010. id: that.wpId,
  1011. targetName,
  1012. },
  1013. success(res) {
  1014. that.dialogShow = true;
  1015. that.dialogData = res.data;
  1016. that.dialogType = dialogType;
  1017. },
  1018. });
  1019. },
  1020. // 显示功率复核图表
  1021. showPowerChart(res) {
  1022. this.dialogTitle = res.dialogTitle;
  1023. this.dialogType = res.dialogType;
  1024. this.powerLineChartData = res.data;
  1025. this.dialogShow = true;
  1026. },
  1027. // 显示计划电量完成情况图表
  1028. showDoneChart(res) {
  1029. this.dialogTitle = res.dialogTitle;
  1030. this.dialogType = res.dialogType;
  1031. this.doneLineChartData = res.data;
  1032. this.dialogShow = true;
  1033. },
  1034. // 地图进入事件
  1035. onEnter() {
  1036. this.powerplanShowSingle = true;
  1037. },
  1038. // 地图退出事件
  1039. onBack() {
  1040. this.powerplanShowSingle = false;
  1041. },
  1042. },
  1043. created() {
  1044. let that = this;
  1045. that.nowTime = new Date().formatDate("hh:mm:ss");
  1046. that.$nextTick(() => {
  1047. that.requestData(false);
  1048. this.getCharts();
  1049. that.timmer = setInterval(() => {
  1050. that.requestData(false);
  1051. }, that.$store.state.websocketTimeSec);
  1052. that.timmer2 = setInterval(() => {
  1053. that.nowTime = new Date().formatDate("hh:mm:ss");
  1054. }, 1000);
  1055. that.timmer3 = setInterval(() => {
  1056. this.getCharts();
  1057. }, 360000);
  1058. });
  1059. },
  1060. unmounted() {
  1061. clearInterval(this.timmer);
  1062. clearInterval(this.timmer2);
  1063. clearInterval(this.timmer3);
  1064. this.timmer = null;
  1065. this.timmer2 = null;
  1066. this.timmer3 = null;
  1067. },
  1068. };
  1069. </script>
  1070. <style lang="less">
  1071. .home {
  1072. .grid-content {
  1073. background: #333;
  1074. height: 1.111vh;
  1075. }
  1076. .table-card-panel {
  1077. .col + .col {
  1078. margin-left: 8px;
  1079. }
  1080. }
  1081. .table-card {
  1082. background: rgba(255, 255, 255, 0.1);
  1083. border-collapse: collapse;
  1084. width: 100%;
  1085. outline: 1px solid @gray;
  1086. .curP {
  1087. cursor: pointer;
  1088. }
  1089. tr {
  1090. font-size: 12px;
  1091. td {
  1092. border: 0.093vh solid fade(@gray, 20);
  1093. line-height: 27px;
  1094. padding: 0 4px;
  1095. &.text {
  1096. }
  1097. &.value {
  1098. text-align: right;
  1099. font-family: @font-family-num;
  1100. }
  1101. &.unit {
  1102. }
  1103. }
  1104. }
  1105. }
  1106. .tools {
  1107. display: flex;
  1108. .tool-block {
  1109. display: flex;
  1110. align-items: center;
  1111. margin-left: 0.741vh;
  1112. .legend {
  1113. flex: auto;
  1114. width: 6px;
  1115. height: 6px;
  1116. margin-right: 0.741vh;
  1117. &.long {
  1118. width: 2.963vh;
  1119. height: 0.37vh;
  1120. }
  1121. }
  1122. .legend-text {
  1123. color: #ffffff4d;
  1124. }
  1125. }
  1126. }
  1127. .situation {
  1128. width: 100%;
  1129. height: 100%;
  1130. .situation-body {
  1131. display: flex;
  1132. flex-direction: column;
  1133. justify-content: space-around;
  1134. height: 100%;
  1135. .situation-item {
  1136. display: flex;
  1137. align-content: center;
  1138. flex: 1 1 25%;
  1139. align-items: center;
  1140. .icon {
  1141. svg {
  1142. width: 40px;
  1143. height: 40px;
  1144. }
  1145. }
  1146. &.fengji {
  1147. flex: 0 1 25%;
  1148. .info {
  1149. margin-left: 16px;
  1150. .value {
  1151. font-size: 24px;
  1152. }
  1153. }
  1154. }
  1155. .fengji-icon {
  1156. padding: 12px;
  1157. border-radius: 50%;
  1158. box-shadow: inset 1.5px -1px 1px 0px @green;
  1159. svg {
  1160. width: 24px;
  1161. height: 24px;
  1162. }
  1163. }
  1164. .info {
  1165. display: flex;
  1166. flex-direction: column;
  1167. justify-content: center;
  1168. margin-left: 0.741vh;
  1169. .title {
  1170. font-size: 12px;
  1171. font-weight: bold;
  1172. margin-bottom: 0.7407vh;
  1173. }
  1174. .text {
  1175. display: inline-block;
  1176. width: 64px;
  1177. text-align: left;
  1178. }
  1179. .value {
  1180. text-align: right;
  1181. font-size: 12px;
  1182. }
  1183. }
  1184. }
  1185. }
  1186. }
  1187. .com-panel {
  1188. height: 100%;
  1189. .panel-body {
  1190. height: calc(100% - 32px);
  1191. }
  1192. }
  1193. .top-left-panel {
  1194. display: flex;
  1195. flex-direction: column;
  1196. justify-content: space-between;
  1197. flex: 0 0 380px;
  1198. .row {
  1199. flex: 0 0 auto;
  1200. }
  1201. .plan {
  1202. flex: 0 0 auto;
  1203. .com-panel {
  1204. height: 100%;
  1205. .panel-body {
  1206. height: calc(100% - 32px);
  1207. }
  1208. }
  1209. }
  1210. }
  1211. .top-mid-panel {
  1212. flex: 1 1 auto;
  1213. }
  1214. .top-right-panel {
  1215. display: flex;
  1216. flex-direction: column;
  1217. justify-content: space-between;
  1218. flex: 0 0 380px;
  1219. }
  1220. }
  1221. </style>