index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777
  1. <template>
  2. <div class="stationControl">
  3. <div class="stationControl_top">
  4. <el-select
  5. size="mini"
  6. v-model="tabIndex"
  7. placeholder="请选择"
  8. clearable
  9. @change="getTableData"
  10. >
  11. <el-option
  12. v-for="item in tabOptions"
  13. :key="item.id"
  14. :label="item.name"
  15. :value="item.id"
  16. >
  17. </el-option>
  18. </el-select>
  19. <div class="station">
  20. 时间:
  21. <div class="">
  22. <el-date-picker
  23. size="mini"
  24. v-model="pickerTime"
  25. type="month"
  26. value-format="YYYY-MM"
  27. placeholder="选择年月"
  28. popper-class="date-select"
  29. >
  30. </el-date-picker>
  31. </div>
  32. </div>
  33. <div class="but">
  34. <el-button
  35. round
  36. size="mini"
  37. class="buttons sousuo"
  38. @click="getTableData"
  39. >搜索</el-button
  40. >
  41. <el-button round size="mini" class="buttons" @click="downXlsxFn"
  42. >导出</el-button
  43. >
  44. </div>
  45. </div>
  46. <div
  47. style="
  48. background: rgba(0, 0, 0, 0.4);
  49. height: calc(100% - 43px);
  50. padding-bottom: 15px;
  51. "
  52. >
  53. <div class="stationControl_title clearfix">
  54. <div class="leftContent floatLeft">
  55. <span>{{ tabIndex == -1 ? "风场" : "电站" }}管控KPI</span>
  56. </div>
  57. </div>
  58. <div class="economicTable1">
  59. <el-table
  60. :data="stationControlData"
  61. stripe
  62. size="mini"
  63. height="calc(100% - 40px - 20px)"
  64. ref="stationControl_table"
  65. style="width: 100%"
  66. border
  67. >
  68. <el-table-column
  69. prop="station"
  70. label="场站"
  71. align="center"
  72. show-overflow-tooltip
  73. />
  74. <el-table-column
  75. prop="year"
  76. label="年份"
  77. align="center"
  78. width="58"
  79. show-overflow-tooltip
  80. />
  81. <el-table-column
  82. prop="month"
  83. label="月份"
  84. align="center"
  85. width="58"
  86. show-overflow-tooltip
  87. />
  88. <el-table-column
  89. v-for="(item, index) in tableHeader"
  90. :key="index"
  91. :label="item.title"
  92. align="center"
  93. >
  94. <el-table-column
  95. v-for="(subItem, subIndex) in tabIndex == -1
  96. ? item.children
  97. : item.childrenG
  98. ? item.childrenG
  99. : item.children"
  100. :key="subIndex"
  101. :prop="subItem.code"
  102. :label="subItem.title"
  103. align="center"
  104. show-overflow-tooltip
  105. >
  106. <el-table-column
  107. v-for="(thiItem, thiIndex) in subItem.children"
  108. :key="thiIndex"
  109. sortable
  110. width="45"
  111. :prop="thiItem.code"
  112. :label="thiItem.title"
  113. align="center"
  114. show-overflow-tooltip
  115. >
  116. </el-table-column>
  117. </el-table-column>
  118. </el-table-column>
  119. <el-table-column
  120. prop="score"
  121. label="总评分"
  122. align="center"
  123. width="40"
  124. show-overflow-tooltip
  125. />
  126. </el-table>
  127. <el-pagination
  128. @size-change="handleSizeChange"
  129. @current-change="handleCurrentChange"
  130. :current-page="page.currentPage"
  131. :page-size="page.pagesize"
  132. layout="total, prev, pager, next, jumper"
  133. :total="page.total"
  134. >
  135. </el-pagination>
  136. </div>
  137. </div>
  138. </div>
  139. </template>
  140. <script>
  141. import {
  142. getApicompanyslist,
  143. getApiwpByCplistlist,
  144. getApioutputSpeedlist,
  145. } from "@/api/monthlyPerformanceAnalysis";
  146. import utils from "@/utills/downXlsx";
  147. import dayjs from "dayjs";
  148. import { GetStationByCompany } from "@/api/factoryMonitor/index.js";
  149. export default {
  150. name: "stationControl", //场站管控KPI
  151. components: {},
  152. data() {
  153. return {
  154. stationVal: "",
  155. stationOptions: [],
  156. pickerTime: "",
  157. stationControlData: [...new Array(15)].fill({
  158. id: 1,
  159. station: "右玉小五台风电场",
  160. yxbz: "1组",
  161. year: "2023",
  162. month: "09",
  163. fnlylValue: 1,
  164. fnlylrank: 1,
  165. xdsslValue: 1,
  166. xdsslRank: 1,
  167. xnsslValue: 1,
  168. xnsslRank: 1,
  169. fwjsl: 1,
  170. ztzhl: 1,
  171. qxxd: 1,
  172. qxys: 1,
  173. pjxf: 1,
  174. mttf: 1,
  175. sblyxs: 1,
  176. zhcydl: 1,
  177. yhfxzql: 1,
  178. score: 12,
  179. }),
  180. tabIndex: -1,
  181. tabOptions: [
  182. { id: -1, name: "风电" },
  183. { id: -2, name: "光伏" },
  184. ],
  185. tableHeader: [
  186. {
  187. title: "安全指标",
  188. children: [
  189. {
  190. title: "人身、设备事故",
  191. children: [
  192. { title: "值(次)", code: "sblyxs" },
  193. { title: "评分", code: "sblyxs" },
  194. ],
  195. },
  196. {
  197. title: "设备一类障碍",
  198. children: [
  199. { title: "值(次)", code: "zhcydl" },
  200. { title: "评分", code: "zhcydl" },
  201. ],
  202. },
  203. ],
  204. },
  205. {
  206. title: "生产效率指标",
  207. children: [
  208. {
  209. title: "风能利用率",
  210. children: [
  211. { title: "值(%)", code: "fnlylValue" },
  212. { title: "评分", code: "fnlylrank" },
  213. ],
  214. },
  215. {
  216. title: "计划检修损失率",
  217. children: [
  218. { title: "值(%)", code: "xdsslValue" },
  219. { title: "评分", code: "xdsslRank" },
  220. ],
  221. },
  222. {
  223. title: "非计划检修损失率",
  224. children: [
  225. { title: "值(%)", code: "xnsslValue" },
  226. { title: "评分", code: "xnsslRank" },
  227. ],
  228. },
  229. {
  230. title: "限电损失率",
  231. children: [
  232. { title: "值(%)", code: "xdsslValue" },
  233. { title: "评分", code: "xdsslRank" },
  234. ],
  235. },
  236. {
  237. title: "性能损失率",
  238. children: [
  239. { title: "值(%)", code: "xnsslValue" },
  240. { title: "评分", code: "xnsslRank" },
  241. ],
  242. },
  243. {
  244. title: "复位及时率",
  245. children: [
  246. { title: "值(%)", code: "fwjsl" },
  247. { title: "评分", code: "fwjsl" },
  248. ],
  249. },
  250. {
  251. title: "状态转换及时率",
  252. children: [
  253. { title: "值(%)", code: "ztzhl" },
  254. { title: "评分", code: "ztzhl" },
  255. ],
  256. },
  257. {
  258. title: "故障处理及时率",
  259. children: [
  260. { title: "值(%)", code: "fwjsl" },
  261. { title: "评分", code: "fwjsl" },
  262. ],
  263. },
  264. {
  265. title: "MTBF",
  266. children: [
  267. { title: "值(小时)", code: "qxys" },
  268. { title: "评分", code: "qxys" },
  269. ],
  270. },
  271. {
  272. title: "MTTF",
  273. children: [
  274. { title: "值(小时)", code: "mttf" },
  275. { title: "评分", code: "mttf" },
  276. ],
  277. },
  278. {
  279. title: "MTTR",
  280. children: [
  281. { title: "值(小时)", code: "mttf" },
  282. { title: "评分", code: "mttf" },
  283. ],
  284. },
  285. ],
  286. childrenG: [
  287. {
  288. title: "光能利用率",
  289. children: [
  290. { title: "值(%)", code: "fnlylValue" },
  291. { title: "评分", code: "fnlylrank" },
  292. ],
  293. },
  294. {
  295. title: "计划检修损失率",
  296. children: [
  297. { title: "值(%)", code: "xdsslValue" },
  298. { title: "评分", code: "xdsslRank" },
  299. ],
  300. },
  301. {
  302. title: "非计划检修损失率",
  303. children: [
  304. { title: "值(%)", code: "xnsslValue" },
  305. { title: "评分", code: "xnsslRank" },
  306. ],
  307. },
  308. {
  309. title: "限电损失率",
  310. children: [
  311. { title: "值(%)", code: "xdsslValue" },
  312. { title: "评分", code: "xdsslRank" },
  313. ],
  314. },
  315. {
  316. title: "性能损失率",
  317. children: [
  318. { title: "值(%)", code: "xnsslValue" },
  319. { title: "评分", code: "xnsslRank" },
  320. ],
  321. },
  322. {
  323. title: "复位及时率",
  324. children: [
  325. { title: "值(%)", code: "fwjsl" },
  326. { title: "评分", code: "fwjsl" },
  327. ],
  328. },
  329. {
  330. title: "状态转换及时率",
  331. children: [
  332. { title: "值(%)", code: "ztzhl" },
  333. { title: "评分", code: "ztzhl" },
  334. ],
  335. },
  336. {
  337. title: "故障处理及时率",
  338. children: [
  339. { title: "值(%)", code: "fwjsl" },
  340. { title: "评分", code: "fwjsl" },
  341. ],
  342. },
  343. {
  344. title: "MTBF",
  345. children: [
  346. { title: "值(小时)", code: "qxys" },
  347. { title: "评分", code: "qxys" },
  348. ],
  349. },
  350. {
  351. title: "MTTF",
  352. children: [
  353. { title: "值(小时)", code: "mttf" },
  354. { title: "评分", code: "mttf" },
  355. ],
  356. },
  357. {
  358. title: "MTTR",
  359. children: [
  360. { title: "值(小时)", code: "mttf" },
  361. { title: "评分", code: "mttf" },
  362. ],
  363. },
  364. ],
  365. },
  366. {
  367. title: "综合分析指标",
  368. children: [
  369. {
  370. title: "设备利用小时",
  371. children: [
  372. { title: "值(小时)", code: "sblyxs" },
  373. { title: "评分", code: "sblyxs" },
  374. ],
  375. },
  376. {
  377. title: "综合厂用电率",
  378. children: [
  379. { title: "值(%)", code: "zhcydl" },
  380. { title: "评分", code: "zhcydl" },
  381. ],
  382. },
  383. {
  384. title: "设备可利用率",
  385. children: [
  386. { title: "值(%)", code: "zhcydl" },
  387. { title: "评分", code: "zhcydl" },
  388. ],
  389. },
  390. {
  391. title: "等效可用系数",
  392. children: [
  393. { title: "值(%)", code: "yhfxzql" },
  394. { title: "评分", code: "yhfxzql" },
  395. ],
  396. },
  397. {
  398. title: "隐患发现准确率",
  399. children: [
  400. { title: "值(%)", code: "yhfxzql" },
  401. { title: "评分", code: "yhfxzql" },
  402. ],
  403. },
  404. {
  405. title: "风功率预测准确率",
  406. children: [
  407. { title: "值(%)", code: "yhfxzql" },
  408. { title: "评分", code: "yhfxzql" },
  409. ],
  410. },
  411. ],
  412. childrenG: [
  413. {
  414. title: "设备利用小时",
  415. children: [
  416. { title: "值(小时)", code: "sblyxs" },
  417. { title: "评分", code: "sblyxs" },
  418. ],
  419. },
  420. {
  421. title: "综合厂用电率",
  422. children: [
  423. { title: "值(%)", code: "zhcydl" },
  424. { title: "评分", code: "zhcydl" },
  425. ],
  426. },
  427. {
  428. title: "设备可利用率",
  429. children: [
  430. { title: "值(%)", code: "zhcydl" },
  431. { title: "评分", code: "zhcydl" },
  432. ],
  433. },
  434. {
  435. title: "等效可用系数",
  436. children: [
  437. { title: "值(%)", code: "yhfxzql" },
  438. { title: "评分", code: "yhfxzql" },
  439. ],
  440. },
  441. {
  442. title: "隐患发现准确率",
  443. children: [
  444. { title: "值(%)", code: "yhfxzql" },
  445. { title: "评分", code: "yhfxzql" },
  446. ],
  447. },
  448. {
  449. title: "光功率预测准确率",
  450. children: [
  451. { title: "值(%)", code: "yhfxzql" },
  452. { title: "评分", code: "yhfxzql" },
  453. ],
  454. },
  455. ],
  456. },
  457. {
  458. title: "自然环境影响指标",
  459. children: [
  460. {
  461. title: "平均风速",
  462. children: [
  463. { title: "值(m/s)", code: "sblyxs" },
  464. { title: "评分", code: "sblyxs" },
  465. ],
  466. },
  467. {
  468. title: "静风频率",
  469. children: [
  470. { title: "值(%)", code: "sblyxs" },
  471. { title: "评分", code: "sblyxs" },
  472. ],
  473. },
  474. {
  475. title: "有效风时率",
  476. children: [
  477. { title: "值(%)", code: "sblyxs" },
  478. { title: "评分", code: "sblyxs" },
  479. ],
  480. },
  481. ],
  482. childrenG: [
  483. {
  484. title: "累计辐射总量",
  485. children: [
  486. { title: "值(兆焦/平米)", code: "sblyxs" },
  487. { title: "评分", code: "sblyxs" },
  488. ],
  489. },
  490. ],
  491. },
  492. ],
  493. page: {
  494. pagesize: 21,
  495. currentPage: 1,
  496. total: 0,
  497. },
  498. };
  499. },
  500. created() {
  501. this.pickerTime = dayjs().format("YYYY-MM");
  502. },
  503. mounted() {},
  504. computed: {},
  505. methods: {
  506. handleSizeChange(val) {
  507. this.page.pagesize = val;
  508. this.getTableData();
  509. },
  510. handleCurrentChange(val) {
  511. this.page.currentPage = val;
  512. this.getTableData();
  513. },
  514. getTableData() {},
  515. downXlsxFn() {
  516. let header = [];
  517. this.tableHeader.forEach((it) => {
  518. if (it.title !== "操作") {
  519. header.push(it.title);
  520. }
  521. });
  522. if (this.stationControlData.length > 0) {
  523. utils.exportExcel(
  524. this.$refs["stationControl_table"].$el,
  525. header,
  526. `${this.pickerTime}${
  527. this.tabIndex == -1 ? "风场" : "电站"
  528. }综合评价KPI`
  529. );
  530. }
  531. },
  532. },
  533. };
  534. </script>
  535. <style lang="less" scoped>
  536. .stationControl {
  537. padding: 0 20px;
  538. height: 100%;
  539. .stationControl_title {
  540. .leftContent {
  541. width: 242px;
  542. height: 41px;
  543. line-height: 41px;
  544. background: url("~@/assets/imgs/title_left_bg1.png") no-repeat;
  545. span {
  546. font-size: 16px;
  547. font-family: Microsoft YaHei;
  548. font-weight: 400;
  549. color: #05bb4c;
  550. margin-left: 25px;
  551. }
  552. }
  553. .floatLeft {
  554. float: left;
  555. }
  556. .floatRight {
  557. float: right;
  558. }
  559. .rightContent {
  560. width: 212px;
  561. height: 28px;
  562. margin-top: 13px;
  563. background: url("../../../../assets/imgs/title_right_bg.png");
  564. }
  565. }
  566. .clearfix::after {
  567. content: "";
  568. clear: both;
  569. height: 0;
  570. line-height: 0;
  571. visibility: hidden;
  572. display: block;
  573. }
  574. .clearfix {
  575. zoom: 1;
  576. }
  577. .stationControl_top {
  578. display: flex;
  579. flex-direction: row;
  580. align-items: center;
  581. margin-top: 10px;
  582. margin-bottom: 10px;
  583. .station {
  584. display: flex;
  585. flex-direction: row;
  586. align-items: center;
  587. font-size: 14px;
  588. font-family: Microsoft YaHei;
  589. font-weight: 400;
  590. color: #b3b3b3;
  591. margin-right: 10px;
  592. margin-left: 10px;
  593. }
  594. .tabCut {
  595. display: inline-block;
  596. margin: 0 10px;
  597. div {
  598. display: inline-block;
  599. width: 60px;
  600. height: 27px;
  601. border: 1px solid #274934;
  602. text-align: center;
  603. line-height: 25px;
  604. cursor: pointer;
  605. }
  606. div:nth-child(1) {
  607. border-radius: 13px 0px 0px 13px;
  608. }
  609. div:nth-child(2) {
  610. border-radius: 0px 13px 13px 0px;
  611. cursor: not-allowed;
  612. }
  613. .active {
  614. background-color: rgba(5, 187, 76, 0.9);
  615. color: #fff;
  616. }
  617. }
  618. .search-input {
  619. margin-left: 10px;
  620. .el-input__inner {
  621. width: 175px;
  622. }
  623. .el-input__suffix {
  624. right: -50px;
  625. }
  626. }
  627. .but {
  628. display: flex;
  629. flex-direction: row;
  630. align-content: center;
  631. margin-left: 20px;
  632. .buttons:nth-child(1) {
  633. background: rgba(5, 187, 76, 0.6);
  634. border: 1px solid #3b6c53;
  635. border-radius: 13px;
  636. color: #fff;
  637. &:hover {
  638. background: rgba(5, 187, 76, 0.9);
  639. border-radius: 13px;
  640. color: #fff;
  641. }
  642. }
  643. .buttons:nth-child(2) {
  644. background: rgba(67, 81, 107, 0.3);
  645. border: 1px solid #3b6c53;
  646. border-radius: 13px;
  647. font-size: 14px;
  648. color: #b3b3b3;
  649. }
  650. }
  651. }
  652. .economicTable1 {
  653. height: calc(100% - 42px);
  654. .el-table ::v-deep {
  655. .el-table__header {
  656. border-collapse: collapse;
  657. }
  658. .el-table__body-wrapper {
  659. .el-table__body {
  660. font-size: 13px;
  661. // border: 1px solid #eceef5;
  662. // border-collapse: collapse;
  663. }
  664. }
  665. th {
  666. height: 20px;
  667. line-height: 20px;
  668. font-size: 14px;
  669. &.el-table__cell {
  670. border: 1px solid rgba(255, 255, 255, 0.8) !important;
  671. &:nth-child(1) {
  672. border-left-width: 0 !important;
  673. // border-left-width: 0 !important;
  674. }
  675. &.is-leaf {
  676. // border-bottom-width: 1px !important;
  677. }
  678. }
  679. }
  680. td {
  681. height: 25px;
  682. line-height: 25px;
  683. font-size: 14px;
  684. &.el-table__cell {
  685. border-bottom: 1px solid #434141 !important;
  686. &:nth-child(1) {
  687. border-left-width: 0 !important;
  688. // border-left-width: 0 !important;
  689. }
  690. &.is-leaf {
  691. // border-bottom-width: 1px !important;
  692. }
  693. }
  694. }
  695. }
  696. .el-pagination {
  697. display: flex;
  698. justify-content: flex-end;
  699. padding-right: 40px;
  700. padding-top: 20px;
  701. .el-pagination__total,
  702. .el-pagination__jump {
  703. color: #fff;
  704. }
  705. }
  706. .el-table__fixed,
  707. .el-table__fixed-right {
  708. background: rgba(0, 0, 0, 1);
  709. border-left: 2px solid #000;
  710. height: calc(100% - 15px) !important;
  711. }
  712. .el-table__fixed::before {
  713. background-color: #2a2a2a;
  714. }
  715. .el-table__fixed-right::before {
  716. background-color: #2a2a2a;
  717. }
  718. }
  719. .el-overlay {
  720. .el-overlay-dialog {
  721. overflow-y: hidden !important;
  722. .el-dialog {
  723. margin-top: 0 !important;
  724. .el-dialog__body {
  725. height: calc(100% - 51px - 32px);
  726. }
  727. }
  728. }
  729. }
  730. .el-picker__popper .el-date-range-picker__header .el-picker-panel__icon-btn {
  731. color: #fff;
  732. }
  733. .el-picker__popper .el-date-table .in-range div {
  734. background: #43516b;
  735. }
  736. }
  737. .historyBtn1 {
  738. cursor: pointer;
  739. color: #05bb4c;
  740. }
  741. </style>