workRecord.vue 17 KB

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