【PT.SCC实名制管理系统】24.10.01 -30天,考勤打卡小程序
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.

184 lines
3.2 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view class="team">
  3. <!-- logo -->
  4. <div class="logo">
  5. 打卡系统
  6. </div>
  7. <!-- 标题 -->
  8. <view class="login-title">工程项目打卡系统</view>
  9. <!-- 团队选择表单 -->
  10. <view class="team-form">
  11. <view class="team-form-item">
  12. <view class="title">团队</view>
  13. <view class="select">
  14. <uni-data-select
  15. v-model="form.teamId"
  16. :localdata="range"
  17. style="width: 600rpx;font-size: 30rpx;"
  18. :clear="false"></uni-data-select>
  19. </view>
  20. </view>
  21. <view class="team-form-item">
  22. <view class="title">姓名</view>
  23. <view class="name-input">
  24. <input type="text" placeholder="请输入姓名" v-model="form.name"/>
  25. </view>
  26. </view>
  27. </view>
  28. <uv-popup ref="popup" :round="30">
  29. <view class="content-popup">
  30. </view>
  31. </uv-popup>
  32. <!-- 提交审核 -->
  33. <div @click="submit" class="btn">
  34. 提交审核
  35. </div>
  36. </view>
  37. </template>
  38. <script>
  39. import { mapState } from 'vuex'
  40. export default {
  41. name: "Team",
  42. data() {
  43. return {
  44. range: [],
  45. form : {
  46. name : '',
  47. teamId : '',
  48. },
  49. }
  50. },
  51. computed : {
  52. ...mapState(['teamList', 'userInfo']),
  53. },
  54. onLoad() {
  55. let team = []
  56. this.teamList.forEach(n => {
  57. team.push({
  58. value: n.id,
  59. text: n.name
  60. })
  61. })
  62. this.range = team
  63. },
  64. methods: {
  65. submit() {
  66. // this.$refs.popup.open()
  67. // return
  68. if (this.$utils.verificationAll(this.form, {
  69. teamId : '请选择团队',
  70. name : '请输入姓名',
  71. })) {
  72. return
  73. }
  74. this.$api('teamApply', this.form, res => {
  75. if(res.code == 200){
  76. uni.reLaunch({
  77. url: '/pages/index/index'
  78. })
  79. }
  80. })
  81. }
  82. }
  83. }
  84. </script>
  85. <style lang="scss" scoped>
  86. .content-popup{
  87. padding: 40rpx;
  88. display: flex;
  89. flex-direction: column;
  90. align-items: center;
  91. width: 600rpx;
  92. }
  93. .team {
  94. display: flex;
  95. flex-direction: column;
  96. justify-content: center;
  97. align-items: center;
  98. min-height: 100vh;
  99. background: white;
  100. /deep/ .uni-select__input-text{
  101. font-size: 30rpx !important;
  102. }
  103. // logo
  104. .logo {
  105. display: flex;
  106. align-items: center;
  107. justify-content: center;
  108. padding: 20rpx 0rpx;
  109. width: 40%;
  110. color: white;
  111. background: linear-gradient(180deg, #4C9EEA, #6DB9FF);
  112. border-radius: 45rpx 13rpx 45rpx 13rpx;
  113. font-size: 60rpx;
  114. }
  115. // 标题
  116. .login-title {
  117. font-size: 40rpx;
  118. font-weight: bold;
  119. margin: 20rpx 0rpx;
  120. }
  121. // 团队选择表单
  122. .team-form {
  123. width: 83%;
  124. margin: 30rpx auto;
  125. .team-form-item {
  126. display: flex;
  127. align-items: center;
  128. justify-content: space-between;
  129. border-bottom: 1px solid #CBCBCB;
  130. margin: 30rpx 0rpx;
  131. &:nth-child(2) {
  132. margin-top: 50rpx;
  133. }
  134. .title {}
  135. .select,
  136. .name-input {
  137. display: flex;
  138. justify-content: flex-end;
  139. width: 40%;
  140. font-size: 32rpx;
  141. input {
  142. width: 100%;
  143. }
  144. }
  145. &::v-deep .uni-select {
  146. border: none;
  147. padding: 0rpx;
  148. }
  149. }
  150. }
  151. // 提交审核
  152. .btn {
  153. display: flex;
  154. align-items: center;
  155. justify-content: center;
  156. width: 83%;
  157. background: $main-color;
  158. color: white;
  159. height: 100rpx;
  160. border-radius: 50rpx;
  161. margin: 120rpx auto 0rpx auto;
  162. }
  163. }
  164. </style>