workRecord.vue 17 KB

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