index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  1. <template>
  2. <layout-page>
  3. <view class="baseInfo borderLine" @tap="handleTo('baseInfoEdit')">
  4. <view>
  5. <view class="baseInfo-name">
  6. <text class="name title">{{ baseInfo.name }}</text>
  7. <uni-icons
  8. type="icon-Edit"
  9. color="#333"
  10. custom-prefix="iconfont"
  11. size="20"
  12. ></uni-icons>
  13. </view>
  14. <view class="baseInfo-desc">{{ baseInfo.jobStatusText }}</view>
  15. <view class="baseInfo-desc">{{ baseInfo.expTypeText }} - {{ baseInfo.age }}岁 - {{ baseInfo.eduTypeText }}</view>
  16. <view class="baseInfo-phone">
  17. <uni-icons
  18. type="icon-Phone"
  19. color="#999"
  20. custom-prefix="iconfont"
  21. size="14"
  22. ></uni-icons>
  23. <text class="number">{{ baseInfo.phone }}</text>
  24. </view>
  25. </view>
  26. <view class="head">
  27. <image
  28. :src="baseInfo.avatar"
  29. mode="scaleToFill"
  30. />
  31. </view>
  32. </view>
  33. <view class="characteristic borderLine">
  34. <view class="titleBox">
  35. <text class="title">个人画像</text>
  36. <uni-icons
  37. type="icon-Edit"
  38. color="#666"
  39. custom-prefix="iconfont"
  40. size="18"
  41. ></uni-icons>
  42. </view>
  43. <view class="tags">
  44. <view
  45. v-for="tag in baseInfo.tagList"
  46. :key="tag"
  47. class="tag"
  48. >
  49. {{ tag }}
  50. </view>
  51. </view>
  52. </view>
  53. <view class="advantage borderLine">
  54. <view class="titleBox">
  55. <text class="title">个人优势</text>
  56. <uni-icons
  57. type="icon-Edit"
  58. color="#666"
  59. custom-prefix="iconfont"
  60. size="18"
  61. ></uni-icons>
  62. </view>
  63. <view class="ellipsis-2 text px-20">{{ baseInfo.advantage ? baseInfo.advantage : '请填写您的个人优势...' }}</view>
  64. </view>
  65. <view class="intention borderLine">
  66. <view class="titleBox">
  67. <text class="title">求职意向</text>
  68. <uni-icons
  69. type="icon-add"
  70. color="#666"
  71. custom-prefix="iconfont"
  72. size="18"
  73. ></uni-icons>
  74. </view>
  75. <view class="content">
  76. <view class="text" v-if="!intention.length">请填写您的求职意向...</view>
  77. <uni-list :border="false">
  78. <uni-list-item
  79. v-for="int in intention"
  80. :key="int.id"
  81. :border="false"
  82. showArrow
  83. >
  84. <template v-slot:body>
  85. <view class="item">
  86. <view class="item-title">{{ int.jobTypeName}}</view>
  87. <view>
  88. <text class="mr-20">{{ int.position}}</text>
  89. <text>{{ int.payFrom }} {{ int.payFrom && int.payTo ? '-' : ''}} {{ int.payTo}}</text>
  90. </view>
  91. <view>{{ int.workArea }}</view>
  92. <view class="item-tags">
  93. <view v-for="industry in int.industry" :key="industry.id" class="tag">{{ industry.nameCn }}</view>
  94. </view>
  95. </view>
  96. </template>
  97. </uni-list-item>
  98. </uni-list>
  99. </view>
  100. </view>
  101. <view class="educationExp borderLine">
  102. <view class="titleBox">
  103. <text class="title">教育经历</text>
  104. <uni-icons
  105. type="icon-add"
  106. color="#666"
  107. custom-prefix="iconfont"
  108. size="18"
  109. ></uni-icons>
  110. </view>
  111. <view class="content">
  112. <view class="text" v-if="!educationExp.length">请填写您的教育经历...</view>
  113. <uni-list :border="false">
  114. <uni-list-item
  115. v-for="education in educationExp"
  116. :key="education.id"
  117. showArrow
  118. :border="false"
  119. :title="education.schoolName"
  120. :note="`${education.major} ${education.educationTypeText}`"
  121. :rightText="education.time"
  122. />
  123. </uni-list>
  124. </view>
  125. </view>
  126. <view class="workExp borderLine">
  127. <view class="titleBox">
  128. <text class="title">工作经历</text>
  129. <uni-icons
  130. type="icon-add"
  131. color="#666"
  132. custom-prefix="iconfont"
  133. size="18"
  134. ></uni-icons>
  135. </view>
  136. <view class="content">
  137. <view
  138. v-for="work in workExp"
  139. :key="work.id"
  140. class="content-item"
  141. >
  142. <view class="content-title">
  143. <view class="name">{{ work.enterpriseName }}</view>
  144. <view class="time">
  145. {{ work.time }}
  146. <uni-icons
  147. class="icon"
  148. type="right"
  149. color="#aaa"
  150. size="16"
  151. />
  152. </view>
  153. </view>
  154. <view class="content-subTitle">{{ work.positionName }}</view>
  155. <view class="content-main ellipsis-2">内容:{{ work.content }}</view>
  156. </view>
  157. </view>
  158. </view>
  159. <view class="projectExp workExp borderLine">
  160. <view class="titleBox">
  161. <text class="title">项目经历</text>
  162. <uni-icons
  163. type="icon-add"
  164. color="#666"
  165. custom-prefix="iconfont"
  166. size="18"
  167. ></uni-icons>
  168. </view>
  169. <view class="content">
  170. <view
  171. v-for="project in projectExp"
  172. :key="project.id"
  173. class="content-item"
  174. >
  175. <view class="content-title">
  176. <view class="name">{{ project.name }}</view>
  177. <view class="time">
  178. {{ project.time }}
  179. <uni-icons
  180. class="icon"
  181. type="right"
  182. color="#aaa"
  183. size="16"
  184. />
  185. </view>
  186. </view>
  187. <view class="content-main ellipsis-2">描述:{{ project.content }}</view>
  188. </view>
  189. </view>
  190. </view>
  191. <view class="workExp trainExp borderLine">
  192. <view class="titleBox">
  193. <text class="title">培训经历</text>
  194. <uni-icons
  195. type="icon-add"
  196. color="#666"
  197. custom-prefix="iconfont"
  198. size="18"
  199. ></uni-icons>
  200. </view>
  201. <view class="content">
  202. <view
  203. v-for="train in trainExp"
  204. :key="train.id"
  205. class="content-item"
  206. >
  207. <view class="content-title">
  208. <view class="name">{{ train.orgName }}</view>
  209. <view class="time">
  210. {{ train.time }}
  211. <uni-icons
  212. class="icon"
  213. type="right"
  214. color="#aaa"
  215. size="16"
  216. />
  217. </view>
  218. </view>
  219. <view class="content-subTitle">课程:{{ train.course }}</view>
  220. <view class="content-main ellipsis-2">描述:{{ train.content }}</view>
  221. </view>
  222. </view>
  223. </view>
  224. <view class="characteristic">
  225. <view class="titleBox">
  226. <text class="title">职业技能</text>
  227. <uni-icons
  228. type="icon-Edit"
  229. color="#666"
  230. custom-prefix="iconfont"
  231. size="18"
  232. ></uni-icons>
  233. </view>
  234. <view class="tags">
  235. <view
  236. v-for="skill in skillExp"
  237. :key="skill.title"
  238. class="tag"
  239. >
  240. {{ skill.title }}
  241. </view>
  242. </view>
  243. </view>
  244. </layout-page>
  245. </template>
  246. <script setup>
  247. import { ref } from 'vue'
  248. import { getAgeByBirthdayTimestamp, timesTampChange } from '@/utils/date'
  249. import {
  250. getResumeJobInterested,
  251. getResumeEduExp,
  252. getResumeWorkExp,
  253. getResumeProjectExp,
  254. getResumeTrainExp,
  255. getResumePersonSkill
  256. } from '@/api/resume'
  257. import { getText } from '@/utils/getText'
  258. import { getDict } from '@/hooks/useDictionaries'
  259. import { userStore } from '@/store/user'
  260. import { dealJobData } from './dict'
  261. const useUserStore = userStore()
  262. const baseInfo = ref({})
  263. const intention = ref([])
  264. const educationExp = ref([])
  265. const workExp = ref([])
  266. const projectExp = ref([])
  267. const trainExp = ref([])
  268. const skillExp = ref([])
  269. function handleTo (str) {
  270. uni.navigateTo({ url: `/pagesA/resumeOnline/${str}` })
  271. }
  272. // 获取基础信息
  273. function getBaseInfo () {
  274. const { name, phone, ...obj } = useUserStore.baseInfo
  275. baseInfo.value = {
  276. ...obj,
  277. name: name ? name : useUserStore.userInfo.phone,
  278. phone: phone ? phone : useUserStore.userInfo.phone,
  279. age: obj.birthday ? getAgeByBirthdayTimestamp(obj.birthday) : 0
  280. }
  281. }
  282. // 获取求职意向
  283. async function getJobInterested () {
  284. const { data } = await getResumeJobInterested()
  285. if (!data || !data.length) {
  286. return
  287. }
  288. // 完成度展示
  289. // emit('complete', { status: Boolean(data?.length), id: 'jobIntention' })
  290. // if (!data.length) return
  291. intention.value = dealJobData(data)
  292. }
  293. // 获取教育经历
  294. async function getEduExp () {
  295. const { data: dict } = await getDict('menduner_education_type')
  296. if (dict.code !== 0) {
  297. return
  298. }
  299. const { data } = await getResumeEduExp()
  300. if (!data || !data.length) {
  301. return
  302. }
  303. educationExp.value = data.map(e => {
  304. const item = dict.data.find(_e => _e.value === e.educationType)
  305. return {
  306. ...e,
  307. educationTypeText: item?.label ?? '',
  308. time: `${timesTampChange(e.startTime ,'Y')}-${timesTampChange(e.endTime ,'Y')} `
  309. }
  310. })
  311. // 完成度展示
  312. // emit('complete', { status: Boolean(data?.length), id: 'educationExp' })
  313. // dataList.value = data
  314. }
  315. // 获取工作经验
  316. async function getWorkExp () {
  317. const { data } = await getResumeWorkExp()
  318. if (!data || !data.length) {
  319. return
  320. }
  321. // console.log(data)
  322. // 完成度展示
  323. // emit('complete', { status: Boolean(data?.length), id: 'workExperience' })
  324. workExp.value = data.map(e => {
  325. return {
  326. ...e,
  327. time: `${timesTampChange(e.startTime ,'Y')}-${e.endTime ? timesTampChange(e.endTime ,'Y') : '至今'} `
  328. }
  329. })
  330. }
  331. // 项目经历
  332. async function getProjectExpData () {
  333. const { data } = await getResumeProjectExp()
  334. if (!data || !data.length) {
  335. return
  336. }
  337. // 完成度展示
  338. // emit('complete', { status: Boolean(data?.length), id: 'projectExperience' })
  339. projectExp.value = data.map(e => {
  340. return {
  341. ...e,
  342. time: `${timesTampChange(e.startTime ,'Y')}-${e.endTime ? timesTampChange(e.endTime ,'Y') : '至今'} `
  343. }
  344. })
  345. }
  346. // 培训经历
  347. async function getTrainExpData () {
  348. const { data } = await getResumeTrainExp()
  349. if (!data || !data.length) {
  350. return
  351. }
  352. // 完成度展示
  353. // emit('complete', { status: Boolean(data?.length), id: 'trainingExperience' })
  354. trainExp.value = data.map(e => {
  355. return {
  356. ...e,
  357. time: `${timesTampChange(e.startTime ,'Y')}-${e.endTime ? timesTampChange(e.endTime ,'Y') : '至今'} `
  358. }
  359. })
  360. }
  361. // 职业技能
  362. async function getSkillExpData () {
  363. const { data: _skillList} = await getDict('skillList', {}, 'skillList')
  364. const skillList = _skillList?.data
  365. if (!skillList || !skillList.length) {
  366. return
  367. }
  368. const { data: _skillLevelArr } = await getDict('menduner_skill_level')
  369. const skillLevelArr = _skillLevelArr?.data
  370. if (!skillLevelArr || !skillLevelArr.length) {
  371. return
  372. }
  373. const { data } = await getResumePersonSkill()
  374. if (!data || !data.length) {
  375. return
  376. }
  377. // 完成度展示
  378. // emit('complete', { status: Boolean(data?.length), id: 'vocationalSkills' })
  379. skillExp.value = data.map(e => {
  380. return {
  381. ...e,
  382. title: `${getText(e.skillId, skillList, 'nameCn', 'id')} / ${getText(e.level, skillLevelArr)}`
  383. }
  384. })
  385. }
  386. // 求职状态字典
  387. // getJobStatus()
  388. // 获取基础信息
  389. getBaseInfo()
  390. // 获取求职意向
  391. getJobInterested()
  392. // 获取教育经历
  393. getEduExp()
  394. // 获取工作经验
  395. getWorkExp()
  396. // 项目经历
  397. getProjectExpData()
  398. // 培训经历
  399. getTrainExpData()
  400. // 职业技能
  401. getSkillExpData()
  402. </script>
  403. <style lang="scss" scoped>
  404. $px: 30rpx;
  405. .borderLine {
  406. border-bottom: 2rpx solid #f5f5f5;
  407. }
  408. .title {
  409. font-size: 40rpx;
  410. font-weight: 600;
  411. }
  412. .flex-1 {
  413. flex: 1;
  414. }
  415. .soloHeight {
  416. height: 80rpx;
  417. line-height: 80rpx;
  418. }
  419. .px-20 {
  420. padding-left: 20rpx;
  421. padding-right: 20rpx;
  422. box-sizing: border-box;
  423. }
  424. .mr-20 {
  425. margin-right: 20rpx;
  426. }
  427. .ellipsis-2 {
  428. overflow: hidden;
  429. display: -webkit-box;
  430. text-overflow: ellipsis; //属性规定当文本溢出包含元素时发生的事情 text-overflow: clip|ellipsis|string; (修剪/省略号/指定字符串)
  431. -webkit-line-clamp: 2;
  432. -webkit-box-orient: vertical; //属性规定框的子元素应该被水平或垂直排列
  433. }
  434. .titleBox {
  435. margin-bottom: 10rpx;
  436. display: flex;
  437. justify-content: space-between;
  438. }
  439. .text {
  440. font-size: 28rpx;
  441. color: #666;
  442. }
  443. .baseInfo {
  444. padding: 20rpx $px;
  445. display: flex;
  446. justify-content: space-between;
  447. align-items: center;
  448. &-name {
  449. margin-bottom: 10rpx;
  450. .name {
  451. margin-right: 10rpx;
  452. }
  453. }
  454. &-desc {
  455. font-size: 28rpx;
  456. color: #666;
  457. margin-bottom: 10rpx;
  458. }
  459. &-phone {
  460. font-size: 28rpx;
  461. color: #666;
  462. .number {
  463. margin-left: 10rpx;
  464. }
  465. }
  466. .head {
  467. image {
  468. width: 150rpx;
  469. height: 150rpx;
  470. border: 2rpx solid #ccc;
  471. border-radius: 50%;
  472. }
  473. }
  474. }
  475. .advantage {
  476. padding: $px;
  477. }
  478. .characteristic {
  479. padding: $px;
  480. .tags {
  481. padding-top: $px;
  482. display: flex;
  483. flex-wrap: wrap;
  484. .tag {
  485. margin: 0 10rpx 10rpx 0;
  486. border: 2rpx solid #008978;
  487. color: #008978;
  488. white-space: nowrap;
  489. padding: 4rpx 10rpx;
  490. border-radius: 10rpx;
  491. font-size: 24rpx;
  492. }
  493. }
  494. }
  495. .intention,.educationExp,.workExp,.projectExp {
  496. padding: $px;
  497. }
  498. .workExp {
  499. .content {
  500. &-item {
  501. padding: $px 20rpx;
  502. }
  503. &-title {
  504. display: flex;
  505. justify-content: space-between;
  506. .name {
  507. // font-weight: 600;
  508. font-size: 30rpx;
  509. color: #333;
  510. }
  511. .time {
  512. color: #999;
  513. font-size: 24rpx;
  514. display: flex;
  515. align-items: center;
  516. .icon {
  517. margin-left: 20rpx;
  518. }
  519. }
  520. }
  521. &-subTitle {
  522. font-size: 24rpx;
  523. margin-top: 6rpx;
  524. color: #999;
  525. }
  526. &-main {
  527. margin-top: 20rpx;
  528. font-size: 24rpx;
  529. color: #999;
  530. }
  531. }
  532. }
  533. .intention {
  534. .content {
  535. .item {
  536. font-size: 28rpx;
  537. color: #666;
  538. &-title {
  539. color: #000;
  540. font-weight: 600;
  541. }
  542. &-tags {
  543. display: flex;
  544. .tag {
  545. border: 2rpx solid #008978;
  546. color: #008978;
  547. padding: 4rpx 16rpx;
  548. font-size: 24rpx;
  549. margin: 10rpx 10rpx 0 0;
  550. border-radius: 10rpx;
  551. }
  552. }
  553. }
  554. }
  555. }
  556. .popup {
  557. padding: $px;
  558. padding-bottom: 100rpx;
  559. &-title {
  560. width: 100%;
  561. display: flex;
  562. justify-content: space-between;
  563. margin-bottom: $px;
  564. font-size: 24rpx;
  565. .title {
  566. font-size: 36rpx;
  567. }
  568. }
  569. &-content {
  570. .box {
  571. display: flex;
  572. justify-content: space-between;
  573. border-bottom: 2rpx solid #eee;
  574. padding: $px 0;
  575. font-size: 30rpx;
  576. font-weight: 500;
  577. color: #000;
  578. &:last-of-type {
  579. border-bottom: none;
  580. }
  581. &.active {
  582. color: #008978;
  583. font-weight: 600;
  584. }
  585. }
  586. }
  587. }
  588. </style>