resumeDetail.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. <template>
  2. <view class="resume-detail" :style="{ paddingTop: (12 + statusBarHeight + 88 - 60) + 'px' }">
  3. <!-- 固定顶部导航栏 -->
  4. <view class="fixed-nav" :style="{ paddingTop: (12 + statusBarHeight) + 'px' }">
  5. <view class="navbar">
  6. <view class="navbar-content">
  7. <view class="navbar-left" @click="goBack">
  8. <u-icon name="arrow-left" size="36" color="#333"></u-icon>
  9. </view>
  10. <view class="navbar-title">简历详情</view>
  11. <view class="nav-right">
  12. <view class="nav-icon" @click="setCollection">
  13. <image v-if="resumeData.isCollection == 0" src="/static/images/index/guanzhu.svg" class="icon-img"></image>
  14. <image v-else src="/static/images/index/gzActive.svg" style="width: 50rpx;height: 50rpx;"></image>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. <view style="margin-top: 20px; border-top: 20rpx solid rgba(241, 245, 248, 1);" v-if="!loading">
  21. <previewResume :resumesId="resumesId" :postPushId="postPushId"></previewResume>
  22. </view>
  23. <!-- 底部操作按钮 -->
  24. <view v-if="postPushId != '' && isShowBtn == 0" class="bottom-actions">
  25. <view class="action-btn contact-btn" @click="contactCandidate">
  26. <text>立即联系</text>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import previewResume from '@/components/resume/preview-resume.vue';
  33. export default {
  34. components: {
  35. previewResume
  36. },
  37. data() {
  38. return {
  39. statusBarHeight: 0, // 状态栏高度
  40. resumeData: {},
  41. userEntity: "",
  42. eduList: "",
  43. intentions: "",
  44. resumeList: {},
  45. skills: "",
  46. postPushId: "",
  47. workExpList: [],
  48. workExpTimes: "",
  49. resumesStatus: ['离职&随时到岗', '在职&月内到岗', '在职&考虑机会', '在职&暂不考虑'],
  50. isShowBtn:0,
  51. resumesId: '',
  52. postPushId: '',
  53. loading: true
  54. }
  55. },
  56. onLoad(option) {
  57. // 获取状态栏高度
  58. let systemInfo = uni.getSystemInfoSync();
  59. this.statusBarHeight = systemInfo.statusBarHeight || 0;
  60. // 获取邀请码保存到本地
  61. if (option.invitation) {
  62. this.$queue.setData('inviterCode', option.invitation);
  63. }
  64. // #ifdef MP-WEIXIN
  65. if (option.scene) {
  66. const scene = decodeURIComponent(option.scene);
  67. this.$queue.setData('inviterCode', scene.split(',')[0]);
  68. }
  69. // #endif
  70. this.weekMember = uni.getStorageSync('weekMember')
  71. this.userId = uni.getStorageSync('userId') ? uni.getStorageSync('userId') : 0
  72. if (option.postPushId) {
  73. this.postPushId = option.postPushId
  74. }
  75. if (option.resumesId) {
  76. this.resumesId = option.resumesId
  77. this.getDetail()
  78. }
  79. // if (option.resumesId) {
  80. // this.resumesId = option.resumesId
  81. // this.getDetail()
  82. // } else if (option.userId) {
  83. // this.byuserId = option.userId
  84. // this.getDetail()
  85. // }
  86. if(option.isShowBtn){
  87. this.isShowBtn = option.isShowBtn
  88. }
  89. },
  90. onUnload() {
  91. this.$queue.remove('resumeDetailData')
  92. },
  93. methods: {
  94. /**
  95. * 收藏简历
  96. */
  97. setCollection() {
  98. this.$Request.postT("/app/myCollection/saveCollection", {
  99. resumesId: this.resumesId,
  100. type: 2
  101. }).then(res => {
  102. if (res.code == 0) {
  103. uni.showToast({
  104. title: res.msg
  105. })
  106. this.getDetail()
  107. }
  108. })
  109. },
  110. goBack() {
  111. uni.navigateBack();
  112. },
  113. contactCandidate() {
  114. //去联系
  115. this.getDetail()
  116. this.$Request.postJson('/app/chat/insertChatConversation', {
  117. userId: this.userEntity, //会话对象的id
  118. focusedUserId: uni.getStorageSync('userId'), //当前登录者Id
  119. postPushId: this.postPushId,
  120. resumesId: this.resumesId,
  121. type: 2,
  122. }).then(ret => {
  123. if (ret.code == 0) {
  124. uni.navigateTo({
  125. url: '/pages/msg/im?byUserId=' + this.userEntity
  126. + '&chatConversationId=' + ret.data
  127. .chatConversationId + '&resumesId=' + this.resumesId + '&postPushId=' +
  128. this.postPushId
  129. })
  130. }
  131. })
  132. },
  133. getDetail() {
  134. uni.showLoading({
  135. title: '加载中'
  136. })
  137. let data = {
  138. resumesId: this.resumesId,
  139. userId: this.userId,
  140. companyId: uni.getStorageSync('companyId'),
  141. }
  142. if (this.postPushId && this.postPushId !== 'null' && this.postPushId !== 'undefined') {
  143. data = {
  144. ...data,
  145. postPushId: this.postPushId
  146. }
  147. }
  148. this.$Request.get('/app/resumes/selectResumesByResumesId', data).then(res => {
  149. if (res.code == 0) {
  150. uni.hideLoading()
  151. var data = res.data;
  152. this.resumeData = res.data;
  153. // this.userEntity = data.userEntity
  154. this.userEntity = data.userId
  155. this.eduList = data.eduList
  156. this.intentions = data.intentionList
  157. this.resumeList = data.resumesListDtoList !=null?data.resumesListDtoList : {}
  158. // this.skills = data.skills
  159. this.skills = data.skillList
  160. this.workExpList = data.workExpList
  161. this.$queue.setData('resumeDetailData', res.data)
  162. } else {
  163. uni.hideLoading()
  164. uni.showModal({
  165. title: '提示',
  166. content: '用户简历不存在',
  167. showCancel: false,
  168. complete(ret) {
  169. uni.navigateBack()
  170. }
  171. })
  172. }
  173. }).finally(() => {
  174. this.loading = false
  175. })
  176. },
  177. //使用岗位名称查询出企业正在招聘的该岗位拿到对应的岗位id
  178. getJobList(ruleClassifyName) {
  179. let data = {
  180. status: 2,
  181. page: 1,
  182. limit: 1,
  183. ruleClassifyName: ruleClassifyName,
  184. companyId: uni.getStorageSync('companyId')
  185. }
  186. this.$Request.getT('/app/postPush/getPostPushList', data).then(res => {
  187. if (res.code == 0) {
  188. this.postPushId = res.data.records[0].postPushId
  189. }
  190. })
  191. },
  192. // 查看图片
  193. saveImg(imgs, index) {
  194. // console.log(imgs)
  195. let that = this;
  196. let imgArr = imgs
  197. // imgArr.push(imgs);
  198. // //预览图片
  199. uni.previewImage({
  200. urls: imgArr,
  201. current: imgArr[index]
  202. });
  203. },
  204. }
  205. }
  206. </script>
  207. <style lang="scss" scoped>
  208. .resume-detail {
  209. min-height: 100vh;
  210. padding-bottom: 120rpx;
  211. // padding-top 已改为动态计算,在模板中通过 :style 设置
  212. }
  213. .fixed-nav {
  214. position: fixed;
  215. top: 0;
  216. left: 0;
  217. right: 0;
  218. z-index: 9999;
  219. background-color: #ffffff;
  220. // padding: 0 4rpx;
  221. // padding-top 已改为动态计算,在模板中通过 :style 设置
  222. }
  223. // 顶部导航栏
  224. .navbar {
  225. background: #fff;
  226. height: 88rpx;
  227. padding: 0 8rpx;
  228. // padding: 80rpx 0 40rpx 0; // 已移除,因为现在是固定导航栏
  229. .navbar-content {
  230. display: flex;
  231. align-items: center;
  232. justify-content: space-between;
  233. padding: 0 30rpx;
  234. height: 60rpx;
  235. .navbar-left {
  236. width: 96rpx;
  237. display: flex;
  238. align-items: center;
  239. }
  240. .navbar-title {
  241. color: rgba(23, 23, 37, 1);
  242. font-family: DM Sans;
  243. font-size: 34rpx;
  244. font-weight: 400;
  245. line-height: 52rpx;
  246. letter-spacing: 0%;
  247. text-align: center;
  248. }
  249. .nav-right {
  250. display: flex;
  251. align-items: center;
  252. justify-content: flex-end;
  253. width: 96rpx;
  254. }
  255. .nav-icon {
  256. display: flex;
  257. align-items: center;
  258. justify-content: center;
  259. // width: 36rpx;
  260. // height: 36rpx;
  261. }
  262. .icon-img {
  263. width: 42rpx;
  264. height: 42rpx;
  265. }
  266. }
  267. }
  268. // 底部操作按钮
  269. .bottom-actions {
  270. position: fixed;
  271. bottom: 0;
  272. left: 0;
  273. right: 0;
  274. background: #fff;
  275. padding: 30rpx;
  276. box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1);
  277. .action-btn {
  278. width: 100%;
  279. height: 88rpx;
  280. border-radius: 44rpx;
  281. display: flex;
  282. align-items: center;
  283. justify-content: center;
  284. font-size: 32rpx;
  285. font-weight: 500;
  286. }
  287. .contact-btn {
  288. background: linear-gradient(90deg, rgba(13, 39, 247, 1), rgba(19, 193, 234, 1) 100%);
  289. color: #fff;
  290. }
  291. }
  292. .company-title {
  293. margin-bottom: 8rpx;
  294. color: rgba(23, 23, 37, 1);
  295. font-family: DM Sans;
  296. font-size: 28rpx;
  297. font-weight: 400;
  298. }
  299. </style>