stationSvgDetailPages.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <template>
  2. <el-dialog
  3. width="85%"
  4. @opened="opened()"
  5. @closed="closed()"
  6. :show-close="false"
  7. class="my-info-dialog"
  8. >
  9. <template #title>
  10. <!-- <div style="margin-top:-10px;color: #FFFFFF;">{{stationName}}</div> -->
  11. <div class="titleList">
  12. <div v-for="(item, index) in stationList" :key="index">
  13. <div
  14. v-if="item?.id !== currentStation"
  15. :class="
  16. index === 0
  17. ? 'controlTypesLeft'
  18. : index === stationList.length - 1
  19. ? 'controlTypesRight'
  20. : 'controlTypes'
  21. "
  22. @click="handleTypeChange(item)"
  23. >
  24. {{ item.stationName || item.name }}
  25. </div>
  26. <div
  27. v-else
  28. :class="
  29. index === 0
  30. ? 'onControlTypesLeft'
  31. : index === stationList.length - 1
  32. ? 'onControlTypesRight'
  33. : 'onControlTypes'
  34. "
  35. @click="handleTypeChange(item)"
  36. >
  37. {{ item.stationName || item.name }}
  38. </div>
  39. </div>
  40. </div>
  41. </template>
  42. <div>
  43. <Cl
  44. ref="svgRef"
  45. v-if="currentStation == 'CL_FDC' || currentStation == 'CL_SYZ'"
  46. />
  47. <KB
  48. ref="svgRef"
  49. v-if="currentStation == 'KB_FDC' || currentStation == 'KB_SYZ'"
  50. />
  51. <DX
  52. ref="svgRef"
  53. v-if="currentStation == 'DX_FDC' || currentStation == 'DX_SYZ'"
  54. />
  55. <SY
  56. ref="svgRef"
  57. v-if="currentStation == 'SY_FDC' || currentStation == 'SY_SYZ'"
  58. />
  59. </div>
  60. </el-dialog>
  61. </template>
  62. <script>
  63. import Cl from "./BoosterStation/cl.vue";
  64. import KB from "./BoosterStation/kb.vue";
  65. import DX from "./BoosterStation/dx.vue";
  66. import SY from "./BoosterStation/sy.vue";
  67. export default {
  68. components: {
  69. Cl,
  70. KB,
  71. DX,
  72. SY,
  73. },
  74. props: {
  75. svgWeb: {
  76. type: String,
  77. default: "",
  78. },
  79. },
  80. data() {
  81. return {
  82. BasicInfo: {},
  83. line: "",
  84. currentStation: "",
  85. alarmTime: "",
  86. alarmContent: "",
  87. alarms: [],
  88. count: false,
  89. stationList: [],
  90. types: null,
  91. };
  92. },
  93. created() {},
  94. methods: {
  95. closed() {
  96. // todo 切换页面的时候应该让上一个页面停止刷新数据(调用end方法)
  97. this.$refs.svgRef.closed();
  98. // this.$refs.BasicInfo.end();
  99. // this.$refs.BasicInfo.labelChange();
  100. this.$emit("close");
  101. //clearInterval(this.refreshTimer);
  102. },
  103. opened() {
  104. this.currentStation = this.svgWeb?this.svgWeb:this.$store.state.stationList[0].id;
  105. this.stationList = this.$store.state.stationList;
  106. this.$nextTick(() => {
  107. this.$refs.svgRef.opened();
  108. });
  109. },
  110. dbClicks(value) {
  111. this.$refs.BasicInfo.dbClicks(value, this.windturbine.windturbineId);
  112. },
  113. handleTypeChange(val) {
  114. this.currentStation = val.id;
  115. this.$nextTick(() => {
  116. this.$refs.svgRef.opened();
  117. });
  118. },
  119. },
  120. };
  121. </script>
  122. <style scoped>
  123. .my-info-dialog {
  124. box-shadow: 0px 0px 10px #05bb4c;
  125. }
  126. .body {
  127. background-color: black;
  128. margin-top: -30px;
  129. margin-left: -10px;
  130. margin-right: -10px;
  131. margin-bottom: -30px;
  132. border-bottom: 20px solid rgb(36, 36, 36);
  133. }
  134. .chunkdiv {
  135. display: flex;
  136. /* justify-content: center; */
  137. background-color: #363636;
  138. margin: 1px;
  139. padding: 4px 2px;
  140. font-size: 12px;
  141. color: #ffffff;
  142. overflow: hidden;
  143. white-space: nowrap;
  144. padding-left: 32px;
  145. }
  146. .title {
  147. font-size: 12px;
  148. color: #b3b3b3;
  149. }
  150. .titleList {
  151. display: flex;
  152. flex-direction: row;
  153. align-items: center;
  154. margin-top: -10px;
  155. color: #ffffff;
  156. }
  157. table {
  158. margin-left: 2px;
  159. margin-right: 2px;
  160. }
  161. td {
  162. width: 20%;
  163. }
  164. el-tabs {
  165. background-color: black;
  166. }
  167. .svg {
  168. height: 67vh;
  169. }
  170. .controlTypes {
  171. width: 110px;
  172. height: 30px;
  173. display: flex;
  174. align-items: center;
  175. justify-content: center;
  176. border: 1px solid rgba(51, 51, 51, 1);
  177. }
  178. .controlTypesLeft {
  179. width: 110px;
  180. height: 30px;
  181. display: flex;
  182. align-items: center;
  183. justify-content: center;
  184. border: 1px solid rgba(51, 51, 51, 1);
  185. border-top-left-radius: 15px;
  186. border-bottom-left-radius: 15px;
  187. }
  188. .controlTypesRight {
  189. width: 110px;
  190. height: 30px;
  191. display: flex;
  192. align-items: center;
  193. justify-content: center;
  194. border: 1px solid rgba(51, 51, 51, 1);
  195. border-top-right-radius: 15px;
  196. border-bottom-right-radius: 15px;
  197. }
  198. .onControlTypes {
  199. width: 110px;
  200. height: 30px;
  201. display: flex;
  202. align-items: center;
  203. justify-content: center;
  204. border: 1px solid rgba(51, 51, 51, 1);
  205. background-color: rgba(37, 116, 219, 1);
  206. }
  207. .onControlTypesLeft {
  208. width: 110px;
  209. height: 30px;
  210. display: flex;
  211. align-items: center;
  212. justify-content: center;
  213. /* border: 1px solid rgba(37, 116, 219, 1); */
  214. border-top-left-radius: 15px;
  215. border-bottom-left-radius: 15px;
  216. background-color: rgba(37, 116, 219, 1);
  217. }
  218. .onControlTypesRight {
  219. width: 110px;
  220. height: 30px;
  221. display: flex;
  222. align-items: center;
  223. justify-content: center;
  224. /* border: 1px solid rgba(37, 116, 219, 1); */
  225. border-top-right-radius: 15px;
  226. border-bottom-right-radius: 15px;
  227. background-color: rgba(37, 116, 219, 1);
  228. }
  229. </style>