index.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. <template>
  2. <div class="draught-fan-list">
  3. <div class="query mg-b-8">
  4. <div class="query-items">
  5. <div class="query-item">
  6. <div class="lable">场站:</div>
  7. <div class="search-input">
  8. <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select">
  9. <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
  10. </el-select>
  11. </div>
  12. </div>
  13. <div class="query-item">
  14. <div class="lable">日期:</div>
  15. <div class="search-input">
  16. <el-date-picker v-model="recorddate" type="date" value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
  17. </el-date-picker>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="query-actions">
  22. <button class="btn green" @click="search()">查询</button>
  23. </div>
  24. </div>
  25. <div class="df-table curTable">
  26. <el-table :data="tableData.data" height="78vh" max-height="78vh" stripe style="width: 100%" :border="true">
  27. <el-table-column :show-overflow-tooltip="true" prop="wtname" label="风机"></el-table-column>
  28. <el-table-column :show-overflow-tooltip="true" :label="tableTitle">
  29. <el-table-column :show-overflow-tooltip="true" label="近一天">
  30. <el-table-column :show-overflow-tooltip="true" label="1">
  31. <el-table-column :show-overflow-tooltip="true" prop="day1top1name" label="故障"></el-table-column>
  32. <el-table-column :show-overflow-tooltip="true" prop="day1top1" label="频次" :sortable="true"></el-table-column>
  33. </el-table-column>
  34. <el-table-column :show-overflow-tooltip="true" label="2">
  35. <el-table-column :show-overflow-tooltip="true" prop="day1top2name" label="故障"></el-table-column>
  36. <el-table-column :show-overflow-tooltip="true" prop="day1top2" label="频次" :sortable="true"></el-table-column>
  37. </el-table-column>
  38. <el-table-column :show-overflow-tooltip="true" label="3">
  39. <el-table-column :show-overflow-tooltip="true" prop="day1top3name" label="故障"></el-table-column>
  40. <el-table-column :show-overflow-tooltip="true" prop="day1top3" label="频次" :sortable="true"></el-table-column>
  41. </el-table-column>
  42. </el-table-column>
  43. <el-table-column :show-overflow-tooltip="true" label="近三天">
  44. <el-table-column :show-overflow-tooltip="true" label="1">
  45. <el-table-column :show-overflow-tooltip="true" prop="day3top1name" label="故障"></el-table-column>
  46. <el-table-column :show-overflow-tooltip="true" prop="day3top1" label="频次" :sortable="true"></el-table-column>
  47. </el-table-column>
  48. <el-table-column :show-overflow-tooltip="true" label="2">
  49. <el-table-column :show-overflow-tooltip="true" prop="day3top2name" label="故障"></el-table-column>
  50. <el-table-column :show-overflow-tooltip="true" prop="day3top2" label="频次" :sortable="true"></el-table-column>
  51. </el-table-column>
  52. <el-table-column :show-overflow-tooltip="true" label="3">
  53. <el-table-column :show-overflow-tooltip="true" prop="day3top3name" label="故障"></el-table-column>
  54. <el-table-column :show-overflow-tooltip="true" prop="day3top3" label="频次" :sortable="true"></el-table-column>
  55. </el-table-column>
  56. </el-table-column>
  57. <el-table-column :show-overflow-tooltip="true" label="近七天">
  58. <el-table-column :show-overflow-tooltip="true" label="1">
  59. <el-table-column :show-overflow-tooltip="true" prop="day7top1name" label="故障"></el-table-column>
  60. <el-table-column :show-overflow-tooltip="true" prop="day7top1" label="频次" :sortable="true"></el-table-column>
  61. </el-table-column>
  62. <el-table-column :show-overflow-tooltip="true" label="2">
  63. <el-table-column :show-overflow-tooltip="true" prop="day7top2name" label="故障"></el-table-column>
  64. <el-table-column :show-overflow-tooltip="true" prop="day7top2" label="频次" :sortable="true"></el-table-column>
  65. </el-table-column>
  66. <el-table-column :show-overflow-tooltip="true" label="3">
  67. <el-table-column :show-overflow-tooltip="true" prop="day7top3name" label="故障"></el-table-column>
  68. <el-table-column :show-overflow-tooltip="true" prop="day7top3" label="频次" :sortable="true"></el-table-column>
  69. </el-table-column>
  70. </el-table-column>
  71. <el-table-column :show-overflow-tooltip="true" label="近十五天">
  72. <el-table-column :show-overflow-tooltip="true" label="1">
  73. <el-table-column :show-overflow-tooltip="true" prop="day15top1name" label="故障"></el-table-column>
  74. <el-table-column :show-overflow-tooltip="true" prop="day15top1" label="频次" :sortable="true"></el-table-column>
  75. </el-table-column>
  76. <el-table-column :show-overflow-tooltip="true" label="2">
  77. <el-table-column :show-overflow-tooltip="true" prop="day15top2name" label="故障"></el-table-column>
  78. <el-table-column :show-overflow-tooltip="true" prop="day15top2" label="频次" :sortable="true"></el-table-column>
  79. </el-table-column>
  80. <el-table-column :show-overflow-tooltip="true" label="3">
  81. <el-table-column :show-overflow-tooltip="true" prop="day15top3name" label="故障"></el-table-column>
  82. <el-table-column :show-overflow-tooltip="true" prop="day15top3" label="频次" :sortable="true"></el-table-column>
  83. </el-table-column>
  84. </el-table-column>
  85. <el-table-column :show-overflow-tooltip="true" label="近一个月">
  86. <el-table-column :show-overflow-tooltip="true" label="1">
  87. <el-table-column :show-overflow-tooltip="true" prop="month1top1name" label="故障"></el-table-column>
  88. <el-table-column :show-overflow-tooltip="true" prop="month1top1" label="频次" :sortable="true"></el-table-column>
  89. </el-table-column>
  90. <el-table-column :show-overflow-tooltip="true" label="2">
  91. <el-table-column :show-overflow-tooltip="true" prop="month1top2name" label="故障"></el-table-column>
  92. <el-table-column :show-overflow-tooltip="true" prop="month1top2" label="频次" :sortable="true"></el-table-column>
  93. </el-table-column>
  94. <el-table-column :show-overflow-tooltip="true" label="3">
  95. <el-table-column :show-overflow-tooltip="true" prop="month1top3name" label="故障"></el-table-column>
  96. <el-table-column :show-overflow-tooltip="true" prop="month1top3" label="频次" :sortable="true"></el-table-column>
  97. </el-table-column>
  98. </el-table-column>
  99. </el-table-column>
  100. </el-table>
  101. </div>
  102. <el-dialog title="切入切出风速整合历史" v-model="dialogShow" width="85%" top="10vh" custom-class="modal"
  103. :close-on-click-modal="true" @closed="dialogType = ''">
  104. </el-dialog>
  105. </div>
  106. </template>
  107. <script>
  108. export default {
  109. // 名称
  110. name: "cutAnalyse",
  111. // 数据
  112. data () {
  113. const that = this;
  114. return {
  115. isAsc: "asc",
  116. wpArray: [],
  117. wpId: "",
  118. recorddate: new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
  119. tableTitle: "",
  120. tableData: {
  121. column: [
  122. {
  123. name: "风机",
  124. field: "windturbineid",
  125. is_num: false,
  126. is_light: false,
  127. sortable: true
  128. },
  129. {
  130. name: "总小风切入",
  131. field: "inputsmall",
  132. is_num: false,
  133. is_light: false,
  134. sortable: true
  135. },
  136. {
  137. name: "总小风切入合格率",
  138. field: "inputsmallratio",
  139. is_num: false,
  140. is_light: false,
  141. sortable: true
  142. },
  143. {
  144. name: "总大风切入",
  145. field: "inputbig",
  146. is_num: false,
  147. is_light: false,
  148. sortable: true
  149. },
  150. {
  151. name: "总大风切入合格率",
  152. field: "inputbigratio",
  153. is_num: false,
  154. is_light: false,
  155. sortable: true
  156. },
  157. {
  158. name: "总小风切出",
  159. field: "outputsmall",
  160. is_num: false,
  161. is_light: false,
  162. sortable: true
  163. },
  164. {
  165. name: "总小风切出合格率",
  166. field: "outputsmallratio",
  167. is_num: false,
  168. is_light: false,
  169. sortable: true
  170. },
  171. {
  172. name: "总大风切出",
  173. field: "outputbig",
  174. is_num: false,
  175. is_light: false,
  176. sortable: true
  177. },
  178. {
  179. name: "总大风切出合格率",
  180. field: "outputbigmaxratio",
  181. is_num: false,
  182. is_light: false,
  183. sortable: true
  184. },
  185. {
  186. name: "日小风切入",
  187. field: "dayinputsmall",
  188. is_num: false,
  189. is_light: false,
  190. sortable: true
  191. },
  192. {
  193. name: "日小风切入合格率",
  194. field: "dayinputsmallratio",
  195. is_num: false,
  196. is_light: false,
  197. sortable: true
  198. },
  199. {
  200. name: "日小风切出",
  201. field: "dayoutputsmall",
  202. is_num: false,
  203. is_light: false,
  204. sortable: true
  205. },
  206. {
  207. name: "日小风切出合格率",
  208. field: "dayoutputsmallratio",
  209. is_num: false,
  210. is_light: false,
  211. sortable: true
  212. },
  213. {
  214. name: "日大风切入",
  215. field: "dayinputbig",
  216. is_num: false,
  217. is_light: false,
  218. sortable: true
  219. },
  220. {
  221. name: "日大风切入合格率",
  222. field: "dayinputbigratio",
  223. is_num: false,
  224. is_light: false,
  225. sortable: true
  226. },
  227. {
  228. name: "日大风切出",
  229. field: "dayoutputbig",
  230. is_num: false,
  231. is_light: false,
  232. sortable: true
  233. },
  234. {
  235. name: "日大风切出合格率",
  236. field: "dayoutputbigratio",
  237. is_num: false,
  238. is_light: false,
  239. sortable: true
  240. },
  241. {
  242. name: "月小风切入",
  243. field: "monthinputsmall",
  244. is_num: false,
  245. is_light: false,
  246. sortable: true
  247. },
  248. {
  249. name: "月小风切入合格率",
  250. field: "monthinputsmallratio",
  251. is_num: false,
  252. is_light: false,
  253. sortable: true
  254. },
  255. {
  256. name: "月大风切入",
  257. field: "monthinputbig",
  258. is_num: false,
  259. is_light: false,
  260. },
  261. {
  262. name: "月大风切入合格率",
  263. field: "monthinputbigratio",
  264. is_num: false,
  265. is_light: false,
  266. sortable: true
  267. },
  268. {
  269. name: "月小风切出",
  270. field: "monthoutputsmall",
  271. is_num: false,
  272. is_light: false,
  273. sortable: true
  274. },
  275. {
  276. name: "月小风切出合格率",
  277. field: "monthoutputsmallratio",
  278. is_num: false,
  279. is_light: false,
  280. sortable: true
  281. },
  282. {
  283. name: "月大风切出",
  284. field: "monthoutputbig",
  285. is_num: false,
  286. is_light: false,
  287. sortable: true
  288. },
  289. {
  290. name: "月大风切出合格率",
  291. field: "monthoutputbigratio",
  292. is_num: false,
  293. is_light: false,
  294. sortable: true
  295. },
  296. {
  297. name: "年小风切入",
  298. field: "yearinputsmall",
  299. is_num: false,
  300. is_light: false,
  301. sortable: true
  302. },
  303. {
  304. name: "年小风切入合格率",
  305. field: "yearinputsmallratio",
  306. is_num: false,
  307. is_light: false,
  308. sortable: true
  309. },
  310. {
  311. name: "年大风切入",
  312. field: "yearinputbig",
  313. is_num: false,
  314. is_light: false,
  315. sortable: true
  316. },
  317. {
  318. name: "年大风切入合格率",
  319. field: "yearinputbigratio",
  320. is_num: false,
  321. is_light: false,
  322. sortable: true
  323. },
  324. {
  325. name: "年小风切出",
  326. field: "yearoutputsmall",
  327. is_num: false,
  328. is_light: false,
  329. sortable: true
  330. },
  331. {
  332. name: "年小风切出合格率",
  333. field: "yearoutputsmallratio",
  334. is_num: false,
  335. is_light: false,
  336. sortable: true
  337. },
  338. {
  339. name: "年大风切出",
  340. field: "yearoutputbig",
  341. is_num: false,
  342. is_light: false,
  343. sortable: true
  344. },
  345. {
  346. name: "年大风切出合格率",
  347. field: "yearoutputbigratio",
  348. is_num: false,
  349. is_light: false,
  350. sortable: true
  351. },
  352. {
  353. name: "操作",
  354. field: "",
  355. is_num: false,
  356. is_light: false,
  357. template () {
  358. return "<el-button type='text' style='cursor: pointer;'>历史</el-button>";
  359. },
  360. click (e, row) {
  361. that.getOutputspeedHistoryList(row)
  362. }
  363. }
  364. ],
  365. data: [],
  366. },
  367. };
  368. },
  369. // 函数
  370. methods: {
  371. // 请求服务
  372. requestData () {
  373. let that = this;
  374. that.API.requestData({
  375. method: "GET",
  376. subUrl: "powercompare/windfarmAjax",
  377. success (res) {
  378. that.wpArray = res.data;
  379. that.wpId = res.data[0].id;
  380. that.getTableData();
  381. }
  382. });
  383. },
  384. getTableData () {
  385. let that = this;
  386. if (!that.wpId || !that.recorddate) {
  387. that.BASE.showMsg({
  388. msg: "场站与日期不可为空"
  389. });
  390. } else {
  391. that.API.requestData({
  392. method: "GET",
  393. baseURL: "http://10.155.32.4:8034/",
  394. subUrl: "reliability/earlyWarn",
  395. data: {
  396. wpid: that.wpId,
  397. date: that.recorddate
  398. },
  399. success (res) {
  400. if (res.data.length) {
  401. that.tableTitle = res.data[0].wpname + "预警统计";
  402. that.tableData.data = res.data;
  403. }
  404. }
  405. });
  406. }
  407. },
  408. search () {
  409. this.getTableData();
  410. }
  411. },
  412. created () {
  413. this.requestData();
  414. },
  415. mounted () { },
  416. unmounted () { },
  417. };
  418. </script>
  419. <style lang="less" scoped>
  420. .draught-fan-list {
  421. width: 100%;
  422. height: 100%;
  423. display: flex;
  424. flex-direction: column;
  425. .btn-group-tabs {
  426. display: flex;
  427. flex-direction: row;
  428. .photovoltaic {
  429. margin-left: 1.481vh;
  430. }
  431. }
  432. .df-table {
  433. border: 0.093vh solid fade(@darkgray, 50%);
  434. position: relative;
  435. overflow: auto;
  436. flex-grow: 1;
  437. margin-top: 1.481vh;
  438. &:before {
  439. content: '';
  440. width: 0.37vh;
  441. height: 0.37vh;
  442. background: @write;
  443. position: absolute;
  444. left: 0.278vh;
  445. top: 0.278vh;
  446. }
  447. tbody {
  448. height: calc(100vh - 166px);
  449. }
  450. }
  451. }
  452. </style>
  453. <style lang="less">
  454. .curTable {
  455. .cell {
  456. text-align: center;
  457. }
  458. }
  459. </style>