消毒机前端代码
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.

294 lines
6.9 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="operator_main_content">
  3. <div class="left_contaienr">
  4. <div class="info_cards">
  5. <div class="card">
  6. <DisinfectantLiquidInfo />
  7. </div>
  8. <div class="card">
  9. <EnvironmentInfo />
  10. </div>
  11. <div class="card">
  12. <EnvironmentInfo />
  13. </div>
  14. <div class="card">
  15. <EnvironmentInfo />
  16. </div>
  17. </div>
  18. <div class="warn_wrap">
  19. <p class="warn_text">警报信息</p>
  20. <div class="detail_btn">详情</div>
  21. </div>
  22. </div>
  23. <div class="right_container">
  24. <div class="setting_title">
  25. <p>消毒设置</p>
  26. <p>SET</p>
  27. </div>
  28. <div class="set_form">
  29. <input
  30. type="number"
  31. :disabled="operatorStore.disinfectStatus"
  32. v-model="roomSize"
  33. class="room_size"
  34. />
  35. <div class="log" @click="showLogPicker">{{ logVal }}</div>
  36. </div>
  37. <div class="start" @click="startDisinfect">开始消毒</div>
  38. <div class="progress" @click="toDetail">
  39. <p class="title">消毒进度</p>
  40. <div class="tube">
  41. <div
  42. class="pro"
  43. :style="{
  44. '--width': '50px',
  45. }"
  46. ></div>
  47. </div>
  48. <div class="num">000/100</div>
  49. </div>
  50. </div>
  51. <!-- <WarnModal /> -->
  52. <LogPicker
  53. v-if="logVisible"
  54. :changeLogVal="changeLogVal"
  55. :logVal="logVal"
  56. />
  57. </div>
  58. </template>
  59. <script setup>
  60. import LogPicker from 'cpns/dialogs/LogPicker'
  61. import WarnModal from 'cpns/dialogs/WarnModal'
  62. import DisinfectantLiquidInfo from 'cpns/info/DisinfectantLiquidInfo'
  63. import EnvironmentInfo from 'cpns/info/EnvironmentInfo'
  64. import { ref } from 'vue'
  65. import { useOperatorStore } from '@/store'
  66. const operatorStore = useOperatorStore()
  67. const props = defineProps({
  68. changeShowOperator: {
  69. type: Function,
  70. },
  71. })
  72. const toDetail = () => {
  73. // 判断当前消毒任务是否开始,如果开始时才生效 否则点击不生效
  74. if (operatorStore.disinfectStatus) {
  75. props.changeShowOperator(false)
  76. }
  77. }
  78. const logVisible = ref(false)
  79. const logVal = ref(1)
  80. const roomSize = ref(0)
  81. const changeLogVal = val => {
  82. logVal.value = val
  83. logVisible.value = false
  84. }
  85. const startDisinfect = () => {
  86. // 改变开始消毒状态 如果已经开始则不可点击
  87. if (!operatorStore.disinfectStatus) {
  88. operatorStore.updateDisinfectStatus(true)
  89. props.changeShowOperator(false)
  90. }
  91. }
  92. const showLogPicker = () => {
  93. if (!operatorStore.disinfectStatus) {
  94. logVisible.value = true
  95. }
  96. }
  97. </script>
  98. <style lang="scss" scoped>
  99. .operator_main_content {
  100. margin-bottom: 30px;
  101. height: 580px;
  102. box-sizing: border-box;
  103. display: flex;
  104. align-items: center;
  105. .left_contaienr {
  106. margin-right: 30px;
  107. width: 766px;
  108. height: 580px;
  109. box-sizing: border-box;
  110. border-radius: 16px;
  111. background: #ffffff;
  112. padding: 20px;
  113. .info_cards {
  114. width: 726px;
  115. height: 470px;
  116. box-sizing: border-box;
  117. display: grid;
  118. grid-template-columns: repeat(2, 1fr);
  119. grid-template-rows: repeat(2, 1fr);
  120. column-gap: 20px;
  121. row-gap: 20px;
  122. margin-bottom: 20px;
  123. .card {
  124. width: 353px;
  125. height: 225px;
  126. border-radius: 17.5px;
  127. background: #06518b;
  128. }
  129. }
  130. .warn_wrap {
  131. display: flex;
  132. align-items: center;
  133. justify-content: space-between;
  134. box-sizing: border-box;
  135. padding: 0 20px;
  136. width: 726px;
  137. height: 50px;
  138. border-radius: 6px;
  139. background: #f6f6f6;
  140. .warn_text {
  141. font-family: Source Han Sans CN;
  142. font-size: 12px;
  143. font-weight: 500;
  144. letter-spacing: 0.1em;
  145. color: #fa1c1c;
  146. }
  147. .detail_btn {
  148. width: 105px;
  149. height: 31px;
  150. border-radius: 16px;
  151. background: #06518b;
  152. display: flex;
  153. align-items: center;
  154. justify-content: center;
  155. font-family: Source Han Sans CN;
  156. font-size: 12px;
  157. font-weight: normal;
  158. letter-spacing: 0.1em;
  159. color: #ffffff;
  160. }
  161. }
  162. }
  163. .right_container {
  164. height: 580px;
  165. box-sizing: border-box;
  166. border-radius: 16px;
  167. background: #ffffff;
  168. flex: 1;
  169. padding: 42px;
  170. padding-top: 32px;
  171. .setting_title {
  172. width: 340px;
  173. height: 45px;
  174. border-radius: 23px;
  175. background: #06518b;
  176. padding: 0 24px;
  177. box-sizing: border-box;
  178. display: flex;
  179. align-items: center;
  180. justify-content: space-between;
  181. font-family: Source Han Sans CN;
  182. font-size: 14px;
  183. font-weight: normal;
  184. letter-spacing: 0.1em;
  185. color: #ffffff;
  186. margin-bottom: 41px;
  187. }
  188. .set_form {
  189. width: 340px;
  190. height: 190px;
  191. box-sizing: border-box;
  192. margin-bottom: 41px;
  193. overflow: hidden;
  194. background: url(../assets/img/operator/form.png) no-repeat;
  195. background-size: 100% 100%;
  196. position: relative;
  197. .room_size {
  198. position: absolute;
  199. top: 45px;
  200. left: 23px;
  201. width: 189px;
  202. height: 20px;
  203. text-align: center;
  204. border: none;
  205. outline: none;
  206. }
  207. .log {
  208. position: absolute;
  209. top: 145px;
  210. left: 0px;
  211. width: 240px;
  212. height: 42px;
  213. text-align: center;
  214. display: flex;
  215. align-items: center;
  216. justify-content: center;
  217. font-family: Source Han Sans CN;
  218. font-size: 14px;
  219. font-weight: 500;
  220. letter-spacing: 0.06em;
  221. color: #0e0e0e;
  222. }
  223. }
  224. .start {
  225. margin-bottom: 30px;
  226. width: 340px;
  227. height: 45px;
  228. border-radius: 23px;
  229. background: #06518b;
  230. display: flex;
  231. align-items: center;
  232. justify-content: center;
  233. font-family: Source Han Sans CN;
  234. font-size: 14px;
  235. font-weight: normal;
  236. letter-spacing: 0.1em;
  237. color: #ffffff;
  238. }
  239. .progress {
  240. width: 340px;
  241. height: 114px;
  242. border-radius: 16px;
  243. opacity: 1;
  244. background: #f6f6f6;
  245. box-sizing: border-box;
  246. padding: 27px 24px 18px 27px;
  247. .title {
  248. font-family: Source Han Sans CN;
  249. font-size: 12px;
  250. font-weight: 350;
  251. letter-spacing: 0.06em;
  252. color: #9e9e9e;
  253. margin-bottom: 13px;
  254. }
  255. .tube {
  256. width: 292px;
  257. height: 14px;
  258. border-radius: 7px;
  259. background: #ffffff;
  260. margin-bottom: 11px;
  261. position: relative;
  262. overflow: hidden;
  263. .pro {
  264. position: absolute;
  265. left: 0;
  266. top: 0;
  267. height: 14px;
  268. width: var(--width);
  269. border-radius: 7px;
  270. background: #06518b;
  271. }
  272. }
  273. .num {
  274. display: flex;
  275. justify-content: flex-end;
  276. font-family: Source Han Sans CN;
  277. font-size: 10px;
  278. font-weight: normal;
  279. letter-spacing: 0.06em;
  280. color: #9e9e9e;
  281. }
  282. }
  283. }
  284. }
  285. </style>