batch-step.vue 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view class="p-30 fx-col gap-30">
  3. <view class="bg-gradient-to-r from-primary to-primary-500 px-20 py-30 rounded-lg">
  4. <view class="text-white font-bold">我的成绩</view>
  5. <view class="mt-20 flex justify-between items-center text-white text-2xs">
  6. <text>省份:{{ userSnapshot.location }}</text>
  7. <text>专业类别:{{ userSnapshot.examMajorName }}</text>
  8. <text>总分:{{ model.score }}</text>
  9. </view>
  10. </view>
  11. <view class="text-center mt-50">(二)选择填报批次</view>
  12. <view class="flex flex-col gap-20 mt-20">
  13. <view @click="handleBatchSelect(item)" v-for="item in batchList"
  14. class="bg-gradient-to-b from-sky-100 to-white px-30 py-50 flex justify-between items-center rounded-lg shadow-card">
  15. <view class="flex-1 flex flex-col">
  16. <view class="flex items-center">
  17. <text class="text-xl mr-10 batch-name">{{ item.name }}</text>
  18. <uv-tags v-if="item.recommand" text="重点推荐" type="error" shape="circle" size="mini"/>
  19. </view>
  20. <view class="text-2xs mt-20">{{ item.tips }}</view>
  21. </view>
  22. <view class="flex flex-col items-center">
  23. <uv-button type="primary" shape="circle" class="pointer-events-none"
  24. color="linear-gradient(to right, var(--primary-color),var(--primary-color-500))"
  25. custom-style="height: 32px; border: none;" text="智能填报"/>
  26. <!-- <text class="f-tips f10 mt5">可填{{ getCollegeLimit(item.batch) }}所院校</text>-->
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script setup>
  33. import {useInjectVoluntaryStep} from "@/pagesOther/pages/vhs/hooks/useVoluntaryStepInjection";
  34. import {useInjectVoluntaryForm} from "@/pagesOther/pages/vhs/hooks/useVoluntaryFormInjection";
  35. import {useInjectUserSnapshot} from "@/pagesOther/hooks/useUserSnapshotInjection";
  36. import {useInjectVoluntaryAssistant} from "@/pagesOther/pages/vhs/hooks/useVoluntaryAssistantInjection";
  37. const {currentStep} = useInjectVoluntaryStep()
  38. const {model, batch, batchList, loadBatchList} = useInjectVoluntaryForm()
  39. const userSnapshot = useInjectUserSnapshot()
  40. const {handleForward} = useInjectVoluntaryAssistant()
  41. const handleBatchSelect = (item) => {
  42. batch.value = item
  43. handleForward()
  44. }
  45. watch(currentStep, step => {
  46. if (step == 1) loadBatchList()
  47. })
  48. // getCollegeLimit(batch) {
  49. // const match = this.voluntaryData?.batches?.find(b => b.batch == batch)
  50. // return match?.groups
  51. // }
  52. </script>
  53. <style lang="scss" scoped>
  54. .batch-name {
  55. position: relative;
  56. z-index: 10;
  57. &::before {
  58. position: absolute;
  59. left: 0;
  60. bottom: 0;
  61. content: ' ';
  62. width: 66rpx;
  63. height: 10rpx;
  64. border-radius: 5rpx;
  65. background: linear-gradient(to right, #FFD423, #FFFFFF);
  66. z-index: -1;
  67. }
  68. }
  69. </style>