result.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <ie-page bg-color="#F6F8FA">
  3. <ie-navbar title="测职业技能分" />
  4. <ie-image is-oss src="/volunteer/skill/index/bg.png" custom-class="w-full h-600 absolute" />
  5. <view class="p-28 z-2">
  6. <view v-if="target.info" class="rounded-xl overflow-hidden">
  7. <college-item :item="target.info" hidden-star reverse />
  8. <uv-line />
  9. <college-summary :college="target.info" />
  10. </view>
  11. <skill-result />
  12. </view>
  13. <ie-safe-toolbar :height="84" :shadow="false">
  14. <view class="px-30 py-16">
  15. <ie-button @click="handleSubmit">加入志愿表</ie-button>
  16. </view>
  17. </ie-safe-toolbar>
  18. </ie-page>
  19. </template>
  20. <script setup lang="ts">
  21. import { VOLUNTARY_TARGET, VOLUNTARY_RULES, VOLUNTARY_MODEL, VOLUNTARY_RESULT } from "@/types/injectionSymbols";
  22. import { useTransferPage } from "@/hooks/useTransferPage";
  23. import { VoluntaryDto } from "@/types/voluntary";
  24. import VoluntaryFormMajor from "@/pagesOther/pages/voluntary/index/components/voluntary-form-major.vue";
  25. import CollegeItem from "@/pagesOther/pages/university/index/components/plus/college-item.vue";
  26. import CollegeSummary from "@/pagesOther/pages/university/index/components/plus/college-summary.vue";
  27. import SkillResult from "@/pagesOther/pages/skill/result/components/skill-result.vue";
  28. import { addVoluntary } from "@/api/modules/voluntary";
  29. const { prevData } = useTransferPage<VoluntaryDto, any>()
  30. const target = computed(() => prevData.value.target || {})
  31. const rules = computed(() => prevData.value.rules || [])
  32. const model = computed(() => prevData.value.model || {})
  33. const result = computed(() => prevData.value.result || {})
  34. const handleSubmit = async () => {
  35. await addVoluntary(target.value)
  36. uni.$ie.showSuccess('保存成功')
  37. }
  38. provide(VOLUNTARY_TARGET, target)
  39. provide(VOLUNTARY_RULES, rules)
  40. provide(VOLUNTARY_MODEL, model)
  41. provide(VOLUNTARY_RESULT, result)
  42. // 为了让子组件触发页面滚动
  43. onPageScroll(() => {
  44. })
  45. </script>
  46. <style lang="scss"></style>