indexFd.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  1. <template>
  2. <div class="comprehensiveEvaluation">
  3. <div class="Evaluation_topall">
  4. <div class="Evaluation_top">
  5. <el-select
  6. size="mini"
  7. v-model="tabEvent"
  8. placeholder="请选择"
  9. @change="changeBtn"
  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. <el-select
  20. size="mini"
  21. v-model="companyVal"
  22. placeholder="请选择"
  23. @change="changeCompan"
  24. >
  25. <el-option
  26. v-for="item in companyOptions"
  27. :key="item.id"
  28. :label="item.aname"
  29. :value="item.id"
  30. >
  31. </el-option>
  32. </el-select>
  33. <el-select
  34. size="mini"
  35. v-model="stationVal"
  36. placeholder="请选择"
  37. clearable
  38. @change="changeStation"
  39. >
  40. <el-option
  41. v-for="item in stationOptions"
  42. :key="item.id"
  43. :label="item.aname"
  44. :value="item.id"
  45. >
  46. </el-option>
  47. </el-select>
  48. <div class="station">
  49. 时间
  50. <div class="search-input">
  51. <el-date-picker
  52. v-model="pickerTimer"
  53. type="date"
  54. value-format="YYYY-MM-DD"
  55. placeholder="选择日期"
  56. popper-class="date-select"
  57. >
  58. </el-date-picker>
  59. </div>
  60. </div>
  61. <div class="but">
  62. <el-button round size="mini" class="buttons" @click="seachData"
  63. >搜索</el-button
  64. >
  65. <el-button
  66. round
  67. size="mini"
  68. class="buttons"
  69. @click="contrastFn"
  70. :disabled="chooseList.length === 2 ? false : true"
  71. >信息对比</el-button
  72. >
  73. </div>
  74. </div>
  75. <div class="selections">
  76. <div
  77. class="selections_btn"
  78. @click="tabSelect(0)"
  79. :class="{ active: tabIndex == 0 }"
  80. >
  81. </div>
  82. <div
  83. class="selections_btn"
  84. @click="tabSelect(1)"
  85. :class="{ active: tabIndex == 1 }"
  86. >
  87. </div>
  88. <div
  89. class="selections_btn"
  90. @click="tabSelect(2)"
  91. :class="{ active: tabIndex == 2 }"
  92. >
  93. </div>
  94. </div>
  95. </div>
  96. <div style="background: rgba(0, 0, 0, 0.4)">
  97. <div class="Evaluation_title clearfix">
  98. <div class="leftContent floatLeft"><span>性能等级评估</span></div>
  99. <div class="rightContent floatRight"></div>
  100. </div>
  101. <div class="Evaluation_Table">
  102. <el-table
  103. :data="EvaluationData"
  104. stripe
  105. @selection-change="handleCurrentChange"
  106. size="mini"
  107. height="80vh"
  108. ref="Eval_table"
  109. style="width: 100%"
  110. >
  111. <el-table-column type="selection" width="55" align="center">
  112. </el-table-column>
  113. <el-table-column prop="nemCode" label="风机" align="center">
  114. </el-table-column>
  115. <el-table-column prop="dayLevel" label="等级" align="center">
  116. </el-table-column>
  117. <el-table-column prop="dayRank" label="综合排名" align="center">
  118. </el-table-column>
  119. <el-table-column
  120. v-for="(item, index) in tableHeader"
  121. :key="index"
  122. sortable
  123. :prop="item.code"
  124. :label="item.title"
  125. align="center"
  126. >
  127. <template #header="scope">
  128. <div>
  129. {{
  130. scope.column.label.slice(0, scope.column.label.indexOf("("))
  131. }}
  132. </div>
  133. <div>
  134. {{ scope.column.label.slice(scope.column.label.indexOf("(")) }}
  135. </div>
  136. </template>
  137. </el-table-column>
  138. <el-table-column label="操作" align="center">
  139. <template #default="scope">
  140. <span
  141. @click="seachHistoryData(scope.row)"
  142. style="cursor: pointer; color: #1c99ff"
  143. >历史</span
  144. >
  145. </template>
  146. </el-table-column>
  147. </el-table>
  148. </div>
  149. </div>
  150. <el-dialog
  151. v-model="dialogVisible"
  152. width="100%"
  153. custom-class="EvaluationhistoryModel"
  154. :close-on-click-modal="false"
  155. >
  156. <template #title>
  157. <div class="dialog-title">
  158. <img
  159. class="dialog-title-img"
  160. src="@assets/img/images/dialog-title.png"
  161. />
  162. <div class="title">{{ dialogTitle }}</div>
  163. </div>
  164. </template>
  165. <div class="body">
  166. <historyDetailFd ref="windhistoryDetail" />
  167. </div>
  168. </el-dialog>
  169. <el-dialog
  170. v-model="contrastVisible"
  171. width="70%"
  172. top="5vh"
  173. custom-class="contrastModal"
  174. :close-on-click-modal="false"
  175. >
  176. <template #title>
  177. <div class="dialog-title">
  178. <img
  179. class="dialog-title-img"
  180. src="@assets/img/images/dialog-title.png"
  181. />
  182. <div class="title">信息对比</div>
  183. </div>
  184. </template>
  185. <div class="dialog-body">
  186. <img class="dialog-img" src="@assets/img/images/dialog.png" />
  187. <dayDetailInfoFd
  188. :chooseList="chooseList"
  189. :tabEvent="tabEvent"
  190. ref="MessageContrast"
  191. />
  192. </div>
  193. </el-dialog>
  194. </div>
  195. </template>
  196. <script>
  197. import { getApiequipmentinfoDayList } from "@/api/monthlyPerformanceAnalysis";
  198. import { GetOrganization, GetStationByCompany } from "@/api/headerNav.js";
  199. import historyDetailFd from "./historyDetailFd.vue";
  200. import dayDetailInfoFd from "./dayDetailInfoFd.vue";
  201. export default {
  202. name: "performanceAssess",
  203. components: {
  204. historyDetailFd,
  205. dayDetailInfoFd,
  206. },
  207. data() {
  208. return {
  209. tabIndex: 0,
  210. companyVal: "",
  211. companyOptions: [],
  212. stationVal: "",
  213. stationOptions: [],
  214. pickerTimer: "",
  215. EvaluationData: [],
  216. tableHeader: [
  217. { title: "发电量(kWh)", code: "dayfdl" },
  218. { title: "理论发电量(kWh)", code: "dayllfdl" },
  219. { title: "平均风速(m/s)", code: "dayfs" },
  220. { title: "平均功率(KW)", code: "daygl" },
  221. { title: "故障损失(kWh)", code: "daygzssdl" },
  222. { title: "限电损失(kWh)", code: "dayxdssdl" },
  223. { title: "维护损失(kWh)", code: "daywhssdl" },
  224. { title: "性能损失(kWh)", code: "dayxnssdl" },
  225. { title: "利用小时数(h)", code: "daylyxs" },
  226. { title: "拟合优度(%)", code: "daynhyd" },
  227. { title: "可利用率(%)", code: "daysbklyl" },
  228. { title: "可用系数(%)", code: "daydxkyxs" },
  229. { title: "有效风时数(h)", code: "dayyxfss" },
  230. { title: "平均切入(m/s)", code: "dayxfqr" },
  231. { title: "静风频率(%)", code: "dayjfpl" },
  232. { title: "功率一致性(%)", code: "dayglyzxxs" },
  233. ],
  234. dialogVisible: false,
  235. dialogTitle: "",
  236. chooseList: [],
  237. contrastVisible: false,
  238. tabEvent: -1,
  239. tabOptions: [
  240. { id: -1, name: "风电" },
  241. { id: -2, name: "光伏" },
  242. ],
  243. };
  244. },
  245. created() {
  246. this.getCompanyData();
  247. },
  248. computed: {
  249. pageHeight() {
  250. return {
  251. height: document.documentElement.clientHeight - 130 + "px",
  252. };
  253. },
  254. },
  255. methods: {
  256. // 切换tab
  257. tabSelect(index) {
  258. this.tabIndex = index;
  259. this.seachData();
  260. },
  261. changeBtn() {
  262. this.$router.push({
  263. path: "/economicsOperation/performanceAnalyse/performanceAssess",
  264. });
  265. },
  266. // 获取公司列表
  267. async getCompanyData() {
  268. this.companyOptions = [];
  269. this.pickerTimer = this.getchangeTime(new Date());
  270. const datas = await GetOrganization({ type: this.tabEvent });
  271. this.companyOptions = datas.data;
  272. this.companyVal = datas.data[0]?.id;
  273. this.getStationData();
  274. },
  275. changeCompan(val) {
  276. this.companyVal = val;
  277. this.stationOptions = [];
  278. this.stationVal = "";
  279. this.getStationData();
  280. },
  281. // 获取场站列表
  282. async getStationData() {
  283. this.stationOptions = [];
  284. let params = {
  285. type: this.tabEvent,
  286. companyids: this.companyVal,
  287. };
  288. const datas = await GetStationByCompany(params);
  289. this.stationOptions = datas.data;
  290. this.stationVal = datas.data[0].id;
  291. this.getTableData();
  292. },
  293. changeStation(val) {
  294. this.stationVal = val;
  295. this.getTableData();
  296. },
  297. seachData() {
  298. this.getTableData();
  299. },
  300. async getTableData() {
  301. let params = {
  302. companyId: this.companyVal,
  303. date: this.pickerTimer,
  304. staType: -1,
  305. types: this.tabIndex * 1 + 1,
  306. wpId: this.stationVal,
  307. type: this.tabEvent,
  308. };
  309. const datas = await getApiequipmentinfoDayList(params);
  310. this.EvaluationData = datas.data;
  311. },
  312. handleCurrentChange(val) {
  313. if (val.length > 2) {
  314. let del_row = val.shift();
  315. this.$refs.Eval_table.toggleRowSelection(del_row, false);
  316. }
  317. let arr = [];
  318. val.forEach((item, index) => {
  319. if (index < 2) {
  320. arr.push(item);
  321. }
  322. });
  323. this.chooseList = arr;
  324. },
  325. //转换时间
  326. getchangeTime(date) {
  327. var y = date.getFullYear();
  328. var m = date.getMonth() + 1;
  329. m = m < 10 ? "0" + m : m;
  330. var d = date.getDate();
  331. d = d < 10 ? "0" + d : d;
  332. return y + "-" + m + "-" + d;
  333. },
  334. seachHistoryData(row) {
  335. this.dialogVisible = true;
  336. this.dialogTitle = "历史数据查询";
  337. this.$nextTick(() => {
  338. let startT =
  339. new Date(this.pickerTimer).getTime() - 10 * 24 * 60 * 60 * 1000;
  340. this.$refs.windhistoryDetail.pickerTimer = [
  341. this.getchangeTime(new Date(startT)),
  342. this.pickerTimer,
  343. ];
  344. this.$refs.windhistoryDetail.tabIndex = this.tabIndex * 1 + 1;
  345. this.$refs.windhistoryDetail.tabEvent = this.tabEvent;
  346. this.$refs.windhistoryDetail.init(row);
  347. });
  348. },
  349. contrastFn() {
  350. this.contrastVisible = true;
  351. this.$nextTick(() => {
  352. this.$refs.MessageContrast.tabIndex = this.tabIndex * 1 + 1;
  353. this.$refs.MessageContrast.init();
  354. });
  355. },
  356. },
  357. };
  358. </script>
  359. <style lang="less">
  360. .comprehensiveEvaluation {
  361. padding: 0 23px;
  362. .Evaluation_title {
  363. padding-left: 10px;
  364. .leftContent {
  365. width: 242px;
  366. height: 41px;
  367. line-height: 41px;
  368. background: url("../../../../../assets/imgs/title_left_bg.png");
  369. span {
  370. font-size: 16px;
  371. font-family: Microsoft YaHei;
  372. font-weight: 400;
  373. color: #ffffff;
  374. margin-left: 25px;
  375. }
  376. }
  377. .floatLeft {
  378. float: left;
  379. }
  380. .floatRight {
  381. float: right;
  382. }
  383. .rightContent {
  384. width: 212px;
  385. height: 28px;
  386. margin-top: 13px;
  387. background: url("../../../../../assets/imgs/title_right_bg.png");
  388. }
  389. }
  390. .clearfix::after {
  391. content: "";
  392. clear: both;
  393. height: 0;
  394. line-height: 0;
  395. visibility: hidden;
  396. display: block;
  397. }
  398. .clearfix {
  399. zoom: 1;
  400. }
  401. .Evaluation_topall {
  402. display: flex;
  403. justify-content: space-between;
  404. .selections {
  405. position: relative;
  406. right: 120px;
  407. display: flex;
  408. margin-top: 10px;
  409. .selections_btn {
  410. flex: 0 0 55px;
  411. text-align: center;
  412. height: 33px;
  413. line-height: 33px;
  414. margin-right: 8px;
  415. color: #fff;
  416. font-size: 1.296vh;
  417. background: fade(#606769, 20);
  418. border: 1px solid fade(#606769, 20);
  419. border-radius: 20px;
  420. &:hover,
  421. &.active {
  422. background: fade(#0046c7, 80);
  423. border: 1px solid #0046c7;
  424. color: #b9b9b9;
  425. cursor: pointer;
  426. }
  427. }
  428. }
  429. .Evaluation_top {
  430. display: flex;
  431. flex-direction: row;
  432. align-items: center;
  433. margin-top: 10px;
  434. margin-bottom: 10px;
  435. .el-select {
  436. width: 155px;
  437. margin-right: 15px;
  438. ::v-deep .el-input .el-input__inner {
  439. width: 150px;
  440. }
  441. }
  442. .station {
  443. display: flex;
  444. flex-direction: row;
  445. align-items: center;
  446. font-size: 14px;
  447. font-family: Microsoft YaHei;
  448. font-weight: 400;
  449. color: #b3b3b3;
  450. margin-right: 10px;
  451. margin-left: 10px;
  452. }
  453. .search-input {
  454. margin-left: 10px;
  455. .el-input__inner {
  456. width: 175px;
  457. }
  458. .el-input__suffix {
  459. right: -50px;
  460. }
  461. }
  462. .but {
  463. display: flex;
  464. flex-direction: row;
  465. align-content: center;
  466. margin-left: 20px;
  467. .buttons:nth-child(1) {
  468. background: rgba(0, 70, 199, 0.6);
  469. border: 1px solid #1f51ae;
  470. border-radius: 13px;
  471. color: #fff;
  472. &:hover {
  473. background: rgba(14, 90, 229, 0.9);
  474. border-radius: 13px;
  475. color: #fff;
  476. }
  477. }
  478. .buttons:nth-child(2) {
  479. background: rgba(67, 81, 107, 0.3);
  480. border: 1px solid #3b4c6c;
  481. border-radius: 13px;
  482. font-size: 14px;
  483. color: #b3b3b3;
  484. }
  485. }
  486. }
  487. }
  488. .Evaluation_Table {
  489. padding: 5px;
  490. padding-bottom: 10px;
  491. .el-table--mini {
  492. margin: 5px;
  493. .el-table__header-wrapper {
  494. tr {
  495. background: rgba(83, 89, 104, 0.3) !important;
  496. th {
  497. vertical-align: top !important;
  498. }
  499. .cell {
  500. color: #b3b3b3;
  501. font-family: MicrosoftYaHei;
  502. font-size: 14px;
  503. }
  504. }
  505. }
  506. .el-table__body-wrapper {
  507. tr {
  508. &:nth-child(2n) {
  509. background: rgba(83, 89, 104, 0.05) !important;
  510. }
  511. .cell {
  512. color: #d8d8d9;
  513. font-family: ArialMT;
  514. font-size: 13px;
  515. height: 25px !important;
  516. .el-checkbox {
  517. height: 25px;
  518. }
  519. }
  520. }
  521. }
  522. }
  523. .historyBtn {
  524. background: #43516b;
  525. border-radius: 15px;
  526. margin-top: 5px;
  527. border: 1px solid #43516b;
  528. span {
  529. color: #fff;
  530. }
  531. }
  532. }
  533. .el-overlay {
  534. .el-overlay-dialog {
  535. overflow-y: hidden !important;
  536. .EvaluationhistoryModel {
  537. margin-top: 0 !important;
  538. .el-dialog__body {
  539. padding-top: 10px;
  540. }
  541. }
  542. .contrastModal {
  543. .el-dialog__header {
  544. border: none;
  545. }
  546. .el-dialog__body {
  547. padding-top: 10px;
  548. }
  549. }
  550. }
  551. }
  552. .el-picker__popper .el-date-range-picker__header .el-picker-panel__icon-btn {
  553. color: #fff;
  554. }
  555. .el-picker__popper .el-date-table .in-range div {
  556. background: #43516b;
  557. }
  558. }
  559. </style>