publictest.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <template>
  2. <div>
  3. <div class="d-tt">公用测控分画面</div>
  4. <div class="d-subtt">主画面</div>
  5. <div class="d-pn">
  6. <table class="d-pn-tb">
  7. <tr v-for="item in dotArr" :key="item.id">
  8. <td width="50%">{{ item.name }}</td>
  9. <td width="25%">{{ item.num }}</td>
  10. <td width="25%">{{ item.unit }}</td>
  11. </tr>
  12. </table>
  13. <div class="d-pn-ul">
  14. <div class="d-pn-ul-li" :data-active="item.status===true" v-for="(item,index) in dataArr" :key="index">{{ item.name }}</div>
  15. </div>
  16. </div>
  17. </div>
  18. </template>
  19. <script>
  20. export default {
  21. data(){
  22. return {
  23. dataArr: [
  24. {
  25. name: '公用测控 站控制交换机失电'
  26. },
  27. {
  28. name: '公用测控 直流屏充电模块异常'
  29. },
  30. {
  31. name: '公用测控 直流屏绝缘异常'
  32. },
  33. {
  34. name: '公用测控 直流屏交直流串入异常'
  35. },
  36. {
  37. name: '公用测控 upsL3交流输出'
  38. },
  39. {
  40. name: '公用测控 upsL4直流故障'
  41. },
  42. {
  43. name: '公用测控 upsL5输出过载'
  44. },
  45. {
  46. name: '公用测控 1U保护装置保护跳闸'
  47. },
  48. {
  49. name: '公用测控 1U保护装置保护合闸'
  50. },
  51. {
  52. name: '公用测控 7U保护装置保护动作'
  53. },
  54. {
  55. name: '公用测控 7U保护装置异常告警'
  56. },
  57. {
  58. name: '公用测控 防孤岛装置故障'
  59. },
  60. {
  61. name: '公用测控 母差装置故障告警(闭锁)'
  62. },
  63. {
  64. name: '公用测控 母差装置运行异常(告警)'
  65. },
  66. {
  67. name: '公用测控 母差装置CT/PT断线告警'
  68. },
  69. {
  70. name: '公用测控 电能质量失电报警'
  71. },
  72. {
  73. name: '公用测控 小电流接地选线装置动作'
  74. },
  75. {
  76. name: '公用测控 AGC/AVC控制系统装置异常'
  77. }
  78. ],
  79. dotArr: [
  80. {
  81. name: 'Ua:',
  82. num: 0,
  83. unit: 'V'
  84. },
  85. {
  86. name: 'Ub:',
  87. num: 0,
  88. unit: 'V'
  89. },
  90. {
  91. name: 'Uc:',
  92. num: 0,
  93. unit: 'V'
  94. },
  95. {
  96. name: 'Uab:',
  97. num: 0,
  98. unit: 'V'
  99. },
  100. {
  101. name: 'Ubc:',
  102. num: 0,
  103. unit: 'V'
  104. },
  105. {
  106. name: 'Uca:',
  107. num: 0,
  108. unit: 'V'
  109. },
  110. {
  111. name: 'Fri:',
  112. num: 0,
  113. unit: 'Hz'
  114. },
  115. {
  116. name: 'COS:',
  117. num: 0,
  118. unit: ''
  119. },
  120. ]
  121. }
  122. },
  123. props:{
  124. datas: {
  125. type: Object,
  126. default: () => {}
  127. }
  128. },
  129. watch: {
  130. datas(val){
  131. this.funSetDot(val)
  132. }
  133. },
  134. methods: {
  135. funSetDot(obj){
  136. this.dotArr[0].num = obj.akua1
  137. this.dotArr[1].num = obj.akub1
  138. this.dotArr[2].num = obj.akuc1
  139. this.dotArr[3].num = obj.aku1ab
  140. this.dotArr[4].num = obj.aku1bc
  141. this.dotArr[5].num = obj.aku1ca
  142. this.dotArr[6].num = obj.akfr1
  143. this.dotArr[7].num = obj.akcos1
  144. this.dataArr[0].status = obj.akdi007
  145. this.dataArr[1].status = obj.akdi008
  146. this.dataArr[2].status = obj.akdi009
  147. this.dataArr[3].status = obj.akdi013
  148. this.dataArr[4].status = obj.akdi016
  149. this.dataArr[5].status = obj.akdi017
  150. this.dataArr[6].status = obj.akdi018
  151. this.dataArr[7].status = obj.akdi023
  152. this.dataArr[8].status = obj.akdi024
  153. this.dataArr[9].status = obj.akdi026
  154. this.dataArr[10].status = obj.akdi027
  155. this.dataArr[11].status = obj.akdi030
  156. this.dataArr[12].status = obj.akdi039
  157. this.dataArr[13].status = obj.akdi040
  158. this.dataArr[14].status = obj.akdi042
  159. this.dataArr[15].status = obj.akdi047
  160. this.dataArr[16].status = obj.akdi048
  161. this.dataArr[17].status = obj.akdi049
  162. }
  163. },
  164. created(){
  165. this.funSetDot(this.datas)
  166. }
  167. }
  168. </script>
  169. <style lang="less" scoped>
  170. .d-tt{
  171. font-size: 24px;
  172. color: white;
  173. height: 30px;
  174. line-height: 30px;
  175. text-align: center;
  176. }
  177. .d-subtt{
  178. font-size: 20px;
  179. color: white;
  180. height: 24px;
  181. line-height: 24px;
  182. padding-left: 10px;
  183. }
  184. .d-pn{
  185. width: 100%;
  186. margin-top: 10px;
  187. display: flex;
  188. justify-content: space-between;
  189. border: 2px solid rgba(255,255,255,0.6);
  190. height: 600px;
  191. .d-pn-tb{
  192. width: 40%;
  193. margin-top: 10px;
  194. margin-bottom: 20px;
  195. margin-right: 20px;
  196. margin-left: 20px;
  197. border: 1px solid rgba(255,255,255,0.6);
  198. border-collapse: collapse;
  199. td{
  200. border: 1px solid rgba(255,255,255,0.6);
  201. text-align: right;
  202. padding-right: 10px;
  203. height: 36px;
  204. color: rgba(255,255,255,0.75);
  205. font-size: 16px;
  206. font-weight: bold;
  207. &:last-child{
  208. text-align: center;
  209. }
  210. &:nth-child(2){
  211. color: rgb(41, 238, 14);
  212. }
  213. }
  214. }
  215. .d-pn-ul{
  216. width: 70%;
  217. padding: 20px 30px 0 20px;
  218. border-left: 2px solid rgba(255,255,255,0.6);
  219. display: flex;
  220. flex-wrap: wrap;
  221. align-items: flex-start;
  222. align-content: flex-start;
  223. overflow-y: auto;
  224. overflow-x: hidden;
  225. .d-pn-ul-li{
  226. width: 44%;
  227. height: 40px;
  228. // line-height: 40px;
  229. margin-bottom: 20px;
  230. background-image: linear-gradient(to bottom, rgb(145, 145, 240),rgb(245, 245, 245),rgb(145, 145, 233));
  231. color: rgb(0, 0, 179);
  232. font-size: 16px;
  233. text-align: center;
  234. border-radius: 6px;
  235. margin-right: 10px;
  236. display: flex;
  237. font-size: 14px;
  238. align-items: center;
  239. justify-content: center;
  240. &[data-active='true']{
  241. background-image: linear-gradient(to bottom, red,rgb(243, 136, 128),red);
  242. color: rgb(255, 196, 0);
  243. }
  244. }
  245. }
  246. }
  247. </style>