Ver Fonte

修复求职状态bug

wkw há 6 meses atrás
pai
commit
4eeec7f6a1
2 ficheiros alterados com 31 adições e 6 exclusões
  1. 29 4
      src/views/interview/interview.vue
  2. 2 2
      src/views/resume/addResume.vue

+ 29 - 4
src/views/interview/interview.vue

@@ -95,8 +95,8 @@
 								</div>
 								<!-- 待接受 -->
 								<div class="content-l-item-top-rs" v-if="item.status == 1">
-									<el-button @click="coleInterView(item.recordId, 2)">拒绝</el-button>
-									<el-button @click="coleInterView(item.recordId, 1)" type="primary">接受</el-button>
+									<el-button @click="coleInterView(item.recordId, 2,item)">拒绝</el-button>
+									<el-button @click="coleInterView(item.recordId, 1,item)" type="primary">接受</el-button>
 								</div>
 								<!-- 已接受 -->
 								<div class="content-l-item-top-r activeColors" v-if="item.status == 2">
@@ -214,13 +214,15 @@
 					}],
 				tabIndex: 0,
 				screenHeight: 0, //屏幕高度
-				url:''
+				url:'',
+				webSco : null,//webscoket对象
 			}
 		},
 		mounted() {
 			this.tabIndex = this.$route.query.index || 0;
 			this.screenHeight = window.innerHeight
 			this.getJobList()
+			this.webSco = this.$socket.getSocket();
 		},
 		methods: {
 			goInfo(item) {
@@ -243,7 +245,7 @@
 				this.getJobList()
 			},
 			//拒绝面试邀请
-			coleInterView(recordId, type) {
+			coleInterView(recordId, type,item) {
 				ElMessageBox.alert(type == 2 ? '确认拒绝该面试邀请吗?' : '确定接受该面试邀请', '提示', {
 					confirmButtonText: '确认',
 					showCancelButton: true,
@@ -264,7 +266,13 @@
 										offset: this.screenHeight / 2
 									})
 									this.page == 1
+									if(type == 1){
+										this.sendMessage(97,'已接受面试邀请', item)
+									}else{
+										this.sendMessage(96,'已拒绝面试邀请', item)
+									}
 									this.getJobList()
+
 								} else {
 									ElMessage({
 										message: res.msg,
@@ -278,6 +286,23 @@
 					}
 				})
 			},
+			sendMessage(type, content, item) {
+				this.$Request.get("/app/chat/selectByTwoIds", { userId: item.interviewerId, focusedUserId: item.userId }).then((res) => {
+					if (res.code == 0){
+						let data = {
+							userId: item.interviewerId, //id
+							content: content, //消息内容
+							messageType: type, //消息类型
+							chatConversationId: res.data //聊天室id
+						}
+						//把要发送的消息转换为json字符串
+						data = JSON.stringify(data);
+						//如果scoket是连接状态,那么就直接发送消息
+						// 发送消息
+						this.webSco.send(data)
+					}
+				})
+			},
 			//切换状态
 			selectTabs(index) {
 				this.tabIndex = index

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

@@ -97,7 +97,7 @@
                                     </div>
                                     <!-- 求职状态 -->
                                     <div class="info-box-l-btm flex align-center justify-between">
-                                        <div class="info-box-l-status">{{resumesStatus?qiuzhiStatus[resumesStatus].label:'未填写求职状态'}}</div>
+                                        <div class="info-box-l-status">{{ qiuzhiStatus[resumesStatus].label }}</div>
 
                                         <div @click="hideFrom('userInfoEdit')"
                                             class="info-box-l-seid flex align-center">
@@ -2461,7 +2461,7 @@ export default {
 
                             // 更新性别选择的当前值
                             this.current = resumeData.resumesSex || 1;
-                            this.resumesStatus = resumeData.resumesStatus;
+                            this.resumesStatus = resumeData.resumesStatus || 0;
                             this.resumesId = resumeData.resumesId;
                         }