Sfoglia il codice sorgente

搜索添加求职期望

wkw 7 mesi fa
parent
commit
0dd0c9f1e5

+ 1 - 0
src/components/postPush/postPush.vue

@@ -481,6 +481,7 @@ export default {
 					this.postPushForm.lng = obj.lng
 					this.postPushForm.lat = obj.lat
 					this.postPushForm.status = obj.status
+					this.postPushForm.salaryTimes = obj.salaryTimes
 					if (this.type == 'save') {
 						this.getJobPrice(obj.ruleClassifyId)
 					} else if (this.postPushForm.status == 3) {

+ 22 - 0
src/views/myPostPush/myPostPush.vue

@@ -130,11 +130,13 @@
 				screenHeight: 0,
 				postPushId: '', //岗位id
 				type: '',
+				companyList:[]
 			}
 		},
 		mounted() {
 			this.screenHeight = window.innerHeight
 			this.tabIndex = this.$route.query.tabIndex
+			this.getTabsList();
 			this.getlist()
 		},
 		methods: {
@@ -288,11 +290,31 @@
 				})
 
 			},
+			//获取发布的岗位
+			getTabsList() {
+				let data = {
+					companyId: this.$store.state.companyId ? this.$store.state.companyId : localStorage.getItem('companyId')
+				}
+				this.$Request.get('/app/postPush/getCompanyClassify', {
+					params: data
+				}).then(res => {
+					if (res.code == 0) {
+						this.companyList = res.data;
+					}
+				})
+			},
 			/**
 			 * @param {Object} item 详情参数
 			 * 去详情
 			 */
 			goDetails(item) {
+				if (this.companyList.length == 0) {
+					ElMessage({
+						message: '请先发布职位!',
+						type: 'warning',
+					})
+					return;
+				}
 				if (localStorage.getItem('token')) {
 					this.$router.push({
 						name: 'resumeInfo',

+ 4 - 1
src/views/resume/addResume.vue

@@ -1077,7 +1077,7 @@ export default {
             userInfoEdit: false, //个人信息编辑状态
             // 工作经历相关数据,定义为响应式属性
             workExps: [], // 工作经历列表
-            workExpList: [] // 工作经历详细信息列表
+            workExpList: [],// 工作经历详细信息列表
         };
     },
     computed: {
@@ -1092,6 +1092,9 @@ export default {
         }
     },
     mounted() {
+        if (this.$route.query.isExpand === '1') {
+            this.gangweiEdit = true
+        }
         this.screenHeight = window.innerHeight;
         this.token = localStorage.getItem('token');
         if (this.token) {

+ 118 - 4
src/views/search/index.vue

@@ -6,8 +6,29 @@
 				class="condizione flex align-center justify-center">
 				<div class="condizione-box flex align-center justify-center">
 					<div class="condizione-box-c">
+						
 						<!-- 搜索框 -->
 						<div class="condizione-box-c-searchc flex align-center justify-between">
+							<!-- 切换类型 -->
+							<div class="tabs flex align-center">
+								<!-- 可横向滚动区域 -->
+								<div class="tabs-box">
+									<div class="tabs-box-inner">
+										<div v-for="(item, index) in tabs" :key="index" class="tabs-box-item"
+											:class="tabsCurr === index ? 'tabs-box-item-active' : ''"
+											@click="selectTabs(index)">
+											{{ item.ruleClassifyName }}
+										</div>
+									</div>
+								</div>
+
+								<!-- 固定右侧按钮 -->
+								<div @click="goToPage" class="add flex align-center">
+									<el-icon><circle-plus /></el-icon>
+									<div>添加求职期望</div>
+								</div>
+							</div>
+
 							<div class="condizione-box-c-search flex justify-between">
 								<div class="condizione-box-c-search-in flex align-center justify-center">
 									<div class="condizione-box-c-search-ins flex align-center justify-center">
@@ -300,6 +321,8 @@ export default {
 	},
 	data() {
 		return {
+			tabs: [],
+			tabsCurr:null,
 			size: 160, //二维码大小
 			qrColor: {
 				'background': '#ffffff'
@@ -395,17 +418,45 @@ export default {
 		this.getschoolList()
 		//公司规模
 		this.getscompList()
-		//获取职位列表
-		this.getUserList()
 		if (localStorage.getItem('token')) {
 			//简历详情
 			this.getJlInfo();
 		}
 		this.getRmCityList();
 		this.getCitysList();
+		// 获取求职期望
+		this.getJobType();
 
 	},
 	methods: {
+		goToPage() {
+			this.$router.push({
+				path: '/addResume',
+				query: {
+					isExpand: 1
+				}
+			})
+		},
+		selectTabs(index) {
+			this.tabsCurr = index;
+			//重新获取岗位
+			this.page = 1
+			this.getUserList()
+		},
+		// 获取求职期望
+		getJobType() {
+			this.$Request.get('/app/intention/getIntentionList').then(res => {
+				console.log(res)
+				if (res.code == 0 && res.data.length > 0) {
+					this.tabs = res.data;
+					//获取岗位列表
+					this.getUserList()
+				}else{
+					//获取岗位列表
+					this.getUserList()
+				}
+			})
+		},
 		selectCity(item) {
 			console.log(item)
 			// 判断是选择城市还是区域
@@ -597,6 +648,7 @@ export default {
 		},
 		//开始搜索
 		startSearch() {
+			this.tabsCurr = null
 			this.page = 1
 			this.getUserList()
 		},
@@ -666,7 +718,7 @@ export default {
 				page: this.page,
 				limit: this.limit,
 				postType: '', //求职类型
-				ruleClassifyName: this.keyWord, //岗位名称
+				ruleClassifyName: this.keyWord?this.keyWord: this.tabs[this.tabsCurr]?.ruleClassifyName || '',//岗位名称, //岗位名称
 				screen: this.postType == '综合排序' ? 1 : 2, //1推荐 2最新
 				county: this.county == '全部' ? '' : this.county || '', //区
 				city: this.originalCityList[this.cityIndex]?.city || '', //城市
@@ -1135,7 +1187,7 @@ $marginTop-60: 120px;
 		}
 
 		.condizione-box-c-search {
-			width: 80%;
+			width: 50%;
 			height: 100%;
 			background-color: #00DD9A;
 			border-radius: 13px;
@@ -1377,4 +1429,66 @@ $marginTop-60: 120px;
 		color: #FFFFFF;
 	}
 }
+.tabs {
+	//width: 100%;
+	max-width: 30%;
+	height: 40px;
+
+	.tabs-box {
+		overflow: auto;
+		display: flex;
+		height: 100%;
+		// overflow-x: auto;
+		white-space: nowrap;
+		position: relative;
+		
+	}
+
+	.tabs-box::-webkit-scrollbar {
+		/* Chrome, Safari, Opera */
+		height: 0px !important;
+	}
+
+	.tabs-box::-webkit-scrollbar-thumb {
+		background-color: #cccccc;
+		/* 滚动条颜色 */
+	}
+
+	.tabs-box::-webkit-scrollbar-track {
+		background-color: #ffffff;
+		/* 轨道颜色 */
+	}
+
+	.tabs-box-item {
+		display: inline-block;
+		min-width: 80px;
+		padding: 0 5px;
+		height: 100%;
+		text-align: center;
+		line-height: 40px;
+		font-size: 16px;
+		color: #333333;
+		font-weight: 400;
+		margin-right: 10px;
+		border-radius: 6px;
+		cursor: pointer;
+		position: relative;
+		z-index: 1;
+	}
+
+	.tabs-box-item:hover {
+		color: #06E1AB;
+	}
+
+	.tabs-box-item-active {
+		color: #FFFFFF !important;
+		background-color: #06E1AB !important;
+		transition: background-color color 0.5s; // 添加过渡效果
+	}
+}
+.add{
+	flex-shrink: 0;
+	margin-left: 10px;
+	cursor: pointer;
+}
 </style>

+ 97 - 2
src/views/search/searchCom.vue

@@ -65,6 +65,16 @@
 								</div>
 							</div>
 						</div>
+						<!-- 发布的岗位选择 -->
+						<!-- 切换类型 -->
+						<div class="tabs flex align-center justify-center">
+							<div class="tabs-box">
+								<div @click="selectTabs(index)" :class="tabsCurr == index ? 'tabs-box-item-active' : ''"
+									class="tabs-box-item" v-for="(item, index) in tabs" :key="index">
+									{{ item?.ruleClassifyName }}
+								</div>
+							</div>
+						</div>
 						<!-- 行业筛选 -->
 						<div class="condizione-box-c-hy flex align-center justify-between">
 							<div class="condizione-box-c-hy-l flex align-center">
@@ -277,6 +287,7 @@
 </template>
 
 <script>
+	import { ElMessage } from 'element-plus'
 	import VueQrcode from 'vue-qrcode'
 	import resume from '../../components/resume/resume.vue'
 	import axios from 'axios';
@@ -291,6 +302,8 @@
 		},
 		data() {
 			return {
+				tabs: [],
+				tabsCurr: 0,
 				size: 160, //二维码大小
 				qrColor: {
 					'background': '#ffffff'
@@ -376,6 +389,12 @@
 			this.getCitysList();
 		},
 		methods: {
+			selectTabs(index) {
+				this.tabsCurr = index;
+				//重新获取简历
+				this.page = 1
+				this.getUserList()
+			},
 			formatDate(datetime) {
 				if (!datetime) return '';
 				return datetime.split(' ')[0]; // 去掉时分秒,只留 "2025-12-15"
@@ -394,6 +413,13 @@
 			 * 去详情
 			 */
 			goDetails(item) {
+				if (this.tabs.length == 0) {
+					ElMessage({
+						message: '请先发布职位!',
+						type: 'warning',
+					})
+					return;
+				}
 				if (localStorage.getItem('token')) {
 					this.$router.push({
 						name: 'resumeInfo',
@@ -670,15 +696,30 @@
 			change(e) {
 				this.isTop = e
 			},
+			//获取发布的岗位
+			getTabsList() {
+				let data = {
+					companyId: this.$store.state.companyId ? this.$store.state.companyId : localStorage.getItem('companyId')
+				}
+				this.$Request.get('/app/postPush/getCompanyClassify', {
+					params: data
+				}).then(res => {
+					if (res.code == 0) {
+						this.tabs = res.data;
+						// //定位
+						// this.getLocation();
+					}
+				})
+			},
 			/**
-			 * 获取岗位列表
+			 * 获取简历列表
 			 */
 			getUserList() {
 				this.loading = true
 				let data = {
 					page: this.page,
 					limit: this.limit,
-					expectedPosition:'',//岗位名称
+					expectedPosition: this.tabs[this.tabsCurr]?.ruleClassifyName,//岗位名称
 					skillName: this.keyWord, //岗位技能名称
 					screen: 2, //1推荐 2最新
 					city: this.city, //城市
@@ -1398,4 +1439,58 @@
 				color: #FFFFFF;
 			}
 		}
+	.tabs {
+		width: 100%;
+		height: 40px;
+
+		.tabs-box {
+			width: calc(100% - $marginTop-60 * 2);
+			height: 100%;
+			overflow-x: auto;
+			white-space: nowrap;
+			position: relative;
+		}
+
+		.tabs-box::-webkit-scrollbar {
+			/* Chrome, Safari, Opera */
+			height: 0px !important;
+		}
+
+		.tabs-box::-webkit-scrollbar-thumb {
+			background-color: #cccccc;
+			/* 滚动条颜色 */
+		}
+
+		.tabs-box::-webkit-scrollbar-track {
+			background-color: #ffffff;
+			/* 轨道颜色 */
+		}
+
+		.tabs-box-item {
+			display: inline-block;
+			min-width: 80px;
+			padding: 0 5px;
+			height: 100%;
+			text-align: center;
+			line-height: 40px;
+			font-size: 16px;
+			color: #333333;
+			font-weight: 400;
+			margin-right: 10px;
+			border-radius: 6px;
+			cursor: pointer;
+			position: relative;
+			z-index: 1;
+		}
+
+		.tabs-box-item:hover {
+			color: #06E1AB;
+		}
+
+		.tabs-box-item-active {
+			color: #FFFFFF !important;
+			background-color: #06E1AB !important;
+			transition: background-color color 0.5s; // 添加过渡效果
+		}
+	}
 </style>