tagManage.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  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. } else {
  202. uni.showToast({
  203. title: res.msg,
  204. icon: "none",
  205. });
  206. }
  207. });
  208. })
  209. },
  210. changePreference(preference) {
  211. if(intentionId==0)
  212. return;
  213. var industry=preference==''||preference==null?'':preference.join('/')
  214. let data={
  215. intentionId,
  216. industry
  217. }
  218. var that=this
  219. this.$Request.postJson("/app/intention/saveUpdate", data).then((res) => {
  220. if (res.code == 0) {
  221. // 实际开发中可以在这里添加跳转逻辑
  222. that.getData()
  223. } else {
  224. uni.showToast({
  225. title: res.msg,
  226. icon: "none",
  227. });
  228. }
  229. });
  230. },
  231. },
  232. onLoad() {
  233. // 获取状态栏高度
  234. let systemInfo = uni.getSystemInfoSync();
  235. this.statusBarHeight = systemInfo.statusBarHeight || 0;
  236. this.getData()
  237. var that=this
  238. // 监听偏好设置更新
  239. uni.$on('preferenceUpdated', (data) => {
  240. if(data.set!=1)
  241. return
  242. that.changePreference(data.preferences)
  243. })
  244. uni.$on('updateResume',()=>{
  245. that.getData()
  246. })
  247. },
  248. onUnload() {
  249. // 移除事件监听
  250. uni.$off('preferenceUpdated')
  251. uni.$off('updateResume')
  252. }
  253. }
  254. </script>
  255. <style lang="scss" scoped>
  256. .tag-manage {
  257. min-height: 100vh;
  258. background: url('../../static/images/index/zhiwei.png') no-repeat;
  259. background-size: 100% 40%; /* 宽度100%,高度60% */
  260. background-position: top center;
  261. padding: 0 40rpx 40rpx 40rpx;
  262. }
  263. .tag-manage-text1 {
  264. color: rgba(255, 255, 255, 1);
  265. font-family: DM Sans;
  266. font-size: 52rpx;
  267. font-weight: 700;
  268. line-height: 30px;
  269. letter-spacing: 0px;
  270. text-align: left;
  271. margin: 40rpx 0 30rpx 0;
  272. }
  273. .tag-manage-text {
  274. color: rgba(255, 255, 255, 1);
  275. font-family: DM Sans;
  276. font-size: 26rpx;
  277. font-weight: 400;
  278. line-height: 16px;
  279. letter-spacing: 0px;
  280. text-align: left;
  281. margin-bottom: 30rpx;
  282. }
  283. /* 全职期望卡片 */
  284. .expectation-card {
  285. background: #ffffff;
  286. border-radius: 12rpx;
  287. padding: 30rpx;
  288. margin-bottom: 20rpx;
  289. box-sizing: border-box;
  290. border: 0.5px solid rgba(227, 231, 236, 1);
  291. border-radius: 6px;
  292. background: rgba(253, 253, 253, 1);
  293. .card-header {
  294. display: flex;
  295. justify-content: space-between;
  296. align-items: center;
  297. .header-left {
  298. display: flex;
  299. align-items: center;
  300. .header-icon {
  301. width: 40rpx;
  302. height: 40rpx;
  303. margin-right: 20rpx;
  304. }
  305. .header-title {
  306. color: rgba(29, 33, 41, 1);
  307. font-family: DM Sans;
  308. font-size: 28rpx;
  309. font-weight: 500;
  310. line-height: 16px;
  311. letter-spacing: 0%;
  312. text-align: left;
  313. }
  314. }
  315. .progress-text {
  316. font-family: DM Sans;
  317. font-size: 24rpx;
  318. font-weight: 700;
  319. line-height: 13px;
  320. letter-spacing: 0%;
  321. text-align: right;
  322. }
  323. }
  324. .job-list {
  325. margin-bottom: 10rpx;
  326. .job-item {
  327. display: flex;
  328. justify-content: space-between;
  329. align-items: center;
  330. padding: 20rpx 0;
  331. &:last-child {
  332. border-bottom: none;
  333. }
  334. .job-info {
  335. flex: 1;
  336. > view:first-child {
  337. display: flex;
  338. justify-content: space-between;
  339. align-items: center;
  340. margin-bottom: 4rpx;
  341. }
  342. .job-title {
  343. color: rgba(29, 33, 41, 1);
  344. font-family: DM Sans;
  345. font-size: 28rpx;
  346. font-weight: 500;
  347. line-height: 16px;
  348. letter-spacing: 0%;
  349. text-align: left;
  350. }
  351. .job-details {
  352. display: block;
  353. font-size: 24rpx;
  354. color: rgba(153, 153, 153, 1);
  355. margin-bottom: 4rpx;
  356. }
  357. .job-location {
  358. font-size: 24rpx;
  359. color: rgba(153, 153, 153, 1);
  360. }
  361. }
  362. .preference-btn {
  363. display: flex;
  364. align-items: center;
  365. padding: 8rpx;
  366. border: 0.5rpx solid #007AFF;
  367. border-radius: 12rpx;
  368. margin-right: 10rpx;
  369. text {
  370. font-size: 18rpx;
  371. color: #007AFF;
  372. }
  373. }
  374. .job-info > view:first-child > view:last-child {
  375. display: flex;
  376. align-items: center;
  377. }
  378. }
  379. }
  380. .add-expectation-btn {
  381. width: 100%;
  382. height: 80rpx;
  383. border: 1rpx solid #007AFF;
  384. border-radius: 42rpx;
  385. display: flex;
  386. align-items: center;
  387. justify-content: center;
  388. text {
  389. font-size: 28rpx;
  390. color: #007AFF;
  391. font-weight: 500;
  392. }
  393. }
  394. }
  395. /* 求职状态卡片 */
  396. .status-card {
  397. background: #ffffff;
  398. border-radius: 20rpx;
  399. padding: 30rpx;
  400. box-sizing: border-box;
  401. border: 0.5px solid rgba(227, 231, 236, 1);
  402. border-radius: 6px;
  403. background: rgba(253, 253, 253, 1);
  404. .status-item {
  405. display: flex;
  406. justify-content: space-between;
  407. align-items: center;
  408. .status-label {
  409. color: rgba(29, 33, 41, 1);
  410. font-family: DM Sans;
  411. font-size: 28rpx;
  412. font-weight: 500;
  413. line-height: 16px;
  414. letter-spacing: 0%;
  415. text-align: left;
  416. }
  417. .status-value {
  418. display: flex;
  419. align-items: center;
  420. text {
  421. color: rgba(153, 153, 153, 1);
  422. font-family: DM Sans;
  423. font-size: 24rpx;
  424. font-weight: 400;
  425. line-height: 13px;
  426. letter-spacing: 0%;
  427. text-align: left;
  428. margin-right: 10rpx;
  429. }
  430. }
  431. }
  432. }
  433. .nav-bar {
  434. display: flex;
  435. align-items: center;
  436. justify-content: space-between;
  437. padding-left: auto;
  438. padding-right: auto;
  439. padding-bottom: 20rpx;
  440. .nav-left {
  441. display: flex;
  442. align-items: center;
  443. justify-content: center;
  444. }
  445. .nav-title {
  446. color: rgba(255, 255, 255, 1);
  447. font-family: DM Sans;
  448. font-size: 32rpx;
  449. font-weight: 700;
  450. line-height: 26px;
  451. letter-spacing: undefined;
  452. text-align: center;
  453. }
  454. }
  455. /* 求职状态选择器样式 */
  456. .job-status-picker {
  457. background: #fff;
  458. border-radius: 20rpx 20rpx 0 0;
  459. overflow: hidden;
  460. }
  461. .picker-header {
  462. display: flex;
  463. justify-content: center;
  464. align-items: center;
  465. padding: 30rpx 40rpx 20rpx;
  466. border-bottom: 1rpx solid #F2F2F2;
  467. position: relative;
  468. .picker-title {
  469. color: rgba(34, 37, 42, 1);
  470. font-family: DM Sans;
  471. font-size: 36rpx;
  472. font-weight: 500;
  473. line-height: 23px;
  474. letter-spacing: 0px;
  475. text-align: center;
  476. }
  477. .picker-close {
  478. width: 60rpx;
  479. height: 60rpx;
  480. display: flex;
  481. align-items: center;
  482. justify-content: center;
  483. }
  484. }
  485. .picker-content {
  486. padding: 32rpx;
  487. }
  488. .status-option {
  489. display: flex;
  490. flex-direction: row;
  491. justify-content: flex-start;
  492. align-items: center;
  493. padding: 16rpx 28rpx;
  494. box-sizing: border-box;
  495. border: 1px solid rgba(227, 231, 236, 1);
  496. border-radius: 24px;
  497. background: rgba(255, 255, 255, 1);
  498. margin-bottom: 32rpx;
  499. &:active {
  500. background-color: #F9F9F9;
  501. }
  502. .option-left {
  503. display: flex;
  504. align-items: center;
  505. flex: 1;
  506. .radio-btn {
  507. width: 40rpx;
  508. height: 40rpx;
  509. border: 2rpx solid #E5E5EA;
  510. border-radius: 50%;
  511. display: flex;
  512. align-items: center;
  513. justify-content: center;
  514. margin-right: 24rpx;
  515. background: #fff;
  516. transition: all 0.2s;
  517. &.checked {
  518. border-color: #007AFF;
  519. background: #007AFF;
  520. }
  521. }
  522. .option-text {
  523. font-size: 28rpx;
  524. color: rgba(29, 33, 41, 1);
  525. font-weight: 400;
  526. }
  527. }
  528. .recommend-tag {
  529. background: rgba(153, 196, 250, 0.4);
  530. border-radius: 8rpx;
  531. padding: 0 8rpx;
  532. margin-bottom: 0 !important;
  533. margin-left: 20rpx;
  534. text {
  535. font-size: 16rpx;
  536. line-height: 16rpx;
  537. color: rgba(1, 107, 246, 1);
  538. }
  539. }
  540. }
  541. .picker-content :last-child {
  542. margin-bottom: 0rpx;
  543. }
  544. </style>