ソースを参照

优化求职端企业信息页面

wkw 7 ヶ月 前
コミット
778501c821

+ 1 - 1
src/components/recommend/recommend.vue

@@ -24,7 +24,7 @@
 				</div>
 			</div>
 			<div class="content-r-item-address">
-				{{ item.company.companyAllName }}
+				{{ item.company?.companyName || item.company?.companyAllName }}
 			</div>
 			<div class="content-r-item-line">
 				<el-divider />

+ 13 - 10
src/views/enterpriseList/index.vue

@@ -27,7 +27,7 @@
 						<div class="condizione-box-c-city flex align-center" @click="allCitys = true">
 							<div class="condizione-box-c-city-title">公司地点:</div>
 							<div style="font-size: 14px;margin-left: 20px;font-weight: 400;cursor: pointer;">
-								<el-text style="font-size: 14px;color: #00DD9A;">{{city}}(切换城市)</el-text>
+								<el-text style="font-size: 14px;color: #00DD9A;">{{city}}[切换城市]</el-text>
 							</div>
 						</div>
 						<!-- 行业筛选 -->
@@ -79,14 +79,16 @@
 							<div class="list-box-item-top-r-name">
 								{{item.companyName || item.companyAllName}}
 							</div>
-							<div class="list-box-item-top-r-label flex flex-wrap">
-								<div v-if="item.city" class="list-box-item-top-r-label-i">
-									{{item.city}}
-								</div>
-								<div v-if="item.companyScope[0]" class="list-box-item-top-r-label-i">
-									{{item.companyScope[0]}}
+							<div class="list-box-item-top-r-label flex flex-wrap align-center">
+								<div style="color: #666666;font-size: 13px;">{{ item.companyPeople }} ·</div>
+								<div v-if="item.companyScope">
+									<span v-for="item in item.companyScope" :key="index"
+										class="list-box-item-top-r-label-i">
+										{{ item }}
+									</span>
 								</div>
 							</div>
+							<div style="color: #9ca4ab;font-size: 12px;margin-top: 5px;">{{ item.workTime }} · {{ item.welfare }}</div>
 						</div>
 					</div>
 					<div v-if="item.postPushList.length>0" class="list-box-item-bottom flex align-center">
@@ -167,7 +169,7 @@
 			// this.getBannerList()
 			//获取城市列表
 			this.getList()
