vocation-overview.vue 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <view class="fx-col tabs-swiper-content pb-40">
  3. <view class="mt-20 p-30 bg-white">
  4. <uv-text size="18" bold :text="overview.name"/>
  5. <view class="text-sm text-content mt-20" v-html="overview.summary"></view>
  6. <view class="mt-10 p-30 text-sm text-content rounded-lg bg-slate-100" v-html="overview.description"></view>
  7. </view>
  8. <view class="mt-20 bg-white">
  9. <uv-cell-group title="1" :border="false">
  10. <template #title>
  11. <view class="text-lg">
  12. 相关岗位
  13. <text class="text-error">{{ overview.postJobs?.length }}</text>
  14. </view>
  15. </template>
  16. <uv-cell v-for="job in overview.postJobs" class="text-main" is-link :title="job.name"
  17. @click="goPostInfo(job)">
  18. <template #value>
  19. <text class="text-xs text-light">
  20. {{ `${job.salaryMin}-${job.salaryMax}/月` }}
  21. </text>
  22. </template>
  23. </uv-cell>
  24. </uv-cell-group>
  25. </view>
  26. <view class="mt-20 bg-white">
  27. <uv-cell-group title="1" :border="false">
  28. <template #title>
  29. <view class="text-lg">
  30. 相关职业
  31. <text class="text-error">{{ overview.jobs?.length }}</text>
  32. </view>
  33. </template>
  34. <uv-cell v-for="vocation in overview.jobs" class="text-main" is-link :title="vocation.name"
  35. @click="goVocation(vocation)">
  36. </uv-cell>
  37. </uv-cell-group>
  38. </view>
  39. <view class="mt-20 bg-white">
  40. <uv-cell-group title="1" :border="false">
  41. <template #title>
  42. <view class="text-lg">
  43. 相关专业
  44. <text class="text-error">{{ overview.postMajors?.length }}</text>
  45. </view>
  46. </template>
  47. <uv-cell v-for="major in overview.postMajors" class="text-main" is-link :title="major.name"
  48. @click="goMajor(major)">
  49. <template #label>
  50. <view class="mt-10 grid grid-cols-3">
  51. <view class="fx-col fx-cen-cen font-light">
  52. <view class="text-xs text-content font-bold">{{ major.code }}</view>
  53. <view class="text-4xs text-tips">国标代码</view>
  54. </view>
  55. <view class="fx-col fx-cen-cen font-light">
  56. <view class="text-xs text-content font-bold">{{ major.learnYear }}</view>
  57. <view class="text-4xs text-tips">学制</view>
  58. </view>
  59. <view class="fx-col fx-cen-cen font-light">
  60. <view class="text-xs text-content font-bold">
  61. {{ `${major.maleRatio}/${major.femaleRatio}` }}
  62. </view>
  63. <view class="text-4xs text-tips">男女比例</view>
  64. </view>
  65. </view>
  66. </template>
  67. </uv-cell>
  68. </uv-cell-group>
  69. </view>
  70. </view>
  71. </template>
  72. <script setup>
  73. import {useInjectVocationDetailService} from "@/pages/vocation-library/detail/components/useVocationDetailInjection";
  74. import {useTransfer} from "@/hooks/useTransfer";
  75. const {overview, currentPostName, currentTab, scrollTop} = useInjectVocationDetailService()
  76. const {transferTo} = useTransfer()
  77. const goPostInfo = async (post) => {
  78. currentTab.value = 1
  79. currentPostName.value = post.name
  80. scrollTop.value = 0
  81. }
  82. const goVocation = (vocation) => {
  83. transferTo('/pages/vocation-library/detail/detail', ['code'], vocation)
  84. }
  85. const goMajor = (major) => {
  86. transferTo('/pages/major-library/detail/detail', ['code', 'name'], major)
  87. }
  88. </script>
  89. <style scoped>
  90. </style>