index.vue 31 KB

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