index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  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% - 39px);
  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. @current-change="handlePageChange"
  120. :current-page="page.currentPage"
  121. :page-size="page.pagesize"
  122. layout="total, prev, pager, next, jumper"
  123. :total="page.total"
  124. >
  125. </el-pagination>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </template>
  131. <script>
  132. import {
  133. getApiphotovoltaiclist,
  134. getApicompanyslist,
  135. getApiwpByCplistlist
  136. } from "@/api/monthlyPerformanceAnalysis";
  137. import dayjs from "dayjs";
  138. export default {
  139. name: "PerformanceAssess",
  140. data() {
  141. return {
  142. companyVal: "",
  143. companyOptions: [],
  144. stationVal: "",
  145. stationOptions: [],
  146. pickerTimer: [],
  147. EvaluationData: [],
  148. page: {
  149. currentPage: 1,
  150. pagesize: 21,
  151. total: 0,
  152. },
  153. };
  154. },
  155. mounted() {
  156. this.getCompanyData();
  157. this.pickerTimer = [
  158. new Date(new Date(new Date().getTime()-24*60*60*1000).setHours(0,0,0,0)),
  159. new Date(new Date(new Date().getTime()).setHours(0,0,0,0))
  160. ]
  161. },
  162. computed: {
  163. pageHeight() {
  164. return {
  165. height: document.documentElement.clientHeight - 130 + "px",
  166. };
  167. },
  168. },
  169. methods: {
  170. handlePageChange(val) {
  171. this.page.currentPage = val;
  172. this.seachData();
  173. },
  174. // 获取公司列表
  175. async getCompanyData() {
  176. this.companyOptions = [];
  177. const { data: datas } = await getApicompanyslist();
  178. this.companyOptions = datas.data;
  179. this.companyVal = datas.data[0]?.id;
  180. this.getStationData();
  181. },
  182. changeCompan(val) {
  183. this.companyVal = val;
  184. this.stationOptions = [];
  185. this.stationVal = "";
  186. this.getStationData();
  187. },
  188. // 获取场站列表
  189. async getStationData() {
  190. this.stationOptions = [];
  191. let params = {
  192. type: -1,
  193. companyid: this.companyVal,
  194. };
  195. const { data: datas } = await getApiwpByCplistlist(params);
  196. this.stationOptions = datas.data;
  197. this.stationVal = datas.data[0].id;
  198. this.getTableData();
  199. },
  200. changeStation(val) {
  201. this.stationVal = val;
  202. this.getTableData();
  203. },
  204. seachData() {
  205. this.getTableData();
  206. },
  207. async getTableData() {
  208. let params = {
  209. stationId: this.stationVal,
  210. type: 'WT',
  211. startTime: this.pickerTimer[0].getTime(),
  212. endTime: this.pickerTimer[1].getTime(),
  213. pageNum: this.page.currentPage,
  214. pageSize: this.page.pagesize,
  215. };
  216. const { data: datas } = await getApiphotovoltaiclist(params);
  217. this.EvaluationData = datas.data
  218. this.page.total = datas.total;
  219. },
  220. },
  221. };
  222. </script>
  223. <style lang="less">
  224. .stateTransition {
  225. padding: 0 20px;
  226. height: 100%;
  227. .Evaluation_title {
  228. .leftContent {
  229. width: 242px;
  230. height: 41px;
  231. line-height: 41px;
  232. background: url("~@/assets/imgs/title_left_bg1.png") no-repeat;
  233. span {
  234. font-size: 16px;
  235. font-family: Microsoft YaHei;
  236. font-weight: 400;
  237. color: #05bb4c;
  238. margin-left: 25px;
  239. }
  240. }
  241. .floatLeft {
  242. float: left;
  243. }
  244. .floatRight {
  245. float: right;
  246. }
  247. .rightContent {
  248. width: 212px;
  249. height: 28px;
  250. margin-top: 13px;
  251. background: url("../../../../assets/imgs/title_right_bg.png");
  252. }
  253. }
  254. .clearfix::after {
  255. content: "";
  256. clear: both;
  257. height: 0;
  258. line-height: 0;
  259. visibility: hidden;
  260. display: block;
  261. }
  262. .clearfix {
  263. zoom: 1;
  264. }
  265. .Evaluation_topall {
  266. display: flex;
  267. justify-content: space-between;
  268. .selections {
  269. position: relative;
  270. right: 120px;
  271. display: flex;
  272. margin-top: 10px;
  273. .selections_btn {
  274. flex: 0 0 55px;
  275. text-align: center;
  276. height: 33px;
  277. line-height: 33px;
  278. margin-right: 8px;
  279. color: #b9b9b9;
  280. font-size: 1.296vh;
  281. background: fade(#606769, 20);
  282. border: 1px solid fade(#606769, 20);
  283. border-radius: 20px;
  284. &:hover,
  285. &.active {
  286. background: fade(#05bb4c, 80);
  287. border: 1px solid #05bb4c;
  288. color: #fff;
  289. cursor: pointer;
  290. }
  291. }
  292. }
  293. .Evaluation_top {
  294. display: flex;
  295. flex-direction: row;
  296. align-items: center;
  297. padding-top: 10px;
  298. padding-bottom: 10px;
  299. .station {
  300. display: flex;
  301. flex-direction: row;
  302. align-items: center;
  303. font-size: 14px;
  304. font-family: Microsoft YaHei;
  305. font-weight: 400;
  306. color: #b3b3b3;
  307. margin-right: 10px;
  308. margin-left: 10px;
  309. }
  310. .search-input {
  311. margin-left: 10px;
  312. .el-input__inner {
  313. width: 175px;
  314. }
  315. .el-input__suffix {
  316. right: -50px;
  317. }
  318. }
  319. .tabCut {
  320. display: inline-block;
  321. margin: 0 10px;
  322. div {
  323. display: inline-block;
  324. width: 60px;
  325. height: 27px;
  326. border: 1px solid #274934;
  327. text-align: center;
  328. line-height: 25px;
  329. cursor: pointer;
  330. }
  331. div:nth-child(1) {
  332. border-radius: 13px 0px 0px 13px;
  333. border-right-width: 0;
  334. }
  335. div:nth-child(2) {
  336. border-radius: 0px 13px 13px 0px;
  337. }
  338. .active {
  339. background-color: rgba(5, 187, 76, 0.9);
  340. color: #fff;
  341. }
  342. }
  343. .but {
  344. display: flex;
  345. flex-direction: row;
  346. align-content: center;
  347. margin-left: 20px;
  348. .buttons:nth-child(1) {
  349. background: rgba(5, 187, 76, 0.6);
  350. border: 1px solid #3b6c53;
  351. border-radius: 13px;
  352. color: #fff;
  353. &:hover {
  354. background: rgba(5, 187, 76, 0.9);
  355. border-radius: 13px;
  356. color: #fff;
  357. }
  358. }
  359. .buttons:nth-child(2) {
  360. background: rgba(67, 81, 107, 0.3);
  361. border: 1px solid #3b6c53;
  362. border-radius: 13px;
  363. font-size: 14px;
  364. color: #b3b3b3;
  365. }
  366. }
  367. }
  368. }
  369. .economicTable1 {
  370. height: calc(100% - 40px);
  371. .el-table--mini {
  372. .el-table__header-wrapper {
  373. .el-checkbox {
  374. display: none;
  375. }
  376. }
  377. .el-table__body-wrapper {
  378. .el-checkbox {
  379. .el-checkbox__input {
  380. display: block;
  381. }
  382. }
  383. }
  384. }
  385. .historyBtn {
  386. background: #43516b;
  387. border-radius: 15px;
  388. margin-top: 5px;
  389. border: 1px solid #43516b;
  390. span {
  391. color: #fff;
  392. }
  393. }
  394. }
  395. .el-overlay {
  396. .el-overlay-dialog {
  397. overflow-y: hidden !important;
  398. .EvaluationhistoryModel {
  399. margin-top: 0 !important;
  400. .el-dialog__body {
  401. height: calc(100% - 51px - 50px);
  402. }
  403. }
  404. .contrastModal {
  405. .el-dialog__header {
  406. border: none;
  407. }
  408. .el-dialog__body {
  409. padding-top: 10px;
  410. }
  411. }
  412. }
  413. }
  414. .el-picker__popper .el-date-range-picker__header .el-picker-panel__icon-btn {
  415. color: #fff;
  416. }
  417. .el-picker__popper .el-date-table .in-range div {
  418. background: #43516b;
  419. }
  420. }
  421. </style>