tagManage.vue 11 KB

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