Home.vue 38 KB

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