wkw 6 luni în urmă
părinte
comite
d10c778eae

+ 40 - 63
package/jobIntention/jobSkills.vue

@@ -14,7 +14,7 @@
 		<!-- 主要内容 -->
 		<view class="main-content">
 			<view class="job-title">{{ jobTitle }}-跨境标签</view>
-			<view class="description">根据你的偏好设置,为你推荐更匹配的职位,最多选择20个</view>
+			<view class="description">根据你的偏好设置,为你推荐更匹配的职位</view>
 
 			<!-- 运营方向 -->
 			<view class="skills-section" v-for="(it, ind) in operationOptions" :key="ind">
@@ -22,7 +22,7 @@
 				<view class="skills-grid">
 					<view v-for="(item, index) in it.childrenList" :key="index" class="skill-tag"
 						:class="{ active: selectedOperation.includes(item.postSkillName) }"
-						@click="toggleOperation(item.postSkillName)">
+						@click="toggleOperation(ind,item.postSkillName)">
 						<text>{{ item.postSkillName }}</text>
 					</view>
 				</view>
@@ -127,17 +127,7 @@
 				}
 				this.$Request.getT(action, data).then(res => {
 					if (res.code == 0) {
-						// if (this.jobId == '' || this.jobId == 0) {
-						// 	res.data.forEach(function(item) {
-						// 		item.postSkillName = item.skillName
-						// 	})
-						// 	this.operationOptions = [{
-						// 		childrenList: res.data,
-						// 		postSkillName: ''
-						// 	}]
-						// } else
-							this.operationOptions = res.data
-						
+						this.operationOptions = res.data
 						// 数据加载完成后处理标签回显
 						if (this.tagParam) {
 							this.handleTagDisplay(this.tagParam)
@@ -146,67 +136,60 @@
 				})
 			},
 			
-			// 处理标签回显(区分系统标签和自定义标签)
 			handleTagDisplay(tagString) {
 				const tagArray = tagString
 					.split(',')
 					.map(tag => tag.trim())
-					.filter(tag => tag && tag !== '不限')
-			
-				// 收集所有系统标签名称
-				const allSystemTags = []
+					.filter(tag => tag && tag !== '不限');
+		
+				// 清空当前选中的标签
+				this.selectedOperation = [];
+				this.customTags = [];
+		
+				// 回显系统标签
 				this.operationOptions.forEach(category => {
 					if (category.childrenList) {
 						category.childrenList.forEach(item => {
-							allSystemTags.push(item.postSkillName)
-						})
+							if (tagArray.includes(item.postSkillName)) {
+								this.selectedOperation.push(item.postSkillName);
+							}
+						});
 					}
-				})
-			
-				// 清空当前选中的标签
-				this.selectedOperation = []
-				this.customTags = []
-			
-				// 遍历传入的标签,区分系统标签和自定义标签
+				});
+		
+				// 回显自定义标签
 				tagArray.forEach(tag => {
-					// 检查是否是系统标签
-					if (allSystemTags.includes(tag)) {
-						// 系统标签
-						if (
-							!this.selectedOperation.includes(tag) &&
-							this.selectedOperation.length < 20
-						) {
-							this.selectedOperation.push(tag)
-						}
-					} else {
-						// 自定义标签
-						if (
-							this.customTags.length < 5 &&
-							this.customTags.length + this.selectedOperation.length < 20
-						) {
-							this.customTags.push(tag)
-						}
+					const isSystemTag = this.operationOptions.some(category =>
+						category.childrenList.some(item => item.postSkillName === tag)
+					);
+					if (!isSystemTag && this.customTags.length < 5) {
+						this.customTags.push(tag);
 					}
-				})
+				});
 			},
 			
