管道式消毒机
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.

150 lines
3.7 KiB

  1. <template>
  2. <div class="leave_modal">
  3. <div class="modal_content">
  4. <svg
  5. xmlns="http://www.w3.org/2000/svg"
  6. xmlns:xlink="http://www.w3.org/1999/xlink"
  7. fill="none"
  8. version="1.1"
  9. width="69"
  10. height="69"
  11. viewBox="0 0 69 69"
  12. >
  13. <g>
  14. <path
  15. d="M34.5,0C15.456,0,0,15.456,0,34.5C0,53.544,15.456,69,34.5,69C53.544,69,69,53.544,69,34.5C69,15.456,53.544,0,34.5,0ZM34.5,55.2C32.5335,55.2,30.981,53.613,30.981,51.681C30.981,49.7145,32.568,48.162,34.5,48.162C36.4665,48.162,38.019,49.749,38.019,51.681C38.019,53.613,36.4665,55.2,34.5,55.2ZM38.3295,15.8355L37.605,40.9515C37.5705,42.2625,36.225,43.2975,34.638,43.2975L34.086,43.2975C32.499,43.2975,31.1535,42.2625,31.119,40.9515L30.36,15.8355C30.291,13.8345,31.9125,12.144,33.9825,12.144L34.707,12.144C36.777,12.144,38.3985,13.8345,38.3295,15.8355Z"
  16. fill="#FA1C1C"
  17. fill-opacity="1"
  18. />
  19. </g>
  20. </svg>
  21. <div class="tips">
  22. <span class="red">正在测试气压中离开将会停止测试</span>
  23. <p class="red2">确定离开吗</p>
  24. </div>
  25. <div class="btns">
  26. <div class="ok style-btn" @click="handleStart">确定</div>
  27. <div class="cancel style-btn" @click="handleCancel">取消</div>
  28. </div>
  29. </div>
  30. </div>
  31. </template>
  32. <script setup>
  33. import { useSealStore, useWebSocketStore } from '@/store'
  34. const sealStore = useSealStore()
  35. const websocketStore = useWebSocketStore()
  36. const props = defineProps({
  37. hiddenLeaveModal: {
  38. type: Function,
  39. },
  40. clickType: {
  41. type: Number,
  42. },
  43. handleLogoutReal: {
  44. type: Function,
  45. },
  46. changeTabReal: {
  47. type: Function,
  48. },
  49. })
  50. const handleCancel = () => {
  51. props.hiddenLeaveModal()
  52. }
  53. const handleStart = () => {
  54. // 结束当前测试
  55. sealStore.updateIsStartTest(false)
  56. // 需要执行原先点击该按钮的逻辑
  57. props.hiddenLeaveModal()
  58. if (props.clickType != -1) {
  59. if (props.clickType == -2) {
  60. props.handleLogoutReal()
  61. } else {
  62. props.changeTabReal(props.clickType)
  63. }
  64. }
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. .leave_modal {
  69. position: fixed;
  70. top: 0;
  71. left: 0;
  72. right: 0;
  73. bottom: 0;
  74. background: rgba(0, 0, 0, 0.5);
  75. z-index: 2;
  76. display: flex;
  77. align-items: center;
  78. justify-content: center;
  79. .modal_content {
  80. width: 476px;
  81. height: 350px;
  82. border-radius: 16px;
  83. background: #ffffff;
  84. padding: 52px 37px 55px 37px;
  85. box-sizing: border-box;
  86. display: flex;
  87. flex-direction: column;
  88. align-items: center;
  89. .tips {
  90. margin-top: 33px;
  91. margin-bottom: 50px;
  92. font-family: Source Han Sans CN;
  93. font-size: 21px;
  94. font-weight: normal;
  95. letter-spacing: 0.04em;
  96. color: #000000;
  97. display: flex;
  98. flex-direction: column;
  99. align-items: center;
  100. .red {
  101. color: #fa1c1c;
  102. }
  103. .red2 {
  104. color: #fa1c1c;
  105. margin-top: 6px;
  106. }
  107. }
  108. .btns {
  109. display: flex;
  110. align-items: center;
  111. justify-content: space-between;
  112. width: 362px;
  113. .cancel {
  114. width: 173px;
  115. height: 68px;
  116. border-radius: 34px;
  117. background: #06518b;
  118. font-family: Source Han Sans CN;
  119. font-size: 23px;
  120. font-weight: 350;
  121. letter-spacing: 0em;
  122. color: #ffffff;
  123. display: flex;
  124. align-items: center;
  125. justify-content: center;
  126. }
  127. .ok {
  128. width: 173px;
  129. height: 68px;
  130. border-radius: 34px;
  131. background: #1f6397;
  132. font-family: Source Han Sans CN;
  133. font-size: 23px;
  134. font-weight: 350;
  135. letter-spacing: 0em;
  136. color: #ffffff;
  137. display: flex;
  138. align-items: center;
  139. justify-content: center;
  140. }
  141. }
  142. }
  143. }
  144. </style>