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

131 lines
2.8 KiB

2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="permission_dialog_container">
  3. <div class="modal_content">
  4. <p class="title">选择用户权限</p>
  5. <div class="log_select">
  6. <van-picker
  7. :columns="columns"
  8. :show-toolbar="false"
  9. visible-option-num="3"
  10. option-height="42"
  11. v-model="selectedValues"
  12. />
  13. </div>
  14. <div class="ok_btn style-btn" @click="chooseLog">确定</div>
  15. <svg
  16. class="close"
  17. @click="handleClickClose"
  18. xmlns="http://www.w3.org/2000/svg"
  19. xmlns:xlink="http://www.w3.org/1999/xlink"
  20. fill="none"
  21. version="1.1"
  22. width="13.06049919128418"
  23. height="13.062000274658203"
  24. viewBox="0 0 13.06049919128418 13.062000274658203"
  25. >
  26. <g>
  27. <path
  28. d="M6.531,7.5915L12,13.062L13.0605,12.0015L7.5915,6.531L13.0605,1.062L12,3.57628e-7L6.531,5.4705L1.062,0L0,1.062L5.4705,6.531L0,12L1.062,13.062L6.531,7.5915Z"
  29. fill="#323233"
  30. fill-opacity="1"
  31. />
  32. </g>
  33. </svg>
  34. </div>
  35. </div>
  36. </template>
  37. <script setup>
  38. import { ref, watch } from 'vue'
  39. const props = defineProps({
  40. changeLogVal: {
  41. type: Function,
  42. },
  43. logVal: {
  44. type: String,
  45. },
  46. hiddenLogVisible: {
  47. type: Function,
  48. },
  49. })
  50. const columns = ref([
  51. { text: '管理员', value: '1' },
  52. { text: '维护员', value: '2' },
  53. { text: '用户', value: '3' },
  54. ])
  55. const chooseLog = () => {
  56. props.changeLogVal(selectedValues.value[0])
  57. }
  58. const handleClickClose = () => {
  59. props.hiddenLogVisible()
  60. }
  61. const selectedValues = ref(['3'])
  62. watch(() => {
  63. selectedValues.value = [props.logVal]
  64. })
  65. </script>
  66. <style lang="scss" scoped>
  67. .permission_dialog_container {
  68. position: fixed;
  69. top: 0;
  70. left: 0;
  71. right: 0;
  72. bottom: 0;
  73. background: rgba(0, 0, 0, 0.5);
  74. z-index: 2;
  75. display: flex;
  76. align-items: center;
  77. justify-content: center;
  78. .modal_content {
  79. width: 476px;
  80. height: 407px;
  81. border-radius: 16px;
  82. background: #ffffff;
  83. box-sizing: border-box;
  84. padding: 45px 68px 62px 68px;
  85. display: flex;
  86. flex-direction: column;
  87. align-items: center;
  88. position: relative;
  89. .close {
  90. position: absolute;
  91. right: 24px;
  92. top: 18px;
  93. }
  94. .title {
  95. font-family: Source Han Sans CN;
  96. font-size: 22px;
  97. font-weight: normal;
  98. letter-spacing: 0.04em;
  99. color: #000000;
  100. margin-bottom: 39px;
  101. }
  102. .log_select {
  103. width: 340px;
  104. height: 113px;
  105. overflow: hidden;
  106. margin-bottom: 48px;
  107. }
  108. .ok_btn {
  109. width: 340px;
  110. height: 68px;
  111. border-radius: 8px;
  112. background: #06518b;
  113. display: flex;
  114. align-items: center;
  115. justify-content: center;
  116. font-family: Source Han Sans CN;
  117. font-size: 23px;
  118. font-weight: 350;
  119. letter-spacing: 0em;
  120. color: #ffffff;
  121. }
  122. }
  123. }
  124. </style>