小空间消毒机
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.

167 lines
5.2 KiB

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 class="tab_wrap" @click="changeActiveTab(7)">
  35. <p class="active_line" v-show="activeTab == 7"></p>
  36. <p :class="activeTab == 7 ? 'title active' : 'title'">历史记录</p>
  37. <div :class="activeTab == 7 ? 'btn style-btn' : 'dis_btn'">查看</div>
  38. </div>
  39. </div>
  40. <div class="right_container">
  41. <Admin v-if="activeTab == 2" />
  42. <Date v-if="activeTab == 4" />
  43. <Device v-if="activeTab == 1" />
  44. <User v-if="activeTab == 3" />
  45. <ExportExcel :exportType="1" v-if="activeTab == 5" />
  46. <ExportExcel :exportType="2" v-if="activeTab == 6" />
  47. <History v-if="activeTab == 7" />
  48. </div>
  49. </div>
  50. </template>
  51. <script setup>
  52. import { ref } from 'vue'
  53. import Admin from './components/Admin.vue'
  54. import Date from './components/Date.vue'
  55. import Device from './components/Device.vue'
  56. import User from './components/User.vue'
  57. import ExportExcel from './components/ExportExcel.vue'
  58. import History from './components/History.vue'
  59. import { getAllUserJSON, getAllLocalHistoryData } from '@/mock/command'
  60. import { useWebSocketStore } from '@/store'
  61. const webSocketStore = useWebSocketStore()
  62. const activeTab = ref(1)
  63. const changeActiveTab = index => {
  64. activeTab.value = index
  65. if (index == 3) {
  66. webSocketStore.sendCommandMsg(getAllUserJSON)
  67. }
  68. if (index == 7) {
  69. // 查询历史记录
  70. webSocketStore.sendCommandMsg(getAllLocalHistoryData)
  71. }
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. .setting_contaienr {
  76. display: flex;
  77. align-items: center;
  78. margin-bottom: 19px;
  79. height: 580px;
  80. box-sizing: border-box;
  81. .left_container {
  82. height: 580px;
  83. width: 424px;
  84. margin-right: 30px;
  85. box-sizing: border-box;
  86. border-radius: 16px;
  87. background: #ffffff;
  88. padding: 20px;
  89. display: grid;
  90. grid-template-columns: repeat(1, 1fr);
  91. grid-template-rows: repeat(6, 1fr);
  92. row-gap: 20px;
  93. .tab_wrap {
  94. width: 384px;
  95. height: 73.3px;
  96. border-radius: 14px;
  97. background: #f6f6f6;
  98. box-sizing: border-box;
  99. display: flex;
  100. align-items: center;
  101. justify-content: space-between;
  102. padding: 0 18px;
  103. padding-left: 37px;
  104. position: relative;
  105. .title {
  106. font-family: Zona Pro;
  107. font-size: 18px;
  108. font-weight: normal;
  109. letter-spacing: 0.06em;
  110. color: #000000;
  111. }
  112. .active {
  113. color: #06518b;
  114. }
  115. .btn {
  116. width: 87px;
  117. height: 45px;
  118. border-radius: 23px;
  119. background: #06518b;
  120. display: flex;
  121. align-items: center;
  122. justify-content: center;
  123. font-family: Source Han Sans CN;
  124. font-size: 20px;
  125. font-weight: normal;
  126. letter-spacing: 0.1em;
  127. color: #ffffff;
  128. }
  129. .dis_btn {
  130. width: 87px;
  131. height: 45px;
  132. display: flex;
  133. align-items: center;
  134. justify-content: center;
  135. font-family: Source Han Sans CN;
  136. font-size: 20px;
  137. font-weight: normal;
  138. line-height: normal;
  139. letter-spacing: 0.1em;
  140. color: #06518b;
  141. }
  142. .active_line {
  143. position: absolute;
  144. left: 20px;
  145. top: 24px;
  146. width: 4px;
  147. height: 32px;
  148. border-radius: 2px;
  149. background: #06518b;
  150. }
  151. }
  152. }
  153. .right_container {
  154. height: 580px;
  155. flex: 1;
  156. box-sizing: border-box;
  157. border-radius: 16px;
  158. background: #ffffff;
  159. overflow: hidden;
  160. }
  161. }
  162. </style>