大空间消毒机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

155 lines
4.6 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="setting_contaienr">
  3. <div class="left_container">
  4. <div class="tab_wrap" @click="changeActiveTab(1)">
  5. <p class="active_line" v-show="activeTab == 1"></p>
  6. <p :class="activeTab == 1 ? 'title active' : 'title'">设备参数配置</p>
  7. <div :class="activeTab == 1 ? 'btn style-btn' : 'dis_btn'">配置</div>
  8. </div>
  9. <!-- <div class="tab_wrap" @click="changeActiveTab(2)">
  10. <p class="active_line" v-show="activeTab == 2"></p>
  11. <p :class="activeTab == 2 ? 'title active' : 'title'">修改管理员密码</p>
  12. <div :class="activeTab == 2 ? 'btn style-btn' : 'dis_btn'">修改</div>
  13. </div> -->
  14. <div class="tab_wrap" @click="changeActiveTab(3)">
  15. <p class="active_line" v-show="activeTab == 3"></p>
  16. <p :class="activeTab == 3 ? 'title active' : 'title'">用户管理</p>
  17. <div :class="activeTab == 3 ? 'btn style-btn' : 'dis_btn'">管理</div>
  18. </div>
  19. <div class="tab_wrap" @click="changeActiveTab(4)">
  20. <p class="active_line" v-show="activeTab == 4"></p>
  21. <p :class="activeTab == 4 ? 'title active' : 'title'">日期/时间设置</p>
  22. <div :class="activeTab == 4 ? 'btn style-btn' : 'dis_btn'">配置</div>
  23. </div>
  24. <div class="tab_wrap" @click="changeActiveTab(5)">
  25. <p class="active_line" v-show="activeTab == 5"></p>
  26. <p :class="activeTab == 5 ? 'title active' : 'title'">操作日志导出</p>
  27. <div :class="activeTab == 5 ? 'btn style-btn' : 'dis_btn'">导出</div>
  28. </div>
  29. <!-- <div class="tab_wrap" @click="changeActiveTab(6)">
  30. <p class="active_line" v-show="activeTab == 6"></p>
  31. <p :class="activeTab == 6 ? 'title active' : 'title'">消毒预设</p>
  32. <div :class="activeTab == 6 ? 'btn style-btn' : 'dis_btn'">设置</div>
  33. </div> -->
  34. </div>
  35. <div class="right_container">
  36. <Admin v-if="activeTab == 2" />
  37. <Date v-if="activeTab == 4" />
  38. <Device v-if="activeTab == 1" />
  39. <User v-if="activeTab == 3" />
  40. <ExportExcel v-if="activeTab == 5" />
  41. </div>
  42. </div>
  43. </template>
  44. <script setup>
  45. import { ref } from 'vue'
  46. import Admin from './components/Admin.vue'
  47. import Date from './components/Date.vue'
  48. import Device from './components/Device.vue'
  49. import User from './components/User.vue'
  50. import ExportExcel from './components/ExportExcel.vue'
  51. import { getAllUserJSON } from '@/mock/command'
  52. import { useWebSocketStore } from '@/store'
  53. const webSocketStore = useWebSocketStore()
  54. const activeTab = ref(1)
  55. const changeActiveTab = index => {
  56. activeTab.value = index
  57. if (index == 3) {
  58. webSocketStore.sendCommandMsg(getAllUserJSON)
  59. }
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. .setting_contaienr {
  64. display: flex;
  65. align-items: center;
  66. margin-bottom: 19px;
  67. height: 580px;
  68. box-sizing: border-box;
  69. .left_container {
  70. height: 580px;
  71. width: 424px;
  72. margin-right: 30px;
  73. box-sizing: border-box;
  74. border-radius: 16px;
  75. background: #ffffff;
  76. padding: 20px;
  77. display: grid;
  78. grid-template-columns: repeat(1, 1fr);
  79. grid-template-rows: repeat(6, 1fr);
  80. row-gap: 20px;
  81. .tab_wrap {
  82. width: 384px;
  83. height: 73.3px;
  84. border-radius: 14px;
  85. background: #f6f6f6;
  86. box-sizing: border-box;
  87. display: flex;
  88. align-items: center;
  89. justify-content: space-between;
  90. padding: 0 18px;
  91. padding-left: 37px;
  92. position: relative;
  93. .title {
  94. font-family: Zona Pro;
  95. font-size: 18px;
  96. font-weight: normal;
  97. letter-spacing: 0.06em;
  98. color: #000000;
  99. }
  100. .active {
  101. color: #06518b;
  102. }
  103. .btn {
  104. width: 87px;
  105. height: 45px;
  106. border-radius: 23px;
  107. background: #06518b;
  108. display: flex;
  109. align-items: center;
  110. justify-content: center;
  111. font-family: Source Han Sans CN;
  112. font-size: 14px;
  113. font-weight: normal;
  114. letter-spacing: 0.1em;
  115. color: #ffffff;
  116. }
  117. .dis_btn {
  118. width: 87px;
  119. height: 45px;
  120. display: flex;
  121. align-items: center;
  122. justify-content: center;
  123. font-family: Source Han Sans CN;
  124. font-size: 14px;
  125. font-weight: normal;
  126. line-height: normal;
  127. letter-spacing: 0.1em;
  128. color: #06518b;
  129. }
  130. .active_line {
  131. position: absolute;
  132. left: 20px;
  133. top: 24px;
  134. width: 4px;
  135. height: 32px;
  136. border-radius: 2px;
  137. background: #06518b;
  138. }
  139. }
  140. }
  141. .right_container {
  142. height: 580px;
  143. flex: 1;
  144. box-sizing: border-box;
  145. border-radius: 16px;
  146. background: #ffffff;
  147. overflow: hidden;
  148. }
  149. }
  150. </style>