status-panel.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. <template>
  2. <div class="status-panel">
  3. <div class="pause" v-if="data.breakOff">中断</div>
  4. <ComPanel class="status-com-panel" :title="data.title">
  5. <div class="p-body">
  6. <div class="category-box">
  7. <div class="score">
  8. <span>{{ data.category.score }}</span>
  9. </div>
  10. <div class="box">
  11. <div
  12. class="category-item"
  13. v-for="(item, index) of data.category.datas"
  14. :key="index"
  15. >
  16. <div>{{ item.text }}</div>
  17. <div :class="item.color">{{ item.num }}</div>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="item-box">
  22. <div
  23. class="data-item"
  24. v-for="(item, index) of data.items"
  25. :key="index"
  26. :class="{ light: item.is_light }"
  27. >
  28. <div class="f1">{{ item.f1 }}</div>
  29. <div class="f2">{{ item.f2 }}</div>
  30. <div class="f3">( {{ item.f3 }} )</div>
  31. <div class="f4">{{ item.f4 }}</div>
  32. <div class="f5">( {{ item.f5 }} )</div>
  33. </div>
  34. </div>
  35. <!-- <el-table :data="data.items" style="width: 100%">
  36. <el-table-column :label="AGC">
  37. <el-table-column prop="f1" label="地址" width="200">
  38. </el-table-column>
  39. <el-table-column prop="zip" label="邮编111" width="120">
  40. </el-table-column>
  41. </el-table-column>
  42. </el-table> -->
  43. </div>
  44. </ComPanel>
  45. </div>
  46. </template>
  47. <script>
  48. import ComPanel from "@com/coms/panel/panel.vue";
  49. export default {
  50. // 名称
  51. name: "StatusPanel",
  52. // 使用组件
  53. components: {
  54. ComPanel,
  55. },
  56. /**
  57. * {
  58. title: "某某某风电场",
  59. weather: {
  60. type: "cloudy",
  61. temperature: 11
  62. },
  63. breakOff: false,
  64. category: {
  65. score: 66,
  66. datas: [
  67. { text: "运行", num: 30, color: 'green' },
  68. { text: "待机", num: 27, color: 'purple' },
  69. { text: "限电", num: 30, color: 'yellow' },
  70. { text: "检修", num: 30, color: 'orange' },
  71. { text: "故障", num: 13, color: 'red' },
  72. { text: "受累", num: 30, color: 'blue' },
  73. { text: "离线", num: 30, color: 'gray' },
  74. ]
  75. },
  76. items: [
  77. { f1: 'AGC宋六:', f2: '设定', f3: '66', f4: '出线', f5: '11', is_light: true },
  78. { f1: '升压站:', f2: '出线Uab/La', f3: '23/3 23/3', f4: '电压', f5: '103 103', is_light: false },
  79. { f1: '风功:', f2: '未来15分钟', f3: '103', f4: '', f5: '', is_light: false },
  80. { f1: '测风塔:', f2: '风速', f3: '103KM', f4: '风向', f5: '103 62', is_light: false },
  81. { f1: '电能量表:', f2: '', f3: '103 62', f4: '', f5: '', is_light: false },
  82. ]
  83. }
  84. */
  85. props: {
  86. data: Object,
  87. },
  88. // 数据
  89. data() {
  90. return {
  91. tableData: [],
  92. };
  93. },
  94. // 函数
  95. methods: {
  96. // jumpPage(wpId) {
  97. // this.$router.push({
  98. // path: `/monitor/windsite/home/${wpId}`,
  99. // // query: { wpId: id },
  100. // });
  101. // console.log('wpid:',wpId)
  102. // },
  103. },
  104. // 生命周期钩子
  105. beforeCreate() {
  106. // 创建前
  107. },
  108. created() {
  109. // 创建后
  110. },
  111. beforeMount() {
  112. // 渲染前
  113. },
  114. mounted() {
  115. // 渲染后
  116. },
  117. beforeUpdate() {
  118. // 数据更新前
  119. },
  120. updated() {
  121. // 数据更新后
  122. },
  123. };
  124. </script>
  125. <style lang="less" scoped>
  126. /deep/.el-table thead.is-group th.el-table__cell {
  127. background-color: rgba(96, 103, 105, 0.2);
  128. }
  129. .status-panel {
  130. position: relative;
  131. height: 22.315vh;
  132. cursor: pointer;
  133. .pause {
  134. position: absolute;
  135. width: 100%;
  136. height: 100%;
  137. z-index: 1;
  138. left: 0;
  139. top: 0;
  140. background-color: fade(@darkgray, 50%);
  141. color: fade(@write, 60%);
  142. font-size: 5.556vh;
  143. font-weight: 600;
  144. display: flex;
  145. align-items: center;
  146. justify-content: center;
  147. opacity: 0.9;
  148. backdrop-filter: blur(0.37vh);
  149. }
  150. .status-com-panel {
  151. width: 100%;
  152. height: 100%;
  153. .p-body {
  154. width: 100%;
  155. height: 27vh;
  156. display: flex;
  157. flex-direction: column;
  158. margin-top: -0.926vh;
  159. .category-box {
  160. width: 100%;
  161. background-color: fade(@darkgray, 30%);
  162. display: flex;
  163. margin-bottom: 0.37vh;
  164. .score {
  165. padding: 0.833vh 1.481vh;
  166. span {
  167. width: 3.889vh;
  168. height: 3.889vh;
  169. border-radius: 50%;
  170. display: flex;
  171. align-items: center;
  172. justify-content: center;
  173. color: @green;
  174. border: 0.093vh solid @green;
  175. background-color: fade(@green, 20%);
  176. font-size: @fontsize;
  177. }
  178. }
  179. .box {
  180. flex-grow: 1;
  181. display: flex;
  182. .category-item {
  183. flex: 1;
  184. display: flex;
  185. flex-direction: column;
  186. align-items: center;
  187. justify-content: center;
  188. font-weight: 600;
  189. div {
  190. flex: 1;
  191. font-size: @fontsize-s;
  192. &:first-child {
  193. display: flex;
  194. align-items: flex-end;
  195. color: @gray;
  196. }
  197. }
  198. }
  199. }
  200. }
  201. .item-box {
  202. flex-grow: 1;
  203. display: flex;
  204. flex-direction: column;
  205. .data-item {
  206. flex: 1;
  207. display: flex;
  208. flex-direction: row;
  209. background-color: fade(@darkgray, 20%);
  210. margin-top: 0.278vh;
  211. div {
  212. font-size: @fontsize-s;
  213. overflow: hidden;
  214. display: flex;
  215. align-items: center;
  216. }
  217. .f1,
  218. .f2,
  219. .f4 {
  220. text-align: right;
  221. color: @gray;
  222. justify-content: flex-end;
  223. }
  224. .f1 {
  225. font-size: 1.6vh;
  226. font-weight: 695 !important;
  227. color: #a5c3af!important;
  228. }
  229. .f3,
  230. .f5 {
  231. font-family: "Bicubik";
  232. text-align: left;
  233. color: @green;
  234. justify-content: flex-start;
  235. }
  236. .f1 {
  237. flex: 2;
  238. }
  239. .f2 {
  240. flex: 3;
  241. margin-right: 0.556vh;
  242. }
  243. .f3 {
  244. flex: 3;
  245. }
  246. .f4 {
  247. flex: 1;
  248. margin-right: 0.556vh;
  249. }
  250. .f5 {
  251. flex: 2;
  252. margin-right: 0;
  253. }
  254. .f3,
  255. .f5 {
  256. color: #05bb4c !important;
  257. font-size: 1.34vh;
  258. margin-left: 18px !important;
  259. }
  260. &.light {
  261. background-color: fade(@darkgray, 50%);
  262. position: relative;
  263. &::after {
  264. content: "";
  265. position: absolute;
  266. height: 100%;
  267. width: 0.278vh;
  268. background-color: @green;
  269. top: 0;
  270. left: 0;
  271. }
  272. .f1,
  273. .f2,
  274. .f4 {
  275. color: @write;
  276. }
  277. .f3,
  278. .f5 {
  279. color: fade(@write, 60%);
  280. }
  281. }
  282. }
  283. }
  284. }
  285. }
  286. }
  287. </style>