workRecord.vue 17 KB

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