Home.vue 32 KB

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