selectReason.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <s-layout
  3. title="执行对象"
  4. navbar="normal"
  5. showBackButton
  6. :bgStyle="{ color: '#FAFAFA' }"
  7. >
  8. <view class="select_label">请选择不满意的原因</view>
  9. <view class="reason_list">
  10. <view class="reason_item" :class="{'s_reason':state.reason===item.key}" v-for="(item,index) in state.reasonList" @tap="onReason(item.key)">{{item.text}}</view>
  11. </view>
  12. <view class="submit_btn" @click="submitForm">下一步</view>
  13. </s-layout>
  14. </template>
  15. <script setup>
  16. import { ref, reactive } from 'vue'
  17. import { onLoad } from '@dcloudio/uni-app'
  18. import sheep from '@/common'
  19. const state = reactive({
  20. reasonList:[
  21. { key:1, text:'1.执行的话术不对' },
  22. { key:2, text:'2.我需要修改执行时间' },
  23. { key:3, text:'3.我需要修改执行对象' }
  24. ],
  25. reason:1,
  26. })
  27. onLoad((options) => {
  28. })
  29. function onReason(key){
  30. state.reason = key
  31. }
  32. function submitForm(){
  33. if(state.reason===1||state.reason===2){
  34. sheep.$router.go('/pages/task/create', {
  35. reason:state.reason,
  36. })
  37. }
  38. if(state.reason===3){
  39. sheep.$router.go('/pages/task/executionList', {
  40. reason:state.reason,
  41. })
  42. }
  43. }
  44. </script>
  45. <style lang="scss" scoped>
  46. .select_label{
  47. font-weight: bold;
  48. font-size: 40rpx;
  49. color: #222222;
  50. line-height: 58rpx;
  51. padding: 40rpx 30rpx 70rpx;
  52. }
  53. .reason_list{
  54. .reason_item{
  55. width: 690rpx;
  56. padding: 30rpx;
  57. box-sizing: border-box;
  58. line-height: 40rpx;
  59. background: #F2F2F2;
  60. border-radius: 30rpx;
  61. margin: 30rpx auto;
  62. font-weight: 400;
  63. font-size: 28rpx;
  64. color: #999999;
  65. }
  66. .s_reason{
  67. background: #35E89A;
  68. color: #222222;
  69. }
  70. }
  71. .submit_btn{
  72. width: 630rpx;
  73. height: 104rpx;
  74. line-height: 104rpx;
  75. background: #35E89A;
  76. border-radius: 40rpx;
  77. font-weight: bold;
  78. font-size: 32rpx;
  79. color: #222222;
  80. text-align: center;
  81. position: fixed;
  82. left: calc(50%);
  83. transform: translateX(-50%);
  84. bottom: 40rpx;
  85. }
  86. </style>