Decision3.vue 28 KB

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