PerformanceList.vue 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270
  1. <template>
  2. <el-container>
  3. <el-header>
  4. <el-row>
  5. <el-col :span="24">
  6. <el-card style="height: 30px">
  7. <div class="grid-content bg-purple-dark">
  8. <span>电量绩效榜</span>
  9. </div>
  10. </el-card>
  11. </el-col>
  12. </el-row>
  13. </el-header>
  14. <el-main>
  15. <el-card>
  16. <el-form :inline="true" class="demo-form-inline">
  17. <el-row :gutter="1">
  18. <el-form-item label="风场">
  19. <el-select v-model="fc" clearable placeholder="请选择" @change="query_xml()">
  20. <el-option
  21. v-for="item in wpIdslist"
  22. :key="item.id"
  23. :label="item.name"
  24. :value="item.id"
  25. >
  26. </el-option>
  27. </el-select>
  28. </el-form-item>
  29. <el-form-item label="项目">
  30. <el-select v-model="pj" clearable placeholder="请选择" @change="query_xl()">
  31. <el-option
  32. v-for="item in projectlist"
  33. :key="item.id"
  34. :label="item.name"
  35. :value="item.id"
  36. >
  37. </el-option>
  38. </el-select>
  39. </el-form-item>
  40. <el-form-item label="线路">
  41. <el-select v-model="xl" clearable placeholder="请选择">
  42. <el-option
  43. v-for="item in linelist"
  44. :key="item.id"
  45. :label="item.name"
  46. :value="item.id"
  47. >
  48. </el-option>
  49. </el-select>
  50. </el-form-item>
  51. <el-form-item label="开始时间">
  52. <el-date-picker
  53. v-model="beginDate"
  54. type="date"
  55. placeholder="选择日期"
  56. >
  57. </el-date-picker>
  58. </el-form-item>
  59. <el-form-item label="结束时间">
  60. <el-date-picker
  61. v-model="endDate"
  62. type="date"
  63. placeholder="选择日期"
  64. >
  65. </el-date-picker>
  66. </el-form-item>
  67. <el-form-item>
  68. <el-button type="primary" @click="queryPowerAll" :plain="true"
  69. >查询</el-button
  70. >
  71. </el-form-item>
  72. <el-form-item>
  73. <el-button type="primary" @click="queryApDataMx"
  74. >明细信息</el-button
  75. >
  76. </el-form-item>
  77. <el-form-item>
  78. <el-button type="primary" @click="toExcel">导出</el-button>
  79. </el-form-item>
  80. </el-row>
  81. </el-form>
  82. <el-tabs
  83. v-model="activeName"
  84. type="card"
  85. @tab-click="handleClick"
  86. style="height: 100%; width: 100%"
  87. >
  88. <el-tab-pane label="风场" name="first" id="fc">
  89. <el-row
  90. style="
  91. width: 100%;
  92. height: 100%;
  93. display: flex;
  94. justify-content: space-between;
  95. "
  96. >
  97. <el-card
  98. shadow="always"
  99. ref="fc_zzt_card"
  100. :style="styleObject_fc"
  101. style="
  102. width: 45%;
  103. display: table-cell;
  104. vertical-align: middle;
  105. "
  106. >
  107. <div
  108. id="histogram_fc"
  109. ref="fc_zzt"
  110. style="width: 800px"
  111. ></div>
  112. </el-card>
  113. <el-card
  114. shadow="always"
  115. style="width: 48%"
  116. :style="styleObject_fc"
  117. id="moban"
  118. >
  119. <el-table
  120. id="fc_table"
  121. :data="fc_date"
  122. style="width: 100%; font-size: 1px"
  123. :max-height="tableHeight"
  124. >
  125. <el-table-column label="项目列表">
  126. <el-table-column fixed type="index" width="40">
  127. </el-table-column>
  128. <el-table-column
  129. prop="wtName"
  130. sortable
  131. label="名称"
  132. width="103"
  133. >
  134. </el-table-column>
  135. <el-table-column
  136. sortable
  137. :formatter="filter_total"
  138. prop="total"
  139. label="理论发电"
  140. width="83"
  141. >
  142. </el-table-column>
  143. <el-table-column
  144. sortable
  145. :formatter="filter_daydl2"
  146. prop="daydl2"
  147. label="SCADA"
  148. width="81"
  149. >
  150. </el-table-column>
  151. <el-table-column
  152. sortable
  153. :formatter="filter_dayspeed"
  154. prop="dayspeed"
  155. label="风速"
  156. width="63"
  157. >
  158. </el-table-column>
  159. <el-table-column
  160. sortable
  161. :formatter="filter_daynhgzssdl"
  162. prop="daynhgzssdl"
  163. label="非计划检修"
  164. width="103"
  165. >
  166. </el-table-column>
  167. <el-table-column
  168. sortable
  169. :formatter="filter_daynhwhssdl"
  170. prop="daynhwhssdl"
  171. label="计划检修"
  172. width="85"
  173. >
  174. </el-table-column>
  175. <el-table-column
  176. sortable
  177. :formatter="filter_daynhcfdl"
  178. prop="daynhcfdl"
  179. label="受累"
  180. width="75"
  181. >
  182. </el-table-column>
  183. <el-table-column
  184. sortable
  185. :formatter="filter_daynhxdssdl"
  186. prop="daynhxdssdl"
  187. label="限电"
  188. width="63"
  189. >
  190. </el-table-column>
  191. <el-table-column
  192. sortable
  193. :formatter="filter_daynhxdssdl"
  194. prop="daynhxdssdl"
  195. label="性能"
  196. width="63"
  197. >
  198. </el-table-column>
  199. <el-table-column
  200. sortable
  201. :formatter="filter_lyl"
  202. prop="lyl"
  203. label="利用率%"
  204. width="90"
  205. >
  206. </el-table-column>
  207. </el-table-column>
  208. </el-table>
  209. </el-card>
  210. </el-row>
  211. </el-tab-pane>
  212. <el-tab-pane label="项目" name="second" id="xm">
  213. <el-row
  214. style="
  215. width: 100%;
  216. height: 100%;
  217. display: flex;
  218. justify-content: space-between;
  219. "
  220. >
  221. <el-card
  222. shadow="always"
  223. :style="styleObject_pj"
  224. style="
  225. width: 48%;
  226. display: table-cell;
  227. vertical-align: middle;
  228. "
  229. >
  230. <div
  231. id="histogram_xm"
  232. style="width: 800px; height: 400px; margin: auto"
  233. ></div>
  234. </el-card>
  235. <el-card
  236. shadow="always"
  237. :style="styleObject_pj"
  238. style="width: 48%"
  239. id="moban"
  240. >
  241. <el-table
  242. id="pj_table"
  243. :data="pj_date"
  244. style="width: 100%; font-size: 1px"
  245. :max-height="tableHeight"
  246. >
  247. <el-table-column label="项目列表">
  248. <el-table-column fixed type="index" width="40">
  249. </el-table-column>
  250. <el-table-column
  251. prop="wtName"
  252. sortable
  253. label="名称"
  254. width="103"
  255. >
  256. </el-table-column>
  257. <el-table-column
  258. sortable
  259. :formatter="filter_total"
  260. prop="total"
  261. label="理论发电"
  262. width="83"
  263. >
  264. </el-table-column>
  265. <el-table-column
  266. sortable
  267. :formatter="filter_daydl2"
  268. prop="daydl2"
  269. label="SCADA"
  270. width="81"
  271. >
  272. </el-table-column>
  273. <el-table-column
  274. sortable
  275. :formatter="filter_dayspeed"
  276. prop="dayspeed"
  277. label="风速"
  278. width="63"
  279. >
  280. </el-table-column>
  281. <el-table-column
  282. sortable
  283. :formatter="filter_daynhgzssdl"
  284. prop="daynhgzssdl"
  285. label="非计划检修"
  286. width="103"
  287. >
  288. </el-table-column>
  289. <el-table-column
  290. sortable
  291. :formatter="filter_daynhwhssdl"
  292. prop="daynhwhssdl"
  293. label="计划检修"
  294. width="85"
  295. >
  296. </el-table-column>
  297. <el-table-column
  298. sortable
  299. :formatter="filter_daynhcfdl"
  300. prop="daynhcfdl"
  301. label="受累"
  302. width="75"
  303. >
  304. </el-table-column>
  305. <el-table-column
  306. sortable
  307. :formatter="filter_daynhxdssdl"
  308. prop="daynhxdssdl"
  309. label="限电"
  310. width="63"
  311. >
  312. </el-table-column>
  313. <el-table-column
  314. sortable
  315. :formatter="filter_daynhxdssdl"
  316. prop="daynhxdssdl"
  317. label="性能"
  318. width="63"
  319. >
  320. </el-table-column>
  321. <el-table-column
  322. sortable
  323. :formatter="filter_lyl"
  324. prop="lyl"
  325. label="利用率%"
  326. width="90"
  327. >
  328. </el-table-column>
  329. </el-table-column>
  330. </el-table>
  331. </el-card>
  332. </el-row>
  333. </el-tab-pane>
  334. <el-tab-pane label="集电线路" name="jdxl" id="jdxl">
  335. <el-row
  336. style="
  337. width: 100%;
  338. height: 100%;
  339. display: flex;
  340. justify-content: space-between;
  341. "
  342. >
  343. <el-card
  344. shadow="always"
  345. :style="styleObject_xl"
  346. style="width: 48%; display: table-cell; vertical-align: middle"
  347. >
  348. <div
  349. id="histogram_jdxl"
  350. style="width: 800px; margin: auto"
  351. ></div>
  352. </el-card>
  353. <el-card
  354. shadow="always"
  355. style="width: 48%"
  356. :style="styleObject_xl"
  357. id="moban"
  358. >
  359. <el-table
  360. id="xl_table"
  361. :data="xl_date"
  362. style="width: 100%; font-size: 1px"
  363. :max-height="tableHeight"
  364. >
  365. <el-table-column label="项目列表">
  366. <el-table-column fixed type="index" width="40">
  367. </el-table-column>
  368. <el-table-column
  369. prop="wtName"
  370. sortable
  371. label="名称"
  372. width="103"
  373. >
  374. </el-table-column>
  375. <el-table-column
  376. sortable
  377. :formatter="filter_total"
  378. prop="total"
  379. label="理论发电"
  380. width="83"
  381. >
  382. </el-table-column>
  383. <el-table-column
  384. sortable
  385. :formatter="filter_daydl2"
  386. prop="daydl2"
  387. label="SCADA"
  388. width="81"
  389. >
  390. </el-table-column>
  391. <el-table-column
  392. sortable
  393. :formatter="filter_dayspeed"
  394. prop="dayspeed"
  395. label="风速"
  396. width="63"
  397. >
  398. </el-table-column>
  399. <el-table-column
  400. sortable
  401. :formatter="filter_daynhgzssdl"
  402. prop="daynhgzssdl"
  403. label="非计划检修"
  404. width="103"
  405. >
  406. </el-table-column>
  407. <el-table-column
  408. sortable
  409. :formatter="filter_daynhwhssdl"
  410. prop="daynhwhssdl"
  411. label="计划检修"
  412. width="85"
  413. >
  414. </el-table-column>
  415. <el-table-column
  416. sortable
  417. :formatter="filter_daynhcfdl"
  418. prop="daynhcfdl"
  419. label="受累"
  420. width="75"
  421. >
  422. </el-table-column>
  423. <el-table-column
  424. sortable
  425. :formatter="filter_daynhxdssdl"
  426. prop="daynhxdssdl"
  427. label="限电"
  428. width="63"
  429. >
  430. </el-table-column>
  431. <el-table-column
  432. sortable
  433. :formatter="filter_daynhxdssdl"
  434. prop="daynhxdssdl"
  435. label="性能"
  436. width="63"
  437. >
  438. </el-table-column>
  439. <el-table-column
  440. sortable
  441. :formatter="filter_lyl"
  442. prop="lyl"
  443. label="利用率%"
  444. width="90"
  445. >
  446. </el-table-column>
  447. </el-table-column>
  448. </el-table>
  449. </el-card>
  450. </el-row>
  451. </el-tab-pane>
  452. </el-tabs>
  453. </el-card>
  454. </el-main>
  455. </el-container>
  456. </template>
  457. <script>
  458. import * as echarts from "echarts";
  459. import excelHelper from "@/utils/excelHelper";
  460. export default {
  461. data() {
  462. return {
  463. len:10,
  464. fc:"",
  465. pj:"",
  466. xl:"",
  467. gridData: [],
  468. autoHeight_fc: 400,
  469. autoHeight_pj: 800,
  470. autoHeight_xl: 1200,
  471. wpIdslist: {
  472. name:"",
  473. id:"",
  474. },
  475. projectlist:{
  476. name:"",
  477. id:"",
  478. },
  479. linelist:{
  480. name:"",
  481. id:"",
  482. },
  483. fc_date: [],
  484. pj_date: [],
  485. xl_date: [],
  486. beginDate: "2021-01-01",
  487. endDate: "2021-01-02",
  488. activeName: "first",
  489. tableid: "fc",
  490. celname: [],
  491. histogram_fc: {},
  492. histogram_xm: {},
  493. histogram_jdxl: {},
  494. table_fc: {},
  495. table_xm: {},
  496. table_jdxl: {},
  497. queryAll_querybutton: {},
  498. styleObject_fc: {
  499. height: '460px'
  500. },
  501. styleObject_pj: {
  502. height: '860px'
  503. },
  504. styleObject_xl: {
  505. height: '1220px'
  506. }
  507. };
  508. },
  509. methods: {
  510. onSubmit() {},
  511. query_wpid() {
  512. this.$http.get("powercompare/windfarmAjax?").then((res) => {
  513. this.wpIdslist = res.data.data;
  514. });
  515. },
  516. query_xml(){
  517. this.pj = "";
  518. this.xl = "";
  519. this.$http.get("powercompare/projectAjax?wpIds=" + this.fc).then((res) => {
  520. this.projectlist = res.data.data;
  521. });
  522. },
  523. query_xl(){
  524. this.xl = "";
  525. this.$http.get("powercompare/lineAjax?pjIds=" + this.pj).then((res) => {
  526. this.linelist = res.data.data;
  527. });
  528. },
  529. query_lyl(queryAll_table) {
  530. Object.assign(this.$data.gridData, this.$options.data().gridData);
  531. queryAll_table.splice(-1, 1);
  532. this.gridData = queryAll_table;
  533. },
  534. handleClick(tab) {
  535. if (tab.name === "first") {
  536. this.tableid = "fc";
  537. this.query();
  538. } else if (tab.name === "second") {
  539. this.tableid = "pj";
  540. this.query();
  541. } else if (tab.name === "jdxl") {
  542. this.tableid = "xl";
  543. this.query();
  544. }
  545. },
  546. deleteRow(index, rows) {
  547. rows.splice(index, 1);
  548. },
  549. query() {
  550. Object.assign(this.$data.autoHeight_fc, this.$options.data().autoHeight_fc);
  551. Object.assign(this.$data.styleObject_fc, this.$options.data().styleObject_fc);
  552. Object.assign(this.$data.autoHeight_pj, this.$options.data().autoHeight_pj);
  553. Object.assign(this.$data.styleObject_pj, this.$options.data().styleObject_pj);
  554. Object.assign(this.$data.autoHeight_xl, this.$options.data().autoHeight_xl);
  555. Object.assign(this.$data.styleObject_xl, this.$options.data().styleObject_xl);
  556. this.styleObject_fc.height = '460px';
  557. this.autoHeight_fc = '400px';
  558. this.styleObject_pj.height = '860px';
  559. this.autoHeight_pj = '800px';
  560. this.styleObject_xl.height = '1260px';
  561. this.autoHeight_xl = '1200px';
  562. this.fc_date = "";
  563. this.xl_date = "";
  564. this.pj_date = "";
  565. this.$http
  566. .get(
  567. "powercompare/queryPowerAll?wpIds=" +
  568. this.fc +
  569. "&beginDate=" +
  570. this.beginDate +
  571. "&endDate=" +
  572. this.endDate +
  573. "&queryType=" +
  574. this.tableid
  575. )
  576. .then((res) => {
  577. let that = this;
  578. if (this.tableid === "fc") {
  579. that.drawhistogram_fc(res.data.data);
  580. } else if (this.tableid === "pj") {
  581. that.drawhistogram_pj(res.data.data);
  582. } else if (this.tableid === "xl") {
  583. that.drawhistogram_xl(res.data.data);
  584. }
  585. });
  586. //表格数据获取
  587. this.$http
  588. .get(
  589. "powercompare/powerAjaxAll?wpIds=" +
  590. this.fc +
  591. "&beginDate=" +
  592. this.beginDate +
  593. "&endDate=" +
  594. this.endDate +
  595. "&queryType=" +
  596. this.tableid +
  597. "&sortName=" +
  598. this.fc +
  599. "&sortOrder=" +
  600. "Asc"
  601. )
  602. .then((res) => {
  603. let that = this;
  604. let queryAll_table = res.data.data;
  605. this.query_lyl(queryAll_table);
  606. if (this.tableid === "fc") {
  607. that.fc_date = queryAll_table;
  608. } else if (this.tableid === "pj") {
  609. that.pj_date = queryAll_table;
  610. } else if (this.tableid === "xl") {
  611. that.xl_date = queryAll_table;
  612. }
  613. });
  614. },
  615. async queryPowerAll() {
  616. Object.assign(this.$data.autoHeight_fc, this.$options.data().autoHeight_fc);
  617. Object.assign(this.$data.styleObject_fc, this.$options.data().styleObject_fc);
  618. let that = this;
  619. if (
  620. this.beginDate == "" ||
  621. this.endDate == "" ||
  622. this.beginDate == undefined ||
  623. this.endDate == undefined
  624. ) {
  625. this.beginDate = "2021-01-01";
  626. that.endDate = "2021-01-02";
  627. that.$message.error("请选时间!");
  628. return;
  629. }
  630. this.fc_date = "";
  631. this.xl_date = "";
  632. this.pj_date = "";
  633. if (
  634. that.fc == "" ||
  635. that.fc == null ||
  636. that.fc == undefined
  637. ) {
  638. that.query();
  639. } else {
  640. this.$http
  641. .get(
  642. "powercompare/queryPower?wpIds=" +
  643. this.fc +
  644. "&pjIds=" +
  645. this.pj +
  646. "&lineIds=" +
  647. this.xl +
  648. "&beginDate=" +
  649. this.beginDate +
  650. "&endDate=" +
  651. this.endDate
  652. )
  653. .then((res) => {
  654. let that = this;
  655. let queryAll = res.data.data;
  656. this.len = Object.keys(queryAll.names).length;
  657. if(this.len <= 10){that.autoHeight_fc = 575; that.styleObject_fc.height = '700px' }
  658. else if(this.len > 10 && this.len <=20){that.autoHeight_fc = 775; that.styleObject_fc.height = '800px';that.autoHeight_pj = 775; that.styleObject_pj.height = '800px';that.autoHeight_xl = 775; that.styleObject_xl.height = '800px' }
  659. else if(this.len > 20 && this.len <=30){that.autoHeight_fc = 975; that.styleObject_fc.height = '1000px';that.autoHeight_pj = 975; that.styleObject_pj.height = '1000px';that.autoHeight_xl = 975; that.styleObject_xl.height = '1000px' }
  660. else if(this.len > 30 && this.len <=40){that.autoHeight_fc = 1175; that.styleObject_fc.height = '1200px';that.autoHeight_pj = 1175; that.styleObject_pj.height = '1200px';that.autoHeight_xl = 1175; that.styleObject_xl.height = '1200px' }
  661. else if(this.len > 40 && this.len <=50){that.autoHeight_fc = 1375; that.styleObject_fc.height = '1400px';that.autoHeight_pj = 1375; that.styleObject_pj.height = '1400px';that.autoHeight_xl = 1375; that.styleObject_xl.height = '1400px' }
  662. else if(this.len > 50 && this.len <=60){that.autoHeight_fc = 1575; that.styleObject_fc.height = '1600px';that.autoHeight_pj = 1575; that.styleObject_pj.height = '1600px';that.autoHeight_xl = 1575; that.styleObject_xl.height = '1600px' }
  663. else if(this.len > 60 && this.len <=70){that.autoHeight_fc = 1775; that.styleObject_fc.height = '1800px';that.autoHeight_pj = 1775; that.styleObject_pj.height = '1800px';that.autoHeight_xl = 1775; that.styleObject_xl.height = '1800px' }
  664. else if(this.len > 70 && this.len <=80){that.autoHeight_fc = 1975; that.styleObject_fc.height = '2000px';that.autoHeight_pj = 1975; that.styleObject_pj.height = '2000px';that.autoHeight_xl = 1975; that.styleObject_xl.height = '2000px' }
  665. else{that.autoHeight_fc = 2175; that.styleObject_fc.height = '2200px';that.autoHeight_pj = 2175; that.styleObject_pj.height = '2200px';that.autoHeight_xl = 2175; that.styleObject_xl.height = '2200px' }
  666. if (this.tableid === "fc") {
  667. that.drawhistogram_fc(queryAll);
  668. } else if (this.tableid === "pj") {
  669. that.drawhistogram_pj(queryAll);
  670. } else if (this.tableid === "xl") {
  671. that.drawhistogram_xl(queryAll);
  672. }
  673. });
  674. this.$http
  675. .get(
  676. "powercompare/powerAjax?wpIds=" +
  677. this.fc +
  678. "&pjIds=" +
  679. this.pj +
  680. "&lineIds=" +
  681. this.xl +
  682. "&beginDate=" +
  683. this.beginDate +
  684. "&endDate=" +
  685. this.endDate +
  686. "&sortName=" +
  687. this.fc +
  688. "&sortOrder=" +
  689. "Asc"
  690. )
  691. .then((res) => {
  692. let that = this;
  693. let queryAll_table = res.data.data;
  694. if (this.tableid === "fc") {
  695. that.fc_date = queryAll_table;
  696. } else if (this.tableid === "pj") {
  697. that.pj_date = queryAll_table;
  698. } else if (this.tableid === "xl") {
  699. that.xl_date = queryAll_table;
  700. }
  701. });
  702. }
  703. },
  704. checkwindfarm() {
  705. if (this.fc == "") {
  706. this.$message.error("请选择风场!");
  707. return;
  708. }
  709. },
  710. checkproject() {
  711. if (this.fc == "") {
  712. this.$message.error("请选择项目!");
  713. return;
  714. }
  715. if (new Date(this.timedate) == null) {
  716. this.$message.error("请选择时间");
  717. return;
  718. }
  719. },
  720. checktime() {
  721. if (new Date(this.timedate) == null) {
  722. this.$message.error("请选择时间");
  723. return;
  724. }
  725. },
  726. queryApDataMx() {
  727. this.$router.push({ path: "/new_performanceList_fan" });
  728. },
  729. filter_total(cellValue) {
  730. return parseFloat(cellValue.total).toFixed(2);
  731. },
  732. filter_daydl2(cellValue) {
  733. return parseFloat(cellValue.daydl2).toFixed(2);
  734. },
  735. filter_dayspeed(cellValue) {
  736. return parseFloat(cellValue.dayspeed).toFixed(2);
  737. },
  738. filter_daynhwhssdl(cellValue) {
  739. return parseFloat(cellValue.daynhwhssdl).toFixed(2);
  740. },
  741. filter_daynhcfdl(cellValue) {
  742. return parseFloat(cellValue.daynhcfdl).toFixed(2);
  743. },
  744. filter_daynhxdssdl(cellValue) {
  745. return parseFloat(cellValue.daynhxdssdl).toFixed(2);
  746. },
  747. filter_lyl(cellValue) {
  748. return parseFloat(cellValue.lyl).toFixed(2);
  749. },
  750. filter_daynhgzssdl(cellValue) {
  751. return parseFloat(cellValue.daynhgzssdl).toFixed(2);
  752. },
  753. toExcel() {
  754. let that = this;
  755. if (this.tableid === "fc") {
  756. excelHelper.exportExcel("fc_table", "fc数据", ".xls", true);
  757. } else if (this.tableid === "pj") {
  758. excelHelper.exportExcel("pj_table", "pj数据", ".xls", true);
  759. } else if (this.tableid === "xl") {
  760. excelHelper.exportExcel("xl_table", "xl数据", ".xls", true);
  761. }
  762. },
  763. drawhistogram_fc(date) {
  764. this.chartLine = echarts.init(document.getElementById("histogram_fc"));
  765. this.chartLine.clear();
  766. this.chartLine.resize({ height: this.autoHeight_fc });
  767. var option;
  768. option = {
  769. color: [
  770. "#64E572",
  771. "#24CBE5",
  772. "#DDDF00",
  773. "#ED561B",
  774. "#50B432",
  775. "#058DC7",
  776. ],
  777. title: {
  778. text: "风机绩效榜单",
  779. left: 300,
  780. top: -5,
  781. textStyle: {
  782. fontSize: 13,
  783. },
  784. },
  785. tooltip: {
  786. trigger: "axis",
  787. axisPointer: {
  788. // Use axis to trigger tooltip
  789. type: "shadow", // 'shadow' as default; can also be 'line' or 'shadow'
  790. },
  791. },
  792. legend: {
  793. left: 15,
  794. top: 30,
  795. data: [
  796. "实发电量",
  797. "计划检修损失",
  798. "非计划检修损失",
  799. "限电损失",
  800. "受累损失",
  801. "性能损失",
  802. "总和",
  803. ],
  804. },
  805. grid: {
  806. left: "3%",
  807. right: "4%",
  808. bottom: "3%",
  809. containLabel: true,
  810. },
  811. xAxis: {
  812. type: "value",
  813. },
  814. yAxis: {
  815. type: "category",
  816. data: date.names,
  817. },
  818. series: [
  819. {
  820. name: "实发电量",
  821. type: "bar",
  822. stack: "total",
  823. label: {
  824. show: true,
  825. },
  826. emphasis: {
  827. focus: "series",
  828. },
  829. data: date.sfdl,
  830. },
  831. {
  832. name: "计划检修损失",
  833. type: "bar",
  834. stack: "total",
  835. label: {
  836. show: true,
  837. },
  838. emphasis: {
  839. focus: "series",
  840. },
  841. data: date.whdl,
  842. },
  843. {
  844. name: "非计划检修损失",
  845. type: "bar",
  846. stack: "total",
  847. label: {
  848. show: true,
  849. },
  850. emphasis: {
  851. focus: "series",
  852. },
  853. data: date.gzdl,
  854. },
  855. {
  856. name: "限电损失",
  857. type: "bar",
  858. stack: "total",
  859. label: {
  860. show: true,
  861. },
  862. emphasis: {
  863. focus: "series",
  864. },
  865. data: date.xddl,
  866. },
  867. {
  868. name: "受累损失",
  869. type: "bar",
  870. stack: "total",
  871. label: {
  872. show: true,
  873. },
  874. emphasis: {
  875. focus: "series",
  876. },
  877. data: date.sldl,
  878. },
  879. {
  880. name: "性能损失",
  881. type: "bar",
  882. stack: "total",
  883. label: {
  884. show: date.qfdl,
  885. },
  886. emphasis: {
  887. focus: "series",
  888. },
  889. data: date.qfdl,
  890. },
  891. //曲线
  892. {
  893. name: "总和",
  894. data: date.yfdl,
  895. type: "line",
  896. symbol: "circle",
  897. symbolSize: 20,
  898. lineStyle: {
  899. color: "#5470C6",
  900. width: 4,
  901. type: "dashed",
  902. },
  903. itemStyle: {
  904. borderWidth: 3,
  905. borderColor: "#EE6666",
  906. color: "yellow",
  907. },
  908. },
  909. ],
  910. };
  911. this.chartLine.setOption(option);
  912. },
  913. drawhistogram_pj(date) {
  914. this.chartLine = echarts.init(document.getElementById("histogram_xm"));
  915. this.chartLine.clear();
  916. this.chartLine.resize({ height: this.autoHeight_pj });
  917. var option;
  918. var option;
  919. option = {
  920. color: [
  921. "#64E572",
  922. "#24CBE5",
  923. "#DDDF00",
  924. "#ED561B",
  925. "#50B432",
  926. "#058DC7",
  927. ],
  928. title: {
  929. text: "风机绩效榜单",
  930. left: 300,
  931. top: -5,
  932. textStyle: {
  933. fontSize: 13,
  934. },
  935. },
  936. tooltip: {
  937. trigger: "axis",
  938. axisPointer: {
  939. // Use axis to trigger tooltip
  940. type: "shadow", // 'shadow' as default; can also be 'line' or 'shadow'
  941. },
  942. },
  943. legend: {
  944. left: 15,
  945. top: 30,
  946. data: [
  947. "实发电量",
  948. "计划检修损失",
  949. "非计划检修损失",
  950. "限电损失",
  951. "受累损失",
  952. "性能损失",
  953. "总和",
  954. ],
  955. },
  956. grid: {
  957. left: "3%",
  958. right: "4%",
  959. bottom: "3%",
  960. containLabel: true,
  961. },
  962. xAxis: {
  963. type: "value",
  964. },
  965. yAxis: {
  966. type: "category",
  967. data: date.names,
  968. },
  969. series: [
  970. {
  971. name: "实发电量",
  972. type: "bar",
  973. stack: "total",
  974. label: {
  975. show: true,
  976. },
  977. emphasis: {
  978. focus: "series",
  979. },
  980. data: date.sfdl,
  981. },
  982. {
  983. name: "计划检修损失",
  984. type: "bar",
  985. stack: "total",
  986. label: {
  987. show: true,
  988. },
  989. emphasis: {
  990. focus: "series",
  991. },
  992. data: date.whdl,
  993. },
  994. {
  995. name: "非计划检修损失",
  996. type: "bar",
  997. stack: "total",
  998. label: {
  999. show: true,
  1000. },
  1001. emphasis: {
  1002. focus: "series",
  1003. },
  1004. data: date.gzdl,
  1005. },
  1006. {
  1007. name: "限电损失",
  1008. type: "bar",
  1009. stack: "total",
  1010. label: {
  1011. show: true,
  1012. },
  1013. emphasis: {
  1014. focus: "series",
  1015. },
  1016. data: date.xddl,
  1017. },
  1018. {
  1019. name: "受累损失",
  1020. type: "bar",
  1021. stack: "total",
  1022. label: {
  1023. show: true,
  1024. },
  1025. emphasis: {
  1026. focus: "series",
  1027. },
  1028. data: date.sldl,
  1029. },
  1030. {
  1031. name: "性能损失",
  1032. type: "bar",
  1033. stack: "total",
  1034. label: {
  1035. show: date.qfdl,
  1036. },
  1037. emphasis: {
  1038. focus: "series",
  1039. },
  1040. data: date.qfdl,
  1041. },
  1042. //曲线
  1043. {
  1044. name: "总和",
  1045. data: date.yfdl,
  1046. type: "line",
  1047. symbol: "circle",
  1048. symbolSize: 20,
  1049. lineStyle: {
  1050. color: "#5470C6",
  1051. width: 4,
  1052. type: "dashed",
  1053. },
  1054. itemStyle: {
  1055. borderWidth: 3,
  1056. borderColor: "#EE6666",
  1057. color: "yellow",
  1058. },
  1059. },
  1060. ],
  1061. };
  1062. this.chartLine.setOption(option);
  1063. },
  1064. drawhistogram_xl(date) {
  1065. this.chartLine = echarts.init(document.getElementById("histogram_jdxl"));
  1066. this.chartLine.clear();
  1067. this.chartLine.resize({ height: this.autoHeight_xl });
  1068. var option;
  1069. var option;
  1070. option = {
  1071. color: [
  1072. "#64E572",
  1073. "#24CBE5",
  1074. "#DDDF00",
  1075. "#ED561B",
  1076. "#50B432",
  1077. "#058DC7",
  1078. ],
  1079. title: {
  1080. text: "风机绩效榜单",
  1081. left: 300,
  1082. top: -5,
  1083. textStyle: {
  1084. fontSize: 13,
  1085. },
  1086. },
  1087. tooltip: {
  1088. trigger: "axis",
  1089. axisPointer: {
  1090. // Use axis to trigger tooltip
  1091. type: "shadow", // 'shadow' as default; can also be 'line' or 'shadow'
  1092. },
  1093. },
  1094. legend: {
  1095. left: 15,
  1096. top: 30,
  1097. data: [
  1098. "实发电量",
  1099. "计划检修损失",
  1100. "非计划检修损失",
  1101. "限电损失",
  1102. "受累损失",
  1103. "性能损失",
  1104. "总和",
  1105. ],
  1106. },
  1107. grid: {
  1108. left: "3%",
  1109. right: "4%",
  1110. bottom: "3%",
  1111. containLabel: true,
  1112. },
  1113. xAxis: {
  1114. type: "value",
  1115. },
  1116. yAxis: {
  1117. type: "category",
  1118. data: date.names,
  1119. },
  1120. series: [
  1121. {
  1122. name: "实发电量",
  1123. type: "bar",
  1124. stack: "total",
  1125. label: {
  1126. show: true,
  1127. },
  1128. emphasis: {
  1129. focus: "series",
  1130. },
  1131. data: date.sfdl,
  1132. },
  1133. {
  1134. name: "计划检修损失",
  1135. type: "bar",
  1136. stack: "total",
  1137. label: {
  1138. show: true,
  1139. },
  1140. emphasis: {
  1141. focus: "series",
  1142. },
  1143. data: date.whdl,
  1144. },
  1145. {
  1146. name: "非计划检修损失",
  1147. type: "bar",
  1148. stack: "total",
  1149. label: {
  1150. show: true,
  1151. },
  1152. emphasis: {
  1153. focus: "series",
  1154. },
  1155. data: date.gzdl,
  1156. },
  1157. {
  1158. name: "限电损失",
  1159. type: "bar",
  1160. stack: "total",
  1161. label: {
  1162. show: true,
  1163. },
  1164. emphasis: {
  1165. focus: "series",
  1166. },
  1167. data: date.xddl,
  1168. },
  1169. {
  1170. name: "受累损失",
  1171. type: "bar",
  1172. stack: "total",
  1173. label: {
  1174. show: true,
  1175. },
  1176. emphasis: {
  1177. focus: "series",
  1178. },
  1179. data: date.sldl,
  1180. },
  1181. {
  1182. name: "性能损失",
  1183. type: "bar",
  1184. stack: "total",
  1185. label: {
  1186. show: date.qfdl,
  1187. },
  1188. emphasis: {
  1189. focus: "series",
  1190. },
  1191. data: date.qfdl,
  1192. },
  1193. //曲线
  1194. {
  1195. name: "总和",
  1196. data: date.yfdl,
  1197. type: "line",
  1198. symbol: "circle",
  1199. symbolSize: 20,
  1200. lineStyle: {
  1201. color: "#5470C6",
  1202. width: 4,
  1203. type: "dashed",
  1204. },
  1205. itemStyle: {
  1206. borderWidth: 3,
  1207. borderColor: "#EE6666",
  1208. color: "yellow",
  1209. },
  1210. },
  1211. ],
  1212. };
  1213. this.chartLine.setOption(option);
  1214. },
  1215. },
  1216. mounted() {
  1217. this.$nextTick(() => {
  1218. this.tableHeight = window.innerHeight + (this.len /10 ) * (this.len /10 ) * 100;
  1219. //后面的50:根据需求空出的高度,自行调整
  1220. });
  1221. this.query_wpid();
  1222. this.query();
  1223. },
  1224. };
  1225. </script>
  1226. <style scoped>
  1227. .bg-purple-dark {
  1228. background: #fff;
  1229. }
  1230. .grid-content {
  1231. border-radius: 2px;
  1232. min-height: 36px;
  1233. margin-top: -15px;
  1234. }
  1235. .item {
  1236. margin-top: 10px;
  1237. margin-right: 40px;
  1238. }
  1239. .el-row {
  1240. margin: 10px;
  1241. }
  1242. </style>