index.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233
  1. <template>
  2. <div class="parcel-box">
  3. <div class="form-wrapper">
  4. <el-select
  5. size="mini"
  6. :disabled="displayDetail"
  7. v-model="company"
  8. placeholder="请选择"
  9. @change="handleCompanyChange(company)"
  10. >
  11. <el-option
  12. v-for="item in companyOptions"
  13. :key="item.id"
  14. :label="item.aname"
  15. :value="item.id"
  16. >
  17. </el-option>
  18. </el-select>
  19. <div class="tabCut">
  20. <div
  21. @click="tabClick(val.id)"
  22. :class="[
  23. tabIndex === val.id ? 'active' : '',
  24. displayDetail ? 'disabled' : '',
  25. ]"
  26. v-for="val in tabOptions"
  27. :key="val.id"
  28. >
  29. <span>{{ val.name }}</span>
  30. </div>
  31. </div>
  32. <div class="station">
  33. 场站:
  34. <el-select
  35. size="mini"
  36. :disabled="displayDetail"
  37. v-model="stationObj"
  38. placeholder="请选择"
  39. @change="handleStationChange(stationObj)"
  40. clearable
  41. >
  42. <el-option
  43. v-for="item in stationList"
  44. :key="item.id"
  45. :label="item.name"
  46. :value="item.id"
  47. >
  48. </el-option>
  49. </el-select>
  50. </div>
  51. <div class="station">
  52. 开始日期
  53. <div class="search-input">
  54. <el-date-picker
  55. :disabled="displayDetail"
  56. v-model="starTime"
  57. type="date"
  58. value-format="YYYY-MM-DD"
  59. placeholder="选择日期"
  60. popper-class="date-select"
  61. >
  62. </el-date-picker>
  63. </div>
  64. </div>
  65. <div class="station">
  66. 结束日期
  67. <div class="search-input">
  68. <el-date-picker
  69. :disabled="displayDetail"
  70. v-model="endTime"
  71. type="date"
  72. value-format="YYYY-MM-DD"
  73. placeholder="选择日期"
  74. popper-class="date-select"
  75. >
  76. </el-date-picker>
  77. </div>
  78. </div>
  79. <div class="but">
  80. <el-button
  81. round
  82. size="mini"
  83. class="buttons"
  84. :disabled="displayDetail"
  85. @click="gerCndb"
  86. >搜索</el-button
  87. >
  88. <el-button
  89. round
  90. size="mini"
  91. class="buttons"
  92. @click="dbfx"
  93. :disabled="
  94. chooseList.length <= 5 && chooseList.length > 1 ? false : true
  95. "
  96. >对标分析</el-button
  97. >
  98. <el-button
  99. round
  100. size="mini"
  101. class="buttons"
  102. @click="goBack"
  103. v-if="displayDetail"
  104. >返回</el-button
  105. >
  106. <el-button round size="mini" class="buttons" @click="funthb"
  107. >同环比</el-button
  108. >
  109. </div>
  110. </div>
  111. <div class="bodys" v-if="!displayDetail">
  112. <div class="line">
  113. <div class="leftContent"><span>场内对标</span></div>
  114. </div>
  115. <div class="economicTable">
  116. <el-table
  117. :data="tableData"
  118. ref="multipleTable"
  119. size="mini"
  120. height="calc(100% - 40px)"
  121. :cell-style="{ padding: '4px' }"
  122. :row-style="{ height: '0' }"
  123. stripe
  124. @selection-change="handleCurrentChange"
  125. >
  126. <el-table-column type="selection" width="58" align="center">
  127. </el-table-column>
  128. <el-table-column
  129. align="center"
  130. show-overflow-tooltip
  131. prop="date"
  132. label="日期"
  133. sortable
  134. >
  135. <template v-slot="scope">
  136. <span
  137. @click="goDetail(scope.row)"
  138. style="cursor: pointer; color: #05bb4c"
  139. >{{ scope.row.date }}</span
  140. >
  141. </template>
  142. </el-table-column>
  143. <el-table-column
  144. align="center"
  145. v-for="item in tabIndex == -1 ? tableHeader : tableHeaderG"
  146. :key="item.code"
  147. :prop="item.code"
  148. :label="item.name"
  149. :width="item.name.length == 4 ? 55 : 69"
  150. show-overflow-tooltip
  151. sortable
  152. >
  153. </el-table-column>
  154. </el-table>
  155. <div class="pagination-class">
  156. <el-pagination
  157. @current-change="handlePageChange"
  158. :current-page="page.currentPage"
  159. :page-size="page.pagesize"
  160. layout="total, prev, pager, next, jumper"
  161. :total="page.total"
  162. >
  163. </el-pagination>
  164. </div>
  165. </div>
  166. </div>
  167. <div class="echarts" v-if="!displayDetail">
  168. <div class="pie-echarts">
  169. <div class="chart-name">
  170. <div class="point point-left bottom"></div>
  171. <div class="point point-right bottom"></div>
  172. 损失电量分析
  173. </div>
  174. <PieChart
  175. :lossPower="lossPower"
  176. width="100%"
  177. height="calc(100% - 39px)"
  178. :showLable="false"
  179. ></PieChart>
  180. </div>
  181. <div class="bar-echarts">
  182. <div class="chart-name">
  183. <div class="point point-left bottom"></div>
  184. <div class="point point-right bottom"></div>
  185. 五项损失
  186. </div>
  187. <BarCharts
  188. :list="barList"
  189. width="100%"
  190. height="calc(100% - 39px)"
  191. :showLegend="true"
  192. :xdate="false"
  193. :colorIndex="true"
  194. ></BarCharts>
  195. </div>
  196. </div>
  197. <div
  198. v-if="displayDetail"
  199. style="height: calc(100% - 43px - 35px); padding-bottom: 10px"
  200. >
  201. <el-table
  202. :data="detailTable"
  203. ref="multipleTable"
  204. size="mini"
  205. height="100%"
  206. :cell-style="{ padding: '0px' }"
  207. :row-style="{ height: '0' }"
  208. stripe
  209. @selection-change="handleCurrentChange"
  210. >
  211. <el-table-column type="selection" width="55" align="center">
  212. </el-table-column>
  213. <el-table-column
  214. show-overflow-tooltip
  215. align="center"
  216. prop="name"
  217. label="风机名称"
  218. sortable
  219. >
  220. </el-table-column>
  221. <el-table-column
  222. v-for="item in tabIndex == -1
  223. ? tableHeaderDetail
  224. : tableHeaderGDetail"
  225. :key="item.code"
  226. :prop="item.code"
  227. :label="item.name"
  228. align="center"
  229. :width="item.name.length == 4 ? 57 : 88"
  230. show-overflow-tooltip
  231. sortable
  232. >
  233. </el-table-column>
  234. </el-table>
  235. <div class="pagination-class">
  236. <el-pagination
  237. @current-change="handlePageDChange"
  238. :current-page="pageD.currentPage"
  239. :page-size="pageD.pagesize"
  240. layout="total, prev, pager, next, jumper"
  241. :total="pageD.total"
  242. >
  243. </el-pagination>
  244. </div>
  245. </div>
  246. <el-dialog
  247. class="dialogs"
  248. width="90%"
  249. top="40px"
  250. v-model="dialogVisible"
  251. :show-close="true"
  252. >
  253. <template #title>
  254. <div class="dialog-title">
  255. <div class="title">对标排名分析</div>
  256. </div>
  257. </template>
  258. <div class="dialog-body">
  259. <img class="dialog-img" src="@assets/imgs/dialog.png" />
  260. <dayinfo
  261. :radarValue="radarValue"
  262. :title="[windNum, windNum2]"
  263. :windNum="windNum"
  264. :windNum2="windNum2"
  265. :windNum3="windNum3"
  266. :windNum4="windNum4"
  267. :windNum5="windNum5"
  268. :tabs="tabs"
  269. :analyisDialog="analyisDialog"
  270. />
  271. </div>
  272. </el-dialog>
  273. <el-dialog
  274. class="dialogs"
  275. width="94%"
  276. top="120px"
  277. v-model="thbVisible"
  278. :show-close="true"
  279. >
  280. <template #title>
  281. <div class="dialog-title">
  282. <div class="title">同环比分析</div>
  283. </div>
  284. </template>
  285. <div class="dialog-body">
  286. <img class="dialog-img" src="@assets/imgs/dialog.png" />
  287. <div class="economicTable" style="height: 300px">
  288. <el-table
  289. :data="thbData"
  290. ref="multipleTable1"
  291. size="mini"
  292. height="100%"
  293. :cell-style="{ padding: '4px' }"
  294. :row-style="{ height: '0' }"
  295. stripe
  296. >
  297. <el-table-column
  298. show-overflow-tooltip
  299. align="center"
  300. label-class-name="s-tb-th"
  301. prop="zhpm"
  302. label="综合排名"
  303. minWidth="80"
  304. sortable
  305. >
  306. </el-table-column>
  307. <el-table-column
  308. show-overflow-tooltip
  309. align="center"
  310. label-class-name="s-tb-th"
  311. prop="name"
  312. label="类型"
  313. sortable
  314. minWidth="100"
  315. >
  316. </el-table-column>
  317. <el-table-column
  318. show-overflow-tooltip
  319. align="center"
  320. label-class-name="s-tb-th"
  321. prop="fdlpm"
  322. label="发电量排名"
  323. sortable
  324. minWidth="65"
  325. >
  326. </el-table-column>
  327. <el-table-column
  328. show-overflow-tooltip
  329. align="center"
  330. label-class-name="s-tb-th"
  331. prop="fdl"
  332. label="发电量"
  333. sortable
  334. minWidth="65"
  335. >
  336. </el-table-column>
  337. <el-table-column
  338. show-overflow-tooltip
  339. align="center"
  340. label-class-name="s-tb-th"
  341. prop="gzssdlpm"
  342. label="故障损失排名"
  343. sortable
  344. minWidth="65"
  345. >
  346. </el-table-column>
  347. <el-table-column
  348. show-overflow-tooltip
  349. align="center"
  350. label-class-name="s-tb-th"
  351. prop="gzssdl"
  352. label="故障损失"
  353. sortable
  354. minWidth="65"
  355. >
  356. </el-table-column>
  357. <el-table-column
  358. show-overflow-tooltip
  359. align="center"
  360. label-class-name="s-tb-th"
  361. prop="jxssdlpm"
  362. label="检修损失排名"
  363. sortable
  364. minWidth="65"
  365. >
  366. </el-table-column>
  367. <el-table-column
  368. show-overflow-tooltip
  369. align="center"
  370. label-class-name="s-tb-th"
  371. prop="jxssdl"
  372. label="检修损失"
  373. sortable
  374. minWidth="65"
  375. >
  376. </el-table-column>
  377. <el-table-column
  378. show-overflow-tooltip
  379. align="center"
  380. label-class-name="s-tb-th"
  381. prop="xnssdlpm"
  382. label="性能损失排名"
  383. sortable
  384. minWidth="65"
  385. >
  386. </el-table-column>
  387. <el-table-column
  388. show-overflow-tooltip
  389. align="center"
  390. label-class-name="s-tb-th"
  391. prop="xnssdl"
  392. label="性能损失"
  393. sortable
  394. minWidth="65"
  395. >
  396. </el-table-column>
  397. <el-table-column
  398. show-overflow-tooltip
  399. align="center"
  400. label-class-name="s-tb-th"
  401. prop="xdssdlpm"
  402. label="限电损失排名"
  403. sortable
  404. minWidth="65"
  405. >
  406. </el-table-column>
  407. <el-table-column
  408. show-overflow-tooltip
  409. align="center"
  410. label-class-name="s-tb-th"
  411. prop="xdssdl"
  412. label="限电损失"
  413. sortable
  414. minWidth="65"
  415. >
  416. </el-table-column>
  417. <el-table-column
  418. show-overflow-tooltip
  419. align="center"
  420. label-class-name="s-tb-th"
  421. prop="slssdlpm"
  422. label="受累损失排名"
  423. sortable
  424. minWidth="65"
  425. >
  426. </el-table-column>
  427. <el-table-column
  428. show-overflow-tooltip
  429. align="center"
  430. label-class-name="s-tb-th"
  431. prop="slssdl"
  432. label="受累损失"
  433. sortable
  434. minWidth="65"
  435. >
  436. </el-table-column>
  437. <el-table-column
  438. show-overflow-tooltip
  439. align="center"
  440. label-class-name="s-tb-th"
  441. prop="fnlylpm"
  442. :label="(tabIndex === -1 ? '风能' : '光能') + '利用率排名'"
  443. sortable
  444. minWidth="65"
  445. >
  446. </el-table-column>
  447. <el-table-column
  448. show-overflow-tooltip
  449. align="center"
  450. label-class-name="s-tb-th"
  451. prop="fnlyl"
  452. :label="(tabIndex === -1 ? '风能' : '光能') + '利用率(%)'"
  453. sortable
  454. minWidth="65"
  455. >
  456. </el-table-column>
  457. <el-table-column
  458. show-overflow-tooltip
  459. align="center"
  460. label-class-name="s-tb-th"
  461. prop="gzsslpm"
  462. label="故障损失率排名"
  463. sortable
  464. minWidth="65"
  465. >
  466. </el-table-column>
  467. <el-table-column
  468. show-overflow-tooltip
  469. align="center"
  470. label-class-name="s-tb-th"
  471. prop="gzssl"
  472. label="故障损失率(%)"
  473. sortable
  474. minWidth="65"
  475. >
  476. </el-table-column>
  477. <el-table-column
  478. show-overflow-tooltip
  479. align="center"
  480. label-class-name="s-tb-th"
  481. prop="jxsslpm"
  482. label="检修损失率排名"
  483. sortable
  484. minWidth="65"
  485. >
  486. </el-table-column>
  487. <el-table-column
  488. show-overflow-tooltip
  489. align="center"
  490. label-class-name="s-tb-th"
  491. prop="jxssl"
  492. label="检修损失率(%)"
  493. sortable
  494. minWidth="65"
  495. >
  496. </el-table-column>
  497. <el-table-column
  498. show-overflow-tooltip
  499. align="center"
  500. label-class-name="s-tb-th"
  501. prop="qflpm"
  502. :label="'弃' + (tabIndex === -1 ? '风' : '光') + '率排名'"
  503. sortable
  504. minWidth="65"
  505. >
  506. </el-table-column>
  507. <el-table-column
  508. show-overflow-tooltip
  509. align="center"
  510. label-class-name="s-tb-th"
  511. prop="qfl"
  512. :label="'弃' + (tabIndex === -1 ? '风' : '光') + '率(%)'"
  513. sortable
  514. minWidth="65"
  515. >
  516. </el-table-column>
  517. <el-table-column
  518. show-overflow-tooltip
  519. align="center"
  520. label-class-name="s-tb-th"
  521. prop="xnsslpm"
  522. label="性能损失率排名"
  523. sortable
  524. minWidth="65"
  525. >
  526. </el-table-column>
  527. <el-table-column
  528. show-overflow-tooltip
  529. align="center"
  530. label-class-name="s-tb-th"
  531. prop="xnssl"
  532. label="性能损失率(%)"
  533. sortable
  534. minWidth="65"
  535. >
  536. </el-table-column>
  537. <el-table-column
  538. show-overflow-tooltip
  539. align="center"
  540. label-class-name="s-tb-th"
  541. prop="slsslpm"
  542. label="受累损失率排名"
  543. sortable
  544. minWidth="65"
  545. >
  546. </el-table-column>
  547. <el-table-column
  548. show-overflow-tooltip
  549. align="center"
  550. label-class-name="s-tb-th"
  551. prop="slssl"
  552. label="受累损失率(%)"
  553. sortable
  554. minWidth="65"
  555. >
  556. </el-table-column>
  557. </el-table>
  558. </div>
  559. </div>
  560. </el-dialog>
  561. </div>
  562. </template>
  563. <script>
  564. import dayjs from "dayjs";
  565. import {
  566. tableHeader,
  567. tableHeaderG,
  568. tableHeaderDetail,
  569. tableHeaderGDetail,
  570. } from "@/utills//constant.js";
  571. import { companys } from "@/api/curveAnalyse";
  572. import { getStation, cndb, thb, details } from "@/api/performance";
  573. import PieChart from "../../homePage/components/pieChart.vue";
  574. import BarCharts from "../../homePage/components/barCharts.vue";
  575. import dayinfo from "../compontent/dayinfo.vue";
  576. export default {
  577. name: "siteBenchmarking", //场内对标
  578. components: {
  579. PieChart,
  580. BarCharts,
  581. dayinfo,
  582. },
  583. data() {
  584. return {
  585. tableHeader,
  586. tableHeaderG,
  587. tableHeaderDetail,
  588. tableHeaderGDetail,
  589. page: {
  590. pagesize: 11,
  591. currentPage: 1,
  592. total: 0,
  593. },
  594. pageD: {
  595. pagesize: 23,
  596. currentPage: 1,
  597. total: 0,
  598. },
  599. company: "",
  600. companyOptions: [],
  601. stationObj: "",
  602. stationList: [],
  603. starTime: "",
  604. endTime: "",
  605. tabIndex: -1,
  606. tabOptions: [
  607. { id: -1, name: "风电" },
  608. { id: -2, name: "光伏" },
  609. ],
  610. tableData: [],
  611. detailTable: [],
  612. chooseList: [],
  613. lossPower: [],
  614. barList: [],
  615. displayDetail: false,
  616. dialogVisible: false,
  617. radarValue: [],
  618. windNum: "",
  619. windNum2: "",
  620. windNum3: "",
  621. windNum4: "",
  622. windNum5: "",
  623. tabs: [],
  624. analyisDialog: [],
  625. //同环比
  626. thbVisible: false,
  627. thbData: [],
  628. };
  629. },
  630. created() {
  631. // let date = new Date();
  632. // date.setDate(1);
  633. // let month = parseInt(date.getMonth() + 1);
  634. // let day = date.getDate();
  635. // if (month < 10) {
  636. // month = '0' + month;
  637. // }
  638. // if (day < 10) {
  639. // day = '0' + day;
  640. // }
  641. // this.starTime = date.getFullYear() + '-' + month + '-' + day;
  642. this.starTime = dayjs(new Date().getTime() - 60000 * 60 * 24 * 7).format(
  643. "YYYY-MM-DD"
  644. );
  645. this.endTime = dayjs(new Date().getTime()).format("YYYY-MM-DD");
  646. this.initialization();
  647. },
  648. methods: {
  649. handlePageChange(val) {
  650. this.page.currentPage = val;
  651. this.gerCndb();
  652. },
  653. handlePageDChange(val) {
  654. this.pageD.currentPage = val;
  655. this.goDetail();
  656. },
  657. funthb() {
  658. thb({
  659. companys: this.company,
  660. type: this.tabIndex,
  661. // beginDate: this.starTime,
  662. // endDate: this.endTime,
  663. pageNum: 1,
  664. pageSize: 10,
  665. wpids: this.stationObj,
  666. }).then(({ data: res }) => {
  667. if (res.data) {
  668. this.thbData = res.data;
  669. this.thbVisible = true;
  670. }
  671. });
  672. },
  673. tabClick(val) {
  674. this.tabIndex = val;
  675. this.getStation(this.company);
  676. this.gerCndb();
  677. // this.initialization();
  678. },
  679. initialization() {
  680. companys().then(({ data: res }) => {
  681. if (res.data) {
  682. this.company = res.data[0].id;
  683. this.companyOptions = res.data;
  684. this.getStation(res.data[0].id);
  685. }
  686. });
  687. },
  688. getStation(companyids) {
  689. getStation({
  690. companyids: companyids,
  691. type: this.tabIndex,
  692. }).then(({ data: res }) => {
  693. if (res.data.length) {
  694. this.stationList = res.data;
  695. this.stationObj = res.data[0].id;
  696. this.gerCndb();
  697. } else {
  698. this.stationList = [];
  699. this.stationObj = "";
  700. this.gerCndb();
  701. }
  702. });
  703. },
  704. gerCndb() {
  705. cndb({
  706. companys: this.company,
  707. type: this.tabIndex,
  708. beginDate: this.starTime,
  709. endDate: this.endTime,
  710. wpids: this.stationObj,
  711. pageSize: this.page.pagesize,
  712. pageNum: this.page.currentPage,
  713. target: "",
  714. sort: "",
  715. }).then(({ data: res }) => {
  716. if (res.data) {
  717. let barList = [
  718. {
  719. name: "故障损失电量",
  720. children: [],
  721. date: [],
  722. },
  723. {
  724. name: "检修损失电量",
  725. children: [],
  726. },
  727. {
  728. name: "性能损失电量",
  729. children: [],
  730. },
  731. {
  732. name: "限电损失电量",
  733. children: [],
  734. },
  735. {
  736. name: "受累损失电量",
  737. children: [],
  738. },
  739. ];
  740. this.tableData = res.data.resultList;
  741. this.page.total = res.data.total;
  742. let lossPower = [];
  743. res.data.resultList.forEach((item) => {
  744. let obj = {
  745. name: item.date,
  746. value: item.zssdl,
  747. };
  748. lossPower.push(obj);
  749. barList[0].date.push(item.date);
  750. barList[0].children.push(item.gzssdl);
  751. barList[1].children.push(item.jxssdl);
  752. barList[2].children.push(item.xnssdl);
  753. barList[3].children.push(item.xdssdl);
  754. barList[4].children.push(item.slssdl);
  755. });
  756. this.lossPower = lossPower;
  757. this.barList = barList;
  758. }
  759. });
  760. },
  761. handleStationChange(val) {
  762. this.stationObj = val;
  763. this.gerCndb();
  764. },
  765. handleCompanyChange(val) {
  766. this.company = val;
  767. this.getStation(val);
  768. this.gerCndb();
  769. },
  770. handleCurrentChange(val) {
  771. if (val.length > 5) {
  772. let del_row = val.shift();
  773. this.$refs.multipleTable.toggleRowSelection(del_row, false);
  774. }
  775. let arr = [];
  776. val.forEach((item, index) => {
  777. if (index < 5) {
  778. arr.push(item);
  779. }
  780. });
  781. this.chooseList = arr;
  782. },
  783. goDetail(row) {
  784. this.displayDetail = true;
  785. details({
  786. id: this.stationObj,
  787. beginDate: this.starTime,
  788. endDate: this.endTime,
  789. pageSize: this.pageD.pagesize,
  790. pageNum: this.pageD.currentPage,
  791. target: "",
  792. sort: "",
  793. }).then(({ data: res }) => {
  794. if (res.data) {
  795. this.detailTable = res.data.resultList;
  796. this.pageD.total = res.data.total;
  797. }
  798. });
  799. },
  800. goBack() {
  801. this.displayDetail = false;
  802. },
  803. dbfx() {
  804. if (this.chooseList.length <= 5) {
  805. this.dialogVisible = true;
  806. this.AjaxDbfx();
  807. }
  808. },
  809. AjaxDbfx() {
  810. var data = this.chooseList;
  811. this.windNum = data[0]?.date || data[0]?.name;
  812. this.windNum2 = data[1]?.date || data[1]?.name;
  813. this.windNum3 = data[2]?.date || data[2]?.name;
  814. this.windNum4 = data[3]?.date || data[3]?.name;
  815. this.windNum5 = data[4]?.date || data[4]?.name;
  816. let tabs = [
  817. {
  818. name: "发电量",
  819. code: "fdl",
  820. },
  821. {
  822. name: "故障损失电量",
  823. code: "gzssdl",
  824. },
  825. {
  826. name: "检修损失电量",
  827. code: "jxssdl",
  828. },
  829. {
  830. name: "性能未达标损失电量",
  831. code: "xnssdl",
  832. },
  833. {
  834. name: "受累损失电量",
  835. code: "slssdl",
  836. },
  837. {
  838. name: "风能利用率",
  839. code: "fnlyl",
  840. },
  841. {
  842. name: "故障损失率",
  843. code: "gzssl",
  844. },
  845. {
  846. name: "检修损失率",
  847. code: "jxssl",
  848. },
  849. {
  850. name: "弃风率",
  851. code: "qfl",
  852. },
  853. {
  854. name: "性能损失率",
  855. code: "xnssl",
  856. },
  857. {
  858. name: "受累损失率",
  859. code: "slssl",
  860. },
  861. ];
  862. tabs = tabs.map((item) => {
  863. if (item.code == "fnlyl") {
  864. if (this.tabIndex == -1) {
  865. item.name = "风能利用率";
  866. } else {
  867. item.name = "光能利用率";
  868. }
  869. }
  870. if (item.code == "qfl") {
  871. if (this.tabIndex == -1) {
  872. item.name = "弃风率";
  873. } else {
  874. item.name = "弃光率";
  875. }
  876. }
  877. return item;
  878. });
  879. tabs.forEach((val) => {
  880. data.forEach((item, index) => {
  881. val["windData" + (index + 1)] = item[val.code];
  882. });
  883. });
  884. this.tabs = tabs;
  885. let radarValue = [];
  886. data.forEach((item, index) => {
  887. let data = {
  888. indicator: [
  889. "风能利用率排名",
  890. "故障损失率排名",
  891. "检修损失率排名",
  892. "弃风率排名",
  893. "性能损失率排名",
  894. "受累损失率排名",
  895. ],
  896. data: [
  897. {
  898. value: [
  899. item.fnlylpm,
  900. item.gzsslpm,
  901. item.jxsslpm,
  902. item.qflpm,
  903. item.xnsslpm,
  904. item.slsslpm,
  905. ],
  906. name: item.name,
  907. },
  908. ],
  909. };
  910. if (this.tabIndex == -1) {
  911. data.indicator = [
  912. "风能利用率排名",
  913. "故障损失率排名",
  914. "检修损失率排名",
  915. "弃风率排名",
  916. "性能损失率排名",
  917. "受累损失率排名",
  918. ];
  919. } else {
  920. data.indicator = [
  921. "光能利用率排名",
  922. "故障损失率排名",
  923. "检修损失率排名",
  924. "弃光率排名",
  925. "性能损失率排名",
  926. "受累损失率排名",
  927. ];
  928. }
  929. radarValue.push(data);
  930. });
  931. this.radarValue = radarValue;
  932. var analyis = [],
  933. gzssdl = [],
  934. jxssdl = [],
  935. xnssdl = [],
  936. xdssdl = [],
  937. slssdl = [];
  938. data.forEach((item, index) => {
  939. gzssdl.push({
  940. text: item.date || item.name,
  941. value: item.gzssdl,
  942. });
  943. jxssdl.push({
  944. text: item.date || item.name,
  945. value: item.jxssdl,
  946. });
  947. xnssdl.push({
  948. text: item.date || item.name,
  949. value: item.xnssdl,
  950. });
  951. xdssdl.push({
  952. text: item.date || item.name,
  953. value: item.xdssdl,
  954. });
  955. slssdl.push({
  956. text: item.date || item.name,
  957. value: item.slssdl,
  958. });
  959. });
  960. analyis.push(
  961. {
  962. title: "故障损失电量",
  963. yAxisIndex: 0,
  964. value: gzssdl,
  965. },
  966. {
  967. title: "检修损失电量",
  968. yAxisIndex: 0,
  969. value: jxssdl,
  970. },
  971. {
  972. title: "性能损失电量",
  973. yAxisIndex: 0,
  974. value: xnssdl,
  975. },
  976. {
  977. title: "限电损失电量",
  978. yAxisIndex: 0,
  979. value: xdssdl,
  980. },
  981. {
  982. title: "受累损失电量",
  983. yAxisIndex: 0,
  984. value: slssdl,
  985. }
  986. );
  987. this.analyisDialog = analyis;
  988. },
  989. },
  990. watch: {
  991. screenHeight(val) {
  992. this.screenHeight = val;
  993. if (val > 1100) {
  994. this.echartsHeight = "58vh";
  995. } else {
  996. this.echartsHeight = "55vh";
  997. }
  998. },
  999. },
  1000. };
  1001. </script>
  1002. <style lang="less" scoped>
  1003. .pagination-class {
  1004. text-align: right;
  1005. margin-top: 5px;
  1006. }
  1007. .parcel-box {
  1008. height: 100%;
  1009. width: 100%;
  1010. padding: 0 30px;
  1011. padding-bottom: 10px;
  1012. }
  1013. /deep/ .s-tb-th {
  1014. height: 50px;
  1015. }
  1016. .form-wrapper {
  1017. display: flex;
  1018. flex-direction: row;
  1019. align-items: center;
  1020. margin-top: 10px;
  1021. margin-bottom: 10px;
  1022. .tabCut {
  1023. display: inline-block;
  1024. margin: 0 10px;
  1025. div {
  1026. display: inline-block;
  1027. width: 60px;
  1028. height: 27px;
  1029. border: 1px solid #274934;
  1030. text-align: center;
  1031. line-height: 25px;
  1032. cursor: pointer;
  1033. }
  1034. div:nth-child(1) {
  1035. border-radius: 13px 0px 0px 13px;
  1036. border-right-width: 0;
  1037. }
  1038. div:nth-child(2) {
  1039. border-radius: 0px 13px 13px 0px;
  1040. }
  1041. .active {
  1042. background-color: rgba(5, 187, 76, 0.9);
  1043. color: #fff;
  1044. }
  1045. .disabled {
  1046. cursor: not-allowed;
  1047. pointer-events: none;
  1048. }
  1049. }
  1050. .tabCut1 {
  1051. display: inline-block;
  1052. margin: 0 10px;
  1053. div {
  1054. display: inline-block;
  1055. width: 60px;
  1056. height: 27px;
  1057. border: 1px solid #274934;
  1058. text-align: center;
  1059. line-height: 25px;
  1060. cursor: pointer;
  1061. }
  1062. div:nth-child(1) {
  1063. border-radius: 13px 0px 0px 13px;
  1064. }
  1065. div:nth-child(3) {
  1066. border-radius: 0px 13px 13px 0px;
  1067. }
  1068. .active {
  1069. background-color: rgba(5, 187, 76, 0.9);
  1070. color: #fff;
  1071. }
  1072. }
  1073. .station {
  1074. display: flex;
  1075. flex-direction: row;
  1076. align-items: center;
  1077. font-size: 14px;
  1078. font-family: Microsoft YaHei;
  1079. font-weight: 400;
  1080. color: #b3b3b3;
  1081. margin-right: 10px;
  1082. }
  1083. .search-input {
  1084. margin-left: 10px;
  1085. }
  1086. .but {
  1087. display: flex;
  1088. flex-direction: row;
  1089. align-content: center;
  1090. margin-left: 20px;
  1091. }
  1092. .buttons {
  1093. background-color: rgba(5, 187, 76, 0.2);
  1094. border: 1px solid #3b6c53;
  1095. color: #b3b3b3;
  1096. font-size: 14px;
  1097. &:hover {
  1098. background-color: rgba(5, 187, 76, 0.5);
  1099. color: #ffffff;
  1100. }
  1101. }
  1102. }
  1103. .bodys {
  1104. width: 100%;
  1105. height: calc(100% - 350px - 43px - 20px);
  1106. background-color: rgba(0, 0, 0, 0.45);
  1107. // padding-bottom: 20px;
  1108. border-radius: 5px;
  1109. }
  1110. .economicTable {
  1111. width: 100%;
  1112. height: calc(100% - 36px);
  1113. }
  1114. .line {
  1115. display: flex;
  1116. flex-direction: row;
  1117. align-items: center;
  1118. justify-content: space-between;
  1119. width: 100%;
  1120. .leftContent {
  1121. width: 242px;
  1122. height: 41px;
  1123. display: flex;
  1124. align-items: center;
  1125. background: url("~@/assets/imgs/title_left_bg1.png") no-repeat;
  1126. span {
  1127. font-size: 16px;
  1128. font-family: Microsoft YaHei;
  1129. font-weight: 400;
  1130. color: #05bb4c;
  1131. margin-left: 25px;
  1132. }
  1133. }
  1134. .rightContent {
  1135. width: 212px;
  1136. height: 28px;
  1137. margin-top: 13px;
  1138. background: url("../../../../assets/imgs/title_right_bg.png");
  1139. }
  1140. }
  1141. .echarts {
  1142. width: 100%;
  1143. height: 350px;
  1144. display: flex;
  1145. flex-direction: row;
  1146. align-items: center;
  1147. .chart-name {
  1148. display: flex;
  1149. align-items: center;
  1150. padding-left: 20px;
  1151. position: relative;
  1152. height: 39px;
  1153. width: 98%;
  1154. margin-left: 1%;
  1155. border-bottom: 1px solid rgba(153, 153, 153, 0.5);
  1156. font-size: 16px;
  1157. font-family: Microsoft YaHei;
  1158. font-weight: 400;
  1159. color: #ffffff;
  1160. }
  1161. .pie-echarts {
  1162. width: 30%;
  1163. height: 100%;
  1164. background: rgba(0, 0, 0, 0.45);
  1165. border-radius: 5px;
  1166. }
  1167. .bar-echarts {
  1168. width: 69%;
  1169. margin-left: 1%;
  1170. height: 100%;
  1171. background: rgba(0, 0, 0, 0.45);
  1172. border-radius: 5px;
  1173. }
  1174. }
  1175. .point {
  1176. width: 6px;
  1177. height: 1px;
  1178. background-color: #ffffff;
  1179. position: absolute;
  1180. &.point-left {
  1181. left: 0;
  1182. }
  1183. &.point-right {
  1184. right: 0;
  1185. }
  1186. &.top {
  1187. top: -1px;
  1188. }
  1189. &.bottom {
  1190. bottom: -1px;
  1191. }
  1192. }
  1193. /*去除表头全选框*/
  1194. ::v-deep .el-table__header-wrapper .el-checkbox {
  1195. display: none;
  1196. }
  1197. ::v-deep .el-table__body-wrapper .el-checkbox {
  1198. .el-checkbox__input {
  1199. display: block;
  1200. }
  1201. }
  1202. </style>