DraughtFanList.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. <template>
  2. <div class="draught-fan-list">
  3. <div class="btn-group-tabs">
  4. <!-- <BtnGroup2 :btnGroups="btnGroups" :rowIndex="0" :index="1" @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. btnGroups: [
  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: "name",
  78. is_num: false,
  79. is_light: false,
  80. },
  81. {
  82. name: "冷却风温度",
  83. field: "lqf",
  84. is_num: true,
  85. is_light: false,
  86. },
  87. {
  88. name: "有功功率",
  89. field: "yggl",
  90. is_num: true,
  91. is_light: false,
  92. },
  93. {
  94. name: "液压油温度",
  95. field: "yyy",
  96. is_num: true,
  97. is_light: false,
  98. },
  99. {
  100. name: "Pcspp温度",
  101. field: "pcspp",
  102. is_num: true,
  103. is_light: false,
  104. },
  105. {
  106. name: "U1绕组温度",
  107. field: "u1",
  108. is_num: true,
  109. is_light: false,
  110. },
  111. {
  112. name: "U2绕组温度",
  113. field: "u2",
  114. is_num: true,
  115. is_light: true,
  116. },
  117. {
  118. name: "V1绕组温度",
  119. field: "v1",
  120. is_num: true,
  121. is_light: false,
  122. },
  123. {
  124. name: "V2绕组温度",
  125. field: "v2",
  126. is_num: true,
  127. is_light: false,
  128. },
  129. {
  130. name: "W1绕组温度",
  131. field: "w1",
  132. is_num: true,
  133. is_light: false,
  134. },
  135. {
  136. name: "W2绕组温度",
  137. field: "w2",
  138. is_num: true,
  139. is_light: false,
  140. },
  141. {
  142. name: "轴承A温度",
  143. field: "zca",
  144. is_num: true,
  145. is_light: false,
  146. },
  147. {
  148. name: "轴承B温度",
  149. field: "zcb",
  150. is_num: true,
  151. is_light: false,
  152. },
  153. {
  154. name: "齿轮箱温度",
  155. field: "clx",
  156. is_num: true,
  157. is_light: false,
  158. },
  159. {
  160. name: "齿轮箱轴1温度",
  161. field: "clx1",
  162. is_num: true,
  163. is_light: false,
  164. },
  165. {
  166. name: "齿轮箱轴2温度",
  167. field: "clx2",
  168. is_num: true,
  169. is_light: false,
  170. },
  171. {
  172. name: "机舱温度",
  173. field: "jc",
  174. is_num: true,
  175. is_light: false,
  176. },
  177. {
  178. name: "滑环温度",
  179. field: "hh",
  180. is_num: true,
  181. is_light: false,
  182. },
  183. {
  184. name: "环境温度",
  185. field: "hj",
  186. is_num: true,
  187. is_light: false,
  188. },
  189. ],
  190. data: [
  191. {
  192. name: "1E01",
  193. lqf: 15.78,
  194. yggl: 15.79,
  195. yyy: 15.79,
  196. pcspp: 15.79,
  197. u1: 15.79,
  198. u2: 15.79,
  199. v1: 15.79,
  200. v2: 15.79,
  201. w1: 15.79,
  202. w2: 15.79,
  203. zca: 15.79,
  204. zcb: 15.79,
  205. clx: 15.79,
  206. clx1: 15.79,
  207. clx2: 15.79,
  208. jc: 15.79,
  209. hh: 15.79,
  210. hj: 15.79,
  211. is_light: false,
  212. },
  213. ],
  214. },
  215. };
  216. },
  217. // 函数
  218. methods: {
  219. // 请求服务
  220. requestData (showLoading) {
  221. let that = this;
  222. that.API.requestData({
  223. showLoading,
  224. method: "POST",
  225. subUrl: "matrix/matrixDetialGfPush",
  226. success (res) {
  227. console.log(123123, res);
  228. },
  229. });
  230. },
  231. },
  232. // 生命周期钩子
  233. beforeCreate () {
  234. // 创建前
  235. },
  236. created () {
  237. // 创建后
  238. for (let i = 1; i < 50; i++) {
  239. this.data.data.push(JSON.parse(JSON.stringify(this.data.data[0])));
  240. if (i == 16) {
  241. this.data.data[i].is_light = true;
  242. }
  243. }
  244. },
  245. mounted () {
  246. let that = this;
  247. that.$nextTick(() => {
  248. that.requestData(false);
  249. that.timmer = setInterval(() => {
  250. that.requestData(false);
  251. }, that.$store.state.websocketTimeSec);
  252. });
  253. },
  254. unmounted () {
  255. clearInterval(this.timmer);
  256. this.timmer = null;
  257. },
  258. }
  259. </script>
  260. <style lang="less" scoped>
  261. .draught-fan-list {
  262. width: 100%;
  263. height: 100%;
  264. display: flex;
  265. flex-direction: column;
  266. .btn-group-tabs {
  267. display: flex;
  268. flex-direction: row;
  269. .photovoltaic {
  270. margin-left: 1.481vh;
  271. }
  272. }
  273. .df-table {
  274. border: 0.093vh solid fade(@darkgray, 50%);
  275. position: relative;
  276. overflow: auto;
  277. flex-grow: 1;
  278. margin-top: 1.481vh;
  279. &:before {
  280. content: '';
  281. width: 0.37vh;
  282. height: 0.37vh;
  283. background: @write;
  284. position: absolute;
  285. left: 0.278vh;
  286. top: 0.278vh;
  287. }
  288. tbody {
  289. height: calc(100vh - 166px);
  290. }
  291. }
  292. }
  293. </style>