DraughtFanList.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511
  1. <template>
  2. <div class="draught-fan-list">
  3. <div class="btn-group-tabs">
  4. <BtnGroup2 :btnGroups="btnGroupsss" :rowIndex="rowIndex" :index="selectIndex" @select="select"></BtnGroup2>
  5. </div>
  6. <div class="df-table">
  7. <table-2 :data="data" :height="'100%'" @headerClick="headerClick"></table-2>
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. import Table2 from "@com/coms/table/table2.vue";
  13. import BtnGroup2 from "@com/coms/btn/btn-group-double.vue";
  14. export default {
  15. // 名称
  16. name: "DraughtFanList",
  17. // 使用组件
  18. components: {
  19. Table2,
  20. BtnGroup2,
  21. },
  22. // 数据
  23. data() {
  24. return {
  25. btnGroupsss: [
  26. {
  27. icon: "fa fa-fire",
  28. btns: [
  29. {
  30. text: "某某风场",
  31. code: "mmfdc1",
  32. },
  33. {
  34. text: "某某风场",
  35. code: "mhsfc",
  36. },
  37. {
  38. text: "某某风场",
  39. code: "mmfdc2",
  40. },
  41. {
  42. text: "某某风场",
  43. code: "mmfdc3",
  44. },
  45. {
  46. text: "某某风场",
  47. code: "mmfdc4",
  48. },
  49. ],
  50. },
  51. {
  52. icon: "fa fa-fire-extinguisher",
  53. btns: [
  54. {
  55. text: "某某风场",
  56. code: "mmgf1",
  57. },
  58. {
  59. text: "某某风场",
  60. code: "mmgf2",
  61. },
  62. {
  63. text: "某某风场",
  64. code: "mmgf3",
  65. },
  66. {
  67. text: "某某风场",
  68. code: "mmgf4",
  69. },
  70. ],
  71. },
  72. ],
  73. data: {
  74. column: [
  75. {
  76. name: "风机名称",
  77. field: "code",
  78. sortable: false,
  79. is_num: false,
  80. is_light: false,
  81. },
  82. {
  83. name: "冷却风温度",
  84. field: "FDJLQFWD",
  85. sortable: false,
  86. is_num: true,
  87. is_light: false,
  88. },
  89. {
  90. name: "有功功率",
  91. field: "FJGL",
  92. sortable: false,
  93. is_num: true,
  94. is_light: false,
  95. },
  96. {
  97. name: "液压油温度",
  98. field: "YYYW",
  99. sortable: false,
  100. is_num: true,
  101. is_light: false,
  102. },
  103. {
  104. name: "Pcspp温度",
  105. field: "PCS_WD",
  106. sortable: false,
  107. is_num: true,
  108. is_light: false,
  109. },
  110. {
  111. name: "U1绕组温度",
  112. field: "U1YZWD",
  113. sortable: false,
  114. is_num: true,
  115. is_light: false,
  116. },
  117. {
  118. name: "U2绕组温度",
  119. field: "U2YZWD",
  120. sortable: false,
  121. is_num: true,
  122. is_light: false,
  123. },
  124. {
  125. name: "V1绕组温度",
  126. field: "V1YZWD",
  127. sortable: false,
  128. is_num: true,
  129. is_light: false,
  130. },
  131. {
  132. name: "V2绕组温度",
  133. field: "V2YZWD",
  134. sortable: false,
  135. is_num: true,
  136. is_light: false,
  137. },
  138. {
  139. name: "W1绕组温度",
  140. field: "W1YZWD",
  141. sortable: false,
  142. is_num: true,
  143. is_light: false,
  144. },
  145. {
  146. name: "W2绕组温度",
  147. field: "W2YZWD",
  148. sortable: false,
  149. is_num: true,
  150. is_light: false,
  151. },
  152. {
  153. name: "轴承A温度",
  154. field: "FDJZCAWD",
  155. sortable: false,
  156. is_num: true,
  157. is_light: false,
  158. },
  159. {
  160. name: "轴承B温度",
  161. field: "FDJZCBWD",
  162. sortable: false,
  163. is_num: true,
  164. is_light: false,
  165. },
  166. {
  167. name: "齿轮箱温度",
  168. field: "CLXWD",
  169. sortable: false,
  170. is_num: true,
  171. is_light: false,
  172. },
  173. {
  174. name: "齿轮箱轴1温度",
  175. field: "CLXSRZ1WD",
  176. sortable: false,
  177. is_num: true,
  178. is_light: false,
  179. },
  180. {
  181. name: "齿轮箱轴2温度",
  182. field: "CLXSRZ2WD",
  183. sortable: false,
  184. is_num: true,
  185. is_light: false,
  186. },
  187. {
  188. name: "机舱温度",
  189. field: "JCWD",
  190. sortable: false,
  191. is_num: true,
  192. is_light: false,
  193. },
  194. {
  195. name: "滑环温度",
  196. field: "FDJHHWD",
  197. sortable: false,
  198. is_num: true,
  199. is_light: false,
  200. },
  201. {
  202. name: "环境温度",
  203. field: "JCWWD",
  204. sortable: false,
  205. is_num: true,
  206. is_light: false,
  207. },
  208. ],
  209. data: [],
  210. total: 1000,
  211. },
  212. };
  213. },
  214. // 函数
  215. methods: {
  216. // 请求服务
  217. requestData(showLoading) {
  218. if(this.wpId.indexOf("GDC") != -1 ){
  219. this.requestDataGDC(showLoading);
  220. return 0;
  221. }
  222. let that = this;
  223. that.API.requestData({
  224. showLoading,
  225. method: "POST",
  226. subUrl: "monitorwt/findWtInfoList",
  227. data: {
  228. wpId: that.wpId
  229. },
  230. success(res) {
  231. res.data.forEach((ele) => {
  232. for (let key in ele) {
  233. if (key !== "code" && key !== "lnid" && key !== "model" && key !== "pjid" && key !== "wpid") {
  234. ele[key] = ele[key] || 0;
  235. }
  236. }
  237. });
  238. that.data = {
  239. data:res.data,
  240. column: [
  241. {
  242. name: "风机名称",
  243. field: "code",
  244. is_num: false,
  245. is_light: false,
  246. },
  247. {
  248. name: "冷却风温度",
  249. field: "FDJLQFWD",
  250. is_num: true,
  251. is_light: false,
  252. },
  253. {
  254. name: "有功功率",
  255. field: "FJGL",
  256. is_num: true,
  257. is_light: false,
  258. },
  259. {
  260. name: "液压油温度",
  261. field: "YYYW",
  262. is_num: true,
  263. is_light: false,
  264. },
  265. {
  266. name: "Pcspp温度",
  267. field: "PCS_WD",
  268. is_num: true,
  269. is_light: false,
  270. },
  271. {
  272. name: "U1绕组温度",
  273. field: "U1YZWD",
  274. is_num: true,
  275. is_light: false,
  276. },
  277. {
  278. name: "U2绕组温度",
  279. field: "U2YZWD",
  280. is_num: true,
  281. is_light: false,
  282. },
  283. {
  284. name: "V1绕组温度",
  285. field: "V1YZWD",
  286. is_num: true,
  287. is_light: false,
  288. },
  289. {
  290. name: "V2绕组温度",
  291. field: "V2YZWD",
  292. is_num: true,
  293. is_light: false,
  294. },
  295. {
  296. name: "W1绕组温度",
  297. field: "W1YZWD",
  298. is_num: true,
  299. is_light: false,
  300. },
  301. {
  302. name: "W2绕组温度",
  303. field: "W2YZWD",
  304. is_num: true,
  305. is_light: false,
  306. },
  307. {
  308. name: "轴承A温度",
  309. field: "FDJZCAWD",
  310. is_num: true,
  311. is_light: false,
  312. },
  313. {
  314. name: "轴承B温度",
  315. field: "FDJZCBWD",
  316. is_num: true,
  317. is_light: false,
  318. },
  319. {
  320. name: "齿轮箱温度",
  321. field: "CLXWD",
  322. is_num: true,
  323. is_light: false,
  324. },
  325. {
  326. name: "齿轮箱轴1温度",
  327. field: "CLXSRZ1WD",
  328. is_num: true,
  329. is_light: false,
  330. },
  331. {
  332. name: "齿轮箱轴2温度",
  333. field: "CLXSRZ2WD",
  334. is_num: true,
  335. is_light: false,
  336. },
  337. {
  338. name: "机舱温度",
  339. field: "JCWD",
  340. is_num: true,
  341. is_light: false,
  342. },
  343. {
  344. name: "滑环温度",
  345. field: "FDJHHWD",
  346. is_num: true,
  347. is_light: false,
  348. },
  349. {
  350. name: "环境温度",
  351. field: "JCWWD",
  352. is_num: true,
  353. is_light: false,
  354. },
  355. ]
  356. };
  357. },
  358. });
  359. },
  360. // 光伏电站列表
  361. async requestDataGDC(showLoading){
  362. let res = await this.API.requestData({
  363. showLoading,
  364. method: "POST",
  365. subUrl: "monitorinverter/findInverterInfoList",
  366. data: {
  367. wpId: this.wpId
  368. }
  369. });
  370. let column = [
  371. {name: "逆变器",field: "code"},
  372. {name: "光照强度",field: "JSSSFS"},
  373. {name: "有功功率",field: "AI130"},
  374. {name: "功率因数",field: "AI067"},
  375. {name: "机内温度",field: "AIG071"},
  376. {name: "逆变效率",field: "AIG072"},
  377. {name: "日发电量",field: "RFDL"},
  378. {name: "月发电量",field: "YFDL"},
  379. {name: "年发电量",field: "NFDL"},
  380. {name: "累计发电量",field: "AIG064"},
  381. ];
  382. this.data = {data:res.data.data,column:column};
  383. },
  384. getWp () {
  385. let that = this;
  386. that.API.requestData({
  387. method: "GET",
  388. subUrl: "powercompare/windfarmAllAjax",
  389. success (res) {
  390. let btnGroups = [
  391. {
  392. icon: "svg-wind-site",
  393. btns: [],
  394. },
  395. {
  396. icon: "svg-photovoltaic",
  397. btns: [],
  398. },
  399. ];
  400. res.data.forEach((ele, index) => {
  401. if (ele.id.indexOf("FDC") !== -1) {
  402. btnGroups[0].btns.push({
  403. text: ele.name,
  404. code: ele.id,
  405. });
  406. } else {
  407. btnGroups[1].btns.push({
  408. text: ele.name,
  409. code: ele.id,
  410. });
  411. }
  412. });
  413. that.btnGroupsss = btnGroups;
  414. that.renderBtnActiveIndex();
  415. },
  416. });
  417. },
  418. renderBtnActiveIndex () {
  419. this.btnGroupsss.forEach((pEle, pIndex) => {
  420. pEle.btns.forEach((cEle, cIndex) => {
  421. if (cEle.code === this.wpId) {
  422. this.rowIndex = pIndex;
  423. this.selectIndex = cIndex;
  424. }
  425. });
  426. });
  427. },
  428. select (res) {
  429. this.$router.replace({
  430. path: `/monitor/windsite/draughtfanlist/${res.code}`,
  431. });
  432. },
  433. headerClick(param) {
  434. this.data.column.forEach(item => {
  435. item.sortable = false;
  436. });
  437. this.data.column[param.index].sortable = true;
  438. },
  439. },
  440. created() {
  441. let that = this;
  442. that.wpId = that.$route.params.wpId;
  443. that.getWp();
  444. that.$nextTick(() => {
  445. that.requestData(false);
  446. that.timmer = setInterval(() => {
  447. that.requestData(false);
  448. }, that.$store.state.websocketTimeSec);
  449. });
  450. },
  451. mounted() {},
  452. unmounted() {
  453. clearInterval(this.timmer);
  454. this.timmer = null;
  455. }, watch: {
  456. $route (res) {
  457. this.wpId = res.params.wpId;
  458. if (res.params.wpId) {
  459. this.requestData(false);
  460. this.renderBtnActiveIndex();
  461. }
  462. },
  463. },
  464. };
  465. </script>
  466. <style lang="less">
  467. .draught-fan-list {
  468. width: 100%;
  469. height: 100%;
  470. display: flex;
  471. flex-direction: column;
  472. .btn-group-tabs {
  473. display: flex;
  474. flex-direction: row;
  475. }
  476. .df-table {
  477. border: 0.093vh solid fade(@darkgray, 50%);
  478. position: relative;
  479. overflow: auto;
  480. flex-grow: 1;
  481. margin-top: 1.481vh;
  482. &:before {
  483. content: "";
  484. width: 0.37vh;
  485. height: 0.37vh;
  486. background: @write;
  487. position: absolute;
  488. left: 0.278vh;
  489. top: 0.278vh;
  490. }
  491. tbody {
  492. height: calc(100vh - 166px);
  493. }
  494. }
  495. }
  496. </style>