workRecord.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  1. <template>
  2. <view class="resume-container">
  3. <!-- 导航栏 -->
  4. <navBar title="近期工作经验" color="#000" />
  5. <view class="resume-content">
  6. <!-- 头像上传区域 -->
  7. <view class="form-label">头像</view>
  8. <view class="avatar-section">
  9. <view class="avatar-upload" @click="chooseAvatar">
  10. <view class="avatar-preview">
  11. <image
  12. v-if="formData.avatar"
  13. :src="formData.avatar"
  14. class="avatar-image"
  15. mode="aspectFill"
  16. ></image>
  17. <image
  18. v-else
  19. src="@/static/images/jobApplicant/touxiang.svg"
  20. mode="scaleToFill"
  21. class="user-img"
  22. />
  23. </view>
  24. <view class="upload-view">上传头像</view>
  25. </view>
  26. </view>
  27. <!-- 基本信息表单 -->
  28. <view class="form-section">
  29. <!-- 姓名 -->
  30. <view class="form-item required">
  31. <view class="form-label">姓名</view>
  32. <u-input
  33. placeholder="请输入姓名"
  34. v-model="formData.name"
  35. :border="false"
  36. class="form-input"
  37. ></u-input>
  38. </view>
  39. <!-- 性别 -->
  40. <view class="form-item required">
  41. <view class="form-label">性别</view>
  42. <view class="gender-select">
  43. <view class="gender-option" @click="formData.gender = 'male'">
  44. <image
  45. v-if="formData.gender === 'male'"
  46. src="/static/images/jobApplicant/radio-check.svg"
  47. mode="scaleToFill"
  48. />
  49. <image
  50. v-else
  51. src="/static/images/jobApplicant/radio.svg"
  52. mode="scaleToFill"
  53. />
  54. 男</view
  55. >
  56. <view class="gender-option" @click="formData.gender = 'female'">
  57. <image
  58. v-if="formData.gender === 'female'"
  59. src="/static/images/jobApplicant/radio-check.svg"
  60. mode="scaleToFill"
  61. />
  62. <image
  63. v-else
  64. src="/static/images/jobApplicant/radio.svg"
  65. mode="scaleToFill"
  66. />
  67. 女</view
  68. >
  69. </view>
  70. </view>
  71. <!-- 联系方式 -->
  72. <view class="form-item required">
  73. <view class="form-label">联系方式</view>
  74. <view class="phone-view">188******39</view>
  75. </view>
  76. <!-- 出生年月 -->
  77. <view class="form-item required">
  78. <view class="form-label">出生年月</view>
  79. <view @click="pickerShow" class="form-input-time">
  80. <text>{{
  81. formData.birthDate ? formData.birthDate : "请选择出生年月日"
  82. }}</text>
  83. <image src="@/static/images/jobApplicant/rili.svg" mode="scaleToFill" />
  84. </view>
  85. </view>
  86. <!-- 求职状态 -->
  87. <view class="form-item required">
  88. <view class="form-label">求职状态</view>
  89. <view @click.stop="showJobStatus" class="form-input-time">
  90. <text>{{ formData.advantages?formData.advantages:'请选择求职状态' }}</text>
  91. <image src="@/static/images/jobApplicant/icon-next.svg" mode="scaleToFill" />
  92. </view>
  93. </view>
  94. </view>
  95. <!-- 工作经历 -->
  96. <view class="section">
  97. <view class="section-header">
  98. <view class="form-item required">
  99. <view class="job-title">
  100. <view class="job-title-txt"
  101. >工作经历 <text class="job-txt">请填写专属聘用行业的工作经验</text></view
  102. >
  103. <image
  104. @click="goWorkProgress"
  105. class="job-image"
  106. src="@/static/images/jobApplicant/edit.svg"
  107. mode="scaleToFill"
  108. />
  109. </view>
  110. </view>
  111. </view>
  112. <view
  113. class="experience-item"
  114. v-for="(exp, index) in workExperiences"
  115. :key="index"
  116. >
  117. <view class="job-content">
  118. <view class="job-icon">
  119. <image src="/static/images/jobApplicant/xuexiao.svg" mode="scaleToFill" />
  120. </view>
  121. <view class="job-content-txt">
  122. <view class="exp-header">
  123. <view class="exp-position">
  124. <view class="position">{{ exp.position }}</view>
  125. <view class="department">{{ exp.department }}</view>
  126. </view>
  127. <!-- <u-icon
  128. name="close"
  129. size="18"
  130. color="#999"
  131. @click="removeWorkExperience(index)"
  132. ></u-icon> -->
  133. </view>
  134. <view class="exp-company">
  135. <view class="company">{{ exp.company }}</view>
  136. <view class="yuan">·</view>
  137. <view class="duration">{{ exp.duration }}</view>
  138. </view>
  139. <view class="exp-content">
  140. <view class="content-label">请填写您的工作内容</view>
  141. </view>
  142. <view class="exp-content">
  143. <view class="content-label tag-box">请填写您的技能标签</view>
  144. </view>
  145. </view>
  146. </view>
  147. </view>
  148. </view>
  149. <!-- 教育经历 -->
  150. <view class="section">
  151. <view class="section-header">
  152. <view class="form-item required">
  153. <view class="job-title">
  154. <view class="job-title-txt">教育经历</view>
  155. <image
  156. class="job-image"
  157. src="@/static/images/jobApplicant/edit.svg"
  158. mode="scaleToFill"
  159. />
  160. </view>
  161. </view>
  162. </view>
  163. <view
  164. class="experience-item"
  165. v-for="(exp, index) in workExperiences"
  166. :key="index"
  167. >
  168. <view class="job-content">
  169. <view class="job-icon">
  170. <image src="/static/images/jobApplicant/bumen.svg" mode="scaleToFill" />
  171. </view>
  172. <view class="job-content-txt">
  173. <view class="exp-header">
  174. <view class="exp-position">
  175. <view class="position">学校名称</view>
  176. </view>
  177. </view>
  178. <view class="exp-company">
  179. <view class="company">学历</view>
  180. <view class="yuan">·</view>
  181. <view class="duration">专业</view>
  182. <view class="yuan">·</view>
  183. <view class="duration">在校时间</view>
  184. </view>
  185. <view class="exp-content">
  186. <view class="content-label">请填写您的教育经历</view>
  187. </view>
  188. </view>
  189. </view>
  190. </view>
  191. </view>
  192. <!-- 个人优势 -->
  193. <view class="section">
  194. <view class="section-header">
  195. <view class="form-item required">
  196. <view class="job-title">
  197. <view class="job-title-txt">个人优势</view>
  198. <image
  199. class="job-image"
  200. src="@/static/images/jobApplicant/edit.svg"
  201. mode="scaleToFill"
  202. />
  203. </view>
  204. </view>
  205. </view>
  206. <view class="advantage-content">
  207. <view type="textarea" class="advantage-textarea">
  208. 这是个人编辑的个人优势区域还是个人编辑的个人优势区域还是个人编辑的个人优势区域还是个人编辑的个人优势区域。展示三行
  209. </view>
  210. </view>
  211. </view>
  212. <!-- 底部按钮 -->
  213. <view class="footer">
  214. <u-button
  215. type="primary"
  216. @click="submitResume"
  217. :customStyle="{
  218. height: '90rpx',
  219. fontSize: '32rpx',
  220. borderRadius: '45rpx',
  221. margin: '40rpx 0',
  222. }"
  223. >开启求职之旅</u-button
  224. >
  225. </view>
  226. </view>
  227. <u-picker
  228. v-model="showBirthDatePicker"
  229. :columns="dateColumns"
  230. keyName="label"
  231. @confirm="confirmBirthDate"
  232. @cancel="showBirthDatePicker = false"
  233. ></u-picker>
  234. <u-action-sheet :list="statusList" v-model="showStatus" @click="confirmStatus"></u-action-sheet>
  235. </view>
  236. </template>
  237. <script>
  238. import navBar from "@/components/nav-bar/index.vue";
  239. export default {
  240. data() {
  241. // 生成日期选择器数据
  242. const currentYear = new Date().getFullYear();
  243. const years = [];
  244. const months = [];
  245. const days = [];
  246. for (let i = currentYear - 50; i <= currentYear; i++) {
  247. years.push({ label: i + "年", value: i });
  248. }
  249. for (let i = 1; i <= 12; i++) {
  250. months.push({ label: i + "月", value: i });
  251. }
  252. for (let i = 1; i <= 31; i++) {
  253. days.push({ label: i + "日", value: i });
  254. }
  255. return {
  256. show: false,
  257. avatarUrl: "",
  258. showBirthDatePicker: false,
  259. dateColumns: [years, months, days],
  260. statusList: [{ text: "兼职" }, { text: "在职" }, { text: "离职&随时到岗" }],
  261. showStatus: false,
  262. formData: {
  263. name: "",
  264. gender: "male",
  265. birthDate: "",
  266. advantages: "",
  267. },
  268. workExperiences: [
  269. {
  270. position: "职位",
  271. department: "部门",
  272. company: "公司名称",
  273. duration: "就职时间",
  274. content: "请填写简历工作内容",
  275. skills: "请填写面试技能要求",
  276. },
  277. ],
  278. };
  279. },
  280. components: {
  281. navBar,
  282. },
  283. methods: {
  284. showJobStatus() {
  285. this.showStatus = true;
  286. },
  287. pickerShow() {
  288. this.showBirthDatePicker = true;
  289. },
  290. confirmStatus(e) {
  291. this.showStatus = false;
  292. this.formData.advantages=this.statusList[e].text
  293. },
  294. goWorkProgress(){
  295. uni.navigateTo({ url: '/pages/my/workExperience' })
  296. },
  297. // 选择头像
  298. chooseAvatar() {
  299. uni.chooseImage({
  300. count: 1,
  301. sizeType: ["compressed"],
  302. sourceType: ["album", "camera"],
  303. success: (res) => {
  304. this.avatarUrl = res.tempFilePaths[0];
  305. },
  306. });
  307. },
  308. // 确认出生日期
  309. confirmBirthDate(e) {
  310. const { year, month, day } = e;
  311. this.formData.birthDate = `${year}-${month}-${day}`;
  312. this.showBirthDatePicker = false;
  313. },
  314. // 添加工作经历
  315. addWorkExperience() {
  316. this.workExperiences.push({
  317. position: "职位",
  318. department: "部门",
  319. company: "公司名称",
  320. duration: "就职时间",
  321. content: "请填写简历工作内容",
  322. skills: "请填写面试技能要求",
  323. });
  324. },
  325. // 删除工作经历
  326. removeWorkExperience(index) {
  327. if (this.workExperiences.length > 1) {
  328. this.workExperiences.splice(index, 1);
  329. } else {
  330. uni.showToast({
  331. title: "至少保留一条工作经历",
  332. icon: "none",
  333. });
  334. }
  335. },
  336. // 提交简历
  337. submitResume() {
  338. if (!this.formData.name) {
  339. uni.showToast({ title: "请输入姓名", icon: "none" });
  340. return;
  341. }
  342. if (!this.formData.gender) {
  343. uni.showToast({ title: "请选择性别", icon: "none" });
  344. return;
  345. }
  346. if (!this.formData.birthDate) {
  347. uni.showToast({ title: "请输入出生年月", icon: "none" });
  348. return;
  349. }
  350. uni.showLoading({ title: "提交中..." });
  351. setTimeout(() => {
  352. uni.hideLoading();
  353. uni.showToast({ title: "提交成功", icon: "success" });
  354. uni.setStorageSync("firstLogin", true);
  355. // 实际开发中可以在这里添加跳转逻辑
  356. uni.switchTab({ url: '/pages/index/index' })
  357. }, 1500);
  358. },
  359. },
  360. };
  361. </script>
  362. <style lang="scss" scoped>
  363. .resume-container {
  364. position: absolute;
  365. left: 0;
  366. right: 0;
  367. top: 0;
  368. bottom: 0;
  369. overflow: hidden;
  370. display: flex;
  371. flex-direction: column;
  372. }
  373. .job-title {
  374. display: flex;
  375. justify-content: space-between;
  376. align-items: center;
  377. }
  378. .job-image {
  379. width: 48rpx;
  380. height: 48rpx;
  381. }
  382. .nav-bar {
  383. height: 88rpx;
  384. display: flex;
  385. align-items: center;
  386. justify-content: center;
  387. background: #fff;
  388. }
  389. .nav-title {
  390. font-size: 36rpx;
  391. font-weight: bold;
  392. color: #000;
  393. }
  394. .resume-content {
  395. padding: 32rpx;
  396. box-sizing: border-box;
  397. overflow: hidden;
  398. overflow-y: auto;
  399. }
  400. /* 头像区域 */
  401. .avatar-section {
  402. display: flex;
  403. }
  404. .avatar-upload {
  405. display: flex;
  406. align-items: center;
  407. }
  408. .avatar-preview {
  409. width: 48rpx;
  410. height: 48rpx;
  411. border-radius: 50%;
  412. display: flex;
  413. align-items: center;
  414. justify-content: center;
  415. margin-right: 20rpx;
  416. }
  417. .avatar-image {
  418. width: 100%;
  419. height: 100%;
  420. border-radius: 50%;
  421. }
  422. .upload-view {
  423. color: #016bf6;
  424. font-family: DM Sans;
  425. font-size: 20rpx;
  426. font-weight: 500;
  427. line-height: 48rpx;
  428. }
  429. .form-item {
  430. padding-bottom: 24rpx;
  431. box-sizing: border-box;
  432. .job-txt {
  433. color: #016bf6;
  434. font-family: DM Sans;
  435. font-size: 20rpx;
  436. margin-left: 16rpx;
  437. }
  438. }
  439. .form-item:last-child {
  440. border-bottom: none;
  441. }
  442. .form-label {
  443. color: #1f2c37;
  444. font-family: DM Sans;
  445. font-size: 28rpx;
  446. font-weight: 500;
  447. line-height: 44rpx;
  448. padding-top: 30rpx;
  449. padding-bottom: 27rpx;
  450. box-sizing: border-box;
  451. }
  452. .form-input {
  453. flex: 1;
  454. box-sizing: border-box;
  455. border: 2rpx solid #9ea1a8;
  456. border-radius: 100rpx;
  457. background: rgba(255, 255, 255, 1);
  458. padding: 0rpx 24rpx !important;
  459. }
  460. .form-input-time {
  461. flex: 1;
  462. box-sizing: border-box;
  463. border: 2rpx solid #e3e7ec;
  464. border-radius: 100rpx;
  465. background: rgba(255, 255, 255, 1);
  466. padding: 10rpx 24rpx;
  467. color: rgba(153, 153, 153, 1);
  468. font-family: DM Sans;
  469. font-size: 24rpx;
  470. font-weight: 500;
  471. display: flex;
  472. justify-content: space-between;
  473. align-items: center;
  474. image {
  475. width: 48rpx;
  476. height: 48rpx;
  477. }
  478. }
  479. ::v-deep .input-placeholder {
  480. color: rgba(153, 153, 153, 1) !important;
  481. font-family: DM Sans;
  482. font-size: 24rpx !important;
  483. font-weight: 500;
  484. }
  485. .user-img {
  486. width: 48rpx;
  487. height: 48rpx;
  488. }
  489. .required .form-label::before {
  490. content: "*";
  491. color: #fa3534;
  492. margin-right: 8rpx;
  493. }
  494. /* 性别选择 */
  495. .gender-select {
  496. display: flex;
  497. flex: 1;
  498. gap: 40rpx;
  499. }
  500. .gender-option {
  501. display: flex;
  502. align-items: center;
  503. color: #171725;
  504. font-family: DM Sans;
  505. font-size: 24rpx;
  506. font-weight: 400;
  507. line-height: 48rpx;
  508. text-align: left;
  509. image {
  510. width: 32rpx;
  511. height: 32rpx;
  512. margin-right: 8rpx;
  513. }
  514. }
  515. .phone-view,
  516. .job-status {
  517. flex: 1;
  518. font-size: 32rpx;
  519. color: #333;
  520. }
  521. .section {
  522. box-sizing: border-box;
  523. border: 2rpx solid #016bf6;
  524. border-radius: 24rpx;
  525. background: #fff;
  526. padding: 32rpx;
  527. box-sizing: border-box;
  528. margin-bottom: 30rpx;
  529. }
  530. .section-header {
  531. margin-bottom: 24rpx;
  532. }
  533. /* 经历项目 */
  534. .experience-item {
  535. border-radius: 12rpx;
  536. padding: 24rpx;
  537. box-sizing: border-box;
  538. }
  539. .job-content {
  540. display: flex;
  541. gap: 42rpx;
  542. .job-icon {
  543. width: 96rpx;
  544. height: 96rpx;
  545. border-radius: 16rpx;
  546. background: rgba(246, 246, 246, 1);
  547. display: flex;
  548. justify-content: center;
  549. align-items: center;
  550. image {
  551. width: 64rpx;
  552. height: 64rpx;
  553. }
  554. }
  555. .job-content-txt {
  556. }
  557. }
  558. .exp-header {
  559. display: flex;
  560. justify-content: space-between;
  561. align-items: center;
  562. margin-bottom: 16rpx;
  563. }
  564. .exp-position {
  565. display: flex;
  566. align-items: center;
  567. }
  568. .position {
  569. color: #171725;
  570. font-family: DM Sans;
  571. font-size: 28rpx;
  572. font-weight: 400;
  573. line-height: 44rpx;
  574. text-align: left;
  575. }
  576. .department {
  577. font-size: 24rpx;
  578. color: #999;
  579. margin-left: 16rpx;
  580. }
  581. .exp-company {
  582. display: flex;
  583. align-items: center;
  584. margin-bottom: 16rpx;
  585. color: #78828a;
  586. font-family: DM Sans;
  587. font-size: 16rpx;
  588. font-weight: 400;
  589. line-height: 40rpx;
  590. text-align: left;
  591. .yuan {
  592. padding: 0 16rpx;
  593. box-sizing: border-box;
  594. font-size: 40rpx;
  595. }
  596. }
  597. .exp-content {
  598. margin-bottom: 12rpx;
  599. }
  600. .exp-content:last-child {
  601. margin-bottom: 0;
  602. }
  603. .content-label {
  604. color: rgba(120, 130, 138, 1);
  605. font-family: DM Sans;
  606. font-size: 16rpx;
  607. font-weight: 400;
  608. line-height: 20rpx;
  609. text-align: left;
  610. margin-bottom: 10rpx;
  611. }
  612. .tag-box {
  613. border-radius: 8rpx;
  614. background: rgba(153, 153, 153, 0.1);
  615. padding: 8rpx;
  616. box-sizing: border-box;
  617. }
  618. .content-view {
  619. font-size: 28rpx;
  620. color: #333;
  621. line-height: 1.5;
  622. }
  623. /* 教育经历 */
  624. .education-item {
  625. background: #f8f9fa;
  626. border-radius: 12rpx;
  627. padding: 24rpx;
  628. margin-bottom: 24rpx;
  629. }
  630. .edu-header {
  631. display: flex;
  632. justify-content: space-between;
  633. align-items: center;
  634. margin-bottom: 16rpx;
  635. }
  636. .edu-school {
  637. font-size: 32rpx;
  638. color: #333;
  639. font-weight: 500;
  640. }
  641. .edu-info {
  642. display: flex;
  643. align-items: center;
  644. margin-bottom: 12rpx;
  645. }
  646. .edu-degree,
  647. .edu-major,
  648. .edu-duration {
  649. font-size: 28rpx;
  650. color: #666;
  651. margin-right: 20rpx;
  652. }
  653. .edu-content {
  654. margin-top: 12rpx;
  655. }
  656. .add-view {
  657. font-size: 28rpx;
  658. margin-left: 12rpx;
  659. }
  660. .advantage-textarea {
  661. color: rgba(120, 130, 138, 1);
  662. font-family: DM Sans;
  663. font-size: 24rpx;
  664. font-weight: 400;
  665. line-height: 32rpx;
  666. padding: 32rpx;
  667. padding-top: 0;
  668. box-sizing: border-box;
  669. }
  670. .footer {
  671. padding-bottom: 40rpx;
  672. }
  673. ::v-deep .u-input {
  674. text-align: left !important;
  675. }
  676. </style>