index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. <template>
  2. <div class="stateTransition">
  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. <el-date-picker
  40. v-model="pickerTimer"
  41. type="datetimerange"
  42. start-placeholder="开始时间"
  43. end-placeholder="结束时间"
  44. format="YYYY-MM-DD HH:mm:ss"
  45. date-format="YYYY/MM/DD ddd"
  46. time-format="A hh:mm:ss"
  47. />
  48. </div>
  49. <div class="but">
  50. <el-button round size="mini" class="buttons" @click="seachData"
  51. >搜 索</el-button
  52. >
  53. </div>
  54. </div>
  55. </div>
  56. <div
  57. style="
  58. background: rgba(0, 0, 0, 0.4);
  59. height: calc(100% - 52px);
  60. padding-bottom: 15px;
  61. "
  62. >
  63. <div class="Evaluation_title clearfix">
  64. <div class="leftContent floatLeft"><span>状态时间分析</span></div>
  65. </div>
  66. <div class="economicTable1">
  67. <el-table
  68. :data="EvaluationData"
  69. stripe
  70. size="mini"
  71. height="calc(100% - 40px)"
  72. ref="Eval_table"
  73. style="width: 100%"
  74. >
  75. <el-table-column prop="deviceId" label="风机名称" align="center" />
  76. <el-table-column label="待机时间(H)" align="center">
  77. <template #default="{ row }">
  78. <span>{{ row.standbyTime.toFixed(2) }}</span>
  79. </template>
  80. </el-table-column>
  81. <el-table-column label="并网时间(H)" align="center">
  82. <template #default="{ row }">
  83. <span>{{ row.gridConnectionTime.toFixed(2) }}</span>
  84. </template>
  85. </el-table-column>
  86. <el-table-column label="故障时间(H)" align="center">
  87. <template #default="{ row }">
  88. <span>{{ row.faultTime.toFixed(2) }}</span>
  89. </template>
  90. </el-table-column>
  91. <el-table-column label="检修时间(H)" align="center">
  92. <template #default="{ row }">
  93. <span>{{ row.maintenanceTime.toFixed(2) }}</span>
  94. </template>
  95. </el-table-column>
  96. <el-table-column label="限电时间(H)" align="center">
  97. <template #default="{ row }">
  98. <span>{{ row.powerLimitTime.toFixed(2) }}</span>
  99. </template>
  100. </el-table-column>
  101. <el-table-column label="受累时间(H)" align="center">
  102. <template #default="{ row }">
  103. <span>{{ row.faultTime.toFixed(2) }}</span>
  104. </template>
  105. </el-table-column>
  106. <el-table-column label="离线时间(H)" align="center">
  107. <template #default="{ row }">
  108. <span>{{ row.offlineTime.toFixed(2) }}</span>
  109. </template>
  110. </el-table-column>
  111. <el-table-column label="合计时间(H)" align="center">
  112. <template #default="{ row }">
  113. <span>{{ row.total }}</span>
  114. </template>
  115. </el-table-column>
  116. </el-table>
  117. <div style="text-align: right">
  118. <el-pagination
  119. @size-change="handleSizeChange"
  120. :page-sizes="[22, 50, 100, 500]"
  121. layout="total, sizes, prev, pager, next, jumper"
  122. @current-change="handlePageChange"
  123. :current-page="page.currentPage"
  124. :page-size="page.pagesize"
  125. :total="page.total"
  126. >
  127. </el-pagination>
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. </template>
  133. <script>
  134. import {
  135. getApiphotovoltaiclist,
  136. getApicompanyslist,
  137. getApiwpByCplistlist,
  138. } from "@/api/monthlyPerformanceAnalysis";
  139. import dayjs from "dayjs";
  140. export default {
  141. name: "PerformanceAssess",
  142. data() {
  143. return {
  144. companyVal: "",
  145. companyOptions: [],
  146. stationVal: "",
  147. stationOptions: [],
  148. pickerTimer: [],
  149. EvaluationData: [],
  150. page: {
  151. currentPage: 1,
  152. pagesize: 22,
  153. total: 0,
  154. },
  155. };
  156. },
  157. mounted() {
  158. this.getCompanyData();
  159. this.pickerTimer = [
  160. new Date(
  161. new Date(new Date().getTime() - 24 * 60 * 60 * 1000).setHours(
  162. 0,
  163. 0,
  164. 0,
  165. 0
  166. )
  167. ),
  168. new Date(new Date(new Date().getTime()).setHours(0, 0, 0, 0)),
  169. ];
  170. },
  171. computed: {
  172. pageHeight() {
  173. return {
  174. height: document.documentElement.clientHeight - 130 + "px",
  175. };
  176. },
  177. },
  178. methods: {
  179. handleSizeChange(val) {
  180. this.page.currentPage = 1;
  181. this.page.pagesize = val;
  182. this.seachData();
  183. },
  184. handlePageChange(val) {
  185. this.page.currentPage = val;
  186. this.seachData();
  187. },
  188. // 获取公司列表
  189. async getCompanyData() {
  190. this.companyOptions = [];
  191. const { data: datas } = await getApicompanyslist();
  192. this.companyOptions = datas.data;
  193. this.companyVal = datas.data[0]?.id;
  194. this.getStationData();
  195. },
  196. changeCompan(val) {
  197. this.companyVal = val;
  198. this.stationOptions = [];
  199. this.stationVal = "";
  200. this.getStationData();
  201. },
  202. // 获取场站列表
  203. async getStationData() {
  204. this.stationOptions = [];
  205. let params = {
  206. type: -1,
  207. companyid: this.companyVal,
  208. };
  209. const { data: datas } = await getApiwpByCplistlist(params);
  210. this.stationOptions = datas.data;
  211. this.stationVal = datas.data[0].id;
  212. this.getTableData();
  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. stationId: this.stationVal,
  224. type: "WT",
  225. startTime: this.pickerTimer[0].getTime(),
  226. endTime: this.pickerTimer[1].getTime(),
  227. pageNum: this.page.currentPage,
  228. pageSize: this.page.pagesize,
  229. };
  230. const { data: datas } = await getApiphotovoltaiclist(params);
  231. this.EvaluationData = datas.data;
  232. this.page.total = datas.total;
  233. },
  234. },
  235. };
  236. </script>
  237. <style lang="less">
  238. .stateTransition {
  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. .buttons {
  358. background-color: rgba(5, 187, 76, 0.2);
  359. border: 1px solid #3b6c53;
  360. color: #b3b3b3;
  361. font-size: 14px;
  362. &:hover,
  363. &.active {
  364. background-color: rgba(5, 187, 76, 0.5);
  365. color: #ffffff;
  366. }
  367. }
  368. }
  369. }
  370. .economicTable1 {
  371. height: calc(100% - 40px);
  372. .el-table--mini {
  373. .el-table__header-wrapper {
  374. .el-checkbox {
  375. display: none;
  376. }
  377. }
  378. .el-table__body-wrapper {
  379. .el-checkbox {
  380. .el-checkbox__input {
  381. display: block;
  382. }
  383. }
  384. }
  385. }
  386. .historyBtn {
  387. background: #43516b;
  388. border-radius: 15px;
  389. margin-top: 5px;
  390. border: 1px solid #43516b;
  391. span {
  392. color: #fff;
  393. }
  394. }
  395. }
  396. .el-overlay {
  397. .el-overlay-dialog {
  398. overflow-y: hidden !important;
  399. .EvaluationhistoryModel {
  400. margin-top: 0 !important;
  401. .el-dialog__body {
  402. height: calc(100% - 51px - 50px);
  403. }
  404. }
  405. .contrastModal {
  406. .el-dialog__header {
  407. border: none;
  408. }
  409. .el-dialog__body {
  410. padding-top: 10px;
  411. }
  412. }
  413. }
  414. }
  415. .el-picker__popper .el-date-range-picker__header .el-picker-panel__icon-btn {
  416. color: #fff;
  417. }
  418. .el-picker__popper .el-date-table .in-range div {
  419. background: #43516b;
  420. }
  421. }
  422. </style>