preferred.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <template>
  2. <div v-if="Object.keys(result).length" class="default-width" style="position: relative;">
  3. <div style="position: relative;">
  4. <v-carousel :show-arrows="result.carousel.length > 1 ? 'hover' : false" :hide-delimiters="result.carousel.length > 1 ? false : true" cycle>
  5. <v-carousel-item v-for="(k, i) in result.carousel" :key="i">
  6. <v-img :src="k" :lazy-src="k" width="1184" height="500" cover>
  7. <template v-slot:placeholder>
  8. <v-row align="center" class="fill-height ma-0" justify="center">
  9. <v-progress-circular color="grey-lighten-5" indeterminate></v-progress-circular>
  10. </v-row>
  11. </template>
  12. </v-img>
  13. </v-carousel-item>
  14. </v-carousel>
  15. <v-img v-if="result.logo" class="logo-png" :src="result.logo" width="193" height="59"></v-img>
  16. </div>
  17. <!-- 集团简介 -->
  18. <div class="brief-introduction">
  19. <h2>{{ result?.introduce?.title }}</h2>
  20. <div class="desc">
  21. <p v-html="result?.introduce?.describe"></p>
  22. </div>
  23. <div v-if="result?.introduce?.thumbnail?.length" class="culture my-15">
  24. <div v-for="(k, i) in result.introduce.thumbnail" :key="i" class="culture-item">
  25. <v-img :src="k" :lazy-src="k" width="350" height="230" contain>
  26. <template v-slot:placeholder>
  27. <v-row align="center" class="fill-height ma-0" justify="center">
  28. <v-progress-circular color="grey-lighten-5" indeterminate></v-progress-circular>
  29. </v-row>
  30. </template>
  31. </v-img>
  32. </div>
  33. </div>
  34. <div v-if="result?.introduce?.bigPicture?.url">
  35. <v-img :src="result.introduce.bigPicture.url" :lazy-src="result.introduce.bigPicture.url">
  36. <template v-slot:placeholder>
  37. <v-row align="center" class="fill-height ma-0" justify="center">
  38. <v-progress-circular color="grey-lighten-5" indeterminate></v-progress-circular>
  39. </v-row>
  40. </template>
  41. </v-img>
  42. </div>
  43. </div>
  44. <!-- 品牌介绍 -->
  45. <div v-if="result.brandIntroduce && result.brandIntroduce.length" class="brand-introduction">
  46. <h2>品牌介绍</h2>
  47. <ul>
  48. <li v-for="k in result.brandIntroduce" :key="k.title">
  49. <v-img :src="k.url" width="100%" height="192" :lazy-src="k.url">
  50. <template v-slot:placeholder>
  51. <v-row align="center" class="fill-height ma-0" justify="center">
  52. <v-progress-circular color="grey-lighten-5" indeterminate></v-progress-circular>
  53. </v-row>
  54. </template>
  55. </v-img>
  56. <h3>{{ k.content }}</h3>
  57. <span>{{ k.desc }}</span>
  58. </li>
  59. </ul>
  60. </div>
  61. <!-- 招聘职位 -->
  62. <div class="recruit-position">
  63. <h2>招聘职位</h2>
  64. <div>
  65. <div class="position-item d-flex align-center" v-for="k in recruitPosition" :key="k.job.id">
  66. <div class="job-name">
  67. {{ formatName(k.job.name) }}
  68. <br>
  69. {{ formatName(k.enterprise.name) }}
  70. </div>
  71. <div class="job-place">
  72. <div class="job-title">地点</div>
  73. <p class="font-size-14">{{ !k.job.areaId ? '全国' : k.job.areaName || '' }}</p>
  74. </div>
  75. <div class="job-class">
  76. <div class="job-title">工作经验</div>
  77. <p class="font-size-14">{{ k.job.expName }}</p>
  78. </div>
  79. <div class="job-class">
  80. <div class="job-title">职位更新</div>
  81. <p class="font-size-14">{{ timesTampChange(k.job.updateTime) }}</p>
  82. </div>
  83. <div class="font-size-14 cursor-pointer view-detail" @click="handlePosition(k)">点击查看详情
  84. <v-icon>mdi-pan-right</v-icon>
  85. </div>
  86. </div>
  87. <CtPagination
  88. :total="total"
  89. :page="queryParams.pageNo"
  90. :limit="queryParams.pageSize"
  91. @handleChange="handleChangePage"
  92. ></CtPagination>
  93. </div>
  94. </div>
  95. <v-btn icon="mdi-chevron-up" size="large" color="primary" class="up-btn" @click="handleToTop"></v-btn>
  96. </div>
  97. </template>
  98. <script setup>
  99. defineOptions({ name: 'home-adv-preferred'})
  100. import { ref, onMounted } from 'vue'
  101. import { useRoute } from 'vue-router'
  102. import { getWebContent } from '@/api/common'
  103. import { getJobAdvertisedSearch } from '@/api/position'
  104. import { dealDictObjData } from '@/utils/position'
  105. import { timesTampChange } from '@/utils/date'
  106. import { formatName } from '@/utils/getText'
  107. const route = useRoute()
  108. const { id } = route.params
  109. const result = ref({})
  110. onMounted(async () => {
  111. const data = await getWebContent()
  112. if (!id || !data.appPreferredGroup) {
  113. return window.close()
  114. }
  115. result.value = data.appPreferredGroup[id] || {}
  116. document.title = result.value.title || '门墩儿 优选集团'
  117. })
  118. // 招聘职位
  119. const total = ref(0)
  120. const queryParams = ref({
  121. pageNo: 1,
  122. pageSize: 10,
  123. enterpriseId: id
  124. })
  125. const recruitPosition = ref([])
  126. const getRecruitPositionList = async () => {
  127. const { list, total: number } = await getJobAdvertisedSearch(queryParams.value)
  128. if (!list.length) {
  129. total.value = 0
  130. recruitPosition.value = []
  131. return
  132. }
  133. recruitPosition.value = list.map(e => {
  134. e.job = { ...e.job, ...dealDictObjData({}, e.job) }
  135. return e
  136. })
  137. total.value = number
  138. }
  139. getRecruitPositionList()
  140. const handleChangePage = (e) => {
  141. queryParams.value.pageNo = e
  142. getRecruitPositionList()
  143. }
  144. // 职位详情
  145. const handlePosition = (val) => {
  146. window.open(`/recruit/personal/position/details/${val.job.id}`)
  147. }
  148. const handleToTop = () => {
  149. window.scrollTo({ top: 0, behavior: 'smooth' })
  150. }
  151. </script>
  152. <style scoped lang="scss">
  153. .logo-png {
  154. position: absolute;
  155. top: 30px;
  156. left: 5%;
  157. }
  158. .culture {
  159. width: 100%;
  160. display: flex;
  161. &-item {
  162. width: 33.3%;
  163. }
  164. }
  165. h2 {
  166. font-size: 32px;
  167. color: #666;
  168. line-height: 44px;
  169. text-align: center;
  170. margin-bottom: 26px;
  171. font-weight: 600;
  172. }
  173. .brief-introduction {
  174. margin: 100px 0;
  175. .desc {
  176. color: #666;
  177. margin-bottom: 40px;
  178. }
  179. }
  180. .brand-introduction {
  181. ul {
  182. display: flex;
  183. flex-wrap: wrap;
  184. width: 100%;
  185. li {
  186. width: calc((100% - 96px) / 3);
  187. min-width: calc((100% - 96px) / 3);
  188. max-width: calc((100% - 96px) / 3);
  189. margin: 0 48px 24px 0;
  190. list-style: none;
  191. &:nth-child(3n) {
  192. margin-right: 0;
  193. }
  194. h3 {
  195. height: 30px;
  196. font-size: 22px;
  197. color: #333;
  198. line-height: 30px;
  199. margin: 24px 0 12px 10px;
  200. }
  201. span {
  202. display: block;
  203. width: 342px;
  204. font-size: 14px;
  205. color: #666;
  206. line-height: 26px;
  207. margin: 0 auto;
  208. }
  209. }
  210. }
  211. }
  212. .recruit-position {
  213. margin-top: 100px;
  214. .position-item {
  215. background-color: #f9f9f9;
  216. margin-bottom: 15px;
  217. padding: 20px 0 20px 32px;
  218. .job-name {
  219. width: 20.5%;
  220. overflow: hidden;
  221. margin-right: 5%;
  222. // color: #333;
  223. font-size: 15px;
  224. font-weight: 600;
  225. }
  226. .job-place {
  227. width: 17%;
  228. margin-right: 5%;
  229. }
  230. .job-class {
  231. width: 15%;
  232. margin-right: 5%;
  233. }
  234. .job-title {
  235. font-size: 13px;
  236. color: #8c8c8c;
  237. line-height: 26px;
  238. }
  239. }
  240. }
  241. .view-detail:hover {
  242. text-decoration: underline;
  243. }
  244. .up-btn {
  245. position: fixed;
  246. bottom: 20px;
  247. right: 20px;
  248. }
  249. </style>