addStudentMsg.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <view class="container">
  3. <!-- 姓名区域 -->
  4. <view class="box">
  5. <view class="box_key">
  6. <text class="text">*</text>
  7. 孩子姓名
  8. </view>
  9. <view class="box_value">
  10. <input class="input" type="text" placeholder="请输入孩子姓名" v-model="name" />
  11. </view>
  12. </view>
  13. <!-- 性别区域 -->
  14. <view class="box">
  15. <view class="box_key">
  16. <text class="text">*</text>
  17. 性别
  18. </view>
  19. <view class="box_value">
  20. <view class="men" @click="handlegender(1)">
  21. <radio color="#0061FF" style="transform: scale(0.7)" :checked="gender == 1" />
  22. </view>
  23. <view class="women" @click="handlegender(2)">
  24. <radio color="#0061FF" style="transform: scale(0.7)" :checked="gender == 2" />
  25. </view>
  26. </view>
  27. </view>
  28. <!-- 人脸图片区域 -->
  29. <view class="box2">
  30. <view class="box_key">
  31. <text class="text">*</text>
  32. 人脸图片
  33. </view>
  34. <view class="box_upload">
  35. <uni-icons type="plusempty" size="30" color="#666666"></uni-icons>
  36. 上传照片
  37. </view>
  38. </view>
  39. <view class="tips">注:支持.jpg .png,五官清晰无遮挡,大小不超过2M</view>
  40. <!-- 时间组区域 -->
  41. <view class="box">
  42. <view class="box_key">
  43. <text class="text">*</text>
  44. 时间组
  45. </view>
  46. <picker @change="bindPickerChange" :value="currentIndex" :range="array">
  47. <view class="box_value" :class="{ unactive: !currentIndex }">
  48. {{ currentIndex ? array[currentIndex] : '请选择' }}
  49. <image class="value_img" src="/static/images/bottom2.png" mode="aspectFill"></image>
  50. </view>
  51. </picker>
  52. </view>
  53. <!-- 家属区域 -->
  54. <view class="box">
  55. <view class="box_key">
  56. <text class="text">*</text>
  57. 家属
  58. </view>
  59. <view class="box_value">
  60. <input class="input" type="text" placeholder="请输入姓名" />
  61. <view class="value_icon">
  62. <uni-icons type="plus" size="25" color="#0061FF"></uni-icons>
  63. </view>
  64. </view>
  65. </view>
  66. <!-- 手机号码区域 -->
  67. <view class="box">
  68. <view class="box_key">
  69. <text class="text">*</text>
  70. 手机号码
  71. </view>
  72. <view class="box_value">
  73. <input class="input" type="text" placeholder="请输入手机号码" />
  74. </view>
  75. </view>
  76. <!-- 家属与本人的关系区域 -->
  77. <view class="box">
  78. <view class="box_key">
  79. <text class="text">*</text>
  80. 家属与本人的关系
  81. </view>
  82. <view class="box_value">
  83. <input class="input" type="text" placeholder="请输入家属与本人的关系" />
  84. </view>
  85. </view>
  86. </view>
  87. </template>
  88. <script setup>
  89. import { ref } from 'vue'
  90. // 姓名
  91. const name = ref()
  92. // 性别
  93. const gender = ref(1)
  94. // 时间组当前激活索引
  95. const currentIndex = ref()
  96. // 时间组数据
  97. const array = ref(['上午', '下午'])
  98. // 切换性别回调
  99. const handlegender = (v) => {
  100. gender.value = v
  101. }
  102. // 切换时间组回调
  103. const bindPickerChange = (e) => {
  104. currentIndex.value = e.detail.value
  105. }
  106. </script>
  107. <style lang="scss" scoped>
  108. .container {
  109. padding: 10rpx 0 30rpx 15rpx;
  110. height: 100vh;
  111. font-size: 28rpx;
  112. .box {
  113. display: flex;
  114. justify-content: space-between;
  115. align-items: center;
  116. height: 96rpx;
  117. border-bottom: 2rpx solid #e6e6e6;
  118. .box_key {
  119. display: flex;
  120. align-items: center;
  121. font-weight: bold;
  122. .text {
  123. color: #d43030;
  124. }
  125. }
  126. .box_value {
  127. display: flex;
  128. align-items: center;
  129. justify-content: flex-end;
  130. padding-right: 20rpx;
  131. width: 320rpx;
  132. height: 96rpx;
  133. .input {
  134. height: 100%;
  135. text-align: end;
  136. }
  137. .men,
  138. .women {
  139. display: flex;
  140. align-items: center;
  141. }
  142. .women {
  143. margin-left: 20rpx;
  144. }
  145. .value_icon {
  146. margin-left: 15rpx;
  147. }
  148. .value_img {
  149. margin-left: 20rpx;
  150. width: 27rpx;
  151. height: 16rpx;
  152. }
  153. }
  154. .unactive {
  155. color: #6a6a6a;
  156. }
  157. }
  158. .box2 {
  159. display: flex;
  160. margin-top: 40rpx;
  161. .box_key {
  162. display: flex;
  163. font-weight: bold;
  164. .text {
  165. color: #d43030;
  166. }
  167. }
  168. .box_upload {
  169. display: flex;
  170. flex-direction: column;
  171. justify-content: center;
  172. align-items: center;
  173. margin-left: 30rpx;
  174. width: 160rpx;
  175. height: 160rpx;
  176. font-size: 24rpx;
  177. color: #666666;
  178. border-radius: 6rpx;
  179. background-color: #f2f2f2;
  180. }
  181. }
  182. .tips {
  183. margin-top: 20rpx;
  184. margin-bottom: 5rpx;
  185. font-size: 24rpx;
  186. color: #a6a6a6;
  187. }
  188. }
  189. </style>