index.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <template>
  2. <div class="wind-control-page">
  3. <div class="content-layout">
  4. <!-- 左侧面板:短路风门管控 -->
  5. <div class="left-panel">
  6. <div class="panel-title">短路风门管控详情</div>
  7. <!-- 风门数据列表 -->
  8. <div class="door-list">
  9. <div class="door-card" v-for="item in doorList" :key="item.id">
  10. <div class="door-header">
  11. <div class="header-row">
  12. <span class="col">位置</span>
  13. <span class="col">前门状态</span>
  14. <span class="col">后门状态</span>
  15. <span class="col">网络状态</span>
  16. <a-button type="primary" class="one-key-btn">一键双开</a-button>
  17. </div>
  18. <div class="status-row">
  19. <span class="col">{{ item.position }}</span>
  20. <span class="col" :class="item.frontStatus === '打开' ? 'status-open' : 'status-close'">
  21. {{ item.frontStatus }}
  22. </span>
  23. <span class="col" :class="item.backStatus === '打开' ? 'status-open' : 'status-close'">
  24. {{ item.backStatus }}
  25. </span>
  26. <span class="col status-online">{{ item.networkStatus }}</span>
  27. </div>
  28. </div>
  29. <!-- 模型展示占位div -->
  30. <div class="model-placeholder">
  31. <img :src="item.modelImg" alt="风门模型" class="model-img" />
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. <div class="center-panel">
  37. <Nav></Nav>
  38. </div>
  39. <!-- 右侧面板:摄像头视频信号 -->
  40. <div class="right-panel">
  41. <div class="video-card">
  42. <h3 class="video-title">摄像头视频信号</h3>
  43. <div class="video-placeholder" v-for="i in 3" :key="i">
  44. <div class="video-frame"></div>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. </template>
  51. <script setup lang="ts">
  52. import { ref } from 'vue';
  53. import Nav from '../components/nav.vue';
  54. const doorList = ref([
  55. {
  56. id: 1,
  57. position: '16联巷短路风门',
  58. frontStatus: '关闭',
  59. backStatus: '关闭',
  60. networkStatus: '在线',
  61. modelImg: '',
  62. },
  63. {
  64. id: 2,
  65. position: '18联巷短路风门',
  66. frontStatus: '打开',
  67. backStatus: '打开',
  68. networkStatus: '在线',
  69. modelImg: '',
  70. },
  71. {
  72. id: 3,
  73. position: '23联巷短路风门',
  74. frontStatus: '关闭',
  75. backStatus: '关闭',
  76. networkStatus: '在线',
  77. modelImg: '',
  78. },
  79. ]);
  80. </script>
  81. <style scoped>
  82. .wind-control-page {
  83. width: 100%;
  84. height: 100%;
  85. background: #0a1435;
  86. color: #d0e8ff;
  87. font-family: 'Microsoft YaHei', sans-serif;
  88. overflow: hidden;
  89. }
  90. .content-layout {
  91. display: flex;
  92. height: calc(100% - 54px);
  93. padding: 10px;
  94. gap: 10px;
  95. }
  96. .center-panel {
  97. flex: 1;
  98. display: flex;
  99. flex-direction: column;
  100. gap: 10px;
  101. }
  102. /* 左侧面板 */
  103. .left-panel {
  104. border: 1px solid #2a52be;
  105. width: 22%;
  106. display: flex;
  107. flex-direction: column;
  108. gap: 10px;
  109. padding: 10px;
  110. }
  111. .panel-title {
  112. background: #1890ff;
  113. color: #fff;
  114. padding: 4px 12px;
  115. border-radius: 4px;
  116. font-size: 14px;
  117. width: fit-content;
  118. text-align: center;
  119. }
  120. .door-list {
  121. display: flex;
  122. flex-direction: column;
  123. gap: 10px;
  124. flex: 1;
  125. }
  126. .door-card {
  127. background: rgba(15, 36, 87, 0.6);
  128. border: 1px solid #2a52be;
  129. border-radius: 4px;
  130. padding: 12px;
  131. display: flex;
  132. flex-direction: column;
  133. gap: 8px;
  134. }
  135. .door-header {
  136. display: flex;
  137. flex-direction: column;
  138. gap: 6px;
  139. }
  140. .header-row {
  141. display: flex;
  142. align-items: center;
  143. font-size: 12px;
  144. font-weight: bold;
  145. color: #fff;
  146. }
  147. .status-row {
  148. display: flex;
  149. align-items: center;
  150. font-size: 12px;
  151. }
  152. .col {
  153. flex: 1;
  154. padding: 0 4px;
  155. }
  156. .one-key-btn {
  157. padding: 2px 8px;
  158. font-size: 12px;
  159. background: #1890ff;
  160. border-color: #1890ff;
  161. }
  162. .status-open {
  163. color: #52c41a;
  164. font-weight: bold;
  165. }
  166. .status-close {
  167. color: #f5222d;
  168. font-weight: bold;
  169. }
  170. .status-online {
  171. color: #1890ff;
  172. font-weight: bold;
  173. }
  174. /* 模型展示占位div */
  175. .model-placeholder {
  176. width: 100%;
  177. height: 120px;
  178. background: rgba(10, 20, 53, 0.8);
  179. border: 1px solid #2a52be;
  180. border-radius: 4px;
  181. display: flex;
  182. align-items: center;
  183. justify-content: center;
  184. overflow: hidden;
  185. }
  186. .model-img {
  187. width: 22%;
  188. display: flex;
  189. flex-direction: column;
  190. justify-content: space-around;
  191. gap: 10px;
  192. object-fit: cover;
  193. }
  194. /* 右侧面板 */
  195. .right-panel {
  196. width: 22%;
  197. display: flex;
  198. flex-direction: column;
  199. }
  200. .video-card {
  201. background: rgba(15, 36, 87, 0.6);
  202. border: 1px solid #2a52be;
  203. border-radius: 4px;
  204. padding: 12px;
  205. height: 100%;
  206. display: flex;
  207. flex-direction: column;
  208. gap: 12px;
  209. }
  210. .video-title {
  211. margin: 0;
  212. font-size: 18px;
  213. color: #fff;
  214. text-align: center;
  215. }
  216. .video-placeholder {
  217. flex: 1;
  218. }
  219. .video-frame {
  220. width: 100%;
  221. height: 100%;
  222. border: 2px solid #2a52be;
  223. border-radius: 4px;
  224. background: transparent;
  225. position: relative;
  226. }
  227. </style>