tagManage.vue 13 KB

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