|
@@ -84,6 +84,8 @@ import {
|
|
|
invigilateExamFinish,
|
|
|
invigilationWarningMessage,
|
|
|
communicationList,
|
|
|
+ communicationCalling,
|
|
|
+ communicationOver,
|
|
|
} from "@/api/invigilation";
|
|
|
|
|
|
import { mapState, mapMutations, mapActions } from "vuex";
|
|
@@ -136,6 +138,7 @@ export default {
|
|
|
message: {},
|
|
|
voice: {},
|
|
|
talk: {},
|
|
|
+ "back-call": {},
|
|
|
},
|
|
|
/** 通话中 */
|
|
|
talking: {
|
|
@@ -237,15 +240,15 @@ export default {
|
|
|
},
|
|
|
|
|
|
onOperation({ type, data }) {
|
|
|
- if (type === "video") {
|
|
|
+ if (type === "video" || type === "back-call") {
|
|
|
this.operationStudent["talk"] = data;
|
|
|
- } else {
|
|
|
- this.operationStudent[type] = data;
|
|
|
}
|
|
|
+ this.operationStudent[type] = data;
|
|
|
const operationMap = {
|
|
|
message: this.toSendTextMsg,
|
|
|
voice: this.toSendAudioMsg,
|
|
|
talk: () => this.toTalk(),
|
|
|
+ "back-call": () => this.toTalk(),
|
|
|
video: () => this.toTalk(true),
|
|
|
};
|
|
|
this.$nextTick(() => {
|
|
@@ -289,11 +292,26 @@ export default {
|
|
|
|
|
|
/** 回拨 */
|
|
|
onBackCall(data) {
|
|
|
- this.onOperation({ type: "talk", data });
|
|
|
+ this.onOperation({ type: "back-call", data });
|
|
|
},
|
|
|
|
|
|
/** 通话中事件... */
|
|
|
onTalking({ examRecordId, talking }) {
|
|
|
+ if (this.operationStudent["back-call"]) {
|
|
|
+ /** 回拨类型 */
|
|
|
+ if (talking) {
|
|
|
+ communicationCalling({
|
|
|
+ recordId: this.operationStudent["back-call"].examRecordId,
|
|
|
+ source: this.operationStudent["back-call"].source,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ communicationOver({
|
|
|
+ recordId: this.operationStudent["back-call"].examRecordId,
|
|
|
+ source: this.operationStudent["back-call"].source,
|
|
|
+ });
|
|
|
+ this.operationStudent["back-call"] = {};
|
|
|
+ }
|
|
|
+ }
|
|
|
this.talking.examRecordId = talking ? examRecordId : "";
|
|
|
},
|
|
|
|