-			toggleOperation(item) {
-				const index = this.selectedOperation.indexOf(item)
-				let realLength = this.customTags.filter(item => item !== '不限').length;
-				if (index > -1) {
-					this.selectedOperation.splice(index, 1)
-				} else {
-					if (this.selectedOperation.length + realLength < 20) {
-						this.selectedOperation.push(item)
-					} else {
+			toggleOperation(pIndex, name) {
+				const parent = this.operationOptions[pIndex];
+		
+				// 当前分类下已选中的标签(排除不限)
+				const selectedInGroup = parent.childrenList
+					.filter(item => item.postSkillName !== '不限' && this.selectedOperation.includes(item.postSkillName));
+		
+				const index = this.selectedOperation.indexOf(name);
+		
+				if (index === -1) {
+					if (selectedInGroup.length >= 5) {
 						uni.showToast({
-							title: '最多选择20个标签',
+							title: '每个分类最多选择5个标签',
 							icon: 'none'
-						})
+						});
+						return;
 					}
+					this.selectedOperation.push(name);
+				} else {
+					this.selectedOperation.splice(index, 1);
 				}
 			},
-
 			showAddTagModal() {
 				this.showAddTag = true
 				this.newTagName = ''
@@ -219,12 +202,6 @@
 				if (this.newTagName.trim()) {
 					let realLength = this.customTags.filter(item => item !== '不限').length;
 					if (realLength < 5) {
-						if (realLength + this.selectedOperation.length >= 20) {
-							return uni.showToast({
-								title: '最多选择20个标签',
-								icon: 'none'
-							})
-						}
 						this.customTags.push(this.newTagName.trim())
 						this.showAddTag = false
 						this.newTagName = ''

+ 60 - 8
pages/msg/im.vue

@@ -403,9 +403,16 @@
 								{{item.content}}
 							</view>
 						</view>
-						<view v-if="item.content && item.messageType === 10" class="chat-listitem-text"
+						<view v-if="item.content && item.messageType === 10" class="chat-listitem-text bg-style"
 							style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
-							{{item.content}}
+							<block v-if="userType == 1">{{item.content}}</block>
+							<block v-else>
+								<view class="flex align-center" @click="previewResume(item.content)">
+									<image src="../../static/im/orderInfo.png"
+										style="width: 60rpx;height: 60rpx;margin-right: 10rpx;" mode=""></image>
+									点击预览附件简历
+								</view>
+							</block>
 						</view>
 						<view v-if="item.content && item.messageType === 12" class="chat-listitem-text"
 							style="margin-left: 20rpx;color: #000000;background-color: #ffffff;">
@@ -524,9 +531,16 @@
 							style="margin-right: 20rpx;">
 							简历请求已发送,等待对方同意
 						</view>
-						<view v-if="item.content && item.messageType === 10" class="chat-listitem-text textColor"
+						<view v-if="item.content && item.messageType === 10" class="chat-listitem-text textColor bg-style"
 							style="margin-right: 20rpx;">
-							{{item.content}}
+							<block v-if="userType == 1">
+								<view class="flex align-center" @click="previewResume(item.content)">
+									<image src="../../static/im/orderInfo.png"
+										style="width: 60rpx;height: 60rpx;margin-right: 10rpx;" mode=""></image>
+									点击预览附件简历
+								</view>
+							</block>
+							<block v-else>{{item.content}}</block>
 						</view>
 						<view v-if="item.content && item.messageType === 12" class="chat-listitem-text textColor"
 							style="margin-right: 20rpx;">
@@ -923,6 +937,7 @@
 				</view>
 			</view>
 		</u-popup>
+		<!-- 简历弹框 -->
 		<u-popup v-model="attachmentShow" z-index="99999" mode="bottom" border-radius="14" height="auto" :closeable="true">
 			<attachment @select="selectAttachment" :content="attachmentContent"></attachment>
 		</u-popup>
@@ -1248,6 +1263,37 @@
 			// this.recordsInter = null
 		},
 		methods: {
+			// 预览简历
+			previewResume(attachmentAddress){
+				const isFileLink = /^https?:\/\/.+\.(pdf|doc|docx|xls|xlsx)$/i.test(attachmentAddress);
+				if (!isFileLink) {
+					uni.showModal({
+					  title: "提示",
+					  content: "该简历无法预览",
+					  showCancel: false,
+					});
+					return;
+				}
+				//#ifdef APP-PLUS
+				uni.downloadFile({
+					url: attachmentAddress,
+					success: function (res) {
+						var filePath = res.tempFilePath;
+						uni.openDocument({
+							filePath: filePath,
+							showMenu: true,
+							success: function (res) {
+								console.log('打开文档成功');
+							}
+						});
+					}
+				});
+				return;
+				//#endif
+				uni.navigateTo({
+					url: '/pages/index/webView?url=' + attachmentAddress + '&title=' + ''
+				});
+			},
 			goToInterviewDetail(item){
 				if(item.recordId){
 					uni.navigateTo({
@@ -1794,7 +1840,6 @@
 				})
 			},
 			selectAttachment(item){
-				//console.log(item)
 				this.attachmentShow=false
 				let that = this
 				let data = {
@@ -1807,7 +1852,7 @@
 						uni.showToast({
 							title: '简历已发送',
 						})
-						that.setChatSave(24)
+						that.setChatSave(24,item.attachmentAddress,'jl')
 						that.getTimeOrListItem1()
 						that.getStatusInfo()
 					} else {
@@ -2690,7 +2735,7 @@
 						uni.hideLoading();
 					});
 			},
-			setChatSave(type, url) {
+			setChatSave(type, url,val) {
 				//type:1文字 2图片
 				if (type === 1 && this.content == '') {
 					this.$queue.showToast('请输入聊天内容');
@@ -2751,13 +2796,20 @@
 						messageType: type,
 						chatConversationId: this.chatConversationId
 					}
-				} else if (type == 24) {
+				} else if (type == 24 && !val) {
 					data = {
 						userId: this.byUserId,
 						content: '刷新',
 						messageType: type,
 						chatConversationId: this.chatConversationId
 					}
+				} else if (type == 24 && val) {
+					data = {
+						userId: this.byUserId,
+						content: url,
+						messageType: type,
+						chatConversationId: this.chatConversationId
+					}
 				} else if (type == 96){
 					data = {
 						userId: this.byUserId,

+ 2 - 1
pages/msg/index.vue

@@ -81,7 +81,8 @@
 							{{item.messageTime?getMonthOrDay(item.messageTime):''}}</view>
 						</view>
 						<view class="flex justify-between" style="margin-top: 10rpx;">
-							<view class="text-grey" v-if="item.messageType == 1||item.messageType == 10">{{item.content}}</view>
+							<view class="text-grey" v-if="item.messageType == 1">{{item.content}}</view>
+							<view class="text-grey" v-else-if="item.messageType == 10">简历已发送</view>
 							<view class="text-grey" v-else-if="item.messageType == 18">位置</view>
 							<view class="text-grey" v-else-if="item.messageType == 9">简历请求</view>
 							<view class="text-grey" v-else-if="item.messageType == 6">微信请求</view>

+ 5 - 6
pages/msg/interviewInvitation.vue

@@ -257,12 +257,6 @@
 				this.recordId = option.recordId
 					console.log("接收到的参数resumesId:",option.resumesId)
 			}
-			let stationNameInfo = this.$queue.getJson('companyAddressInfo') || [];
-			this.selectedAddress = this.$queue.getData('companyAddress')
-			this.detailedAddress = stationNameInfo.addressDetail
-			this.address = stationNameInfo.address
-			this.latitude=stationNameInfo.latitude
-			this.longitude=stationNameInfo.longitude
 			this.PostPushDetails()
 			this.getCurrentDateTime()
 			this.selectHrPhone()
@@ -302,6 +296,11 @@
 						if(this.recordId!=''){
 							this.getData()
 						}
+						this.selectedAddress = res.data.address
+						this.address = res.data.address?res.data.address.split(' ')[0] : '';
+						this.detailedAddress = res.data.address?res.data.address.split(' ')[1] : '';
+						this.latitude=res.data.lat || ''
+						this.longitude=res.data.lng || ''
 						console.log(this.jobList)
 					} else {
 						uni.hideLoading()

+ 47 - 4
pages/my/jobPosting.vue

@@ -96,7 +96,16 @@ export default {
 				price: ''
 			},
 			lastDueTimes:0,
-			lastPostTimes:0
+			lastPostTimes:0,
+			companyAddressInfo:{
+				address:'',
+				fullText:'',
+				latitude:'',
+				longitude:'',
+				province:'',
+				city:'',
+				district:'',
+			}
 		};
 	},
 	components: {
@@ -151,12 +160,39 @@ export default {
 		console.log("收到岗位描述数据:", this.text);
 		console.log('接收的公司ID:', this.companyId);
 		console.log('接收的公司状态:', this.status);
+		this.getAddress();
 	},
 	onUnload() {
 		// 页面卸载时移除监听,避免内存泄漏
 		uni.$off('jobs', this.onJobEvent);
 	},
 	methods: {
+		// 获取公司地址
+		getAddress(){
+			let data = {
+			  status: '',
+			  page: 1,
+			  limit: 10,
+			  companyId: this.companyId
+			}
+			this.$Request.getT('/app/postPush/getMyPostPush', data).then(res => {
+				if (res.code == 0) {
+					if(res.data && res.data.records.length > 0){
+						this.companyAddressInfo = {
+							address:res.data.records[0].address,
+							fullText:res.data.records[0].address,
+							latitude:res.data.records[0].lat,
+							longitude:res.data.records[0].lng,
+							province:res.data.records[0].province,
+							city:res.data.records[0].city,
+							district:res.data.records[0].county
+						}
+					}
+				}
+			}).catch(err => {
+			  
+			})
+		},
 		getVipData(){
 			this.$Request.get("/app/user/vipData").then((res) => {
 				this.lastDueTimes = res.data.lastDueTimes || 0;
@@ -353,9 +389,16 @@ export default {
 			}
 			console.log(this.postPushId)
 			uni.navigateTo({
-				url: "/pages/my/jobPostingSecond?pid=" + this.postPushId + '&companyId=' +
-					this.companyId + "&status=" + this
-						.status + "&companyName=" + this.companyName + '&type=' + this.update + '&workData=' + encodeURIComponent(JSON.stringify(this.jobInfo)) + '&isBack=' + true + '&ruleClassifyId=' + this.jobInfo.ruleClassifyId + '&dataInfo=' + JSON.stringify(data)
+				url: "/pages/my/jobPostingSecond?pid=" + this.postPushId 
+				+ '&companyId=' + this.companyId 
+				+ "&status=" + this.status 
+				+ "&companyName=" + this.companyName 
+				+ '&type=' + this.update 
+				+ '&workData=' + encodeURIComponent(JSON.stringify(this.jobInfo)) 
+				+ '&isBack=' + true 
+				+ '&ruleClassifyId=' + this.jobInfo.ruleClassifyId 
+				+ '&dataInfo=' + JSON.stringify(data) 
+				+ '&companyAddressInfo=' + encodeURIComponent(JSON.stringify(this.companyAddressInfo)) 
 			});
 
 			// 发送请求

+ 14 - 19
pages/my/jobPostingSecond.vue

@@ -236,14 +236,14 @@ export default {
 			],
 			type: '',
 			ruleClassifyId:'',//岗位id
-			dataInfo:{}
+			dataInfo:{},
+			companyAddressInfo:{}
 		};
 	},
 	components: {
 		navBar,
 	},
 	onLoad(options) {
-		let stationNameInfo = this.$queue.getJson('companyAddressInfo') || [];
 		console.log(options)
 		if(options.dataInfo){
 			this.dataInfo = JSON.parse(options.dataInfo)
@@ -267,6 +267,9 @@ export default {
 			//this.status = uni.getStorageSync('companyStatus')
 			this.getcompanystatus()
 		}
+		if(options.companyAddressInfo){
+			this.companyAddressInfo = JSON.parse(decodeURIComponent(options.companyAddressInfo));
+		}
 		if (options.workData) {
 			let workData = JSON.parse(decodeURIComponent(options.workData));
 			this.selectedExper = workData.experience;
@@ -275,13 +278,13 @@ export default {
 			this.salaryTimes = workData.salaryTimes || '';
 			this.welfareTag = workData.welfareTag || '';
 			this.positionTag = workData.positionTag ? workData.positionTag.split (',') : [];
-			this.address = workData.address || this.$queue.getData('companyAddress');
-			this.stationName.fullText = workData.address || this.$queue.getData('companyAddress'), //地址
-			this.stationName.latitude = workData.lat || stationNameInfo.latitude
-			this.stationName.longitude = workData.lng || stationNameInfo.longitude
-			this.stationName.province = workData.province || stationNameInfo.province
-			this.stationName.city = workData.city || stationNameInfo.city
-			this.stationName.district = workData.county || stationNameInfo.district
+			this.address = workData.address || this.companyAddressInfo.address;
+			this.stationName.fullText = workData.address || this.companyAddressInfo.fullText, //地址
+			this.stationName.latitude = workData.lat || this.companyAddressInfo.latitude
+			this.stationName.longitude = workData.lng || this.companyAddressInfo.longitude
+			this.stationName.province = workData.province || this.companyAddressInfo.province
+			this.stationName.city = workData.city || this.companyAddressInfo.city
+			this.stationName.district = workData.county || this.companyAddressInfo.district
 			this.jobTitle = workData.ruleClassifyName
 			console.log(11111,this.$queue.getData('companyAddress'))
 			console.log(this.address)
@@ -298,9 +301,6 @@ export default {
 			this.address = data.fullText;
 			this.stationName = data;
 			this.stationName.fullText = data.fullText;
-			this.$queue.setData('companyAddress', data.fullText);
-			this.$queue.setJson('companyAddressInfo', data);
-			
 		});
 		if (options.companyId) {
 			this.companyId = options.companyId;
@@ -320,12 +320,7 @@ export default {
 				this.getInfo()
 			}
 			console.log('接收PID:', this.pid);
-		} else {
-			// uni.navigateTo({
-			// 	url: '/pages/my/jobPosting?companyId=' + this.companyId + '&status=' + this.status +
-			// 		'&companyName=' + this.companyName
-			// })
-		}
+		} 
 
 	},
 	onUnload() {
@@ -454,7 +449,7 @@ export default {
 		// 跳转页面并接收参数(职位关键词)
 		goJobSkill() {
 			uni.navigateTo({
-				url: "/package/jobIntention/jobSkills?tag=" + this.positionTag + '&jobTitle=' + this.jobTitle + '&ruleClassifyId=' + this.ruleClassifyId,
+				url: "/package/jobIntention/jobSkills?tag=" + encodeURIComponent(this.positionTag) + '&jobTitle=' + this.jobTitle + '&ruleClassifyId=' + this.ruleClassifyId,
 				events: {
 					skillsUpdated: (data) => {
 						this.positionTag = data.selectedTags;