index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  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="companyVal"
  8. placeholder="请选择"
  9. @change="changeCompan"
  10. >
  11. <el-option
  12. v-for="item in companyOptions"
  13. :key="item.id"
  14. :label="item.aname"
  15. :value="item.id"
  16. >
  17. </el-option>
  18. </el-select>
  19. <div class="station">
  20. 场站:
  21. <el-select
  22. size="mini"
  23. v-model="stationVal"
  24. placeholder="请选择"
  25. clearable
  26. @change="changeStation"
  27. >
  28. <el-option
  29. v-for="item in stationOptions"
  30. :key="item.id"
  31. :label="item.aname"
  32. :value="item.id"
  33. >
  34. </el-option>
  35. </el-select>
  36. </div>
  37. <div class="station">
  38. 时间:
  39. <div class="">
  40. <el-date-picker
  41. v-if="tabIndex == 'month'"
  42. size="mini"
  43. v-model="pickerTimer"
  44. type="month"
  45. value-format="YYYY-MM"
  46. placeholder="选择月份"
  47. popper-class="date-select"
  48. >
  49. </el-date-picker>
  50. </div>
  51. </div>
  52. <div class="but">
  53. <el-button round size="mini" class="buttons" @click="seachData"
  54. >搜 索</el-button
  55. >
  56. </div>
  57. </div>
  58. </div>
  59. <div
  60. style="
  61. background: rgba(0, 0, 0, 0.4);
  62. height: calc(100% - 39px);
  63. padding-bottom: 15px;
  64. "
  65. >
  66. <div class="Evaluation_title clearfix">
  67. <div class="leftContent floatLeft"><span>性能等级评估</span></div>
  68. </div>
  69. <div class="economicTable1">
  70. <el-table
  71. :data="EvaluationData"
  72. stripe
  73. size="mini"
  74. height="calc(100% - 40px)"
  75. ref="Eval_table"
  76. style="width: 100%"
  77. >
  78. <el-table-column prop="equipmentId" label="设备编号" align="center">
  79. </el-table-column>
  80. <el-table-column
  81. v-for="(item, index) in tableHeaderGf"
  82. :key="index"
  83. sortable
  84. :prop="item.code"
  85. :label="item.title"
  86. align="center"
  87. />
  88. </el-table>
  89. <div style="text-align: right">
  90. <el-pagination
  91. @current-change="handlePageChange"
  92. @size-change="handleSizeChange"
  93. :page-sizes="[22, 50, 100, 500]"
  94. :current-page="page.currentPage"
  95. :page-size="page.pagesize"
  96. layout="total, sizes, prev, pager, next, jumper"
  97. :total="page.total"
  98. >
  99. </el-pagination>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </template>
  105. <script>
  106. import {
  107. getApicompanyslist,
  108. getApiwpByCplistlist,
  109. } from "@/api/monthlyPerformanceAnalysis";
  110. import { getApiequipmentinfoDayListGf } from "@/api/powerAnalyse.js";
  111. // import historyDetail from "./historyDetail.vue";
  112. // import dayDetailInfo from "./dayDetailInfo.vue";
  113. import dayjs from "dayjs";
  114. export default {
  115. name: "PerformanceEvaluation",
  116. components: {
  117. // historyDetail,
  118. // dayDetailInfo,
  119. },
  120. data() {
  121. return {
  122. tabIndex: "month",
  123. companyVal: "",
  124. companyOptions: [],
  125. stationVal: "",
  126. stationOptions: [],
  127. pickerTimer: "",
  128. EvaluationData: [],
  129. tableHeaderGf: [
  130. { title: "离散率(%)", code: "scatter" },
  131. { title: "转换效率(%)", code: "conversionEfficiency" },
  132. { title: "等价发电时(h)", code: "equivalentGeneratingTime" },
  133. { title: "设备可利用率(%)", code: "deviceAvailability" },
  134. ],
  135. dialogVisible: false,
  136. dialogTitle: "",
  137. chooseList: [],
  138. contrastVisible: false,
  139. tabEvent: -2,
  140. tabOptions: [
  141. { id: -1, name: "风电" },
  142. { id: -2, name: "光伏" },
  143. ],
  144. page: {
  145. currentPage: 1,
  146. pagesize: 22,
  147. total: 0,
  148. },
  149. historyTimer: "",
  150. };
  151. },
  152. created() {
  153. this.getCompanyData();
  154. this.pickerTimer = dayjs().add(-1, "day").format("YYYY-MM-DD");
  155. this.historyTimer = dayjs().add(-1, "day").format("YYYY-MM-DD");
  156. },
  157. computed: {
  158. pageHeight() {
  159. return {
  160. height: document.documentElement.clientHeight - 130 + "px",
  161. };
  162. },
  163. },
  164. methods: {
  165. handlePageChange(val) {
  166. this.page.currentPage = val;
  167. this.seachData();
  168. },
  169. handleSizeChange(val) {
  170. this.page.currentPage = 1;
  171. this.page.pagesize = val;
  172. this.seachData();
  173. },
  174. changeBtn(id) {
  175. this.tabEvent = id;
  176. this.stationVal = "";
  177. this.stationOptions = [];
  178. this.getStationData();
  179. this.seachData();
  180. },
  181. // 获取公司列表
  182. async getCompanyData() {
  183. this.companyOptions = [];
  184. const { data: datas } = await getApicompanyslist();
  185. this.companyOptions = datas.data;
  186. this.companyVal = datas.data[1]?.id;
  187. this.getStationData();
  188. },
  189. changeCompan(val) {
  190. this.companyVal = val;
  191. this.stationOptions = [];
  192. this.stationVal = "";
  193. this.getStationData();
  194. },
  195. // 获取场站列表
  196. async getStationData() {
  197. this.stationOptions = [];
  198. let params = {
  199. type: this.tabEvent,
  200. companyid: this.companyVal,
  201. };
  202. const { data: datas } = await getApiwpByCplistlist(params);
  203. if (datas.data.length) {
  204. this.stationOptions = datas.data;
  205. this.stationVal = "SXJ_KGDL_HR_GDC_STA";
  206. this.getTableData();
  207. } else {
  208. this.stationOptions = [];
  209. this.stationVal = "";
  210. this.EvaluationData = [];
  211. this.page.total = 0;
  212. }
  213. },
  214. changeStation(val) {
  215. this.stationVal = val;
  216. this.getTableData();
  217. },
  218. seachData() {
  219. this.getTableData();
  220. },
  221. async getTableData() {
  222. let params = {
  223. time: this.pickerTimer,
  224. timeType: this.tabIndex,
  225. stationId: this.stationVal,
  226. type: this.tabEvent,
  227. pageNum: this.page.currentPage,
  228. pageSize: this.page.pagesize,
  229. };
  230. const { data } = await getApiequipmentinfoDayListGf(params);
  231. this.EvaluationData = data.records;
  232. this.page.total = data.total;
  233. },
  234. },
  235. };
  236. </script>
  237. <style lang="less">
  238. .comprehensiveEvaluation {
  239. padding: 0 20px;
  240. height: 100%;
  241. .Evaluation_title {
  242. .leftContent {
  243. width: 242px;
  244. height: 41px;
  245. line-height: 41px;
  246. background: url("~@/assets/imgs/title_left_bg1.png") no-repeat;
  247. span {
  248. font-size: 16px;
  249. font-family: Microsoft YaHei;
  250. font-weight: 400;
  251. color: #05bb4c;
  252. margin-left: 25px;
  253. }
  254. }
  255. .floatLeft {
  256. float: left;
  257. }
  258. .floatRight {
  259. float: right;
  260. }
  261. .rightContent {
  262. width: 212px;
  263. height: 28px;
  264. margin-top: 13px;
  265. background: url("../../../../assets/imgs/title_right_bg.png");
  266. }
  267. }
  268. .clearfix::after {
  269. content: "";
  270. clear: both;
  271. height: 0;
  272. line-height: 0;
  273. visibility: hidden;
  274. display: block;
  275. }
  276. .clearfix {
  277. zoom: 1;
  278. }
  279. .Evaluation_topall {
  280. display: flex;
  281. justify-content: space-between;
  282. .selections {
  283. position: relative;
  284. right: 120px;
  285. display: flex;
  286. margin-top: 10px;
  287. .selections_btn {
  288. flex: 0 0 55px;
  289. text-align: center;
  290. height: 33px;
  291. line-height: 33px;
  292. margin-right: 8px;
  293. color: #b9b9b9;
  294. font-size: 1.296vh;
  295. background: fade(#606769, 20);
  296. border: 1px solid fade(#606769, 20);
  297. border-radius: 20px;
  298. &:hover,
  299. &.active {
  300. background: fade(#05bb4c, 80);
  301. border: 1px solid #05bb4c;
  302. color: #fff;
  303. cursor: pointer;
  304. }
  305. }
  306. }
  307. .Evaluation_top {
  308. display: flex;
  309. flex-direction: row;
  310. align-items: center;
  311. padding-top: 10px;
  312. padding-bottom: 10px;
  313. .station {
  314. display: flex;
  315. flex-direction: row;
  316. align-items: center;
  317. font-size: 14px;
  318. font-family: Microsoft YaHei;
  319. font-weight: 400;
  320. color: #b3b3b3;
  321. margin-right: 10px;
  322. margin-left: 10px;
  323. }
  324. .search-input {
  325. margin-left: 10px;
  326. .el-input__inner {
  327. width: 175px;
  328. }
  329. .el-input__suffix {
  330. right: -50px;
  331. }
  332. }
  333. .tabCut {
  334. display: inline-block;
  335. margin: 0 10px;
  336. div {
  337. display: inline-block;
  338. width: 60px;
  339. height: 27px;
  340. border: 1px solid #274934;
  341. text-align: center;
  342. line-height: 25px;
  343. cursor: pointer;
  344. }
  345. div:nth-child(1) {
  346. border-radius: 13px 0px 0px 13px;
  347. border-right-width: 0;
  348. }
  349. div:nth-child(2) {
  350. border-radius: 0px 13px 13px 0px;
  351. }
  352. .active {
  353. background-color: rgba(5, 187, 76, 0.9);
  354. color: #fff;
  355. }
  356. }
  357. .but {
  358. display: flex;
  359. flex-direction: row;
  360. align-content: center;
  361. margin-left: 20px;
  362. .buttons {
  363. background-color: rgba(5, 187, 76, 0.2);
  364. border: 1px solid #3b6c53;
  365. color: #b3b3b3;
  366. font-size: 14px;
  367. &:hover,
  368. &.active {
  369. background-color: rgba(5, 187, 76, 0.5);
  370. color: #ffffff;
  371. }
  372. }
  373. }
  374. }
  375. }
  376. .economicTable1 {
  377. height: calc(100% - 40px);
  378. .el-table--mini {
  379. .el-table__header-wrapper {
  380. .el-checkbox {
  381. display: none;
  382. }
  383. }
  384. .el-table__body-wrapper {
  385. .el-checkbox {
  386. .el-checkbox__input {
  387. display: block;
  388. }
  389. }
  390. }
  391. }
  392. .historyBtn {
  393. background: #43516b;
  394. border-radius: 15px;
  395. margin-top: 5px;
  396. border: 1px solid #43516b;
  397. span {
  398. color: #fff;
  399. }
  400. }
  401. }
  402. .el-overlay {
  403. .el-overlay-dialog {
  404. overflow-y: hidden !important;
  405. .EvaluationhistoryModel {
  406. margin-top: 0 !important;
  407. .el-dialog__body {
  408. height: calc(100% - 51px - 50px);
  409. }
  410. }
  411. .contrastModal {
  412. .el-dialog__header {
  413. border: none;
  414. }
  415. .el-dialog__body {
  416. padding-top: 10px;
  417. }
  418. }
  419. }
  420. }
  421. .el-picker__popper .el-date-range-picker__header .el-picker-panel__icon-btn {
  422. color: #fff;
  423. }
  424. .el-picker__popper .el-date-table .in-range div {
  425. background: #43516b;
  426. }
  427. }
  428. </style>