resumeDetail.vue 7.2 KB

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