|
|
@@ -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
|