index.vue 37 KB

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