static.vue 6.3 KB

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