wkw пре 6 месеци
родитељ
комит
96a9f649b3

+ 31 - 3
src/components/messageCom/messageCom.vue

@@ -40,7 +40,7 @@
 						<!-- 对方的消息 -->
 						<div class="message-boxs message-box-l flex flex-wrap" v-if="item.userId != userId">
 							<img class="message-boxs-avatar" :src="item.avatar?item.avatar:'/default.jpg'" alt="" />
-							<div class="message-box-l-con" v-if="item.messageType==1 || item.messageType==10">
+							<div class="message-box-l-con" v-if="item.messageType==1">
 								{{item.content}}
 							</div>
 							<div class="message-box-l-con flex align-center" v-if="item.messageType==20">
@@ -139,6 +139,15 @@
 								v-if="item.content && item.messageType === 9 && item.content!='简历请求'">
 								{{item.content}}
 							</div>
+							<!-- 预览简历 -->
+							<div class="message-box-l-con inv-style" v-if="item.content && item.messageType === 10">
+								<template v-if="userType == 1">{{ item.content }}</template>
+								<template v-else>
+									<view class="flex align-center" @click="previewResume(item.content)">
+										点击预览附件简历
+									</view>
+								</template>
+							</div>
 							<!-- 面试邀约消息 -->
 							<div class="message-box-l-con inv-style" v-if="item.content && item.messageType === 99">
 								您收到了{{ item.content }}</div>
@@ -222,6 +231,13 @@
 							<div class="message-box-r-con" v-if="item.messageType==12">
 								{{item.content}}已拒绝
 							</div>
+							<!-- 简历预览 -->
+							<div class="message-box-r-con invitation" v-if="item.content && item.messageType === 10">
+								<template v-if="userType == 1">
+									<view class="flex align-center" @click="previewResume(item.content)">点击预览附件简历</view>
+								</template>
+								<template v-else>{{ item.content }}</template>
+							</div>
 							<!-- 面试邀约消息 -->
 							<div class="message-box-r-con invitation" v-if="item.content && item.messageType === 99">
 								您发送了{{ item.content }}</div>
