workRecord.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  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. uni.setStorageSync("firstLogin", true);
  349. // 实际开发中可以在这里添加跳转逻辑
  350. uni.switchTab({ url: '/pages/index/index' })
  351. }, 1500);
  352. },
  353. },
  354. };
  355. </script>
  356. <style lang="scss" scoped>
  357. .resume-container {
  358. position: absolute;
  359. left: 0;
  360. right: 0;
  361. top: 0;
  362. bottom: 0;
  363. }
  364. .job-title {
  365. display: flex;
  366. justify-content: space-between;
  367. align-items: center;
  368. }
  369. .job-image {
  370. width: 48rpx;
  371. height: 48rpx;
  372. }
  373. .nav-bar {
  374. height: 88rpx;
  375. display: flex;
  376. align-items: center;
  377. justify-content: center;
  378. background: #fff;
  379. }
  380. .nav-title {
  381. font-size: 36rpx;
  382. font-weight: bold;
  383. color: #000;
  384. }
  385. .resume-content {
  386. padding: 32rpx;
  387. }
  388. /* 头像区域 */
  389. .avatar-section {
  390. display: flex;
  391. }
  392. .avatar-upload {
  393. display: flex;
  394. align-items: center;
  395. }
  396. .avatar-preview {
  397. width: 48rpx;
  398. height: 48rpx;
  399. border-radius: 50%;
  400. display: flex;
  401. align-items: center;
  402. justify-content: center;
  403. margin-right: 20rpx;
  404. }
  405. .avatar-image {
  406. width: 100%;
  407. height: 100%;
  408. border-radius: 50%;
  409. }
  410. .upload-view {
  411. color: #016bf6;
  412. font-family: DM Sans;
  413. font-size: 20rpx;
  414. font-weight: 500;
  415. line-height: 48rpx;
  416. }
  417. .form-item {
  418. padding-bottom: 24rpx;
  419. box-sizing: border-box;
  420. .job-txt {
  421. color: #016bf6;
  422. font-family: DM Sans;
  423. font-size: 20rpx;
  424. margin-left: 16rpx;
  425. }
  426. }
  427. .form-item:last-child {
  428. border-bottom: none;
  429. }
  430. .form-label {
  431. color: #1f2c37;
  432. font-family: DM Sans;
  433. font-size: 28rpx;
  434. font-weight: 500;
  435. line-height: 44rpx;
  436. padding-top: 30rpx;
  437. padding-bottom: 27rpx;
  438. box-sizing: border-box;
  439. }
  440. .form-input {
  441. flex: 1;
  442. box-sizing: border-box;
  443. border: 2rpx solid #9ea1a8;
  444. border-radius: 100rpx;
  445. background: rgba(255, 255, 255, 1);
  446. padding: 0rpx 24rpx !important;
  447. }
  448. .form-input-time {
  449. flex: 1;
  450. box-sizing: border-box;
  451. border: 2rpx solid #e3e7ec;
  452. border-radius: 100rpx;
  453. background: rgba(255, 255, 255, 1);
  454. padding: 10rpx 24rpx;
  455. color: rgba(153, 153, 153, 1);
  456. font-family: DM Sans;
  457. font-size: 24rpx;
  458. font-weight: 500;
  459. display: flex;
  460. justify-content: space-between;
  461. align-items: center;
  462. image {
  463. width: 48rpx;
  464. height: 48rpx;
  465. }
  466. }
  467. ::v-deep .input-placeholder {
  468. color: rgba(153, 153, 153, 1) !important;
  469. font-family: DM Sans;
  470. font-size: 24rpx !important;
  471. font-weight: 500;
  472. }
  473. .user-img {
  474. width: 48rpx;
  475. height: 48rpx;
  476. }
  477. .required .form-label::before {
  478. content: "*";
  479. color: #fa3534;
  480. margin-right: 8rpx;
  481. }
  482. /* 性别选择 */
  483. .gender-select {
  484. display: flex;
  485. flex: 1;
  486. gap: 40rpx;
  487. }
  488. .gender-option {
  489. display: flex;
  490. align-items: center;
  491. color: #171725;
  492. font-family: DM Sans;
  493. font-size: 24rpx;
  494. font-weight: 400;
  495. line-height: 48rpx;
  496. text-align: left;
  497. image {
  498. width: 32rpx;
  499. height: 32rpx;
  500. margin-right: 8rpx;
  501. }
  502. }
  503. .phone-view,
  504. .job-status {
  505. flex: 1;
  506. font-size: 32rpx;
  507. color: #333;
  508. }
  509. .section {
  510. box-sizing: border-box;
  511. border: 2rpx solid #016bf6;
  512. border-radius: 24rpx;
  513. background: #fff;
  514. padding: 32rpx;
  515. box-sizing: border-box;
  516. margin-bottom: 30rpx;
  517. }
  518. .section-header {
  519. margin-bottom: 24rpx;
  520. }
  521. /* 经历项目 */
  522. .experience-item {
  523. border-radius: 12rpx;
  524. padding: 24rpx;
  525. box-sizing: border-box;
  526. }
  527. .job-content {
  528. display: flex;
  529. gap: 42rpx;
  530. .job-icon {
  531. width: 96rpx;
  532. height: 96rpx;
  533. border-radius: 16rpx;
  534. background: rgba(246, 246, 246, 1);
  535. display: flex;
  536. justify-content: center;
  537. align-items: center;
  538. image {
  539. width: 64rpx;
  540. height: 64rpx;
  541. }
  542. }
  543. .job-content-txt {
  544. }
  545. }
  546. .exp-header {
  547. display: flex;
  548. justify-content: space-between;
  549. align-items: center;
  550. margin-bottom: 16rpx;
  551. }
  552. .exp-position {
  553. display: flex;
  554. align-items: center;
  555. }
  556. .position {
  557. color: #171725;
  558. font-family: DM Sans;
  559. font-size: 28rpx;
  560. font-weight: 400;
  561. line-height: 44rpx;
  562. text-align: left;
  563. }
  564. .department {
  565. font-size: 24rpx;
  566. color: #999;
  567. margin-left: 16rpx;
  568. }
  569. .exp-company {
  570. display: flex;
  571. align-items: center;
  572. margin-bottom: 16rpx;
  573. color: #78828a;
  574. font-family: DM Sans;
  575. font-size: 16rpx;
  576. font-weight: 400;
  577. line-height: 40rpx;
  578. text-align: left;
  579. .yuan {
  580. padding: 0 16rpx;
  581. box-sizing: border-box;
  582. font-size: 40rpx;
  583. }
  584. }
  585. .exp-content {
  586. margin-bottom: 12rpx;
  587. }
  588. .exp-content:last-child {
  589. margin-bottom: 0;
  590. }
  591. .content-label {
  592. color: rgba(120, 130, 138, 1);
  593. font-family: DM Sans;
  594. font-size: 16rpx;
  595. font-weight: 400;
  596. line-height: 20rpx;
  597. text-align: left;
  598. margin-bottom: 10rpx;
  599. }
  600. .tag-box {
  601. border-radius: 8rpx;
  602. background: rgba(153, 153, 153, 0.1);
  603. padding: 8rpx;
  604. box-sizing: border-box;
  605. }
  606. .content-view {
  607. font-size: 28rpx;
  608. color: #333;
  609. line-height: 1.5;
  610. }
  611. /* 教育经历 */
  612. .education-item {
  613. background: #f8f9fa;
  614. border-radius: 12rpx;
  615. padding: 24rpx;
  616. margin-bottom: 24rpx;
  617. }
  618. .edu-header {
  619. display: flex;
  620. justify-content: space-between;
  621. align-items: center;
  622. margin-bottom: 16rpx;
  623. }
  624. .edu-school {
  625. font-size: 32rpx;
  626. color: #333;
  627. font-weight: 500;
  628. }
  629. .edu-info {
  630. display: flex;
  631. align-items: center;
  632. margin-bottom: 12rpx;
  633. }
  634. .edu-degree,
  635. .edu-major,
  636. .edu-duration {
  637. font-size: 28rpx;
  638. color: #666;
  639. margin-right: 20rpx;
  640. }
  641. .edu-content {
  642. margin-top: 12rpx;
  643. }
  644. .add-view {
  645. font-size: 28rpx;
  646. margin-left: 12rpx;
  647. }
  648. .advantage-textarea {
  649. color: rgba(120, 130, 138, 1);
  650. font-family: DM Sans;
  651. font-size: 24rpx;
  652. font-weight: 400;
  653. line-height: 32rpx;
  654. padding: 32rpx;
  655. padding-top: 0;
  656. box-sizing: border-box;
  657. }
  658. .footer {
  659. padding-bottom: 40rpx;
  660. }
  661. ::v-deep .u-input {
  662. text-align: left !important;
  663. }
  664. </style>