PerformanceAnalysis.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <template>
  2. <div class="box">
  3. <div class="searchBar">
  4. <el-card class="box-card">
  5. <el-form :inline="true" :model="formInline" class="demo-form-inline">
  6. <el-row :gutter="1">
  7. <el-form-item label="查询条件">
  8. </el-form-item>
  9. <el-form-item label="风场:">
  10. <el-select v-model="value" placeholder="请选择" @change="projectData">
  11. <el-option
  12. v-for="item in options"
  13. :key="item.name"
  14. :label="item.name"
  15. :value="item.id">
  16. </el-option>
  17. </el-select>
  18. </el-form-item>
  19. <el-form-item label="年份:">
  20. <el-date-picker
  21. value-format="yyyy"
  22. v-model="year"
  23. type="year"
  24. placeholder="选择年"
  25. format="yyyy"
  26. >
  27. </el-date-picker>
  28. </el-form-item>
  29. <el-form-item label="月份:">
  30. <el-date-picker
  31. value-format="yyyy-MM"
  32. v-model="month"
  33. type="month"
  34. placeholder="选择月"
  35. format="yyyy-MM">
  36. </el-date-picker>
  37. </el-form-item>
  38. <el-form-item>
  39. <el-button type="primary" @click="queryApData" :plain="true"
  40. >计算</el-button
  41. >
  42. </el-form-item>
  43. <el-form-item>
  44. <el-button type="primary" @click="toExcel()">导出</el-button>
  45. </el-form-item>
  46. </el-row>
  47. </el-form>
  48. </el-card>
  49. <div style="font-size:30px;text-align:center;margin-top:1%">{{title}}</div>
  50. <el-table
  51. id="callthepolicetable"
  52. :data="gridData"
  53. :row-style="{ height: '10px' }"
  54. :cell-style="{ textAlign: 'center',padding:'1px' }"
  55. :header-cell-style="{ textAlign:'center',background:'#F5F7FA'}"
  56. @sort-change="changeTableSort"
  57. @row-click="tableDatawindturbineName"
  58. border
  59. style="font-size: 10px;margin-top:1%;cursor: pointer;">
  60. <el-table-column
  61. type="index"
  62. width="40">
  63. </el-table-column>
  64. <el-table-column
  65. prop="windturbineName"
  66. label="机组编号"
  67. width="125">
  68. </el-table-column>
  69. <el-table-column
  70. :sortable="'custom'"
  71. prop="fdl"
  72. label="实际发电量(万千瓦时)"
  73. width="100">
  74. </el-table-column>
  75. <el-table-column
  76. :sortable="'custom'"
  77. prop="llfdl"
  78. label="理论发电量(万千瓦时)"
  79. width="100">
  80. </el-table-column>
  81. <el-table-column
  82. :sortable="'custom'"
  83. prop="sbklyl"
  84. label="设备利用小时数(小时)"
  85. width="100">
  86. </el-table-column>
  87. <el-table-column
  88. :sortable="'custom'"
  89. prop="sbklyl"
  90. label="设备可利用率(%)"
  91. width="100">
  92. </el-table-column>
  93. <el-table-column
  94. :sortable="'custom'"
  95. prop="dxklyxs"
  96. label="等效可用系数(%)"
  97. width="100">
  98. </el-table-column>
  99. <el-table-column
  100. :sortable="'custom'"
  101. prop="fs"
  102. label="平均风速(m/s)"
  103. width="100">
  104. </el-table-column>
  105. <el-table-column
  106. :sortable="'custom'"
  107. prop="xfqr"
  108. label="小风切入风速(m/s)"
  109. width="100">
  110. </el-table-column>
  111. <el-table-column
  112. :sortable="'custom'"
  113. prop="yxxs"
  114. label="有效风时数(小时)"
  115. width="100">
  116. </el-table-column>
  117. <el-table-column
  118. :sortable="'custom'"
  119. prop="gzss"
  120. label="故障损失电量(万千瓦时)"
  121. width="120">
  122. </el-table-column>
  123. <el-table-column
  124. :sortable="'custom'"
  125. prop="xdss"
  126. label="调度限电损失电量(万千瓦时)"
  127. width="120">
  128. </el-table-column>
  129. <el-table-column
  130. :sortable="'custom'"
  131. prop="jxss"
  132. label="计划检修损失电量(万千瓦时)"
  133. width="120">
  134. </el-table-column>
  135. <el-table-column
  136. :sortable="'custom'"
  137. prop="xnss"
  138. label="性能未达标损失电量(万千瓦时)"
  139. width="120">
  140. </el-table-column>
  141. <el-table-column
  142. :sortable="'custom'"
  143. prop="gzxs"
  144. label="故障停用时间(小时)"
  145. width="100">
  146. </el-table-column>
  147. <el-table-column
  148. :sortable="'custom'"
  149. prop="glyzxxs"
  150. label="机组功率一致性系数(%)"
  151. width="120">
  152. </el-table-column>
  153. <!-- <el-table-column
  154. :sortable="'custom'"
  155. prop="jfpl"
  156. label="静风频率"
  157. width="100">
  158. </el-table-column> -->
  159. </el-table>
  160. </div>
  161. </div>
  162. </template>
  163. <script>
  164. import excelHelper from "@/utils/excelHelper";
  165. import * as echarts from "echarts";
  166. export default {
  167. data() {
  168. return {
  169. formInline: {
  170. windfarm: "",
  171. project: "",
  172. line: "",
  173. },
  174. month:'',
  175. year:'',
  176. timeyear:'',
  177. timemonth:'',
  178. currentPage2: 1,
  179. pagesize: 10,
  180. gridData:[],
  181. gridDataChart:[],
  182. charFreData:[],
  183. charNameData:[],
  184. options: [],
  185. options2: [],
  186. orderByColumn:'',
  187. isAsc: '',
  188. value: 'MHS_FDC',
  189. value2:'',
  190. fanData:'',
  191. title:'',
  192. updateTime:'',
  193. }
  194. },
  195. created(){
  196. this.callAndSpeedData();
  197. },
  198. methods:{
  199. queryApData() {
  200. this.callAndSpeedData();
  201. },
  202. headStyle() {
  203. return "text-align:center,background-color:red"
  204. },
  205. tableDatawindturbineName(val){
  206. this.fanData = val;
  207. console.log(this.fanData)
  208. this.timemonth = this.month.toString();
  209. this.timeyear = this.year.toString();
  210. this.timemonth = this.timemonth.slice(5,7);
  211. this.$router.push({
  212. path:'/performanceAnalysisOperation',
  213. query:{
  214. data:this.fanData,
  215. timeyear: this.year,
  216. timemonth: this.timemonth
  217. }
  218. })
  219. },
  220. changeTableSort(column){
  221. this.orderByColumn = column.prop;
  222. if(column.order == "descending"){
  223. this.isAsc = 'desc';
  224. }else if(column.order == "ascending"){
  225. this.isAsc = "asc";
  226. }
  227. this.callAndSpeedData();
  228. },
  229. projectData(){
  230. this.$http.get('/powercompare/projectAjax?wpIds=' + this.value).then((res) =>{
  231. this.options2 = res.data.data;
  232. })
  233. },
  234. callAndSpeedData(){
  235. this.$http.get('/powercompare/windfarmAjax').then((res) => {
  236. this.options = res.data.data;
  237. })
  238. const nowDate = new Date();
  239. const date = {
  240. year: nowDate.getFullYear(),
  241. month: nowDate.getMonth() + 1,
  242. date: nowDate.getDate(),
  243. }
  244. const newmonth = date.month>10?date.month:'0'+date.month
  245. const day = date.date>10?date.date - 1:'0'+date.date
  246. this.updateTime = date.year + '-' + newmonth + '-' + day
  247. if(this.month == ''){
  248. this.month = this.updateTime;
  249. this.timemonth = this.month.slice(5,7);
  250. }else{
  251. this.month = this.month.toString();
  252. this.timemonth = this.month.slice(5,7);
  253. }
  254. if(this.year == ''){
  255. this.year = this.updateTime;
  256. this.year = this.year.slice(0,4);
  257. }else{
  258. this.year = this.year.toString();
  259. }
  260. var performanceAnalysis = new URLSearchParams();
  261. performanceAnalysis.append('pageNum',this.currentPage2);
  262. performanceAnalysis.append('pageSize',this.pagesize);
  263. performanceAnalysis.append('orderByColumn',this.orderByColumn);
  264. performanceAnalysis.append('isAsc',this.isAsc);
  265. performanceAnalysis.append('wpId',this.value);
  266. performanceAnalysis.append('year',this.year);
  267. performanceAnalysis.append('month',this.timemonth);
  268. this.$http.post('/singleanalysis/singleanalysisMain',performanceAnalysis).then((res) => {
  269. this.gridData = res.data.data;
  270. this.title = this.gridData[0].windPowerStationName + this.timeyear + '年' + this.timemonth + '月单台机组运行指标性能分析';
  271. })
  272. },
  273. toExcel(){
  274. excelHelper.exportExcel("callthepolicetable","负荷率排行榜",".xls",true);
  275. },
  276. }
  277. }
  278. </script>
  279. <style lang="scss" scoped>
  280. .box{
  281. width: 100%;
  282. display: flex;
  283. justify-content: space-around;
  284. align-items: center;
  285. overflow: hidden;
  286. }
  287. .searchBar{
  288. margin-top: 1%;
  289. }
  290. .box-card{
  291. width: 100%;
  292. }
  293. </style>