tagManage.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. <template>
  2. <view class="tag-manage">
  3. <!-- 顶部导航 -->
  4. <view class="nav-bar" :style="{ paddingTop: (12 + statusBarHeight) + 'px' }">
  5. <view class="nav-left" @click="goBack">
  6. <u-icon name="arrow-leftward" color="#fff" style="font-size: 38rpx;"></u-icon>
  7. </view>
  8. <view class="nav-title">期望职位</view>
  9. <view class="nav-right"></view>
  10. </view>
  11. <view class="tag-manage-text1">哪个岗位是你的心仪工作?</view>
  12. <view class="tag-manage-text">可以添加多个求职期望,获得更多精准推荐机会</view>
  13. <!-- 全职期望卡片 -->
  14. <view class="expectation-card">
  15. <view class="card-header">
  16. <view class="header-left">
  17. <image src="../../static/images/index/lingdai.svg" class="header-icon" />
  18. <text class="header-title">全职期望</text>
  19. </view>
  20. <text class="progress-text">{{detail.intentions&&detail.intentions.length}}/3</text>
  21. </view>
  22. <view class="job-list">
  23. <view @longpress="commonDelete(item.intentionId,'intentions')" @click="addExpectation(item.intentionId)" class="job-item" v-for="item in detail.intentions">
  24. <view class="job-info">
  25. <view>
  26. <text class="job-title">{{item.ruleClassifyName}}</text>
  27. <view @click.stop="goToPreferenceSetting(item)">
  28. <view class="preference-btn">
  29. <text>设置跨境标签</text>
  30. </view>
  31. <u-icon name="arrow-right" color="rgba(29, 33, 41, 1)" size="28"></u-icon>
  32. </view>
  33. </view>
  34. <text class="job-details">{{item.salaryRange}}・{{item.industry||'不限'}}</text>
  35. <text class="job-location">{{item.citys}}</text>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="add-expectation-btn" @click="addExpectation('')">
  40. <text>添加求职期望</text>
  41. </view>
  42. </view>
  43. <!-- 求职状态卡片 -->
  44. <view class="status-card">
  45. <view class="status-item" @click="showJobStatusPicker">
  46. <text class="status-label">求职状态</text>
  47. <view class="status-value">
  48. <text>{{ jobStatusList[selectedJobStatus].text }}</text>
  49. <u-icon name="arrow-right" color="rgba(29, 33, 41, 1)" size="24"></u-icon>
  50. </view>
  51. </view>
  52. </view>
  53. <!-- 求职状态选择器 -->
  54. <u-popup v-model="showJobStatusModal" mode="bottom" border-radius="42" height="auto" :safe-area-inset-bottom="true">
  55. <view class="job-status-picker">
  56. <view class="picker-header">
  57. <text class="picker-title">求职状态</text>
  58. </view>
  59. <view class="picker-content">
  60. <view
  61. class="status-option"
  62. :class="{ active: selectedJobStatus === item.value }"
  63. v-for="item in jobStatusList"
  64. :key="item.value"
  65. @click="selectJobStatus(item)"
  66. >
  67. <view class="option-left">
  68. <view class="radio-btn" :class="{ checked: selectedJobStatus === item.value }">
  69. <u-icon v-if="selectedJobStatus === item.value" name="checkmark" color="#ffffff" size="28"></u-icon>
  70. </view>
  71. <text class="option-text">{{ item.text }}</text>
  72. <view v-if="item.recommended" class="recommend-tag">
  73. <text>推荐</text>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. </u-popup>
  80. </view>
  81. </template>
  82. <script>
  83. var intentionId=0
  84. export default {
  85. data() {
  86. return {
  87. statusBarHeight: 0, // 状态栏高度
  88. showJobStatusModal: false,
  89. selectedJobStatus: 0,
  90. detail:{},
  91. jobStatusList: [
  92. {
  93. value: 0,
  94. text: '离职-随时到岗',
  95. recommended: true
  96. },
  97. {
  98. value: 1,
  99. text: '在职-月内到岗',
  100. recommended: true
  101. },
  102. {
  103. value: 2,
  104. text: '在职-考虑机会',
  105. recommended: false
  106. },
  107. {
  108. value: 3,
  109. text: '在职-暂不考虑',
  110. recommended: false
  111. },
  112. // {
  113. // value: 4,
  114. // text: '实习',
  115. // recommended: false
  116. // }
  117. ]
  118. }
  119. },
  120. methods: {
  121. goBack() {
  122. uni.$emit('updatePosition')
  123. uni.navigateBack()
  124. },
  125. getData(){
  126. var that=this
  127. this.$Request.getT("/app/userFirst/getUserResumes", {}).then((res) => {
  128. if (res.code == 0) {
  129. that.detail=res.data
  130. that.selectedJobStatus=that.detail.resumeList&&that.detail.resumeList.resumesStatus||0
  131. } else {
  132. uni.showToast({
  133. title: res.msg,
  134. icon: "none",
  135. });
  136. }
  137. });
  138. },
  139. addExpectation(id='') {
  140. uni.navigateTo({
  141. url: '/package/jobIntention/addExpectation?id='+id
  142. })
  143. },
  144. showJobStatusPicker() {
  145. this.showJobStatusModal = true
  146. },
  147. closeJobStatusPicker() {
  148. this.showJobStatusModal = false
  149. },
  150. selectJobStatus(item) {
  151. this.selectedJobStatus = item.value
  152. this.showJobStatusModal = false
  153. this.setResume()
  154. // 可以在这里添加保存状态的逻辑
  155. console.log('选择的求职状态:', item)
  156. },
  157. goToPreferenceSetting(item) {
  158. intentionId=item.intentionId
  159. if(item.ruleClassifyId==''||item.ruleClassifyId==0)
  160. return this.$queue.showToast('请先选择岗位')
  161. uni.navigateTo({
  162. url: '/package/jobIntention/preferenceSetting?set=1&jobId='+item.ruleClassifyId+'&jobTitle='+item.ruleClassifyName+'&selectedPreferences='+encodeURIComponent(JSON.stringify(item.industry==''||item.industry==null?[]:item.industry.split('/')))
  163. })
  164. },
  165. // 设置
  166. setResume() {
  167. let data={
  168. resumesStatus:this.selectedJobStatus,
  169. ifExp:this.detail.resumeList.ifExp
  170. }
  171. uni.showLoading({ title: "提交中..." });
  172. this.$Request.postJson("/app/userFirst/regist", data).then((res) => {
  173. uni.hideLoading();
  174. if (res.code == 0) {
  175. // 实际开发中可以在这里添加跳转逻辑
  176. } else {
  177. uni.showToast({
  178. title: res.msg,
  179. icon: "none",
  180. });
  181. }
  182. });
  183. },
  184. commonDelete(id,modules) {
  185. var that=this
  186. var action='userFirst/deleteEdu'
  187. var params={eduId:id}
  188. if(modules=='workExps'){
  189. action='userFirst/deleteWorkExp'
  190. params={workExpId:id}
  191. }
  192. if(modules=='intentions'){
  193. action='intention/deleteIntention'
  194. params={intentionId:id}
  195. }
  196. this.$queue.appConfirm('确认删除该条内容么?',function(res){
  197. if(!res)
  198. return;
  199. that.$Request.postJson("/app/"+action, params).then((res) => {
  200. if (res.code == 0) {
  201. // 实际开发中可以在这里添加跳转逻辑
  202. var info = that.detail[modules].filter(function (item) {
  203. return item[modules=='workExps'?'workExpId':(modules=='intentions'?'intentionId':'eduId')] != id;
  204. });
  205. that.detail[modules]=info
  206. uni.$emit('updateIndexType')
  207. } else {
  208. uni.showToast({
  209. title: res.msg,
  210. icon: "none",
  211. });
  212. }
  213. });
  214. })
  215. },
  216. changePreference(preference) {
  217. if(intentionId==0)
  218. return;
  219. var industry=preference==''||preference==null?'':preference.join('/')
  220. let data={
  221. intentionId,
  222. industry
  223. }
  224. var that=this
  225. this.$Request.postJson("/app/intention/saveUpdate", data).then((res) => {
  226. if (res.code == 0) {
  227. // 实际开发中可以在这里添加跳转逻辑
  228. that.getData()
  229. } else {
  230. uni.showToast({
  231. title: res.msg,
  232. icon: "none",
  233. });
  234. }
  235. });
  236. },
  237. },
  238. onLoad() {
  239. // 获取状态栏高度
  240. let systemInfo = uni.getSystemInfoSync();
  241. this.statusBarHeight = systemInfo.statusBarHeight || 0;
  242. this.getData()
  243. var that=this
  244. // 监听偏好设置更新
  245. uni.$on('preferenceUpdated', (data) => {
  246. if(data.set!=1)
  247. return
  248. that.changePreference(data.preferences)
  249. })
  250. uni.$on('updateResume',()=>{
  251. that.getData()
  252. })
  253. },
  254. onUnload() {
  255. // 移除事件监听
  256. uni.$off('preferenceUpdated')
  257. uni.$off('updateResume')
  258. }
  259. }
  260. </script>
  261. <style lang="scss" scoped>
  262. .tag-manage {
  263. min-height: 100vh;
  264. background: url('../../static/images/index/zhiwei.png') no-repeat;
  265. background-size: 100% 40%; /* 宽度100%,高度60% */
  266. background-position: top center;
  267. padding: 0 40rpx 40rpx 40rpx;
  268. }
  269. .tag-manage-text1 {
  270. color: rgba(255, 255, 255, 1);
  271. font-family: DM Sans;
  272. font-size: 52rpx;
  273. font-weight: 700;
  274. line-height: 30px;
  275. letter-spacing: 0px;
  276. text-align: left;
  277. margin: 40rpx 0 30rpx 0;
  278. }
  279. .tag-manage-text {
  280. color: rgba(255, 255, 255, 1);
  281. font-family: DM Sans;
  282. font-size: 26rpx;
  283. font-weight: 400;
  284. line-height: 16px;
  285. letter-spacing: 0px;
  286. text-align: left;
  287. margin-bottom: 30rpx;
  288. }
  289. /* 全职期望卡片 */
  290. .expectation-card {
  291. background: #ffffff;
  292. border-radius: 12rpx;
  293. padding: 30rpx;
  294. margin-bottom: 20rpx;
  295. box-sizing: border-box;
  296. border: 0.5px solid rgba(227, 231, 236, 1);
  297. border-radius: 6px;
  298. background: rgba(253, 253, 253, 1);
  299. .card-header {
  300. display: flex;
  301. justify-content: space-between;
  302. align-items: center;
  303. .header-left {
  304. display: flex;
  305. align-items: center;
  306. .header-icon {
  307. width: 40rpx;
  308. height: 40rpx;
  309. margin-right: 20rpx;
  310. }
  311. .header-title {
  312. color: rgba(29, 33, 41, 1);
  313. font-family: DM Sans;
  314. font-size: 28rpx;
  315. font-weight: 500;
  316. line-height: 16px;
  317. letter-spacing: 0%;
  318. text-align: left;
  319. }
  320. }
  321. .progress-text {
  322. font-family: DM Sans;
  323. font-size: 24rpx;
  324. font-weight: 700;
  325. line-height: 13px;
  326. letter-spacing: 0%;
  327. text-align: right;
  328. }
  329. }
  330. .job-list {
  331. margin-bottom: 10rpx;
  332. .job-item {
  333. display: flex;
  334. justify-content: space-between;
  335. align-items: center;
  336. padding: 20rpx 0;
  337. &:last-child {
  338. border-bottom: none;
  339. }
  340. .job-info {
  341. flex: 1;
  342. > view:first-child {
  343. display: flex;
  344. justify-content: space-between;
  345. align-items: center;
  346. margin-bottom: 4rpx;
  347. }
  348. .job-title {
  349. color: rgba(29, 33, 41, 1);
  350. font-family: DM Sans;
  351. font-size: 28rpx;
  352. font-weight: 500;
  353. line-height: 16px;
  354. letter-spacing: 0%;
  355. text-align: left;
  356. }
  357. .job-details {
  358. display: block;
  359. font-size: 24rpx;
  360. color: rgba(153, 153, 153, 1);
  361. margin-bottom: 4rpx;
  362. }
  363. .job-location {
  364. font-size: 24rpx;
  365. color: rgba(153, 153, 153, 1);
  366. }
  367. }
  368. .preference-btn {
  369. display: flex;
  370. align-items: center;
  371. padding: 8rpx;
  372. border: 0.5rpx solid #007AFF;
  373. border-radius: 12rpx;
  374. margin-right: 10rpx;
  375. text {
  376. font-size: 18rpx;
  377. color: #007AFF;
  378. }
  379. }
  380. .job-info > view:first-child > view:last-child {
  381. display: flex;
  382. align-items: center;
  383. }
  384. }
  385. }
  386. .add-expectation-btn {
  387. width: 100%;
  388. height: 80rpx;
  389. border: 1rpx solid #007AFF;
  390. border-radius: 42rpx;
  391. display: flex;
  392. align-items: center;
  393. justify-content: center;
  394. text {
  395. font-size: 28rpx;
  396. color: #007AFF;
  397. font-weight: 500;
  398. }
  399. }
  400. }
  401. /* 求职状态卡片 */
  402. .status-card {
  403. background: #ffffff;
  404. border-radius: 20rpx;
  405. padding: 30rpx;
  406. box-sizing: border-box;
  407. border: 0.5px solid rgba(227, 231, 236, 1);
  408. border-radius: 6px;
  409. background: rgba(253, 253, 253, 1);
  410. .status-item {
  411. display: flex;
  412. justify-content: space-between;
  413. align-items: center;
  414. .status-label {
  415. color: rgba(29, 33, 41, 1);
  416. font-family: DM Sans;
  417. font-size: 28rpx;
  418. font-weight: 500;
  419. line-height: 16px;
  420. letter-spacing: 0%;
  421. text-align: left;
  422. }
  423. .status-value {
  424. display: flex;
  425. align-items: center;
  426. text {
  427. color: rgba(153, 153, 153, 1);
  428. font-family: DM Sans;
  429. font-size: 24rpx;
  430. font-weight: 400;
  431. line-height: 13px;
  432. letter-spacing: 0%;
  433. text-align: left;
  434. margin-right: 10rpx;
  435. }
  436. }
  437. }
  438. }
  439. .nav-bar {
  440. display: flex;
  441. align-items: center;
  442. justify-content: space-between;
  443. padding-left: auto;
  444. padding-right: auto;
  445. padding-bottom: 20rpx;
  446. .nav-left {
  447. display: flex;
  448. align-items: center;
  449. justify-content: center;
  450. }
  451. .nav-title {
  452. color: rgba(255, 255, 255, 1);
  453. font-family: DM Sans;
  454. font-size: 32rpx;
  455. font-weight: 700;
  456. line-height: 26px;
  457. letter-spacing: undefined;
  458. text-align: center;
  459. }
  460. }
  461. /* 求职状态选择器样式 */
  462. .job-status-picker {
  463. background: #fff;
  464. border-radius: 20rpx 20rpx 0 0;
  465. overflow: hidden;
  466. }
  467. .picker-header {
  468. display: flex;
  469. justify-content: center;
  470. align-items: center;
  471. padding: 30rpx 40rpx 20rpx;
  472. border-bottom: 1rpx solid #F2F2F2;
  473. position: relative;
  474. .picker-title {
  475. color: rgba(34, 37, 42, 1);
  476. font-family: DM Sans;
  477. font-size: 36rpx;
  478. font-weight: 500;
  479. line-height: 23px;
  480. letter-spacing: 0px;
  481. text-align: center;
  482. }
  483. .picker-close {
  484. width: 60rpx;
  485. height: 60rpx;
  486. display: flex;
  487. align-items: center;
  488. justify-content: center;
  489. }
  490. }
  491. .picker-content {
  492. padding: 32rpx;
  493. }
  494. .status-option {
  495. display: flex;
  496. flex-direction: row;
  497. justify-content: flex-start;
  498. align-items: center;
  499. padding: 16rpx 28rpx;
  500. box-sizing: border-box;
  501. border: 1px solid rgba(227, 231, 236, 1);
  502. border-radius: 24px;
  503. background: rgba(255, 255, 255, 1);
  504. margin-bottom: 32rpx;
  505. &:active {
  506. background-color: #F9F9F9;
  507. }
  508. .option-left {
  509. display: flex;
  510. align-items: center;
  511. flex: 1;
  512. .radio-btn {
  513. width: 40rpx;
  514. height: 40rpx;
  515. border: 2rpx solid #E5E5EA;
  516. border-radius: 50%;
  517. display: flex;
  518. align-items: center;
  519. justify-content: center;
  520. margin-right: 24rpx;
  521. background: #fff;
  522. transition: all 0.2s;
  523. &.checked {
  524. border-color: #007AFF;
  525. background: #007AFF;
  526. }
  527. }
  528. .option-text {
  529. font-size: 28rpx;
  530. color: rgba(29, 33, 41, 1);
  531. font-weight: 400;
  532. }
  533. }
  534. .recommend-tag {
  535. background: rgba(153, 196, 250, 0.4);
  536. border-radius: 8rpx;
  537. padding: 0 8rpx;
  538. margin-bottom: 0 !important;
  539. margin-left: 20rpx;
  540. text {
  541. font-size: 16rpx;
  542. line-height: 16rpx;
  543. color: rgba(1, 107, 246, 1);
  544. }
  545. }
  546. }
  547. .picker-content :last-child {
  548. margin-bottom: 0rpx;
  549. }
  550. </style>