workRecord.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732
  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. src="@/static/images/jobApplicant/touxiang.svg"
  21. mode="scaleToFill"
  22. class="user-img"
  23. />
  24. </view>
  25. <view class="upload-view">上传头像</view>
  26. </view>
  27. </view>
  28. <!-- 基本信息表单 -->
  29. <view class="form-section">
  30. <!-- 姓名 -->
  31. <view class="form-item required">
  32. <view class="form-label">姓名</view>
  33. <u-input
  34. placeholder="请输入姓名"
  35. v-model="formData.name"
  36. :border="false"
  37. class="form-input"
  38. ></u-input>
  39. </view>
  40. <!-- 性别 -->
  41. <view class="form-item required">
  42. <view class="form-label">性别</view>
  43. <view class="gender-select">
  44. <view class="gender-option" @click="formData.gender = 'male'">
  45. <image
  46. v-if="formData.gender === 'male'"
  47. src="/static/images/jobApplicant/radio-check.svg"
  48. mode="scaleToFill"
  49. />
  50. <image
  51. v-else
  52. src="/static/images/jobApplicant/radio.svg"
  53. mode="scaleToFill"
  54. />
  55. 男</view
  56. >
  57. <view class="gender-option" @click="formData.gender = 'female'">
  58. <image
  59. v-if="formData.gender === 'female'"
  60. src="/static/images/jobApplicant/radio-check.svg"
  61. mode="scaleToFill"
  62. />
  63. <image
  64. v-else
  65. src="/static/images/jobApplicant/radio.svg"
  66. mode="scaleToFill"
  67. />
  68. 女</view
  69. >
  70. </view>
  71. </view>
  72. <!-- 联系方式 -->
  73. <view class="form-item required">
  74. <view class="form-label">联系方式</view>
  75. <view class="phone-view">188******39</view>
  76. </view>
  77. <!-- 出生年月 -->
  78. <view class="form-item required">
  79. <view class="form-label">出生年月</view>
  80. <!-- formData.birthDate -->
  81. <view @click="showBirthDatePicker = true" class="form-input-time">
  82. <text>请输入出生年月</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. <!-- formData.birthDate -->
  90. <view @click="showBirthDatePicker = true" class="form-input-time">
  91. <text>离职&随时到岗</text>
  92. <image src="@/static/images/jobApplicant/icon-next.svg" mode="scaleToFill" />
  93. </view>
  94. </view>
  95. </view>
  96. <!-- 工作经历 -->
  97. <view class="section">
  98. <view class="section-header">
  99. <view class="form-item required">
  100. <view class="job-title">
  101. <view class="job-title-txt"
  102. >工作经历 <text class="job-txt">请填写专属聘用行业的工作经验</text></view
  103. >
  104. <image
  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. :show="showBirthDatePicker"
  229. :columns="dateColumns"
  230. keyName="label"
  231. @confirm="confirmBirthDate"
  232. @cancel="showBirthDatePicker = false"
  233. ></u-picker>
  234. </view>
  235. </template>
  236. <script>
  237. export default {
  238. data() {
  239. // 生成日期选择器数据
  240. const currentYear = new Date().getFullYear();
  241. const years = [];
  242. const months = [];
  243. const days = [];
  244. for (let i = currentYear - 50; i <= currentYear; i++) {
  245. years.push({ label: i + "年", value: i });
  246. }
  247. for (let i = 1; i <= 12; i++) {
  248. months.push({ label: i + "月", value: i });
  249. }
  250. for (let i = 1; i <= 31; i++) {
  251. days.push({ label: i + "日", value: i });
  252. }
  253. return {
  254. avatarUrl: "",
  255. showBirthDatePicker: false,
  256. dateColumns: [years, months, days],
  257. formData: {
  258. name: "",
  259. gender: "male",
  260. birthDate: "",
  261. advantages: "",
  262. },
  263. workExperiences: [
  264. {
  265. position: "职位",
  266. department: "部门",
  267. company: "公司名称",
  268. duration: "就职时间",
  269. content: "请填写简历工作内容",
  270. skills: "请填写面试技能要求",
  271. },
  272. ],
  273. educationExperiences: [
  274. {
  275. school: "学校名称",
  276. degree: "学历",
  277. major: "专业",
  278. duration: "在职时间",
  279. content: "请填写简历或简历",
  280. },
  281. ],
  282. };
  283. },
  284. methods: {
  285. // 选择头像
  286. chooseAvatar() {
  287. uni.chooseImage({
  288. count: 1,
  289. sizeType: ["compressed"],
  290. sourceType: ["album", "camera"],
  291. success: (res) => {
  292. this.avatarUrl = res.tempFilePaths[0];
  293. },
  294. });
  295. },
  296. // 确认出生日期
  297. confirmBirthDate(e) {
  298. const [year, month, day] = e.value;
  299. this.formData.birthDate = `${year.label}${month.label}${day.label}`;
  300. this.showBirthDatePicker = false;
  301. },
  302. // 添加工作经历
  303. addWorkExperience() {
  304. this.workExperiences.push({
  305. position: "职位",
  306. department: "部门",
  307. company: "公司名称",
  308. duration: "就职时间",
  309. content: "请填写简历工作内容",
  310. skills: "请填写面试技能要求",
  311. });
  312. },
  313. // 删除工作经历
  314. removeWorkExperience(index) {
  315. if (this.workExperiences.length > 1) {
  316. this.workExperiences.splice(index, 1);
  317. } else {
  318. uni.showToast({
  319. title: "至少保留一条工作经历",
  320. icon: "none",
  321. });
  322. }
  323. },
  324. // 添加教育经历
  325. addEducationExperience() {
  326. this.educationExperiences.push({
  327. school: "学校名称",
  328. degree: "学历",
  329. major: "专业",
  330. duration: "在职时间",
  331. content: "请填写简历或简历",
  332. });
  333. },
  334. // 删除教育经历
  335. removeEducationExperience(index) {
  336. if (this.educationExperiences.length > 1) {
  337. this.educationExperiences.splice(index, 1);
  338. } else {
  339. uni.showToast({
  340. title: "至少保留一条教育经历",
  341. icon: "none",
  342. });
  343. }
  344. },
  345. // 提交简历
  346. submitResume() {
  347. if (!this.formData.name) {
  348. uni.showToast({ title: "请输入姓名", icon: "none" });
  349. return;
  350. }
  351. if (!this.formData.gender) {
  352. uni.showToast({ title: "请选择性别", icon: "none" });
  353. return;
  354. }
  355. if (!this.formData.birthDate) {
  356. uni.showToast({ title: "请输入出生年月", icon: "none" });
  357. return;
  358. }
  359. uni.showLoading({ title: "提交中..." });
  360. setTimeout(() => {
  361. uni.hideLoading();
  362. uni.showToast({ title: "提交成功", icon: "success" });
  363. // 实际开发中可以在这里添加跳转逻辑
  364. }, 1500);
  365. },
  366. },
  367. };
  368. </script>
  369. <style lang="scss" scoped>
  370. .resume-container {
  371. position: absolute;
  372. left: 0;
  373. right: 0;
  374. top: 0;
  375. bottom: 0;
  376. }
  377. .job-title {
  378. display: flex;
  379. justify-content: space-between;
  380. align-items: center;
  381. }
  382. .job-image {
  383. width: 48rpx;
  384. height: 48rpx;
  385. }
  386. .nav-bar {
  387. height: 88rpx;
  388. display: flex;
  389. align-items: center;
  390. justify-content: center;
  391. background: #fff;
  392. }
  393. .nav-title {
  394. font-size: 36rpx;
  395. font-weight: bold;
  396. color: #000;
  397. }
  398. .resume-content {
  399. padding: 32rpx;
  400. }
  401. /* 头像区域 */
  402. .avatar-section {
  403. display: flex;
  404. }
  405. .avatar-upload {
  406. display: flex;
  407. align-items: center;
  408. }
  409. .avatar-preview {
  410. width: 48rpx;
  411. height: 48rpx;
  412. border-radius: 50%;
  413. display: flex;
  414. align-items: center;
  415. justify-content: center;
  416. margin-right: 20rpx;
  417. }
  418. .avatar-image {
  419. width: 100%;
  420. height: 100%;
  421. border-radius: 50%;
  422. }
  423. .upload-view {
  424. color: #016bf6;
  425. font-family: DM Sans;
  426. font-size: 20rpx;
  427. font-weight: 500;
  428. line-height: 48rpx;
  429. }
  430. .form-item {
  431. padding-bottom: 24rpx;
  432. box-sizing: border-box;
  433. .job-txt {
  434. color: #016bf6;
  435. font-family: DM Sans;
  436. font-size: 20rpx;
  437. margin-left: 16rpx;
  438. }
  439. }
  440. .form-item:last-child {
  441. border-bottom: none;
  442. }
  443. .form-label {
  444. color: #1f2c37;
  445. font-family: DM Sans;
  446. font-size: 28rpx;
  447. font-weight: 500;
  448. line-height: 44rpx;
  449. padding-top: 30rpx;
  450. padding-bottom: 27rpx;
  451. box-sizing: border-box;
  452. }
  453. .form-input {
  454. flex: 1;
  455. box-sizing: border-box;
  456. border: 2rpx solid #9ea1a8;
  457. border-radius: 100rpx;
  458. background: rgba(255, 255, 255, 1);
  459. padding: 0rpx 24rpx !important;
  460. }
  461. .form-input-time {
  462. flex: 1;
  463. box-sizing: border-box;
  464. border: 2rpx solid #e3e7ec;
  465. border-radius: 100rpx;
  466. background: rgba(255, 255, 255, 1);
  467. padding: 10rpx 24rpx;
  468. color: rgba(153, 153, 153, 1);
  469. font-family: DM Sans;
  470. font-size: 24rpx;
  471. font-weight: 500;
  472. display: flex;
  473. justify-content: space-between;
  474. align-items: center;
  475. image {
  476. width: 48rpx;
  477. height: 48rpx;
  478. }
  479. }
  480. ::v-deep .input-placeholder {
  481. color: rgba(153, 153, 153, 1) !important;
  482. font-family: DM Sans;
  483. font-size: 24rpx !important;
  484. font-weight: 500;
  485. }
  486. .user-img {
  487. width: 48rpx;
  488. height: 48rpx;
  489. }
  490. .required .form-label::before {
  491. content: "*";
  492. color: #fa3534;
  493. margin-right: 8rpx;
  494. }
  495. /* 性别选择 */
  496. .gender-select {
  497. display: flex;
  498. flex: 1;
  499. gap: 40rpx;
  500. }
  501. .gender-option {
  502. display: flex;
  503. align-items: center;
  504. color: #171725;
  505. font-family: DM Sans;
  506. font-size: 24rpx;
  507. font-weight: 400;
  508. line-height: 48rpx;
  509. text-align: left;
  510. image {
  511. width: 32rpx;
  512. height: 32rpx;
  513. margin-right: 8rpx;
  514. }
  515. }
  516. .phone-view,
  517. .job-status {
  518. flex: 1;
  519. font-size: 32rpx;
  520. color: #333;
  521. }
  522. .section {
  523. box-sizing: border-box;
  524. border: 2rpx solid #016bf6;
  525. border-radius: 24rpx;
  526. background: #fff;
  527. padding: 32rpx;
  528. box-sizing: border-box;
  529. margin-bottom: 30rpx;
  530. }
  531. .section-header {
  532. margin-bottom: 24rpx;
  533. }
  534. /* 经历项目 */
  535. .experience-item {
  536. border-radius: 12rpx;
  537. padding: 24rpx;
  538. box-sizing: border-box;
  539. }
  540. .job-content {
  541. display: flex;
  542. gap: 42rpx;
  543. .job-icon {
  544. width: 96rpx;
  545. height: 96rpx;
  546. border-radius: 16rpx;
  547. background: rgba(246, 246, 246, 1);
  548. display: flex;
  549. justify-content: center;
  550. align-items: center;
  551. image {
  552. width: 64rpx;
  553. height: 64rpx;
  554. }
  555. }
  556. .job-content-txt {
  557. }
  558. }
  559. .exp-header {
  560. display: flex;
  561. justify-content: space-between;
  562. align-items: center;
  563. margin-bottom: 16rpx;
  564. }
  565. .exp-position {
  566. display: flex;
  567. align-items: center;
  568. }
  569. .position {
  570. color: #171725;
  571. font-family: DM Sans;
  572. font-size: 28rpx;
  573. font-weight: 400;
  574. line-height: 44rpx;
  575. text-align: left;
  576. }
  577. .department {
  578. font-size: 24rpx;
  579. color: #999;
  580. margin-left: 16rpx;
  581. }
  582. .exp-company {
  583. display: flex;
  584. align-items: center;
  585. margin-bottom: 16rpx;
  586. color: #78828a;
  587. font-family: DM Sans;
  588. font-size: 16rpx;
  589. font-weight: 400;
  590. line-height: 40rpx;
  591. text-align: left;
  592. .yuan {
  593. padding: 0 16rpx;
  594. box-sizing: border-box;
  595. font-size: 40rpx;
  596. }
  597. }
  598. .exp-content {
  599. margin-bottom: 12rpx;
  600. }
  601. .exp-content:last-child {
  602. margin-bottom: 0;
  603. }
  604. .content-label {
  605. color: rgba(120, 130, 138, 1);
  606. font-family: DM Sans;
  607. font-size: 16rpx;
  608. font-weight: 400;
  609. line-height: 20rpx;
  610. text-align: left;
  611. margin-bottom: 10rpx;
  612. }
  613. .tag-box {
  614. border-radius: 8rpx;
  615. background: rgba(153, 153, 153, 0.1);
  616. padding: 8rpx;
  617. box-sizing: border-box;
  618. }
  619. .content-view {
  620. font-size: 28rpx;
  621. color: #333;
  622. line-height: 1.5;
  623. }
  624. /* 教育经历 */
  625. .education-item {
  626. background: #f8f9fa;
  627. border-radius: 12rpx;
  628. padding: 24rpx;
  629. margin-bottom: 24rpx;
  630. }
  631. .edu-header {
  632. display: flex;
  633. justify-content: space-between;
  634. align-items: center;
  635. margin-bottom: 16rpx;
  636. }
  637. .edu-school {
  638. font-size: 32rpx;
  639. color: #333;
  640. font-weight: 500;
  641. }
  642. .edu-info {
  643. display: flex;
  644. align-items: center;
  645. margin-bottom: 12rpx;
  646. }
  647. .edu-degree,
  648. .edu-major,
  649. .edu-duration {
  650. font-size: 28rpx;
  651. color: #666;
  652. margin-right: 20rpx;
  653. }
  654. .edu-content {
  655. margin-top: 12rpx;
  656. }
  657. .add-view {
  658. font-size: 28rpx;
  659. margin-left: 12rpx;
  660. }
  661. .advantage-textarea {
  662. color: rgba(120, 130, 138, 1);
  663. font-family: DM Sans;
  664. font-size: 24rpx;
  665. font-weight: 400;
  666. line-height: 32rpx;
  667. padding: 32rpx;
  668. padding-top: 0;
  669. box-sizing: border-box;
  670. }
  671. .footer {
  672. padding-bottom: 40rpx;
  673. }
  674. ::v-deep .u-input {
  675. text-align: left !important;
  676. }
  677. </style>