workExperience.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616
  1. <template>
  2. <view class="work-experience">
  3. <!-- 自定义导航栏 -->
  4. <view class="custom-navbar">
  5. <view class="navbar-content">
  6. <view class="nav-left" @click="goBack">
  7. <u-icon name="arrow-leftward" color="#333" size="42"></u-icon>
  8. </view>
  9. <view class="nav-title">工作经历</view>
  10. <view class="nav-right"></view>
  11. </view>
  12. </view>
  13. <!-- 主要内容 -->
  14. <view class="main-content">
  15. <!-- 公司信息 -->
  16. <view class="form-section">
  17. <!-- 公司名称 -->
  18. <view class="form-item">
  19. <view class="form-label">公司名称</view>
  20. <input
  21. v-model="formData.companyName"
  22. placeholder="深圳市四海芯舟科技有限公司"
  23. class="form-input"
  24. />
  25. </view>
  26. <!-- 公司业务类型 -->
  27. <view class="form-item">
  28. <view class="form-label" style="margin-bottom: 20rpx;">
  29. <text class="required-mark">*</text>
  30. <text class="label-text">公司业务类型</text>
  31. </view>
  32. <view class="checkbox-container">
  33. <u-checkbox-group
  34. @change="checkboxGroupChange"
  35. :wrap="false"
  36. shape="square"
  37. active-color="#007AFF"
  38. >
  39. <u-checkbox
  40. v-for="(option, index) in businessTypeOptions"
  41. :key="index"
  42. :name="option.value"
  43. v-model="option.checked"
  44. class="checkbox-item"
  45. >
  46. {{ option.label }}
  47. </u-checkbox>
  48. </u-checkbox-group>
  49. </view>
  50. </view>
  51. </view>
  52. <!-- 岗位履历 -->
  53. <view class="form-section" v-for="(resume, index) in formData.resumes" :key="index">
  54. <view class="section-title" v-if="hasCrossBorderExperience" >岗位履历 ({{ index + 1 }})</view>
  55. <!-- 任职时间 -->
  56. <view class="form-item">
  57. <view class="form-label">
  58. <text class="required-mark">*</text>
  59. <text class="label-text">{{ hasCrossBorderExperience ? '任职时间' : '在职时间' }}</text>
  60. </view>
  61. <view class="form-input" @click="selectEmploymentTime(index)">
  62. <text v-if="resume.employmentTime">{{ resume.employmentTime }}</text>
  63. <text v-else class="placeholder">{{ hasCrossBorderExperience ? '选择任职时间&离职时间' : '选择在职时间&离职时间' }}</text>
  64. <image src="../../static/images/index/Iconly_Light_Calendar.svg" style="width: 48rpx; height: 48rpx;" mode="aspectFit"></image>
  65. </view>
  66. </view>
  67. <!-- 所在部门 -->
  68. <view class="form-item">
  69. <view class="form-label">
  70. <text class="required-mark">*</text>
  71. <text class="label-text">所在部门</text>
  72. </view>
  73. <view class="form-input" @click="selectDepartment(index)">
  74. <text v-if="resume.department">{{ resume.department }}</text>
  75. <text v-else class="placeholder">请选择部门</text>
  76. <u-icon name="arrow-down" color="#999" size="36"></u-icon>
  77. </view>
  78. </view>
  79. <!-- 岗位 -->
  80. <view class="form-item">
  81. <view class="form-label">
  82. <text class="required-mark">*</text>
  83. <text class="label-text">岗位</text>
  84. </view>
  85. <view class="form-input" @click="selectPosition(index)">
  86. <text v-if="resume.position">{{ resume.position }}</text>
  87. <text v-else class="placeholder">请选择岗位</text>
  88. <u-icon name="arrow-down" color="#999" size="36"></u-icon>
  89. </view>
  90. </view>
  91. <!-- 岗位职级 -->
  92. <view class="form-item">
  93. <view class="form-label">岗位职级</view>
  94. <view class="form-input" @click="selectPositionLevel(index)">
  95. <text v-if="resume.positionLevel">{{ resume.positionLevel }}</text>
  96. <text v-else class="placeholder">请选择职级</text>
  97. <u-icon name="arrow-down" color="#999" size="36"></u-icon>
  98. </view>
  99. </view>
  100. <!-- 岗位职业技能 -->
  101. <view class="form-item">
  102. <view class="form-label">
  103. <text class="required-mark">*</text>
  104. <text class="label-text">岗位职业技能</text>
  105. </view>
  106. <view class="skills-input-container">
  107. <view class="skills-tags">
  108. <view
  109. v-for="(skill, skillIndex) in resume.skills"
  110. :key="skillIndex"
  111. class="skill-tag"
  112. >
  113. <text>{{ skill }}</text>
  114. <u-icon name="close" color="#999" size="16" @click="removeSkill(index, skillIndex)"></u-icon>
  115. </view>
  116. </view>
  117. <view class="add-skill-btn" @click="addSkill(index)">
  118. <u-icon name="plus" color="rgba(102, 102, 102, 1)" size="28"></u-icon>
  119. </view>
  120. </view>
  121. </view>
  122. <!-- 工作内容 -->
  123. <view class="form-item">
  124. <view class="form-label">工作内容</view>
  125. <view class="form-input" @click="selectWorkContent(index)">
  126. <text v-if="resume.workContent">{{ resume.workContent }}</text>
  127. <text v-else class="placeholder">选填,请输入</text>
  128. <u-icon name="arrow-down" color="#999" size="36"></u-icon>
  129. </view>
  130. </view>
  131. 36
  132. <!-- 工作业绩 -->
  133. <view class="form-item">
  134. <view class="form-label">工作业绩</view>
  135. <view class="form-input" @click="selectWorkPerformance(index)">
  136. <text v-if="resume.workPerformance">{{ resume.workPerformance }}</text>
  137. <text v-else class="placeholder">选填,请输入</text>
  138. <u-icon name="arrow-down" color="#999" size="36"></u-icon>
  139. </view>
  140. </view>
  141. <!-- 添加岗位履历按钮 -->
  142. <view class="add-resume-btn" @click="addResume" v-if="index === formData.resumes.length - 1 && hasCrossBorderExperience">
  143. <text>添加岗位履历</text>
  144. </view>
  145. </view>
  146. </view>
  147. <!-- 底部保存按钮 -->
  148. <view class="bottom-btn-container">
  149. <view class="save-btn" @click="saveWorkExperience">
  150. <text>保存</text>
  151. </view>
  152. </view>
  153. <!-- 添加技能弹窗 -->
  154. <u-popup v-model="showAddSkill" mode="center" border-radius="24" width="80%">
  155. <view class="add-skill-popup">
  156. <view class="popup-title">添加技能</view>
  157. <view class="popup-content">
  158. <input
  159. v-model="newSkillName"
  160. placeholder="请输入技能名称"
  161. class="skill-input"
  162. maxlength="10"
  163. />
  164. </view>
  165. <view class="popup-buttons">
  166. <view class="popup-btn cancel-btn" @click="cancelAddSkill">取消</view>
  167. <view class="popup-btn confirm-btn" @click="confirmAddSkill">确定</view>
  168. </view>
  169. </view>
  170. </u-popup>
  171. </view>
  172. </template>
  173. <script>
  174. export default {
  175. data() {
  176. return {
  177. showAddSkill: false,
  178. newSkillName: '',
  179. currentResumeIndex: 0,
  180. businessTypeOptions: [
  181. { label: '跨境电商', value: 'cross-border-ecommerce', checked: false },
  182. { label: '国内电商', value: 'domestic-ecommerce', checked: false },
  183. { label: '外贸', value: 'foreign-trade', checked: false },
  184. { label: '其他', value: 'other', checked: false }
  185. ],
  186. formData: {
  187. companyName: '',
  188. businessTypes: [],
  189. resumes: [{
  190. employmentTime: '',
  191. department: '运营部',
  192. position: '亚马逊运营',
  193. positionLevel: '资深',
  194. skills: ['铺货', '品牌精品', '精品精铺', '店铺运营'],
  195. workContent: '',
  196. workPerformance: ''
  197. }]
  198. }
  199. }
  200. },
  201. onLoad(options) {
  202. // 接收从在线简历页面传递的业务类型参数
  203. if (options.businessTypes) {
  204. try {
  205. const businessTypes = JSON.parse(decodeURIComponent(options.businessTypes))
  206. this.formData.businessTypes = businessTypes
  207. console.log('接收到的业务类型:', businessTypes)
  208. console.log('是否有跨境经验:', this.hasCrossBorderExperience)
  209. } catch (e) {
  210. console.error('解析业务类型参数失败:', e)
  211. }
  212. }
  213. },
  214. computed: {
  215. hasCrossBorderExperience() {
  216. return this.formData.businessTypes.includes('cross-border-ecommerce')
  217. }
  218. },
  219. methods: {
  220. goBack() {
  221. uni.navigateBack()
  222. },
  223. checkboxGroupChange(e) {
  224. console.log('选中的业务类型:', e)
  225. // 更新 formData.businessTypes 以保持数据同步
  226. this.formData.businessTypes = e
  227. },
  228. selectEmploymentTime(index) {
  229. // 选择任职时间
  230. uni.showToast({
  231. title: '选择任职时间',
  232. icon: 'none'
  233. })
  234. },
  235. selectDepartment(index) {
  236. // 选择部门
  237. uni.showToast({
  238. title: '选择部门',
  239. icon: 'none'
  240. })
  241. },
  242. selectPosition(index) {
  243. // 选择岗位
  244. uni.showToast({
  245. title: '选择岗位',
  246. icon: 'none'
  247. })
  248. },
  249. selectPositionLevel(index) {
  250. // 选择岗位职级
  251. uni.showToast({
  252. title: '选择岗位职级',
  253. icon: 'none'
  254. })
  255. },
  256. addSkill(index) {
  257. this.currentResumeIndex = index
  258. this.showAddSkill = true
  259. this.newSkillName = ''
  260. },
  261. removeSkill(resumeIndex, skillIndex) {
  262. this.formData.resumes[resumeIndex].skills.splice(skillIndex, 1)
  263. },
  264. cancelAddSkill() {
  265. this.showAddSkill = false
  266. this.newSkillName = ''
  267. },
  268. confirmAddSkill() {
  269. if (this.newSkillName.trim()) {
  270. this.formData.resumes[this.currentResumeIndex].skills.push(this.newSkillName.trim())
  271. this.showAddSkill = false
  272. this.newSkillName = ''
  273. } else {
  274. uni.showToast({
  275. title: '请输入技能名称',
  276. icon: 'none'
  277. })
  278. }
  279. },
  280. selectWorkContent(index) {
  281. // 选择工作内容
  282. uni.showToast({
  283. title: '选择工作内容',
  284. icon: 'none'
  285. })
  286. },
  287. selectWorkPerformance(index) {
  288. // 选择工作业绩
  289. uni.showToast({
  290. title: '选择工作业绩',
  291. icon: 'none'
  292. })
  293. },
  294. addResume() {
  295. this.formData.resumes.push({
  296. employmentTime: '',
  297. department: '',
  298. position: '',
  299. positionLevel: '',
  300. skills: [],
  301. workContent: '',
  302. workPerformance: ''
  303. })
  304. },
  305. saveWorkExperience() {
  306. uni.showToast({
  307. title: '保存成功',
  308. icon: 'success'
  309. })
  310. setTimeout(() => {
  311. uni.navigateBack()
  312. }, 1500)
  313. }
  314. }
  315. }
  316. </script>
  317. <style lang="scss" scoped>
  318. .work-experience {
  319. min-height: 100vh;
  320. padding-bottom: 120rpx;
  321. }
  322. .custom-navbar {
  323. position: fixed;
  324. top: 0;
  325. left: 0;
  326. right: 0;
  327. padding-top: 80rpx;
  328. background-color: #ffffff;
  329. z-index: 9999;
  330. .navbar-content {
  331. display: flex;
  332. align-items: center;
  333. justify-content: space-between;
  334. height: 100%;
  335. padding: 0 40rpx;
  336. .nav-left, .nav-right {
  337. width: 60rpx;
  338. height: 60rpx;
  339. display: flex;
  340. align-items: center;
  341. justify-content: center;
  342. }
  343. .nav-title {
  344. color: rgba(51, 51, 51, 1);
  345. font-family: DM Sans;
  346. font-size: 36rpx;
  347. font-weight: 700;
  348. line-height: 26px;
  349. letter-spacing: 0px;
  350. text-align: center;
  351. }
  352. }
  353. }
  354. .main-content {
  355. margin-top: 88rpx;
  356. padding: 80rpx 20rpx 40rpx 20rpx;
  357. }
  358. .form-section {
  359. background: #fff;
  360. border-radius: 16rpx;
  361. padding: 0rpx 10rpx;
  362. .section-title {
  363. color: rgba(23, 23, 37, 1);
  364. font-family: Inter;
  365. font-size: 32rpx;
  366. font-weight: 600;
  367. line-height: 48rpx;
  368. letter-spacing: 0%;
  369. text-align: left;
  370. padding: 16rpx 0 32rpx 0;
  371. }
  372. }
  373. .form-item {
  374. margin-bottom: 30rpx;
  375. .form-label {
  376. color: rgba(31, 44, 55, 1);
  377. font-family: DM Sans;
  378. font-size: 16px;
  379. font-weight: 500;
  380. line-height: 22px;
  381. letter-spacing: 0%;
  382. text-align: left;
  383. margin-bottom: 20rpx;
  384. .required-mark {
  385. color: #FF3B30;
  386. font-size: 18px;
  387. font-weight: 500;
  388. margin-right: 4rpx;
  389. }
  390. .label-text {
  391. color: rgba(31, 44, 55, 1);
  392. font-family: DM Sans;
  393. font-size: 16px;
  394. font-weight: 500;
  395. line-height: 22px;
  396. letter-spacing: 0%;
  397. text-align: left;
  398. }
  399. }
  400. .form-input {
  401. width: 100%;
  402. height: 80rpx;
  403. padding: 0 40rpx;
  404. border: 1px solid rgba(227, 231, 236, 1);
  405. border-radius: 24px;
  406. background: rgba(255, 255, 255, 1);
  407. display: flex;
  408. align-items: center;
  409. justify-content: space-between;
  410. .placeholder {
  411. color: #999999;
  412. }
  413. }
  414. }
  415. .skills-input-container {
  416. width: 100%;
  417. min-height: 80rpx;
  418. padding: 0rpx 40rpx;
  419. border: 1px solid rgba(227, 231, 236, 1);
  420. border-radius: 32px;
  421. background: rgba(255, 255, 255, 1);
  422. display: flex;
  423. align-items: center;
  424. justify-content: space-between;
  425. .skills-tags {
  426. display: flex;
  427. flex-wrap: wrap;
  428. gap: 12rpx;
  429. flex: 1;
  430. .skill-tag {
  431. padding: 8rpx 16rpx;
  432. background: #F5F5F5;
  433. border-radius: 8rpx;
  434. display: flex;
  435. align-items: center;
  436. gap: 8rpx;
  437. text {
  438. font-size: 24rpx;
  439. color: #666666;
  440. }
  441. }
  442. }
  443. .add-skill-btn {
  444. width: 40rpx;
  445. height: 40rpx;
  446. border: 1rpx solid rgba(102, 102, 102, 1);
  447. border-radius: 8rpx;
  448. display: flex;
  449. align-items: center;
  450. justify-content: center;
  451. background: #fff;
  452. flex-shrink: 0;
  453. }
  454. }
  455. .add-resume-btn {
  456. width: 100%;
  457. height: 80rpx;
  458. border: 1rpx solid #007AFF;
  459. border-radius: 60rpx;
  460. display: flex;
  461. align-items: center;
  462. justify-content: center;
  463. margin-top: 20rpx;
  464. text {
  465. color: #007AFF;
  466. font-size: 28rpx;
  467. font-weight: 500;
  468. }
  469. }
  470. .bottom-btn-container {
  471. position: fixed;
  472. bottom: 0;
  473. left: 0;
  474. right: 0;
  475. padding: 30rpx 20rpx;
  476. background: #fff;
  477. border-top: 1px solid #f0f0f0;
  478. z-index: 9999;
  479. }
  480. .save-btn {
  481. width: 100%;
  482. height: 88rpx;
  483. background: linear-gradient(90deg, rgba(13, 39, 247, 1), rgba(19, 193, 234, 1) 100%);
  484. border-radius: 44rpx;
  485. display: flex;
  486. align-items: center;
  487. justify-content: center;
  488. text {
  489. font-size: 32rpx;
  490. font-weight: 600;
  491. color: #fff;
  492. }
  493. }
  494. .add-skill-popup {
  495. background: #fff;
  496. border-radius: 24rpx;
  497. padding: 40rpx;
  498. .popup-title {
  499. color: rgba(34, 37, 42, 1);
  500. font-size: 36rpx;
  501. font-weight: 500;
  502. text-align: center;
  503. margin-bottom: 30rpx;
  504. }
  505. .popup-content {
  506. margin-bottom: 30rpx;
  507. .skill-input {
  508. width: 100%;
  509. height: 80rpx;
  510. padding: 0 20rpx;
  511. border: 1rpx solid #E5E5EA;
  512. border-radius: 12rpx;
  513. font-size: 28rpx;
  514. color: rgba(34, 37, 42, 1);
  515. background: #F7F8FA;
  516. }
  517. }
  518. .popup-buttons {
  519. display: flex;
  520. gap: 20rpx;
  521. .popup-btn {
  522. flex: 1;
  523. height: 80rpx;
  524. border-radius: 12rpx;
  525. display: flex;
  526. align-items: center;
  527. justify-content: center;
  528. font-size: 28rpx;
  529. font-weight: 500;
  530. }
  531. .cancel-btn {
  532. background: #F7F8FA;
  533. color: rgba(102, 102, 102, 1);
  534. }
  535. .confirm-btn {
  536. background: #007AFF;
  537. color: #fff;
  538. }
  539. }
  540. }
  541. .checkbox-container {
  542. display: flex;
  543. flex-wrap: nowrap;
  544. gap: 10rpx;
  545. /deep/ .u-checkbox-group {
  546. display: flex;
  547. flex-wrap: nowrap;
  548. width: 100%;
  549. }
  550. /deep/ .u-checkbox {
  551. flex: 1;
  552. min-width: 0;
  553. margin-right: 0;
  554. }
  555. /deep/ .u-checkbox__label {
  556. color: var(--Grayscale/Grayscale 100, rgba(23, 23, 37, 1));
  557. font-family: DM Sans;
  558. font-size: 24rpx;
  559. font-weight: 400;
  560. line-height: 48rpx;
  561. letter-spacing: 0%;
  562. text-align: left;
  563. }
  564. }
  565. </style>