Health7.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <template>
  2. <div class="health-7">
  3. <div class="power-info mg-b-16">
  4. <div class="info-tab">
  5. <div class="tab active">
  6. <i class="svg-icon svg-icon svg-icon-sm">
  7. <svg-icon :svgid="'svg-24-houre'" />
  8. </i>
  9. <span> 24小时健康趋势 </span>
  10. </div>
  11. <div class="tab">
  12. <i class="svg-icon svg-icon svg-icon-sm">
  13. <svg-icon :svgid="'svg-h-day'" />
  14. </i>
  15. <span> 7日健康趋势 </span>
  16. </div>
  17. <div class="tab">
  18. <i class="svg-icon svg-icon svg-icon-sm">
  19. <svg-icon :svgid="'svg-h-month'" />
  20. </i>
  21. <span>30日健康趋势</span>
  22. </div>
  23. <div class="empty"></div>
  24. <div class="tab">
  25. <span>全部风场健康趋势</span>
  26. </div>
  27. </div>
  28. <div class="info-chart">
  29. <panel class="info-chart-panel" :title="'损失电量分析'">
  30. <vertival-bar-line-chart :height="'250px'" />
  31. </panel>
  32. </div>
  33. </div>
  34. <div class="fc-info mg-b-16">
  35. <panel :title="'健康走势图'" :showLine="false">
  36. <normal-line-chart :height="'250px'" />
  37. </panel>
  38. </div>
  39. <div class="data-list">
  40. <Table :data="tableData" :canScroll="false" />
  41. </div>
  42. </div>
  43. </template>
  44. <script>
  45. import VertivalBarLineChart from "../../components/chart/combination/vertival-bar-line-chart.vue";
  46. import NormalLineChart from "../../components/chart/line/normal-line-chart.vue";
  47. import SvgIcon from "../../components/coms/icon/svg-icon.vue";
  48. import Panel from "../../components/coms/panel/panel.vue";
  49. import Table from "../../components/coms/table/table.vue";
  50. export default {
  51. setup() {},
  52. components: { SvgIcon, Panel, VertivalBarLineChart, NormalLineChart, Table },
  53. data() {
  54. return {
  55. tableData: {
  56. column: [
  57. {
  58. name: "部件名称",
  59. field: "name",
  60. },
  61. {
  62. name: "备件数量",
  63. field: "v1",
  64. is_num: true,
  65. },
  66. {
  67. name: "平均间隔时间(h)",
  68. field: "v2",
  69. is_num: true,
  70. },
  71. {
  72. name: "平均消耗时间(h)",
  73. field: "v3",
  74. is_num: true,
  75. },
  76. {
  77. name: "预计作业时间(小时)",
  78. field: "v4",
  79. is_num: true,
  80. },
  81. {
  82. name: "损失电量统计",
  83. field: "v5",
  84. is_num: true,
  85. },
  86. {
  87. name: "当前状态",
  88. field: "v6",
  89. template: function(data) {
  90. if (data == 1) return "<div class='dot green'></div>";
  91. else return "<div class='dot yellow'></div>";
  92. },
  93. },
  94. ],
  95. data: [
  96. {
  97. name: "齿轮箱",
  98. v1: 15.78,
  99. v2: 12,
  100. v3: 2.3,
  101. v4: 231.23,
  102. v5: 123.23,
  103. v6: 1,
  104. },
  105. {
  106. name: "齿轮箱",
  107. v1: 15.78,
  108. v2: 12,
  109. v3: 2.3,
  110. v4: 231.23,
  111. v5: 123.23,
  112. v6: 1,
  113. },
  114. {
  115. name: "齿轮箱",
  116. v1: 15.78,
  117. v2: 12,
  118. v3: 2.3,
  119. v4: 231.23,
  120. v5: 123.23,
  121. v6: 1,
  122. },
  123. {
  124. name: "齿轮箱",
  125. v1: 15.78,
  126. v2: 12,
  127. v3: 2.3,
  128. v4: 231.23,
  129. v5: 123.23,
  130. v6: 1,
  131. },
  132. {
  133. name: "齿轮箱",
  134. v1: 15.78,
  135. v2: 12,
  136. v3: 2.3,
  137. v4: 231.23,
  138. v5: 123.23,
  139. v6: 1,
  140. },
  141. {
  142. name: "齿轮箱",
  143. v1: 15.78,
  144. v2: 12,
  145. v3: 2.3,
  146. v4: 231.23,
  147. v5: 123.23,
  148. v6: 2,
  149. },
  150. {
  151. name: "齿轮箱",
  152. v1: 15.78,
  153. v2: 12,
  154. v3: 2.3,
  155. v4: 231.23,
  156. v5: 123.23,
  157. v6: 2,
  158. },
  159. {
  160. name: "齿轮箱",
  161. v1: 15.78,
  162. v2: 12,
  163. v3: 2.3,
  164. v4: 231.23,
  165. v5: 123.23,
  166. v6: 2,
  167. },
  168. ],
  169. },
  170. };
  171. },
  172. created() {},
  173. };
  174. </script>
  175. <style lang="less">
  176. .health-7 {
  177. // 电量健康情况
  178. .power-info {
  179. display: flex;
  180. .info-tab {
  181. flex: 0 0 156px;
  182. display: flex;
  183. flex-direction: column;
  184. height: 287px;
  185. margin-right: 1.4815vh;
  186. .tab {
  187. position: relative;
  188. flex: 0 0 auto;
  189. text-align: center;
  190. height: 33px;
  191. line-height: 33px;
  192. margin-right: 8px;
  193. color: @gray-l;
  194. font-size: 12px;
  195. background: fade(@gray, 20);
  196. border: 1px solid fade(@gray, 20);
  197. display: flex;
  198. align-items: center;
  199. i {
  200. margin: 0 1.4815vh;
  201. svg use {
  202. fill: @gray-l;
  203. }
  204. }
  205. &:hover,
  206. &.active {
  207. background: fade(@green, 20);
  208. border: 1px solid @green;
  209. color: @green;
  210. cursor: pointer;
  211. i {
  212. svg use {
  213. fill: @green;
  214. }
  215. }
  216. }
  217. &.active::after {
  218. box-sizing: content-box;
  219. width: 0px;
  220. height: 0px;
  221. position: absolute;
  222. right: -19px;
  223. padding: 0;
  224. border-bottom: 9px solid @green;
  225. border-top: 9px solid transparent;
  226. border-left: 9px solid transparent;
  227. border-right: 9px solid transparent;
  228. display: block;
  229. content: "";
  230. z-index: 10;
  231. transform: rotate(90deg);
  232. }
  233. &.active::before {
  234. box-sizing: content-box;
  235. width: 0px;
  236. height: 0px;
  237. position: absolute;
  238. right: -17px;
  239. padding: 0;
  240. border-bottom: 9px solid #063319;
  241. border-top: 9px solid transparent;
  242. border-left: 9px solid transparent;
  243. border-right: 9px solid transparent;
  244. display: block;
  245. content: "";
  246. z-index: 12;
  247. transform: rotate(90deg);
  248. }
  249. & + .tab {
  250. margin-top: 0.7407vh;
  251. }
  252. &:last-child {
  253. text-align: center;
  254. justify-content: center;
  255. }
  256. }
  257. .empty {
  258. flex: 1 0 auto;
  259. }
  260. }
  261. .info-chart {
  262. flex: 1 0 auto;
  263. }
  264. }
  265. .data-list {
  266. .dot {
  267. width: 12px;
  268. height: 12px;
  269. margin: auto;
  270. &.green {
  271. background: @green;
  272. }
  273. &.yellow {
  274. background: @yellow;
  275. }
  276. }
  277. }
  278. }
  279. </style>