Decision3.vue 28 KB

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