DraughtFanList.vue 11 KB

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