tagManage.vue 13 KB

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