index.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. <template>
  2. <scroll-view class="scrollBox" scroll-y="true" style="position:relative;">
  3. <view class="box">
  4. <view v-if="loading" class="vertical80-center">{{ loadingText }}</view>
  5. <view v-else>
  6. <!-- 职位名称 + 薪资 -->
  7. <view class="d-flex justify-space-between">
  8. <h2 class="JobName ellipsis">
  9. {{ info.name }}
  10. </h2>
  11. <span class="salary w-600">{{ info.payFrom }}-{{ info.payTo }}/{{ positionInfo.payName }}</span>
  12. </view>
  13. <!-- 职位地区 收藏职位 -->
  14. <view class="d-flex justify-space-between mt-5">
  15. <view class="bold" style="font-size: 14px;">
  16. <span>
  17. <span>{{positionInfo?.areaName }}</span>
  18. <span class="viewider-mx">|</span>
  19. <span>{{positionInfo?.eduName }}</span>
  20. <span class="viewider-mx">|</span>
  21. <span>{{positionInfo?.expName }}</span>
  22. </span>
  23. </view>
  24. <!-- 收藏职位 -->
  25. <view @click="handleCollection">
  26. <uni-icons
  27. :type="isCollection ? 'heart-filled' : 'heart'"
  28. color="#fc6d5e"
  29. class="mr"
  30. size="25"
  31. ></uni-icons>
  32. <!-- <span style="color: #fc6d5e">{{ isCollection ? '取消收藏' : '收藏职位' }}</span> -->
  33. </view>
  34. </view>
  35. <!-- 标签 -->
  36. <view class="tagList mt">
  37. <!-- <view class="tagListItem" v-for="(tag,i) in info?.tagList || []" :key="'tagList' + i">
  38. <uni-tag
  39. :text="tag"
  40. inverted="false"
  41. size="small"
  42. custom-style="background-color: #e2f0ef; color:#00897B; border-color:#e2f0ef;"
  43. />
  44. </view> -->
  45. <view class="tag" v-for="(tag,i) in info?.tagList || []" :key="'tagList' + i">
  46. {{ tag }}
  47. </view>
  48. </view>
  49. <!-- 赏金 -->
  50. <view class="topLine mt-5" style="display: flex; align-items: center;">
  51. <uni-icons class="icon-a-1_zhaopin" custom-prefix="iconfont" color="#e03506"/>
  52. <view class="hirePrice">{{ `赏金:${commissionCalculation(2000, 1)}元` }}</view>
  53. </view>
  54. <!-- 岗位职责 + -->
  55. <view class="topLine fs14 mt-5">
  56. <view class="fs15 w-600 my5">岗位职责</view>
  57. <view v-if="info.content" class="requirement fs14" v-html="info.content?.replace(/\n/g, '</br>')"></view>
  58. <view v-else>暂无</view>
  59. </view>
  60. <view class="topLine mt-5">
  61. <view class="fs15 w-600 my5">岗位要求</view>
  62. <view v-if="info.requirement" class="requirement fs14" v-html="info.requirement?.replace(/\n/g, '</br>')"></view>
  63. <view v-else>暂无</view>
  64. </view>
  65. <view class="topLine mt-5 d-flex">
  66. <view class="avatarBox">
  67. <image class="avatar" :src="info.contact?.avatar || 'https://minio.citupro.com/dev/menduner/7.png'"></image>
  68. </view>
  69. <view >
  70. <view class="contact-name">{{ info.contact?.name }}</view>
  71. <view class="contact-info">{{ info.enterprise?.name }} · {{ info.contact?.postNameCn }}</view>
  72. </view>
  73. </view>
  74. <view class="topLine mt-5">
  75. <view class="fs15 w-600 my5">工作地址</view>
  76. <view class="my10">
  77. <uni-icons
  78. type="map-pin-ellipse"
  79. color="#00897B"
  80. class="mr"
  81. size="25"
  82. ></uni-icons>
  83. <span style="color: var(--color-666);font-size: 15px;line-height: 26px;">{{ info.address }}</span>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. </scroll-view>
  89. <view class="bottom-sticky">
  90. <view style="display: flex;justify-content: space-evenly;align-items: center;width: 100%;margin: 20rpx 0;">
  91. <view @click="null" style="display: flex;justify-content: center;flex-direction: column;align-items: center;">
  92. <uni-icons type="redo-filled" size="24" color="#00897B"/>
  93. <span style="color:#00897B;font-weight:bold;">分享</span>
  94. </view>
  95. <button v-if="alreadySendBtn" type="primary" size="default" class="buttons" style="background-color:grey;">已投简历</button>
  96. <button v-else type="primary" size="default" class="buttons" @click="null">投个简历</button>
  97. </view>
  98. </view>
  99. </template>
  100. <script setup>
  101. import { commissionCalculation } from '@/utils/position'
  102. // import loginPage from '@/views/common/loginDialog.vue'
  103. // import simplePage from './sendResume/simple.vue'
  104. // import selectPage from './sendResume/select.vue'
  105. import { reactive, ref } from 'vue';
  106. import {
  107. getPositionDetails,
  108. // jobCvRelCheckSend,
  109. // getPersonJobUnfavorite,
  110. // getPersonJobFavorite,
  111. // getJobFavoriteCheck
  112. } from '@/api/position'
  113. import { dealDictObjData } from '@/utils/position'
  114. // import { getToken } from '@/utils/auth'
  115. // import Snackbar from '@/plugins/snackbar'
  116. import { onLoad } from '@dcloudio/uni-app';
  117. const loading = ref(false)
  118. const loadingText = ref('加载中 . . . ')
  119. // 职位详情
  120. const info = ref({})
  121. const positionInfo = ref({})
  122. const getPositionDetail = async () => {
  123. const { data } = await getPositionDetails({ id: jobId })
  124. info.value = data
  125. positionInfo.value = { ...dealDictObjData({}, info.value), ...info.value }
  126. loading.value = false
  127. console.log('positionInfo', positionInfo.value)
  128. }
  129. let jobId = ''
  130. onLoad((options) => {
  131. jobId = options?.id || ''
  132. if (jobId) {
  133. loading.value = true
  134. loadingText.value = '加载中 . . . '
  135. getPositionDetail()
  136. } else {
  137. loadingText.value = '加载失败 . . . '
  138. }
  139. })
  140. const desc = [
  141. { mdi: 'mdi-map-marker-outline', value: 'areaName' },
  142. { mdi: 'mdi-school-outline', value: 'eduName' },
  143. { mdi: 'mdi-clock-time-ten-outline', value: 'expName' }
  144. ]
  145. </script>
  146. <style scoped lang="scss">
  147. .mb5 { margin-bottom: 5px; }
  148. .my5 { margin: 5px 0; }
  149. .my10 { margin: 10px 0; }
  150. .mt10 { margin-top: 10px; }
  151. .fs14 { font-size: 14px; }
  152. .fs15 { font-size: 15px; }
  153. .box {
  154. padding: 10px 30rpx 100px;
  155. }
  156. .JobName {
  157. color: #37576c;
  158. font-size: 24px;
  159. margin-right: 30px;
  160. margin-top: 1px;
  161. vertical-align: middle;
  162. flex: 1;
  163. }
  164. .tagList {
  165. width: 100%;
  166. display: flex;
  167. flex-wrap: wrap;
  168. .tagListItem {
  169. margin: 10rpx 10rpx 10rpx 0;
  170. }
  171. }
  172. .topLine {
  173. border-top: 1px solid #EDEDED;
  174. // border-bottom: 1px solid #EDEDED;
  175. padding-top: 10px;
  176. }
  177. .tag {
  178. padding: 5px 10px;
  179. background-color: #e2f0ef;
  180. color: #00897B;
  181. border-radius: 5px;
  182. font-size: 14px;
  183. margin-right: 8px;
  184. margin-top: 4px;
  185. }
  186. .hirePrice {
  187. padding: 5px 10px;
  188. background-color: #fc6d5e63;
  189. color: #ff250e;
  190. border-radius: 5px;
  191. font-size: 14px;
  192. margin-left: 8px;
  193. margin-top: 4px;
  194. }
  195. .requirement {
  196. white-space: pre-wrap;
  197. word-break: break-all;
  198. line-height: 28px;
  199. color: var(--color-333);
  200. font-size: 15px;
  201. text-align: justify;
  202. letter-spacing: 0;
  203. }
  204. //底部按钮公用定位
  205. .bottom-sticky{
  206. display: flex;
  207. width:100vw;
  208. position: fixed;
  209. bottom:0;
  210. left: 0;
  211. background-image:linear-gradient(rgba(255,255,255,1),white);
  212. }
  213. .buttons{
  214. width: 60vw;
  215. height: 44px;
  216. border-radius: 25px;
  217. background-color: var(--v-primary-base);
  218. margin: 0;
  219. }
  220. .noMore{
  221. margin: 20px 0;
  222. }
  223. .date-time{
  224. color:#d9d0d2;
  225. float: right;
  226. }
  227. .viewided-line {
  228. width: 100%;
  229. height: 1px;
  230. background-color: #f0f2f7;
  231. margin: 20px 0;
  232. }
  233. .avatarBox{
  234. max-width: 40px;
  235. max-height: 40px;
  236. margin: 0 10px;
  237. }
  238. .avatar{
  239. width: 40px;
  240. height: 40px;
  241. }
  242. .sub-li-bottom {
  243. display: flex;
  244. justify-content:space-between;
  245. align-items: center;
  246. background: linear-gradient(90deg, #f5fcfc 0, #fcfbfa 100%);
  247. font-size: 13px;
  248. padding: 5px 30rpx;
  249. }
  250. .salary {
  251. // color: #ff770d;
  252. float: right;
  253. }
  254. .list-shape {
  255. padding: 10px 30rpx 10px;
  256. margin-top: 10px;
  257. background-color: #fff;
  258. .titleBox {
  259. display: flex;
  260. align-items: center;
  261. justify-content: space-between;
  262. }
  263. }
  264. .viewider-mx{
  265. margin: 0 10rpx;
  266. }
  267. .viewider {
  268. color:#e4d4d2;
  269. }
  270. //公司名称
  271. .cer-end{
  272. position: absolute;
  273. top: 85%;
  274. right: 16%;
  275. }
  276. .cer-text{
  277. text-decoration: underline;
  278. margin: 0 5rpx;
  279. }
  280. //一行展示不全...
  281. .dis{
  282. display: flex;
  283. align-items: center;
  284. }
  285. .show-more{
  286. width: 26vw;
  287. white-space: nowrap;
  288. overflow: hidden;
  289. text-overflow: ellipsis;
  290. }
  291. /* 列表触底暂无更多 */
  292. .noMore{ text-align:center; color:grey; }
  293. .mt { margin-top: 10rpx; }
  294. .mb { margin-bottom: 10rpx; }
  295. .ml { margin-left: 20rpx; }
  296. .mr { margin-right: 20rpx; }
  297. .mr-10{ margin-right: 10rpx; }
  298. .my-5{ margin: 5px 0; }
  299. </style>