-			this.getCompanyList()
+			// this.getCompanyList()
 		},
 		methods: {
 			selectCitys(index) {
@@ -302,14 +304,15 @@
 				let data = {
 					page: this.page,
 					limit: this.limit,
-					companyName: this.companyName,
+					key: this.companyName,
+					screen:1,
 					city: this.cityIndex == 0 ? '' : this.cityList[this.cityIndex].label,
 					companyScope: this.companyScopeIndex == 0 ? '' : this.companyScopeList[this.companyScopeIndex]
 						.industryName,
 					companyPeople: this.companyPeopleIndex == 0 ? '' : this.companyPeopleList[this.companyPeopleIndex]
 						.value
 				}
-				this.$Request.get('/app/company/listCompany', {
+				this.$Request.get('/app/company/getCompanyPostPush', {
 					params: data
 				}).then(res => {
 					if (res.code == 0) {

+ 164 - 7
src/views/enterpriseList/info.vue

@@ -8,7 +8,7 @@
 						:src="companyInfo.companyLogo?companyInfo.companyLogo:'/public/logo.png'" fit="cover" />
 					<div class="topInfo-box-l-info">
 						<div class="topInfo-box-l-info-name">
-							{{companyInfo.companyName?companyInfo.companyName:'匿名公司'}}
+							{{ companyInfo?.companyName || companyInfo?.companyAllName || '匿名公司' }}
 						</div>
 						<div class="topInfo-box-l-info-tips">
 							{{companyInfo.city?companyInfo.city:''}}
@@ -17,8 +17,11 @@
 							<el-divider direction="vertical" />
 							{{companyInfo.companyPeople}}
 						</div>
+						<div class="topInfo-box-l-info-tips" style="margin: 5px 0;">
+							{{companyInfo.companyAddress || '暂无地址信息'}}
+						</div>
 						<div class="topInfo-box-l-info-tips">
-							{{companyInfo.companyAddress}}
+							{{ companyInfo.workTime }} · {{ companyInfo.welfare }}
 						</div>
 					</div>
 				</div>
@@ -75,10 +78,68 @@
 			<div class="introduce-box flex justify-between">
 				<div class="introduce-box-l">
 					<div class="introduce-box-l-title">
-						公司信息
+						公司介绍
+					</div>
+					<div class="introduce-box-l-contont">
+						{{ companyInfo.companyContent || '暂无公司介绍' }}
+					</div>
+					<div class="introduce-box-l-title">
+						HR介绍
 					</div>
 					<div class="introduce-box-l-contont">
-						{{companyInfo.companyDetails}}
+						<div class="hr-list flex justify-between" v-if="companyInfo.hr && companyInfo.hr.length > 0">
+							<div class="hr-item" v-for="(hr, index) in companyInfo.hr" :key="index">
+								<div class="hr-content flex align-center">
+									<div class="hr-avatar-container">
+										<div class="hr-avatar" :style="{ backgroundColor: hr.color }">
+											<span class="avatar-text">{{ hr.name.charAt(0) }}</span>
+										</div>
+										<div class="online-dot">
+										</div>
+									</div>
+									<div class="hr-text">
+										<div class="hr-name">{{ hr.name }}
+										</div>
+										<div class="hr-position">{{ hr.hrPosition }}</div>
+									</div>
+								</div>
+							</div>
+						</div>
+						<view class="hr-desc" v-else>暂无HR信息</view>
+					</div>
+					<div class="introduce-box-l-title">
+						人才发展
+					</div>
+					<div class="talent-tags flex flex-wrap" style="margin: 20px 0;">
+						<div class="talent-tag" v-for="(talent, index) in companyInfo.companyPeopleDevelop"
+							:key="index">
+							{{ talent }}
+						</div>
+					</div>
+					<div class="introduce-box-l-title">
+						公司风采
+					</div>
+					<div class="introduce-box-l-contont" v-if="companyInfo.photos">
+						<div class="photo" v-for="(talent, index) in companyInfo.photos" :key="index">
+							<img mode="widthFix" :src="talent" class="photoImage"></img>
+						</div>
+					</div>
+					<div class="introduce-box-l-title">
+						工商信息
+					</div>
+					<div style="margin: 20px 0;">
+						<div class="gsInfo-box-c-item">公司全称:{{ companyInfo.companyAllName ?
+							companyInfo.companyAllName :
+							'' }}</div>
+						<div class="gsInfo-box-c-item">成立时间:{{ companyInfo.companyCreateTime ?
+							companyInfo.companyCreateTime : '' }}
+						</div>
+						<div class="gsInfo-box-c-item">注册资本:{{ companyInfo.companyRegisteredFund ?
+							companyInfo.companyRegisteredFund :
+							'' }}万人民币</div>
+						<div class="gsInfo-box-c-item">法人代表:{{ companyInfo.companyLegalPerson ?
+							companyInfo.companyLegalPerson : '未知'
+							}}</div>
 					</div>
 				</div>
 				<div class="introduce-box-r">
@@ -191,7 +252,25 @@
 					params: data
 				}).then(res => {
 					if (res.code == 0) {
-						this.companyInfo = res.data
+						let color = ['#4A90E2', '#7ED321', '#F5A623']
+						if (res.data.hr) {
+							res.data.hr.forEach(function (item, index) {
+								if (item) {
+									item.name = '匿名'
+									item.color = color[index % 3]
+									for (const user of res.data.userEntities) {
+										if (item.userId == user.userId) {
+											item.name = user.userName;
+											break; // 直接跳出循环
+										}
+									}
+								}
+							})
+						}
+						this.companyInfo = res.data;
+						this.companyInfo.photos = this.companyInfo.photos ? this.companyInfo.photos.split(',') : []
+						this.companyInfo.companyPeopleDevelop = this.companyInfo.companyPeopleDevelop ? this.companyInfo.companyPeopleDevelop.split(',') : [];
+						console.log(this.companyInfo)
 					} else {
 						ElMessage.error(res.msg)
 					}
@@ -252,7 +331,7 @@
 			display: flex;
 			flex-direction: column;
 			justify-content: space-between;
-			height: 80px
+			// height: 80px
 		}
 
 		.topInfo-box-l-info-name {
@@ -366,7 +445,7 @@
 		.introduce-box-l-contont {
 			color: #333333;
 			font-size: 15px;
-			margin-top: 20px;
+			margin: 20px 0;
 			line-height: 42px;
 		}
 
@@ -377,4 +456,82 @@
 			border-radius: 20px;
 		}
 	}
+	.gsInfo-box-c-item {
+		color: rgba(153, 153, 153, 1);
+		font-size: 12px;
+		font-weight: 400;
+		margin-bottom: 5px;
+	}
+	.talent-tag {
+		background: rgba(153, 153, 153, 0.1);
+		border-radius: 6px;
+		padding: 3px 6px;
+		color: rgba(102, 102, 102, 1);
+		font-size: 12px;
+		font-weight: 400;
+		box-sizing: border-box;
+		margin-right: 10px;
+	}
+	.hr-list {
+		padding: 0 0 30rpx 0;
+
+		.hr-item {
+			flex: 1;
+
+			.hr-content {
+				align-items: center;
+
+				.hr-avatar-container {
+					position: relative;
+					margin-right: 8px;
+
+					.hr-avatar {
+						width: 40px;
+						height: 40px;
+						border-radius: 50%;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						position: relative;
+
+						.avatar-text {
+							color: #ffffff;
+							font-size: 16px;
+							font-weight: 600;
+						}
+					}
+
+					.online-dot {
+						position: absolute;
+						bottom: 2px;
+						right: 2px;
+						width: 10px;
+						height: 10px;
+						background-color: #7ED321;
+						border-radius: 50%;
+						border: 1px solid #ffffff;
+					}
+				}
+
+				.hr-text {
+					.hr-name {
+						color: rgba(34, 37, 42, 1);
+						font-family: DM Sans;
+						font-size: 14px;
+						font-weight: 500;
+						line-height: 20px;
+						margin-bottom: 2px;
+					}
+
+					.hr-position {
+						color: rgba(153, 153, 153, 1);
+						font-family: DM Sans;
+						font-size: 12px;
+						font-weight: 400;
+						line-height: 16px;
+					}
+				}
+			}
+		}
+	}
 </style>

+ 2 - 4
src/views/index/index.vue

@@ -153,8 +153,7 @@
 					<!-- 公司名称-公司人数 -->
 					<div class="list-box-item-title flex align-center justify-between">
 						<div style="margin: 10px 0;">
-							<span class="company-name" style="margin-right: 8rpx;">{{ item.company ?
-								item.company.companyAllName : '' }}</span>&nbsp;
+							<span class="company-name" style="margin-right: 8rpx;">{{ item.company?.companyName || item.company?.companyAllName }}</span>&nbsp;
 							<span class="company-people" v-if="item.company">{{ item.company ?
 								item.company.companyPeople : '0人' }}</span>
 						</div>
@@ -219,8 +218,7 @@
 					<!-- 公司名称-公司人数 -->
 					<div class="list-box-item-title flex align-center justify-between">
 						<div style="margin: 10px 0;">
-							<span class="company-name" style="margin-right: 8rpx;">{{ item.company ?
-								item.company.companyAllName : '' }}</span>&nbsp;
+							<span class="company-name" style="margin-right: 8rpx;">{{ item.company?.companyName || item.company?.companyAllName }}</span>&nbsp;
 							<span class="company-people" v-if="item.company">{{ item.company ?
 								item.company.companyPeople : '0人' }}</span>
 						</div>

+ 34 - 21
src/views/index/indexCompany.vue

@@ -561,28 +561,41 @@
 			//使用jsonp请求从腾讯地图获取经纬度
 			getLocation() {
 				let data = {
-					key: "ZBABZ-ZWECU-UQTVV-4LYDR-COK3F-5SF75", //申请的密钥
-					output: "jsonp",
+					key: 'ZBABZ-ZWECU-UQTVV-4LYDR-COK3F-5SF75', //申请的密钥
+					output: 'jsonp'
 				};
-				let url = "https://apis.map.qq.com/ws/location/v1/ip"
-				axios.get(url, {
-					params: data,
-					adapter: jsonp
-				}).then(res => {
-					this.longitude = res.data.result.location.lng
-					this.latitude = res.data.result.location.lat
-					this.citys = res.data.result.ad_info.city
-					if (!this.city) {
-						this.city = this.citys
-					}
-					//获取简历
-					this.getRecommendJob(1)
-					this.getRecommendJob(2)
-					localStorage.setItem('city', this.city)
-
-				}).catch(err => {
-					console.log(err)
-				})
+				let url = 'https://apis.map.qq.com/ws/location/v1/ip';
+				axios
+					.get(url, {
+						params: data,
+						adapter: jsonp
+					})
+					.then(res => {
+						this.longitude = res.data.result.location.lng;
+						this.latitude = res.data.result.location.lat;
+						this.getSelectCity(this.longitude, this.latitude);
+					})
+					.catch(err => {
+						console.log('获取位置失败');
+					});
+			},
+			//使用经纬度获取城市
+			getSelectCity(longitude, latitude) {
+				let data = {
+					lat: latitude,
+					lng: longitude
+				};
+				this.$Request
+					.get('/app/Login/selectCity', { params: data })
+					.then(res => {
+						if (res.code == 0) {
+							this.citys = res.data.city ? res.data.city : '未知';
+							//获取简历
+							this.getRecommendJob(1)
+							this.getRecommendJob(2)
+							localStorage.setItem('city', this.city)
+						}
+					});
 			},
 			/**
 			 * @param {Object} item 详情参数

+ 1 - 1
src/views/post/postInfo.vue

@@ -95,7 +95,7 @@
 					<img :src="info.company?info.company.companyLogo:''" alt="" />
 					<div class="postGs-box-info-r">
 						<div class="postGs-box-info-r-name">
-							{{ info.company ? info.company.companyAllName :''}}
+							{{ info.company?.companyName || info.company?.companyAllName || '匿名公司' }}
 						</div>
 						<div class="postGs-box-info-r-bottom">
 							{{info.company?info.company.companyScope:''}}

+ 10 - 7
src/views/search/index.vue

@@ -73,16 +73,19 @@
 											<div class="condizione-box-c-hy-l-i flex align-center">
 												{{ item.name }}
 												<span v-if="item.num > 0">({{ item.num }})</span>
-												<!-- <el-icon :size="14" style="margin-left: 4px;" v-if="item.isUp == false"
-													name="CaretBottom" />
-												<el-icon :size="14" style="margin-left: 4px;" v-else name="CaretTop" /> -->
+												<el-icon :size="14" style="margin-left: 4px;" v-if="item.isUp == false">
+													<CaretBottom />
+												</el-icon>
+												<el-icon :size="14" style="margin-left: 4px;" v-else>
+													<CaretTop />
+												</el-icon>
 											</div>
 										</template>
 										<!-- 综合排序 -->
 										<div class="jobType" v-if="index == 0">
-											<div :style="postType == item ? 'color:#00DD9A' : ''"
-												class="jobType-item" @click="selectCondition(item, 0)"
-												v-for="(item, index) in sortOptions" :key="index">
+											<div :style="postType == item ? 'color:#00DD9A' : ''" class="jobType-item"
+												@click="selectCondition(item, 0)" v-for="(item, index) in sortOptions"
+												:key="index">
 												{{ item }}
 											</div>
 										</div>
@@ -177,7 +180,7 @@
 								<img :src="item.company.companyLogo" alt="" />
 								<div class="content-l-item-r-title-r">
 									<div class="content-l-item-r-title-r-t">
-										{{ item.company.companyAllName }}
+										{{ item.company?.companyName || item.company?.companyAllName }}
 									</div>
 									<div class="content-l-item-r-title-r-b flex align-center">
 										<div class="content-l-item-r-title-r-b-i">

+ 395 - 98
src/views/search/searchCom.vue

@@ -46,23 +46,25 @@
 							</div>
 						</div>
 						<!-- 地区选择 -->
-					<div class="condizione-box-c-city">
-						<div class="condizione-box-c-city-title">
-							城市和地区
-						</div>
-						<div class="condizione-box-c-city-s flex flex-wrap">
-							<div class="condizione-box-c-city-s-i flex align-center" @click="allCitys = true">
-								<el-text style="color: #00DD9A;font-size: 14px;margin-right: 10px;">{{cityList[cityIndex]?.city || city}}</el-text>
-								[切换城市]
+						<div class="condizione-box-c-city">
+							<div class="condizione-box-c-city-title">
+								城市和地区
 							</div>
-						</div>
-						<div class="condizione-box-c-city-d flex flex-wrap">
-							<div @click="selectCity(item)" :style="county==item?'color:#00DD9A;':''"
-								class="condizione-box-c-city-d-i" v-for="(item,index) in countyList" :key="index">
-								{{item}}
+							<div class="condizione-box-c-city-s flex flex-wrap">
+								<div class="condizione-box-c-city-s-i flex align-center" @click="openCityDialog()">
+									<el-text
+										style="color: #00DD9A;font-size: 14px;margin-right: 10px;">{{cityList[cityIndex]?.city
+										|| city}}</el-text>
+									[切换城市]
+								</div>
+							</div>
+							<div class="condizione-box-c-city-d flex flex-wrap">
+								<div @click="selectCity(item)" :style="county==item?'color:#00DD9A;':''"
+									class="condizione-box-c-city-d-i" v-for="(item,index) in countyList" :key="index">
+									{{item}}
+								</div>
 							</div>
 						</div>
-					</div>
 						<!-- 行业筛选 -->
 						<div class="condizione-box-c-hy flex align-center justify-between">
 							<div class="condizione-box-c-hy-l flex align-center">
@@ -247,20 +249,62 @@
 
 		</div>
 		<!-- 切换城市 -->
-		<el-dialog v-model="allCitys" :draggable="true" destroy-on-close align-center center>
+		<el-dialog v-model="allCitys" :draggable="true" destroy-on-close align-center center title="城市选择">
 			<template #header>
 				<div class="my-header flex align-center">
-					<div class="my-header-title" style="font-weight: bold;">
-						切换城市
+					<div class="my-header-title" style="font-weight: bold">
+						城市选择
+					</div>
+					<div class="my-header-title flex" style="margin-left: 40px; width: 300px">
+						<el-input v-model="search" prefix-icon="Search" size="default" placeholder="请输入城市名称"
+							class="input-with-select" @input="handleSearch" />
+						<el-button @click="handleSearch" style="margin-left: 10px" type="primary">搜索</el-button>
 					</div>
 				</div>
 			</template>
-			<div class="citys">
-				<div class="citys-item">
-					<div @click="selectCity(item.city)" v-for="(item,index) in cityList" :key="index"
-						class="citys-item-citys">
-						{{item.city}}
+			<div class="city flex align-center justify-center">
+				<div class="city-box">
+					<div class="city-box-city">
+						<div class="city-box-cityt flex align-center justify-between">
+							定位城市
+							<div @click="getLocation()" class="city-box-cityt-r flex align-center">
+								<el-icon size="18">
+									<Location />
+								</el-icon>
+								重新定位
+							</div>
+						</div>
+						<div @click="selectCity(city)" class="city-box-citys">
+							{{ citys }}
+						</div>
 					</div>
+					<div class="city-box-list">
+						<ul class="city-box-lists" style="overflow: auto">
+							<li class="city-box-lists-title">热门城市</li>
+							<li class="city-box-lists-title-cs flex align-center flex-wrap">
+								<div @click="selectCity(item)" class="city-box-lists-title-css"
+									v-for="(item, index) in rmCity" :key="index">
+									{{ item }}
+								</div>
+							</li>
+							<li v-for="(item, index) in cityList" :key="index" class="city-box-lists-item">
+								<div v-if="item.city.length > 0">
+									<div class="city-box-lists-item-title">
+										{{ item.letter.toUpperCase() }}
+									</div>
+									<div class="flex align-center flex-wrap">
+										<div class="city-box-lists-item-titles flex align-center"
+											v-for="(ite, ind) in item.city" :key="ind">
+											<div @click="selectCity(ite)">
+												{{ ite }}
+											</div>
+										</div>
+									</div>
+								</div>
+							</li>
+						</ul>
+					</div>
+					<el-empty v-if="cityList.length == 0" description="暂无城市" />
 				</div>
 			</div>
 		</el-dialog>
@@ -273,6 +317,8 @@
 	import axios from 'axios';
 	import jsonp from 'axios-jsonp'
 	import citysData from '../../components/header/citys.json'
+	import citySelect from '../../publicJs/citySelect.js';
+	import cityJs from '../../publicJs/city.js';
 	export default {
 		components: {
 			VueQrcode,
@@ -321,8 +367,6 @@
 				jyList: [], //工作经验
 				schoolList: [], //学历列表
 				city: '', //当前选中的地区
-        		allCitys: false, //是否显示全部城市弹框
-        		citys: '', //定位城市
         		jobDataList: [], //岗位列表
 				page: 1, //分页
 				limit: 10, //每页条数
@@ -336,13 +380,29 @@
 				salaryRange: '', //薪资
 				education: '', //学历
 				companyPeople: '', //公司规模
+				allCitys: false, //是否显示全部城市弹框
+				citys: '', //定位城市
+				cityList: [], //按字母分组的城市列表,用于渲染
+				originalCityList: [], //原始格式的城市列表,用于比对和获取区县
+				county: '', //区域
 			}
 		},
 		computed: {
-			//计算城市
-		countyList() {
-			return this.cityList.length > 0 ? ['全部', ...this.cityList[this.cityIndex].countyList] : ['全部']
-		},
+			//计算城市区县列表
+			countyList() {
+				// 确保originalCityList不为空且cityIndex在有效范围内
+				if (this.originalCityList.length > 0 && this.cityIndex >= 0 && this.cityIndex < this.originalCityList.length) {
+					return ['全部', ...this.originalCityList[this.cityIndex].countyList]
+				}
+				return ['全部']
+			},
+			getCity() {
+				// 确保originalCityList不为空且cityIndex在有效范围内
+				if (this.originalCityList.length > 0 && this.cityIndex >= 0 && this.cityIndex < this.originalCityList.length) {
+					return this.originalCityList[this.cityIndex].city
+				}
+				return ''
+			},
 		},
 		mounted() {
 			this.city = ''
@@ -364,7 +424,9 @@
 			//学历
 			this.getschoolList()
 			//获取简历列表
-			// this.getUserList()
+			this.getUserList()
+			this.getRmCityList();
+			this.getCitysList();
 		},
 		methods: {
 			//获取app下载地址
@@ -470,17 +532,189 @@
 				this.page = e
 				this.getUserList()
 			},
+			selectCity(item) {
+				console.log(item)
+				// 判断是选择城市还是区域
+				const index = this.originalCityList.findIndex(cityItem => cityItem.city === item);
+
+				if (index !== -1) {
+					// 城市选择:更新cityIndex和city值
+					this.cityIndex = index;
+					this.city = item;
+
+					// 更新county为默认值"全部"
+					this.county = '全部';
+
+					// 关闭城市选择弹窗
+					this.allCitys = false;
+				} else if (this.countyList.includes(item)) {
+					// 区域选择:更新county值
+					this.county = item;
+				}
+
+				// 重置页码并重新获取职位列表
+				this.page = 1;
+				this.getUserList();
+			},
+			//打开城市选择弹窗
+			openCityDialog() {
+				this.allCitys = true;
+			},
+			//获取热门城市列表
+			getRmCityList() {
+				let data = {
+					limitCount: 10
+				};
+				this.$Request
+					.get('/app/postPush/getHotCity', { params: data })
+					.then(res => {
+						if (res.code == 0) {
+							this.rmCity = res.data;
+						}
+					});
+			},
+			//获取城市列表(按ABC排序)
+			getCitysList(keyword = '') {
+				const grouped = {};
+				// 过滤:如果有关键字,就按城市名模糊匹配
+				const filtered = keyword
+					? cityJs.filter(item => item.label.includes(keyword))
+					: cityJs;
+
+				// 遍历城市数据
+				filtered.forEach(item => {
+					// 按字母分组
+					const letterObj = citySelect.getFirstLetter(item.label);
+					const letter = letterObj.firstletter.toUpperCase();
+					if (!grouped[letter]) grouped[letter] = [];
+					grouped[letter].push(item.label);
+
+					// 查找对应的区县列表
+					let foundCountyList = [];
+					for (const province of citysData) {
+						// 省份级别的检查
+						if (province.label === item.label) {
+							// 获取省份下的区县列表
+							if (province.children && province.children.length > 0) {
+								const firstLevel = province.children[0];
+								if (firstLevel.children && firstLevel.children.length > 0) {
+									foundCountyList = firstLevel.children.map(county => county.label || '');
+								}
+							}
+							break;
+						}
+
+						// 城市级别的检查
+						if (province.children && province.children.length > 0) {
+							for (const cityItem of province.children) {
+								if (cityItem.label === item.label) {
+									// 获取城市下的区县列表
+									if (cityItem.children && cityItem.children.length > 0) {
+										foundCountyList = cityItem.children.map(county => county.label || '');
+									}
+									break;
+								}
+							}
+						}
+					}
+				});
+
+				// 生成按字母分组的城市列表
+				const sortedLetters = Object.keys(grouped).sort();
+				this.cityList = sortedLetters.map(letter => ({
+					letter,
+					city: grouped[letter]
+				}));
+			},
 			//选择城市
 			selectCity(item) {
-				// 查找选中城市的索引
-				const index = this.cityList.findIndex(city => city.city === item)
+				console.log(item)
+				// 判断是选择城市还是区域
+				const index = this.originalCityList.findIndex(cityItem => cityItem.city === item);
+
 				if (index !== -1) {
-					this.cityIndex = index
-					this.county = this.countyList[0]
-					this.page = 1
-					this.allCitys = false
-					this.getUserList();
+					// 城市选择:更新cityIndex和city值
+					this.cityIndex = index;
+					this.city = item;
+
+					// 更新county为默认值"全部"
+					this.county = '全部';
+
+					// 关闭城市选择弹窗
+					this.allCitys = false;
+				} else if (this.countyList.includes(item)) {
+					// 区域选择:更新county值
+					this.county = item;
 				}
+
+				// 重置页码并重新获取职位列表
+				this.page = 1;
+				this.getUserList();
+			},
+			getList() {
+				this.cityList = []
+				// 清空并初始化originalCityList
+				this.originalCityList = []
+				// 定义直辖市列表
+				const municipalities = ['北京市', '上海市', '天津市', '重庆市']
+				// 遍历省份
+				citysData.forEach(province => {
+					// 遍历城市
+					province.children.forEach(city => {
+						// 提取区域列表
+						const countyList = city.children.map(county => county.label)
+
+						// 确定城市名称
+						let cityName = city.label
+
+						// 如果是直辖市,取上一级的label(即省份名称)
+						if (municipalities.includes(province.label) && city.label === '市辖区') {
+							cityName = province.label
+						}
+
+						// 添加到cityList
+						this.cityList.push({
+							city: cityName,
+							countyList: countyList
+						})
+						// 添加到originalCityList
+						this.originalCityList.push({
+							city: cityName,
+							countyList: countyList
+						})
+					})
+				})
+
+				// 设置默认城市(如果没有本地存储的城市)
+				if (!this.city && this.originalCityList.length > 0) {
+					// 默认选择第一个城市
+					this.city = this.originalCityList[0].city
+					this.cityIndex = 0
+					// 设置默认区县为"全部"
+					this.county = '全部'
+				}
+
+				// 处理localStorage中存储的城市名称匹配
+				if (localStorage.getItem('city')) {
+					const storedCity = localStorage.getItem('city')
+					// 设置city值
+					this.city = storedCity
+
+					// 匹配选中项
+					this.originalCityList.forEach((item, index) => {
+						if (item.city === storedCity) {
+							this.cityIndex = index
+						}
+					})
+					// 设置默认区县为"全部"
+					this.county = '全部'
+				}
+
+				this.getLocation()
+			},
+			//搜索事件
+			handleSearch() {
+				this.getCitysList(this.search.trim());
 			},
 			/**
 			 * @param {Boolean} e 
@@ -626,70 +860,39 @@
 					}
 				})
 			},
-			/**
-			 * 获取地址数据
-			 */
-			getList() {
-				// 使用本地citys.json数据
-				this.cityList = []
-				// 定义直辖市列表
-				const municipalities = ['北京市', '上海市', '天津市', '重庆市']
-				
-				// 遍历省份
-				citysData.forEach(province => {
-					// 遍历城市
-					province.children.forEach(city => {
-						// 提取区域列表
-						const countyList = city.children.map(county => county.label)
-						
-						// 确定城市名称
-						let cityName = city.label
-						
-						// 如果是直辖市,取上一级的label(即省份名称)
-						if (municipalities.includes(province.label) && city.label === '市辖区') {
-							cityName = province.label
-						}
-						
-						// 添加到cityList
-						this.cityList.push({
-							city: cityName,
-							countyList: countyList
-						})
+			getLocation() {
+				let data = {
+					key: 'ZBABZ-ZWECU-UQTVV-4LYDR-COK3F-5SF75', //申请的密钥
+					output: 'jsonp'
+				};
+				let url = 'https://apis.map.qq.com/ws/location/v1/ip';
+				axios
+					.get(url, {
+						params: data,
+						adapter: jsonp
 					})
-				})
-				
-				// 处理localStorage中存储的城市名称匹配
-				if (localStorage.getItem('city')) {
-					console.log(localStorage.getItem('city'))
-					const storedCity = localStorage.getItem('city')
-					// 设置city值
-					this.city = storedCity
-				}
-				
-				this.getLocation()
+					.then(res => {
+						this.longitude = res.data.result.location.lng;
+						this.latitude = res.data.result.location.lat;
+						this.getSelectCity(this.longitude, this.latitude);
+					})
+					.catch(err => {
+						console.log('获取位置失败');
+					});
 			},
-			getLocation() {
-				//默认全部区
-				this.county = '全部'
-				// 设置定位城市
-				if (this.cityList.length > 0) {
-					this.citys = this.cityList[this.cityIndex].city
-				}
-				this.getUserList();
-				// let data = {
-				// 	key: "ZBABZ-ZWECU-UQTVV-4LYDR-COK3F-5SF75", //申请的密钥
-				// 	output: "jsonp"
-				// };
-				// let url = "https://apis.map.qq.com/ws/location/v1/ip"
-				// axios.get(url, {
-				// 	params: data,
-				// 	adapter: jsonp
-				// }).then(res => {
-				// 	this.city = res.data.result.ad_info.city
-				// 	this.getUserList()
-				// }).catch(err => {
-				// 	console.log(err)
-				// })
+			//使用经纬度获取城市
+			getSelectCity(longitude, latitude) {
+				let data = {
+					lat: latitude,
+					lng: longitude
+				};
+				this.$Request
+					.get('/app/Login/selectCity', { params: data })
+					.then(res => {
+						if (res.code == 0) {
+							this.citys = res.data.city ? res.data.city : '未知';
+						}
+					});
 			},
 		}
 	}
@@ -1196,4 +1399,98 @@
 			color: #FFFFFF;
 		}
 	}
+		.city {
+			width: 100%;
+			height: 500px;
+	
+			.city-box {
+				width: 100%;
+				padding: 0 20px;
+				height: 100%;
+			}
+	
+			.city-box-city {
+				.city-box-cityt {
+					width: 100%;
+					font-weight: bold;
+	
+					.city-box-cityt-r {
+						font-weight: 500;
+						color: #999999;
+						font-size: 12px;
+						cursor: pointer;
+					}
+				}
+	
+				.city-box-citys {
+					background-color: #F2F2F7;
+					width: fit-content;
+					padding: 4px 10px;
+					margin-top: 10px;
+					cursor: pointer;
+					border-radius: 4px;
+				}
+	
+				.city-box-citys:hover {
+					background-color: #00DD9A;
+					color: #FFFFFF;
+				}
+			}
+	
+			.city-box-list {
+				width: 100%;
+				height: 420px;
+				margin-top: 20px;
+				overflow-y: scroll;
+			}
+	
+			.city-box-lists {
+				width: 100%;
+				height: 100%;
+				list-style: none;
+				padding: 0;
+				margin: 0;
+			}
+	
+			.city-box-lists-title {
+				font-weight: bold;
+	
+			}
+	
+			.city-box-lists-title-css {
+				background-color: #F2F2F7;
+				width: fit-content;
+				padding: 4px 10px;
+				margin-top: 10px;
+				cursor: pointer;
+				border-radius: 4px;
+				margin-right: 20px;
+				margin-bottom: 20px;
+			}
+	
+			.city-box-lists-title-css:hover {
+				background-color: #00DD9A;
+				color: #FFFFFF;
+			}
+	
+			.city-box-lists-item-title {
+				font-weight: bold;
+			}
+	
+			.city-box-lists-item-titles {
+				background-color: #F2F2F7;
+				width: fit-content;
+				padding: 4px 10px;
+				margin-top: 10px;
+				cursor: pointer;
+				border-radius: 4px;
+				margin-right: 20px;
+				margin-bottom: 20px;
+			}
+	
+			.city-box-lists-item-titles:hover {
+				background-color: #00DD9A;
+				color: #FFFFFF;
+			}
+		}
 </style>