index.vue 32 KB

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