workRecord.vue 17 KB

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