Decision3.vue 28 KB

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