Decision2Cjdb.vue 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472
  1. <template>
  2. <div class="decision-page-2">
  3. <div class="query-form">
  4. <div class="station1">
  5. 场站:
  6. <el-select
  7. v-model="value1"
  8. @change="ChangZhanChange(value1)"
  9. multiple
  10. size="mini"
  11. collapse-tags
  12. placeholder="请选择"
  13. popper-class="select"
  14. >
  15. <el-option
  16. v-for="item in ChangZhan"
  17. :key="item.id"
  18. :value="item.id"
  19. :label="item.name"
  20. >
  21. </el-option>
  22. </el-select>
  23. </div>
  24. <div class="station1">
  25. 项目:
  26. <el-select
  27. v-model="value2"
  28. @change="XiangMuChange(value2)"
  29. multiple
  30. size="mini"
  31. collapse-tags
  32. placeholder="请选择"
  33. popper-class="select"
  34. >
  35. <el-option
  36. v-for="item in XiangMu"
  37. :key="item.id"
  38. :value="item.id"
  39. :label="item.name"
  40. >
  41. </el-option>
  42. </el-select>
  43. </div>
  44. <div class="station1">
  45. 线路:
  46. <el-select
  47. v-model="value3"
  48. @change="XianLuChange(value3)"
  49. multiple
  50. size="mini"
  51. collapse-tags
  52. placeholder="请选择"
  53. popper-class="select"
  54. >
  55. <el-option
  56. v-for="item in XianLu"
  57. :key="item.id"
  58. :label="item.name"
  59. :value="item.id"
  60. >
  61. </el-option>
  62. </el-select>
  63. </div>
  64. <div class="dates">
  65. 开始日期:
  66. <div class="search-input">
  67. <el-date-picker
  68. size="mini"
  69. v-model="value4"
  70. @change="BeginChange(value4)"
  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="dates">
  80. 结束日期:
  81. <div class="search-input">
  82. <el-date-picker
  83. size="mini"
  84. v-model="value5"
  85. @change="EndChange(value5)"
  86. type="date"
  87. value-format="YYYY-MM-DD"
  88. placeholder="选择日期"
  89. popper-class="date-select"
  90. >
  91. </el-date-picker>
  92. <!-- <div class="unit svg-icon svg-icon-gray">
  93. <svg-icon :svgid="''" />
  94. </div> -->
  95. </div>
  96. </div>
  97. <div class="query-actions">
  98. <el-button round class="btn green" @click="AjaxCommon()">搜索</el-button>
  99. <el-button round class="btn" @click="dbfx">对标分析</el-button>
  100. <el-button round class="btn" @click="exportExcel()">导出</el-button>
  101. <el-button round class="btn" v-show="detailShow == 2" @click="back">返回</el-button>
  102. </div>
  103. </div>
  104. <div v-show="detailShow == 1">
  105. <div class="tabCut2">
  106. <div class="tabCut-item">
  107. <span>场际对标</span>
  108. </div>
  109. </div>
  110. <!-- <toolbar-panel title="场际对标" :showLine="false"></toolbar-panel> -->
  111. <div class="mg-b-16">
  112. <div class="project-table">
  113. <Table
  114. :data="tableData"
  115. :canScroll="false"
  116. ref="curRef"
  117. @onSort="onSort"
  118. ></Table>
  119. </div>
  120. </div>
  121. <div class="echarts">
  122. <div class="pie-echarts">
  123. <div class="chart-name">
  124. <div class="point left bottom"></div>
  125. <div class="point right bottom"></div>
  126. 发电量占比
  127. </div>
  128. <!-- <panel title="发电量占比"> -->
  129. <dual-pie-chart
  130. height="21.296vh"
  131. :innerData="innerFdl"
  132. :outerData="outerFdl"
  133. />
  134. <!-- </panel> -->
  135. </div>
  136. <div class="bar-echarts">
  137. <div class="chart-name">
  138. <div class="point left bottom"></div>
  139. <div class="point right bottom"></div>
  140. 损失电量分析
  141. </div>
  142. <!-- <panel title="损失电量分析"> -->
  143. <multiple-bar-chart
  144. :height="'calc(100vh - 23.3vh - 550px)'"
  145. :list="analyis"
  146. :customerTooltip="true"
  147. @tooltip="tooltip"
  148. :units="['(万KWh)']"
  149. />
  150. <!-- </panel> -->
  151. </div>
  152. </div>
  153. </div>
  154. <!-- <el-row class="mg-b-16">
  155. <el-col :span="12">
  156. <panel title="发电量占比">
  157. <dual-pie-chart
  158. height="21.296vh"
  159. :innerData="innerFdl"
  160. :outerData="outerFdl"
  161. />
  162. </panel>
  163. </el-col>
  164. <el-col :span="12">
  165. <panel title="各场站损失电量占比">
  166. <dual-pie-chart
  167. height="21.296vh"
  168. :innerData="innerCz"
  169. :outerData="outerCz"
  170. />
  171. </panel>
  172. </el-col>
  173. </el-row>
  174. <div>
  175. <panel title="损失电量分析">
  176. <multiple-bar-chart
  177. :height="'calc(100vh - 23.3vh - 500px)'"
  178. :list="analyis"
  179. :customerTooltip="true"
  180. @tooltip="tooltip"
  181. :units="['(万KWh)']"
  182. />
  183. </panel>
  184. </div>
  185. </div>-->
  186. <el-row :type="'flex'" class="content" v-show="detailShow == 2">
  187. <el-col :span="24" class="pd-l-8">
  188. <div class="tabCut2">
  189. <div class="tabCut-item">
  190. <span>风机对标列表明细</span>
  191. </div>
  192. </div>
  193. <!-- <panel :title="'风机对标列表明细'" :showLine="false"> -->
  194. <div class="project-table">
  195. <Table
  196. :data="tableDataDetail"
  197. ref="curRef"
  198. @onSort="onSort"
  199. ></Table>
  200. </div>
  201. <!-- </panel> -->
  202. </el-col>
  203. </el-row>
  204. <el-dialog
  205. title="对标排名分析"
  206. v-model="dialogVisible"
  207. width="70%"
  208. top="10vh"
  209. custom-class="modal"
  210. :close-on-click-modal="false"
  211. >
  212. <dayinfo
  213. :radarValue="radarValue"
  214. :title="[windNum, windNum2]"
  215. :windNum="windNum"
  216. :windNum2="windNum2"
  217. :tabs="tabs"
  218. :analyisDialog="analyisDialog"
  219. />
  220. </el-dialog>
  221. </div>
  222. </template>
  223. <script>
  224. import MultipleBarChart from "../../components/chart/bar/multiple-bar-chart.vue";
  225. import DualPieChart from "../../components/chart/pie/dual-pie-chart.vue";
  226. import SvgIcon from "../../components/coms/icon/svg-icon.vue";
  227. import Panel from "../../components/coms/panel/panel.vue";
  228. import Table from "./table.vue";
  229. import ToolbarPanel from "../../components/coms/panel/toolbar-panel.vue";
  230. import Dayinfo from "./dayinfo.vue";
  231. import api from "@api/economic/index.js";
  232. export default {
  233. components: {
  234. Panel,
  235. Table,
  236. SvgIcon,
  237. DualPieChart,
  238. MultipleBarChart,
  239. ToolbarPanel,
  240. Dayinfo,
  241. },
  242. data() {
  243. let that = this;
  244. return {
  245. tableIdArr: [], //放checkbox的id数组
  246. tableId: [],
  247. checkLength: 0, //对标分析只能选择2个
  248. tableData: {
  249. column: [
  250. // {
  251. // name: "",
  252. // field: "index",
  253. // is_num: false,
  254. // is_light: false,
  255. // },
  256. {
  257. name: "",
  258. field: "check",
  259. is_num: false,
  260. is_light: false,
  261. template: function () {
  262. return "<input class='check curCheckBox' type='CheckBox'/>";
  263. },
  264. click: function (event, data) {
  265. // checkbox 事件
  266. // event.target checkbox or td 需进行判断
  267. // event.target.checked 判断 checkbox 是否选中
  268. // data 当前数据
  269. var dataId = that.tableIdArr[data.index - 1];
  270. if (event.target.checked == false && that.checkLength <= 2) {
  271. that.tableId.forEach((item, i) => {
  272. if (item == dataId) {
  273. that.tableId.splice(i, 1);
  274. that.dbData.splice(i, 1);
  275. }
  276. });
  277. that.checkLength--;
  278. } else if (event.target.checked && that.checkLength < 2) {
  279. that.tableId.push(dataId);
  280. that.dbData.push(data);
  281. that.checkLength++;
  282. } else if (that.checkLength == 2) {
  283. event.target.checked = false;
  284. }
  285. },
  286. },
  287. {
  288. name: "名称",
  289. field: "name",
  290. is_num: false,
  291. is_light: false,
  292. width: "100px",
  293. },
  294. {
  295. name: "综合排名",
  296. field: "zhpm",
  297. is_num: false,
  298. is_light: false,
  299. sortable: true,
  300. },
  301. {
  302. name: "发电量排名",
  303. field: "fdlpm",
  304. is_num: false,
  305. is_light: false,
  306. sortable: true,
  307. },
  308. {
  309. name: "发电量(万kWh)",
  310. field: "fdl",
  311. is_num: false,
  312. is_light: false,
  313. sortable: true,
  314. },
  315. {
  316. name: "故障损失排名",
  317. field: "gzssdlpm",
  318. is_num: false,
  319. is_light: false,
  320. sortable: true,
  321. },
  322. {
  323. name: "故障损失(万kWh)",
  324. field: "gzssdl",
  325. is_num: false,
  326. is_light: false,
  327. sortable: true,
  328. },
  329. {
  330. name: "检修损失排名",
  331. field: "jxssdlpm",
  332. is_num: false,
  333. is_light: false,
  334. sortable: true,
  335. },
  336. {
  337. name: "检修损失(万kWh)",
  338. field: "jxssdl",
  339. is_num: false,
  340. is_light: false,
  341. sortable: true,
  342. },
  343. {
  344. name: "性能损失排名",
  345. field: "xnssdlpm",
  346. is_num: false,
  347. is_light: false,
  348. sortable: true,
  349. },
  350. {
  351. name: "性能损失(万kWh)",
  352. field: "xnssdl",
  353. is_num: false,
  354. is_light: false,
  355. sortable: true,
  356. },
  357. {
  358. name: "限电损失排名",
  359. field: "xdssdlpm",
  360. is_num: false,
  361. is_light: false,
  362. sortable: true,
  363. },
  364. {
  365. name: "限电损失(万kWh)",
  366. field: "xdssdl",
  367. is_num: false,
  368. is_light: false,
  369. sortable: true,
  370. },
  371. {
  372. name: "受累损失排名",
  373. field: "slssdlpm",
  374. is_num: false,
  375. is_light: false,
  376. sortable: true,
  377. },
  378. {
  379. name: "受累损失(万kWh)",
  380. field: "slssdl",
  381. is_num: false,
  382. is_light: false,
  383. sortable: true,
  384. },
  385. {
  386. name: "风能利用率排名",
  387. field: "fnlylpm",
  388. is_num: false,
  389. is_light: false,
  390. sortable: true,
  391. },
  392. {
  393. name: "风能利用率(%)",
  394. field: "fnlyl",
  395. is_num: false,
  396. is_light: false,
  397. sortable: true,
  398. },
  399. {
  400. name: "故障损失率排名",
  401. field: "gzsslpm",
  402. is_num: false,
  403. is_light: false,
  404. sortable: true,
  405. },
  406. {
  407. name: "故障损失率(%)",
  408. field: "gzssl",
  409. is_num: false,
  410. is_light: false,
  411. sortable: true,
  412. },
  413. {
  414. name: "检修损失率排名",
  415. field: "jxsslpm",
  416. is_num: false,
  417. is_light: false,
  418. sortable: true,
  419. },
  420. {
  421. name: "检修损失率(%)",
  422. field: "jxssl",
  423. is_num: false,
  424. is_light: false,
  425. sortable: true,
  426. },
  427. {
  428. name: "弃风率排名",
  429. field: "qflpm",
  430. is_num: false,
  431. is_light: false,
  432. sortable: true,
  433. },
  434. {
  435. name: "弃风率(%)",
  436. field: "qfl",
  437. is_num: false,
  438. is_light: false,
  439. sortable: true,
  440. },
  441. {
  442. name: "性能损失率排名",
  443. field: "xnsslpm",
  444. is_num: false,
  445. is_light: false,
  446. sortable: true,
  447. },
  448. {
  449. name: "性能损失率(%)",
  450. field: "xnssl",
  451. is_num: false,
  452. is_light: false,
  453. sortable: true,
  454. },
  455. {
  456. name: "受累损失率排名",
  457. field: "slsslpm",
  458. is_num: false,
  459. is_light: false,
  460. sortable: true,
  461. },
  462. {
  463. name: "受累损失率(%)",
  464. field: "slssl",
  465. is_num: false,
  466. is_light: false,
  467. sortable: true,
  468. },
  469. {
  470. name: "操作",
  471. field: "cz",
  472. is_num: false,
  473. is_light: false,
  474. template: function () {
  475. return "<a class='action'>详情</a>";
  476. },
  477. click: function (event, data) {
  478. var dataId = that.tableIdArr[data.index - 1];
  479. that.clearDb();
  480. that.detailShow = 2;
  481. api
  482. .benchmarkingDetails({
  483. id: dataId,
  484. beginDate: that.value4,
  485. endDate: that.value5,
  486. target: "",
  487. sort: "",
  488. })
  489. .then((res) => {
  490. var dataTab = [];
  491. res.data.forEach((item, index) => {
  492. that.tableIdArr.push(item.id);
  493. dataTab.push({
  494. //表格
  495. // index: index + 1,
  496. fdl: item.fdl,
  497. name: item.name,
  498. zhpm: item.zhpm,
  499. gzssdl: item.gzssdl,
  500. jxssdlpm: item.jxssdlpm,
  501. jxssdl: item.jxssdl,
  502. xnssdlpm: item.xnssdlpm,
  503. xnssdl: item.xnssdl,
  504. xdssdlpm: item.xdssdlpm,
  505. xdssdl: item.xdssdl,
  506. slssdlpm: item.slssdlpm,
  507. slssdl: item.slssdl,
  508. fnlylpm: item.fnlylpm,
  509. fnlyl: item.fnlyl,
  510. gzsslpm: item.gzsslpm,
  511. gzssl: item.gzssl,
  512. jxsslpm: item.jxsslpm,
  513. jxssl: item.jxssl,
  514. qflpm: item.qflpm,
  515. qfl: item.qfl,
  516. xnsslpm: item.xnsslpm,
  517. xnssl: item.xnssl,
  518. slsslpm: item.slsslpm,
  519. slssl: item.slssl,
  520. is_light: false,
  521. });
  522. });
  523. that.tableDataDetail.data = dataTab;
  524. });
  525. // that.API.requestData({
  526. // method: "GET",
  527. // baseURL: "http://10.83.66.220:8020/",
  528. // subUrl: "benchmarking/details",
  529. // data: {
  530. // id: dataId,
  531. // beginDate: that.value4,
  532. // endDate: that.value5,
  533. // target: "",
  534. // sort: "",
  535. // },
  536. // success(res) {
  537. // var dataTab = [];
  538. // res.data.forEach((item, index) => {
  539. // that.tableIdArr.push(item.id);
  540. // dataTab.push({
  541. // //表格
  542. // index: index + 1,
  543. // fdl: item.fdl,
  544. // name: item.name,
  545. // zhpm: item.zhpm,
  546. // gzssdl: item.gzssdl,
  547. // jxssdlpm: item.jxssdlpm,
  548. // jxssdl: item.jxssdl,
  549. // xnssdlpm: item.xnssdlpm,
  550. // xnssdl: item.xnssdl,
  551. // xdssdlpm: item.xdssdlpm,
  552. // xdssdl: item.xdssdl,
  553. // slssdlpm: item.slssdlpm,
  554. // slssdl: item.slssdl,
  555. // fnlylpm: item.fnlylpm,
  556. // fnlyl: item.fnlyl,
  557. // gzsslpm: item.gzsslpm,
  558. // gzssl: item.gzssl,
  559. // jxsslpm: item.jxsslpm,
  560. // jxssl: item.jxssl,
  561. // qflpm: item.qflpm,
  562. // qfl: item.qfl,
  563. // xnsslpm: item.xnsslpm,
  564. // xnssl: item.xnssl,
  565. // slsslpm: item.slsslpm,
  566. // slssl: item.slssl,
  567. // is_light: false,
  568. // });
  569. // });
  570. // that.tableDataDetail.data = dataTab;
  571. // },
  572. // });
  573. },
  574. },
  575. ],
  576. data: [],
  577. },
  578. tableDataDetail: {
  579. column: [
  580. // {
  581. // name: "",
  582. // field: "index",
  583. // is_num: false,
  584. // is_light: false,
  585. // },
  586. {
  587. name: "",
  588. field: "check",
  589. is_num: false,
  590. is_light: false,
  591. template: function () {
  592. return "<input class='check curCheckBox checkItem' type='CheckBox'/>";
  593. },
  594. click: function (event, data) {
  595. var dataId = that.tableIdArr[data.index - 1];
  596. if (event.target.checked == false && that.checkLength <= 2) {
  597. that.tableId.forEach((item, i) => {
  598. if (item == dataId) {
  599. that.tableId.splice(i, 1);
  600. that.dbData.splice(i, 1);
  601. }
  602. });
  603. that.checkLength--;
  604. } else if (event.target.checked && that.checkLength < 2) {
  605. that.tableId.push(dataId);
  606. that.dbData.push(data);
  607. that.checkLength++;
  608. } else if (that.checkLength == 2) {
  609. event.target.checked = false;
  610. }
  611. },
  612. },
  613. {
  614. name: "发电量",
  615. field: "fdl",
  616. is_num: false,
  617. is_light: false,
  618. display: "none",
  619. },
  620. {
  621. name: "风机名称",
  622. field: "name",
  623. is_num: false,
  624. is_light: false,
  625. },
  626. {
  627. name: "综合排名",
  628. field: "zhpm",
  629. is_num: false,
  630. is_light: false,
  631. sortable: true,
  632. },
  633. {
  634. name: "故障损失",
  635. field: "gzssdl",
  636. is_num: false,
  637. is_light: false,
  638. sortable: true,
  639. },
  640. {
  641. name: "检修损失排名",
  642. field: "jxssdlpm",
  643. is_num: false,
  644. is_light: false,
  645. sortable: true,
  646. },
  647. {
  648. name: "检修损失",
  649. field: "jxssdl",
  650. is_num: false,
  651. is_light: false,
  652. sortable: true,
  653. },
  654. {
  655. name: "性能损失排名",
  656. field: "xnssdlpm",
  657. is_num: false,
  658. is_light: false,
  659. sortable: true,
  660. },
  661. {
  662. name: "性能损失",
  663. field: "xnssdl",
  664. is_num: false,
  665. is_light: false,
  666. sortable: true,
  667. },
  668. {
  669. name: "限电损失排名",
  670. field: "xdssdlpm",
  671. is_num: false,
  672. is_light: false,
  673. sortable: true,
  674. },
  675. {
  676. name: "限电损失",
  677. field: "xdssdl",
  678. is_num: false,
  679. is_light: false,
  680. sortable: true,
  681. },
  682. {
  683. name: "受累损失排名",
  684. field: "slssdlpm",
  685. is_num: false,
  686. is_light: false,
  687. sortable: true,
  688. },
  689. {
  690. name: "受累损失",
  691. field: "slssdl",
  692. is_num: false,
  693. is_light: false,
  694. sortable: true,
  695. },
  696. {
  697. name: "故障损失率排名",
  698. field: "gzsslpm",
  699. is_num: false,
  700. is_light: false,
  701. sortable: true,
  702. },
  703. {
  704. name: "故障损失率(%)",
  705. field: "gzssl",
  706. is_num: false,
  707. is_light: false,
  708. sortable: true,
  709. },
  710. {
  711. name: "检修损失率排名",
  712. field: "jxsslpm",
  713. is_num: false,
  714. is_light: false,
  715. sortable: true,
  716. },
  717. {
  718. name: "检修损失率(%)",
  719. field: "jxssl",
  720. is_num: false,
  721. is_light: false,
  722. sortable: true,
  723. },
  724. {
  725. name: "弃风率排名",
  726. field: "qflpm",
  727. is_num: false,
  728. is_light: false,
  729. sortable: true,
  730. },
  731. {
  732. name: "弃风率(%)",
  733. field: "qfl",
  734. is_num: false,
  735. is_light: false,
  736. sortable: true,
  737. },
  738. {
  739. name: "性能损失率排名",
  740. field: "xnsslpm",
  741. is_num: false,
  742. is_light: false,
  743. sortable: true,
  744. },
  745. {
  746. name: "性能损失率(%)",
  747. field: "xnssl",
  748. is_num: false,
  749. is_light: false,
  750. sortable: true,
  751. },
  752. {
  753. name: "受累损失率排名",
  754. field: "slsslpm",
  755. is_num: false,
  756. is_light: false,
  757. sortable: true,
  758. },
  759. {
  760. name: "受累损失率(%)",
  761. field: "slssl",
  762. is_num: false,
  763. is_light: false,
  764. sortable: true,
  765. },
  766. ],
  767. data: [],
  768. },
  769. options: [],
  770. ChangZhan: [], //场站
  771. value1: [],
  772. value4: "",
  773. value5: "",
  774. innerFdl: [], //发电量占比
  775. outerFdl: [],
  776. innerCz: [], //各场站损失电量占比
  777. outerLl: [],
  778. analyis: [], //损失电量分析
  779. dialogVisible: false,
  780. radarValue: [],
  781. windNum: "dd",
  782. windNum2: "dd",
  783. tabs: [],
  784. analyisDialog: [],
  785. detailShow: 1,
  786. ajaxData: [],
  787. dbData: [],
  788. };
  789. },
  790. created() {
  791. this.ChangZhanVal();
  792. this.value4 = this.getTime(1);
  793. this.value5 = this.getTime(2);
  794. this.AjaxCommon();
  795. },
  796. methods: {
  797. ChangZhanVal() {
  798. api.benchmarkingWplist({}).then((res) => {
  799. this.ChangZhan = res.data;
  800. });
  801. // var that = this;
  802. // that.API.requestData({
  803. // method: "GET",
  804. // baseURL: "http://10.83.66.220:8020/",
  805. // subUrl: "benchmarking/wplist",
  806. // success(res) {
  807. // that.ChangZhan = res.data;
  808. // },
  809. // });
  810. },
  811. ChangZhanChange(val) {
  812. this.value1 = val;
  813. this.AjaxCommon();
  814. this.clearDb();
  815. },
  816. BeginChange(val) {
  817. this.value4 = val;
  818. this.AjaxCommon();
  819. this.clearDb();
  820. },
  821. EndChange(val) {
  822. this.value5 = val;
  823. this.AjaxCommon();
  824. this.clearDb();
  825. },
  826. getTime(val) {
  827. //时间戳处理,val=1是默认开始时间(当前月第一天),val=2是默认结束时间(今天)
  828. var date = new Date();
  829. var year = date.getFullYear(),
  830. month = date.getMonth() + 1,
  831. day = date.getDate();
  832. month >= 1 && month <= 9 ? (month = "0" + month) : "";
  833. day >= 0 && day <= 9 ? (day = "0" + day) : "";
  834. var begin = year + "-" + month + "-01";
  835. var end = year + "-" + month + "-" + day;
  836. if (val == 1) {
  837. return begin;
  838. } else if (val == 2) {
  839. return end;
  840. }
  841. },
  842. AjaxCommon() {
  843. api
  844. .benchmarkingCjdb({
  845. wpids: this.value1,
  846. projectids: this.value2,
  847. lineids: this.value3,
  848. beginDate: this.value4,
  849. endDate: this.value5,
  850. target: "",
  851. sort: "",
  852. })
  853. .then((res) => {
  854. this.tableIdArr = [];
  855. this.ajaxData = res.data;
  856. var dataTab = [], //表格
  857. fdl = [],
  858. cz = [],
  859. ll = [],
  860. analyis = [],
  861. gzssdl = [],
  862. jxssdl = [],
  863. xnssdl = [],
  864. xdssdl = [],
  865. slssdl = [];
  866. res.data.forEach((item, index) => {
  867. this.tableIdArr.push(item.id);
  868. dataTab.push({
  869. //表格
  870. index: index + 1,
  871. fdl: item.fdl,
  872. name: item.name,
  873. zhpm: item.zhpm,
  874. fdlpm: item.fdlpm,
  875. gzssdlpm: item.gzssdlpm,
  876. gzssdl: item.gzssdl,
  877. jxssdlpm: item.jxssdlpm,
  878. jxssdl: item.jxssdl,
  879. xnssdlpm: item.xnssdlpm,
  880. xnssdl: item.xnssdl,
  881. xdssdlpm: item.xdssdlpm,
  882. xdssdl: item.xdssdl,
  883. slssdlpm: item.slssdlpm,
  884. slssdl: item.slssdl,
  885. fnlylpm: item.fnlylpm,
  886. fnlyl: item.fnlyl,
  887. gzsslpm: item.gzsslpm,
  888. gzssl: item.gzssl,
  889. jxsslpm: item.jxsslpm,
  890. jxssl: item.jxssl,
  891. qflpm: item.qflpm,
  892. qfl: item.qfl,
  893. xnsslpm: item.xnsslpm,
  894. xnssl: item.xnssl,
  895. slsslpm: item.slsslpm,
  896. slssl: item.slssl,
  897. is_light: false,
  898. });
  899. fdl.push({
  900. value: item.fdl,
  901. name: item.name,
  902. });
  903. cz.push({
  904. value: (
  905. item.gzssdl +
  906. item.jxssdl +
  907. item.xnssdl +
  908. item.xdssdl +
  909. item.slssdl
  910. ).toFixed(2),
  911. name: item.name,
  912. });
  913. gzssdl.push({
  914. text: item.name,
  915. value: item.gzssdl,
  916. });
  917. jxssdl.push({
  918. text: item.name,
  919. value: item.jxssdl,
  920. });
  921. xnssdl.push({
  922. text: item.name,
  923. value: item.xnssdl,
  924. });
  925. xdssdl.push({
  926. text: item.name,
  927. value: item.xdssdl,
  928. });
  929. slssdl.push({
  930. text: item.name,
  931. value: item.slssdl,
  932. });
  933. });
  934. analyis.push(
  935. {
  936. title: "故障损失电量",
  937. yAxisIndex: 0,
  938. value: gzssdl,
  939. },
  940. {
  941. title: "检修损失电量",
  942. yAxisIndex: 0,
  943. value: jxssdl,
  944. },
  945. {
  946. title: "性能损失电量",
  947. yAxisIndex: 0,
  948. value: xnssdl,
  949. },
  950. {
  951. title: "限电损失电量",
  952. yAxisIndex: 0,
  953. value: xdssdl,
  954. },
  955. {
  956. title: "受累损失电量",
  957. yAxisIndex: 0,
  958. value: slssdl,
  959. }
  960. );
  961. this.tableData.data = dataTab;
  962. this.innerFdl = fdl;
  963. this.outerFdl = fdl;
  964. this.innerCz = cz;
  965. this.outerCz = cz;
  966. this.analyis = analyis;
  967. });
  968. // var that = this;
  969. // that.API.requestData({
  970. // //五项损失率
  971. // method: "GET",
  972. // baseURL: "http://10.83.66.220:8020/",
  973. // subUrl: "benchmarking/cjdb",
  974. // data: {
  975. // wpids: that.value1,
  976. // projectids: that.value2,
  977. // lineids: that.value3,
  978. // beginDate: that.value4,
  979. // endDate: that.value5,
  980. // target: "",
  981. // sort: "",
  982. // },
  983. // success(res) {
  984. // that.ajaxData = res.data;
  985. // var dataTab = [], //表格
  986. // fdl = [],
  987. // cz = [],
  988. // ll = [],
  989. // analyis = [],
  990. // gzssdl = [],
  991. // jxssdl = [],
  992. // xnssdl = [],
  993. // xdssdl = [],
  994. // slssdl = [];
  995. // res.data.forEach((item, index) => {
  996. // that.tableIdArr.push(item.id);
  997. // dataTab.push({
  998. // //表格
  999. // index: index + 1,
  1000. // fdl: item.fdl,
  1001. // name: item.name,
  1002. // zhpm: item.zhpm,
  1003. // fdlpm: item.fdlpm,
  1004. // gzssdlpm: item.gzssdlpm,
  1005. // gzssdl: item.gzssdl,
  1006. // jxssdlpm: item.jxssdlpm,
  1007. // jxssdl: item.jxssdl,
  1008. // xnssdlpm: item.xnssdlpm,
  1009. // xnssdl: item.xnssdl,
  1010. // xdssdlpm: item.xdssdlpm,
  1011. // xdssdl: item.xdssdl,
  1012. // slssdlpm: item.slssdlpm,
  1013. // slssdl: item.slssdl,
  1014. // fnlylpm: item.fnlylpm,
  1015. // fnlyl: item.fnlyl,
  1016. // gzsslpm: item.gzsslpm,
  1017. // gzssl: item.gzssl,
  1018. // jxsslpm: item.jxsslpm,
  1019. // jxssl: item.jxssl,
  1020. // qflpm: item.qflpm,
  1021. // qfl: item.qfl,
  1022. // xnsslpm: item.xnsslpm,
  1023. // xnssl: item.xnssl,
  1024. // slsslpm: item.slsslpm,
  1025. // slssl: item.slssl,
  1026. // is_light: false,
  1027. // });
  1028. // fdl.push({
  1029. // value: item.fdl,
  1030. // name: item.name,
  1031. // });
  1032. // cz.push({
  1033. // value: (
  1034. // item.gzssdl +
  1035. // item.jxssdl +
  1036. // item.xnssdl +
  1037. // item.xdssdl +
  1038. // item.slssdl
  1039. // ).toFixed(2),
  1040. // name: item.name,
  1041. // });
  1042. // gzssdl.push({
  1043. // text: item.name,
  1044. // value: item.gzssdl,
  1045. // });
  1046. // jxssdl.push({
  1047. // text: item.name,
  1048. // value: item.jxssdl,
  1049. // });
  1050. // xnssdl.push({
  1051. // text: item.name,
  1052. // value: item.xnssdl,
  1053. // });
  1054. // xdssdl.push({
  1055. // text: item.name,
  1056. // value: item.xdssdl,
  1057. // });
  1058. // slssdl.push({
  1059. // text: item.name,
  1060. // value: item.slssdl,
  1061. // });
  1062. // });
  1063. // analyis.push(
  1064. // {
  1065. // title: "故障损失电量",
  1066. // yAxisIndex: 0,
  1067. // value: gzssdl,
  1068. // },
  1069. // {
  1070. // title: "检修损失电量",
  1071. // yAxisIndex: 0,
  1072. // value: jxssdl,
  1073. // },
  1074. // {
  1075. // title: "性能损失电量",
  1076. // yAxisIndex: 0,
  1077. // value: xnssdl,
  1078. // },
  1079. // {
  1080. // title: "限电损失电量",
  1081. // yAxisIndex: 0,
  1082. // value: xdssdl,
  1083. // },
  1084. // {
  1085. // title: "受累损失电量",
  1086. // yAxisIndex: 0,
  1087. // value: slssdl,
  1088. // }
  1089. // );
  1090. // that.tableData.data = dataTab;
  1091. // that.innerFdl = fdl;
  1092. // that.outerFdl = fdl;
  1093. // that.innerCz = cz;
  1094. // that.outerCz = cz;
  1095. // that.analyis = analyis;
  1096. // },
  1097. // });
  1098. },
  1099. AjaxDbfx() {
  1100. var that = this;
  1101. var data = that.dbData;
  1102. that.windNum = data[0].name;
  1103. that.windNum2 = data[1].name;
  1104. that.tabs = [
  1105. {
  1106. name: "发电量",
  1107. windData1: data[0].fdl,
  1108. windData2: data[1].fdl,
  1109. },
  1110. {
  1111. name: "故障损失电量",
  1112. windData1: data[0].gzssdl,
  1113. windData2: data[1].gzssdl,
  1114. },
  1115. {
  1116. name: "检修损失电量",
  1117. windData1: data[0].jxssdl,
  1118. windData2: data[1].jxssdl,
  1119. },
  1120. {
  1121. name: "性能未达标损失电量",
  1122. windData1: data[0].xnssdl,
  1123. windData2: data[1].xnssdl,
  1124. },
  1125. {
  1126. name: "受累损失电量",
  1127. windData1: data[0].slssdl,
  1128. windData2: data[1].slssdl,
  1129. },
  1130. {
  1131. name: "风能利用率",
  1132. windData1: data[0].fnlyl,
  1133. windData2: data[1].fnlyl,
  1134. },
  1135. {
  1136. name: "故障损失率",
  1137. windData1: data[0].gzssl,
  1138. windData2: data[1].gzssl,
  1139. },
  1140. {
  1141. name: "检修损失率",
  1142. windData1: data[0].jxssl,
  1143. windData2: data[1].jxssl,
  1144. },
  1145. {
  1146. name: "弃风率",
  1147. windData1: data[0].qfl,
  1148. windData2: data[1].qfl,
  1149. },
  1150. {
  1151. name: "性能损失率",
  1152. windData1: data[0].xnssl,
  1153. windData2: data[1].xnssl,
  1154. },
  1155. {
  1156. name: "受累损失率",
  1157. windData1: data[0].slssl,
  1158. windData2: data[1].slssl,
  1159. },
  1160. ];
  1161. that.radarValue = [
  1162. {
  1163. indicator: [
  1164. "风能利用率",
  1165. "故障损失率",
  1166. "检修损失率",
  1167. "弃风率",
  1168. "性能损失率",
  1169. "受累损失率",
  1170. ],
  1171. data: [
  1172. {
  1173. value: [
  1174. data[0].fnlylpm,
  1175. data[0].gzsslpm,
  1176. data[0].jxsslpm,
  1177. data[0].qflpm,
  1178. data[0].xnsslpm,
  1179. data[0].slsslpm,
  1180. ],
  1181. },
  1182. {
  1183. value: [
  1184. data[1].fnlylpm,
  1185. data[1].gzsslpm,
  1186. data[1].jxsslpm,
  1187. data[1].qflpm,
  1188. data[1].xnsslpm,
  1189. data[1].slsslpm,
  1190. ],
  1191. },
  1192. ],
  1193. },
  1194. ];
  1195. var analyis = [],
  1196. gzssdl = [],
  1197. jxssdl = [],
  1198. xnssdl = [],
  1199. xdssdl = [],
  1200. slssdl = [];
  1201. data.forEach((item, index) => {
  1202. gzssdl.push({
  1203. text: item.name,
  1204. value: item.gzssdl,
  1205. });
  1206. jxssdl.push({
  1207. text: item.name,
  1208. value: item.jxssdl,
  1209. });
  1210. xnssdl.push({
  1211. text: item.name,
  1212. value: item.xnssdl,
  1213. });
  1214. xdssdl.push({
  1215. text: item.name,
  1216. value: item.xdssdl,
  1217. });
  1218. slssdl.push({
  1219. text: item.name,
  1220. value: item.slssdl,
  1221. });
  1222. });
  1223. analyis.push(
  1224. {
  1225. title: "故障损失电量",
  1226. yAxisIndex: 0,
  1227. value: gzssdl,
  1228. },
  1229. {
  1230. title: "检修损失电量",
  1231. yAxisIndex: 0,
  1232. value: jxssdl,
  1233. },
  1234. {
  1235. title: "性能损失电量",
  1236. yAxisIndex: 0,
  1237. value: xnssdl,
  1238. },
  1239. {
  1240. title: "限电损失电量",
  1241. yAxisIndex: 0,
  1242. value: xdssdl,
  1243. },
  1244. {
  1245. title: "受累损失电量",
  1246. yAxisIndex: 0,
  1247. value: slssdl,
  1248. }
  1249. );
  1250. that.analyisDialog = analyis;
  1251. },
  1252. tooltip(param, callback) {
  1253. var color = ["#05bb4c", "#4b55ae", "#fa8c16", "#f8de5b"];
  1254. var result = param[0].axisValue;
  1255. param.forEach((value, index) => {
  1256. result +=
  1257. "<br />" +
  1258. `<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:${color[index]};"></span>` +
  1259. value.seriesName +
  1260. ":" +
  1261. value.value;
  1262. });
  1263. callback(result);
  1264. return true;
  1265. },
  1266. dbfx() {
  1267. var that = this;
  1268. if (that.tableId.length == 2) {
  1269. that.dialogVisible = true;
  1270. this.AjaxDbfx();
  1271. this.clearDb();
  1272. }
  1273. },
  1274. clearDb() {
  1275. //清空对标状态
  1276. this.$refs.curRef.clearCheckBox();
  1277. this.tableId = [];
  1278. this.dbData = [];
  1279. this.checkLength = 0;
  1280. },
  1281. back() {
  1282. this.detailShow = 1;
  1283. this.clearDb();
  1284. },
  1285. onSort() {
  1286. this.clearDb();
  1287. },
  1288. exportExcel() {
  1289. let that = this;
  1290. const { export_json_to_excel } = require("@tools/excel/Export2Excel.js"); // 注意这个Export2Excel路径
  1291. let tHeader = []; // 上面设置Excel的表格第一行的标题
  1292. let filterVal = []; // 上面的index、nickName、name是tableData里对象的属性key值
  1293. that.tableData.column.forEach((ele, index) => {
  1294. if (index > 1 && index !== that.tableData.column.length - 1) {
  1295. tHeader.push(ele.name);
  1296. filterVal.push(ele.field);
  1297. }
  1298. });
  1299. var list = [];
  1300. that.tableData.data.forEach((i, index) => {
  1301. list.push(i);
  1302. });
  1303. const data = that.formatJson(filterVal, list);
  1304. export_json_to_excel(tHeader, data, "场际对标"); // 最后一个是表名字
  1305. },
  1306. formatJson(filterVal, jsonData) {
  1307. return jsonData.map((v) => filterVal.map((j) => v[j]));
  1308. },
  1309. },
  1310. };
  1311. </script>
  1312. <style lang="less">
  1313. .decision-page-2 {
  1314. .content .project-table {
  1315. tbody {
  1316. height: calc(100vh - 24.5vh);
  1317. }
  1318. }
  1319. .project-table {
  1320. overflow: auto;
  1321. tbody {
  1322. height: 440px;
  1323. }
  1324. th,
  1325. td {
  1326. color: #b2bdc0;
  1327. &:nth-child(1) {
  1328. width: 50px;
  1329. }
  1330. &:nth-child(2) {
  1331. width: 50px;
  1332. }
  1333. }
  1334. }
  1335. .action {
  1336. text-decoration: underline;
  1337. color: @green;
  1338. cursor: pointer;
  1339. }
  1340. }
  1341. .title {
  1342. display: flex;
  1343. flex-direction: row;
  1344. align-items: center;
  1345. margin-top: 10px;
  1346. margin-bottom: 10px;
  1347. .station {
  1348. display: flex;
  1349. flex-direction: row;
  1350. align-items: center;
  1351. font-size: 14px;
  1352. font-family: Microsoft YaHei;
  1353. font-weight: 400;
  1354. color: #b3b3b3;
  1355. margin-right: 10px;
  1356. }
  1357. .search-input {
  1358. margin-left: 10px;
  1359. }
  1360. .but {
  1361. display: flex;
  1362. flex-direction: row;
  1363. align-content: center;
  1364. margin-left: 10px;
  1365. }
  1366. .buttons {
  1367. width: 80px;
  1368. height: 25px;
  1369. background: rgba(0, 70, 199, 0.5);
  1370. border: 1px solid #1f51ae;
  1371. border-radius: 13px;
  1372. color: #ffffff;
  1373. font-size: 14px;
  1374. font-family: Microsoft YaHei;
  1375. font-weight: 400;
  1376. &:hover {
  1377. background-color: rgba(0, 70, 199, 0.5);
  1378. color: #ffffff;
  1379. }
  1380. }
  1381. }
  1382. .echarts {
  1383. width: 100%;
  1384. height: 26vh;
  1385. display: flex;
  1386. flex-direction: row;
  1387. align-items: center;
  1388. // margin-top: 30px;
  1389. .chart-name {
  1390. display: flex;
  1391. align-items: center;
  1392. padding-left: 20px;
  1393. position: relative;
  1394. height: 39px;
  1395. width: 100%;
  1396. // margin-left: 1%;
  1397. background:rgba(0, 0, 0, 0.45) ;
  1398. border-bottom: 1px solid rgba(153, 153, 153, 0.5);
  1399. font-size: 16px;
  1400. font-family: Microsoft YaHei;
  1401. font-weight: 400;
  1402. color: #ffffff;
  1403. }
  1404. .pie-echarts {
  1405. width: 30%;
  1406. height: 100%;
  1407. border: 1px solid rgba(153, 153, 153, 0.5);
  1408. // background: rgba(0, 0, 0, 0.45);
  1409. border-radius: 5px;
  1410. }
  1411. .bar-echarts {
  1412. width: 69%;
  1413. margin-left: 1%;
  1414. height: 100%;
  1415. border: 1px solid rgba(153, 153, 153, 0.5);
  1416. // background: rgba(0, 0, 0, 0.45);
  1417. border-radius: 5px;
  1418. }
  1419. }
  1420. </style>