@@ -503,12 +519,24 @@
 			}, 1000);
 		},
 		methods: {
+			previewResume(attachmentAddress) {
+				const isFileLink = /^https?:\/\/.+\.(pdf|doc|docx|xls|xlsx)$/i.test(attachmentAddress);
+				if (!isFileLink) {
+					ElMessage({
+						message: '该简历无法预览',
+						type: 'warning',
+						duration: 1500,
+						offset: this.screenHeight / 2
+					})
+					return;
+				}
+				window.open(attachmentAddress, '_blank');
+			},
 			getDateDiff(data) {
 				// 兼容字符串或时间戳
 				let timePublish;
 				if (typeof data === 'string') {
-					// PC 浏览器可以正常识别 "2026-01-05 18:46:39"
-					timePublish = new Date(data.replace(/-/g, '/')); // 保留这步以防某些老浏览器异常
+					timePublish = new Date(data.replace(/-/g, '/'));
 				} else if (typeof data === 'number') {
 					timePublish = new Date(data);
 				} else {

+ 42 - 38
src/components/postPush/postPush.vue

@@ -173,13 +173,15 @@
 						选择从事方向
 					</div>
 					<div class="my-header-title flex align-center" style="margin-left: 40px; width: 600px">
-						<el-select @remove-tag="removeTag" :collapse-tags="true" :max-collapse-tags="5"
-							class="my-header-title-se" multiple-limit="20" v-model="postPushForm.positionTag" multiple
-							placeholder="请选择从事方向">
-							<el-option v-for="item in industryArrList" :key="item.postSkillName"
-								:label="item.postSkillName" :value="item.postSkillName" />
+						<el-select v-model="postPushForm.positionTag" multiple placeholder="请选择跨境标签" :collapse-tags="true"
+							:max-collapse-tags="5">
+							<el-option-group v-for="group in industryList" :key="group.postSkillName"
+								:label="group.postSkillName">
+								<el-option v-for="item in group.childrenList" :key="item.postSkillName"
+									:label="item.postSkillName" :value="item.postSkillName" />
+							</el-option-group>
 						</el-select>
-						<span style="margin-left: 10px;font-size: 13px;color: #999999;">{{ postPushForm.positionTag.length }}/20</span>
+						<span style="margin-left: 10px;font-size: 13px;color: #999999;">{{ postPushForm.positionTag.length }}</span>
 						<el-button @click="addHangye()" style="margin-left: 10px" type="primary">确定</el-button>
 					</div>
 				</div>
@@ -195,7 +197,7 @@
 					<div class="preference-children">
 						<div v-for="(child, cIndex) in parent.childrenList" :key="cIndex" class="preference-tag"
 							:class="{ active: postPushForm.positionTag.includes(child.postSkillName) }"
-							@click="togglePreference(child.postSkillName)">
+							@click="togglePreference(pIndex,child.postSkillName)">
 							<span>{{ child.postSkillName }}</span>
 						</div>
 					</div>
@@ -263,7 +265,6 @@ export default {
 			workDialog: false, //是否打开岗位选择
 			dialogAgreements: false, //协议弹窗
 			checked: false, //是否同意协议
-			industryArrList: [], // 可选择的从事方向列表
 			industryList: [], // 从事方向列表
 			industryDialog: false, // 是否打开从事方向选择
 			availableBackendTags: [], // 可用的后端标签
@@ -420,7 +421,7 @@ export default {
 			return this.workTypeList.length > 0 ? this.workTypeList[this.workCurrent].childrens : []
 		},
 		positionTagDisplay() {
-			return this.postPushForm.positionTag.join(',')
+			return this.postPushForm.positionTag?.length?this.postPushForm.positionTag.join(','):''
 		},
 		customTags() {
 			// 过滤出真正的自定义标签(不在后端标签列表中的标签)
@@ -472,19 +473,21 @@ export default {
 			return `${num / 1000}k`
 		},
 		// 切换从事方向选择状态
-		togglePreference(skillName) {
-			// 查找索引
+		togglePreference(pIndex, skillName) {
+			const parent = this.industryList[pIndex];
+			const selectedInCategory = parent.childrenList
+				.filter(item => item.postSkillName !== '不限' && this.postPushForm.positionTag.includes(item.postSkillName));
+
 			const index = this.postPushForm.positionTag.indexOf(skillName);
 
 			if (index > -1) {
-				// 如果已选择则取消选择
+				// 已选择则取消
 				this.postPushForm.positionTag.splice(index, 1);
 			} else {
-				// 如果未选择,检查是否达到选择上限
-				if (this.postPushForm.positionTag.length >= 20) {
+				if (selectedInCategory.length >= 5) {
 					ElMessage({
-						message: '最多添加二十条',
-						type: 'info',
+						message: '每个分类最多选择5个标签',
+						type: 'warning',
 						duration: 1500,
 						offset: this.screenHeight / 2
 					});
@@ -706,8 +709,6 @@ export default {
 							flatList.push(child);
 						});
 					});
-					this.industryArrList = flatList;
-					
 					// 保存所有可用的后端标签名称
 					this.availableBackendTags = flatList.map(item => item.postSkillName);
 					
@@ -771,27 +772,30 @@ export default {
 		},
 		//确认
 		handleInputConfirm() {
-			if (this.inputValue) {
-				// 检查是否达到选择上限
-				if (this.postPushForm.positionTag.length >= 20) {
-					ElMessage({
-						message: '最多添加二十条',
-						type: 'info',
-						duration: 1500,
-						offset: this.screenHeight / 2
-					});
-					this.inputVisible = false;
-					this.inputValue = '';
-					return;
-				}
-				
-				this.postPushForm.positionTag.push(this.inputValue)
-				this.inputVisible = false
-				this.inputValue = ''
-			} else {
-				this.inputVisible = false
+			if (!this.inputValue) {
+				this.inputVisible = false;
+				return;
 			}
+			// 当前已有自定义标签数量
+			const currentCustomCount = this.postPushForm.positionTag.filter(
+				tag => !this.availableBackendTags.includes(tag)
+			).length;
 
+			if (currentCustomCount >= 5) {
+				ElMessage({
+					message: '最多添加5个自定义标签',
+					type: 'warning',
+					duration: 1500,
+					offset: this.screenHeight / 2
+				});
+				this.inputVisible = false;
+				this.inputValue = '';
+				return;
+			}
+			// 添加自定义标签
+			this.postPushForm.positionTag.push(this.inputValue.trim());
+			this.inputVisible = false;
+			this.inputValue = '';
 		},
 		// 工作经验
 		getSchoolList() {
@@ -832,9 +836,9 @@ export default {
 						this.workTypeList = res.data
 						this.workDialog = true
 					}
-
 				}
 			})
+			this.postPushForm.positionTag = []
 		},
 		//选择地址
 		handleSelect(item) {

+ 32 - 18
src/views/index/indexCompany.vue

@@ -306,14 +306,22 @@
 						选择跨境标签
 					</div>
 					<div class="my-header-title flex align-center" style="margin-left: 40px; width: 600px">
-						<el-select :collapse-tags="true" :max-collapse-tags="5"
+						<!-- <el-select :collapse-tags="true" :max-collapse-tags="5"
 							class="my-header-title-se" multiple-limit="20" v-model="selectedIndustryTags" multiple
 							placeholder="请选择跨境标签">
 							<el-option v-for="item in industryArrList" :key="item.postSkillName"
 								:label="item.postSkillName" :value="item.postSkillName" />
+						</el-select> -->
+						<el-select v-model="selectedIndustryTags" multiple placeholder="请选择跨境标签" :collapse-tags="true"
+							:max-collapse-tags="5">
+							<el-option-group v-for="group in industryArrList" :key="group.postSkillName"
+								:label="group.postSkillName">
+								<el-option v-for="item in group.childrenList" :key="item.postSkillName"
+									:label="item.postSkillName" :value="item.postSkillName" />
+							</el-option-group>
 						</el-select>
 						<span style="margin-left: 10px;font-size: 13px;color: #999999;">
-							{{ selectedIndustryTags.length }}/20
+							{{ selectedIndustryTags.length }}
 						</span>
 						<el-button @click="addHangye" style="margin-left: 10px" type="primary">确定</el-button>
 					</div>
@@ -329,7 +337,7 @@
 					<div class="preference-children">
 						<div v-for="(child, cIndex) in parent.childrenList" :key="cIndex" class="preference-tag"
 							:class="{ active: selectedIndustryTags.includes(child.postSkillName) }"
-							@click="togglePreference(child.postSkillName)">
+							@click="togglePreference(pIndex,child.postSkillName)">
 							<span>{{ child.postSkillName }}</span>
 						</div>
 					</div>
@@ -482,35 +490,42 @@
 					}
 				});
 
-				// 清空当前选中
 				this.selectedIndustryTags = [];
 				this.customTags = [];
 
 				tagArray.forEach(tag => {
 					if (allSystemTags.includes(tag)) {
 						// 系统标签
-						if (
-							!this.selectedIndustryTags.includes(tag) &&
-							this.selectedIndustryTags.length < 20
-						) {
-							this.selectedIndustryTags.push(tag);
+						const parent = this.industryList.find(cat => cat.childrenList.some(item => item.postSkillName === tag));
+						if (parent) {
+							const selectedInCategory = parent.childrenList
+								.filter(item => item.postSkillName !== '不限' && this.selectedIndustryTags.includes(item.postSkillName));
+							if (!this.selectedIndustryTags.includes(tag) && selectedInCategory.length < 5) {
+								this.selectedIndustryTags.push(tag);
+							}
 						}
 					} else {
 						// 自定义标签
-						if (
-							this.customTags.length < 5 &&
-							this.customTags.length + this.selectedIndustryTags.length < 20
-						) {
+						if (this.customTags.length < 5) {
 							this.customTags.push(tag);
 						}
 					}
 				});
 			},
-			togglePreference(name) {
+			togglePreference(pIndex, name) {
+				const parent = this.industryList[pIndex];
+				// 当前分类已选标签(排除 '不限')
+				const selectedInCategory = parent.childrenList
+					.filter(item => item.postSkillName !== '不限' && this.selectedIndustryTags.includes(item.postSkillName));
 				const index = this.selectedIndustryTags.indexOf(name);
 				if (index === -1) {
-					if (this.selectedIndustryTags.length >= 20) {
-						this.$message.warning('最多选择20个跨境标签');
+					if (selectedInCategory.length >= 5) {
+						ElMessage({
+							message: '每个分类最多选择五个',
+							type: 'warning',
+							duration: 1500,
+							offset: this.screenHeight / 2
+						});
 						return;
 					}
 					this.selectedIndustryTags.push(name);
@@ -526,12 +541,11 @@
 				if (val) {
 					if (
 						this.customTags.length < 5 &&
-						this.customTags.length + this.selectedIndustryTags.length < 20 &&
 						!this.customTags.includes(val)
 					) {
 						this.customTags.push(val);
 					} else {
-						this.$message.warning('最多可添加5个自定义标签,总数不超过20个');
+						this.$message.warning('最多可添加5个自定义标签');
 					}
 				}
 				this.inputVisible = false;

+ 106 - 7
src/views/message/index.vue

@@ -71,28 +71,77 @@
 										</span>
 									</div>
 									<div v-if="item.messageType == 1" class="content-l-box-item-con-cons">
-										{{item.content}}
+										{{ item.content }}
+									</div>
+
+									<div v-else-if="item.messageType == 10" class="content-l-box-item-con-cons">
+										简历已发送
 									</div>
+
 									<div v-else-if="item.messageType == 18" class="content-l-box-item-con-cons">
 										位置
 									</div>
+
 									<div v-else-if="item.messageType == 9" class="content-l-box-item-con-cons">
 										简历请求
 									</div>
+
 									<div v-else-if="item.messageType == 6" class="content-l-box-item-con-cons">
 										微信请求
 									</div>
+
 									<div v-else-if="item.messageType == 5" class="content-l-box-item-con-cons">
 										手机号请求
 									</div>
+
+									<div v-else-if="item.messageType == 2" class="content-l-box-item-con-cons">
+										[图片]
+									</div>
+
+									<div v-else-if="item.messageType == 3" class="content-l-box-item-con-cons">
+										[语音]
+									</div>
+
+									<div v-else-if="item.messageType == 7" class="content-l-box-item-con-cons">
+										[交换手机]
+									</div>
+
+									<div v-else-if="item.messageType == 8" class="content-l-box-item-con-cons">
+										[交换微信]
+									</div>
+
+									<div v-else-if="item.messageType == 12" class="content-l-box-item-con-cons">
+										{{ item.content }}已拒绝
+									</div>
+
+									<div v-else-if="item.messageType == 4" class="content-l-box-item-con-cons">
+										<img v-if="item.content && item.messageType === 4" :src="emjSrc + item.content"
+											style="height: 20px; width: 20px;" alt="icon" />
+									</div>
+
+									<div v-else-if="item.messageType == 20" class="content-l-box-item-con-cons">
+										[视频通话]
+									</div>
+
+									<div v-else-if="item.messageType == 21" class="content-l-box-item-con-cons">
+										[语音通话]
+									</div>
+
 									<div v-else-if="item.messageType == 99" class="content-l-box-item-con-cons">
 										[面试邀约]
 									</div>
-									<div v-else-if="item.messageType == 96 || item.messageType == 97" class="content-l-box-item-con-cons">
+
+									<div v-else-if="item.messageType == 98" class="content-l-box-item-con-cons">
+										[{{ item.content }}]
+									</div>
+
+									<div v-else-if="item.messageType == 96 || item.messageType == 97"
+										class="content-l-box-item-con-cons">
 										[{{ item.content }}]
 									</div>
+
 									<div v-else class="content-l-box-item-con-cons">
-										[图片]
+										[其他消息类型]
 									</div>
 								</div>
 							</div>
@@ -214,7 +263,7 @@
 								<div class="message-boxs message-box-l flex flex-wrap" v-if="item.userId != userId">
 									<img class="message-boxs-avatar" :src="item.avatar?item.avatar:'/default.jpg'" @click="goToPageDetail"
 										alt="" />
-									<div class="message-box-l-con" v-if="item.messageType==1 || item.messageType==10">
+									<div class="message-box-l-con" v-if="item.messageType==1">
 										{{item.content}}
 									</div>
 									<div class="message-box-l-con flex align-center" v-if="item.messageType==20">
@@ -318,6 +367,15 @@
 										v-if="item.content && item.messageType === 9 && item.content!=='简历请求'">
 										{{item.content}}
 									</div>
+									<!-- 预览简历 -->
+									 <div class="message-box-l-con inv-style" v-if="item.content && item.messageType === 10">
+										<template v-if="userType == 1">{{ item.content }}</template>
+										<template v-else>
+											<view class="flex align-center" @click="previewResume(item.content)">
+												点击预览附件简历
+											</view>
+										</template>
+									 </div>
 									<!-- 面试邀约消息 -->
 									<div class="message-box-l-con inv-style" v-if="item.content && item.messageType === 99">您收到了{{ item.content }}</div>
 									<!-- 面试拒绝或同意 -->
@@ -330,7 +388,7 @@
 								<!-- 我发的消息 -->
 								<div class="message-boxs message-box-r flex flex-wrap" v-else>
 									<!-- 文字消息 -->
-									<div class="message-box-r-con" v-if="item.messageType==1 || item.messageType==10">
+									<div class="message-box-r-con" v-if="item.messageType==1">
 										{{item.content}}
 									</div>
 									<div class="message-box-r-con flex align-center" v-if="item.messageType==20">
@@ -399,6 +457,13 @@
 									<div class="message-box-r-con" v-if="item.messageType==12">
 										{{item.content}}已拒绝
 									</div>
+									<!-- 简历预览 -->
+									<div class="message-box-r-con invitation" v-if="item.content && item.messageType === 10">
+										<template v-if="userType == 1">
+											<view class="flex align-center" @click="previewResume(item.content)">点击预览附件简历</view>
+										</template>
+										<template v-else>{{ item.content }}</template>
+									</div>
 									<!-- 面试邀约消息 -->
 									<div class="message-box-r-con invitation" v-if="item.content && item.messageType === 99">您发送了{{ item.content }}</div>
 									<!-- 面试拒绝或同意 -->
@@ -411,8 +476,6 @@
 										style="width: 100%;color: #999999;font-size: 12px;padding-right: 50px;margin-top: 4px;text-align: right;">
 										{{getDateDiff(item.createTime)}}
 									</div>
-
-									
 								</div>
 							</div>
 						</div>
@@ -527,6 +590,17 @@
 				</span>
 			</template>
 		</el-dialog>
+		<!-- 简历预览弹窗 -->
+		<el-dialog v-model="showResumeDialog" title="简历预览" width="80%" top="5vh" :close-on-click-modal="false">
+			<!-- 文件预览 -->
+			<div class="preview-box">
+				<iframe :src="previewUrl" style="width:100%;height:80vh;border:none;"></iframe>
+			</div>
+			<template #footer>
+				<el-button @click="showResumeDialog = false">关闭</el-button>
+				<el-button type="primary" @click="downloadResume">下载简历</el-button>
+			</template>
+		</el-dialog>
 		<!-- 附件列表 -->
 		<AttachmentSelectDialog @closePostPush="closePostPush" @select="selectItem" v-if="showDialog" :showDialog="showDialog" />
 	</div>
@@ -551,6 +625,9 @@
 		components: { AttachmentSelectDialog },
 		data() {
 			return {
+				showResumeDialog:false,
+				previewUrl:'',
+				currentFileUrl:'',
 				isJobDescExpanded: false,
 				showDialog: false,
 				miamshi: {
@@ -675,6 +752,26 @@
 			}, 1000);
 		},
 		methods: {
+			previewResume(attachmentAddress){
+				const isFileLink = /^https?:\/\/.+\.(pdf|doc|docx|xls|xlsx)$/i.test(attachmentAddress);
+				if (!isFileLink) {
+					ElMessage({
+						message: '该简历无法预览',
+						type: 'warning',
+						duration: 1500,
+						offset: this.screenHeight / 2
+					})
+					return;
+				}
+				window.open(attachmentAddress, '_blank');
+				// this.showResumeDialog = true;
+				this.currentFileUrl = attachmentAddress;
+			},
+			// 下载简历
+			downloadResume() {
+				if (!this.currentFileUrl) return;
+				window.open(this.currentFileUrl, '_blank');
+			},
 			goToPageDetail(){
 				if (this.userType == 1) {
 					this.handleClick(this.postPushInfo.postPushId)
@@ -1898,6 +1995,7 @@
 				border-radius: 13px 13px 13px 0;
 				background-color: #F8F8F8;
 				color: #333333;
+				cursor: pointer;
 			}
 
 			.message-box-l-phone {
@@ -1926,6 +2024,7 @@
 				border-radius: 13px 13px 0 13px;
 				background: #00DD9A;
 				color: #FFFFFF;
+				cursor: pointer;
 			}
 			.invitation{
 				background: linear-gradient(rgb(217, 254, 237), rgb(255, 255, 255));

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

@@ -1814,7 +1814,7 @@ export default {
                 if (selectedInGroup.length >= 5) {
                     ElMessage({
                         message: '每个分类最多选择五个',
-                        type: 'info',
+                        type: 'warning',
                         duration: 1500,
                         offset: this.screenHeight / 2
                     });

+ 44 - 20
src/views/search/index.vue

@@ -377,14 +377,21 @@
 						选择跨境标签
 					</div>
 					<div class="my-header-title flex align-center" style="margin-left: 40px; width: 600px">
-						<el-select :collapse-tags="true" :max-collapse-tags="5"
+						<!-- <el-select :collapse-tags="true" :max-collapse-tags="5"
 							class="my-header-title-se" multiple-limit="20" v-model="selectedIndustryTags" multiple
 							placeholder="请选择跨境标签">
 							<el-option v-for="item in industryArrList" :key="item.postSkillName"
 								:label="item.postSkillName" :value="item.postSkillName" />
+						</el-select> -->
+						<el-select v-model="selectedIndustryTags" multiple placeholder="请选择跨境标签" :collapse-tags="true"
+							:max-collapse-tags="5">
+							<el-option-group v-for="group in industryArrList" :key="group.postSkillName" :label="group.postSkillName">
+								<el-option v-for="item in group.childrenList" :key="item.postSkillName" :label="item.postSkillName"
+									:value="item.postSkillName" />
+							</el-option-group>
 						</el-select>
 						<span style="margin-left: 10px;font-size: 13px;color: #999999;">
-							{{ selectedIndustryTags.length }}/20
+							{{ selectedIndustryTags.length }}
 						</span>
 						<el-button @click="addHangye" style="margin-left: 10px" type="primary">确定</el-button>
 					</div>
@@ -400,7 +407,7 @@
 					<div class="preference-children">
 						<div v-for="(child, cIndex) in parent.childrenList" :key="cIndex" class="preference-tag"
 							:class="{ active: selectedIndustryTags.includes(child.postSkillName) }"
-							@click="togglePreference(child.postSkillName)">
+							@click="togglePreference(pIndex,child.postSkillName)">
 							<span>{{ child.postSkillName }}</span>
 						</div>
 					</div>
@@ -423,6 +430,7 @@ import resumeTipsComp from '../../components/resumeTipsComp/resumeTipsComp.vue'
 import cityJs from '../../publicJs/city.js';
 import citySelect from '../../publicJs/citySelect.js';
 import citysData from '../../components/header/citys.json'
+import { ElMessage } from 'element-plus';
 export default {
 	components: {
 		VueQrcode,
@@ -556,18 +564,10 @@ export default {
 			this.handleTagDisplay(tagString);
 		},
 		handleTagDisplay(tagString) {
-			if (!tagString) return;
-
-			tagString = tagString.replace(/,/g, ',');
-
-			let tagArray = [];
-			if (tagString.includes('/')) {
-				tagArray = tagString.split('/').map(tag => tag.trim()).filter(tag => tag && tag !== '不限');
-			} else if (tagString.includes(',')) {
-				tagArray = tagString.split(',').map(tag => tag.trim()).filter(tag => tag && tag !== '不限');
-			} else {
-				tagArray = [tagString];
-			}
+			const tagArray = tagString
+				.split(',')
+				.map(tag => tag.trim())
+				.filter(tag => tag && tag !== '不限');
 
 			const allSystemTags = [];
 			this.industryList.forEach(category => {
@@ -577,19 +577,43 @@ export default {
 					});
 				}
 			});
+
 			this.selectedIndustryTags = [];
+			this.customTags = [];
 
 			tagArray.forEach(tag => {
-				if (allSystemTags.includes(tag) && !this.selectedIndustryTags.includes(tag)) {
-					this.selectedIndustryTags.push(tag);
+				if (allSystemTags.includes(tag)) {
+					// 系统标签
+					const parent = this.industryList.find(cat => cat.childrenList.some(item => item.postSkillName === tag));
+					if (parent) {
+						const selectedInCategory = parent.childrenList
+							.filter(item => item.postSkillName !== '不限' && this.selectedIndustryTags.includes(item.postSkillName));
+						if (!this.selectedIndustryTags.includes(tag) && selectedInCategory.length < 5) {
+							this.selectedIndustryTags.push(tag);
+						}
+					}
+				} else {
+					// 自定义标签
+					if (this.customTags.length < 5) {
+						this.customTags.push(tag);
+					}
 				}
 			});
 		},
-		togglePreference(name) {
+		togglePreference(pIndex, name) {
+			const parent = this.industryList[pIndex];
+			// 当前分类已选标签(排除 '不限')
+			const selectedInCategory = parent.childrenList
+				.filter(item => item.postSkillName !== '不限' && this.selectedIndustryTags.includes(item.postSkillName));
 			const index = this.selectedIndustryTags.indexOf(name);
 			if (index === -1) {
-				if (this.selectedIndustryTags.length >= 20) {
-					this.$message.warning('最多选择20个跨境标签');
+				if (selectedInCategory.length >= 5) {
+					ElMessage({
+						message: '每个分类最多选择五个',
+						type: 'warning',
+						duration: 1500,
+						offset: this.screenHeight / 2
+					});
 					return;
 				}
 				this.selectedIndustryTags.push(name);