-
-
-
+
+
+
{{ acceptDialog.phone }}
+
+
+
@@ -34,20 +124,91 @@ export default {
data() {
return {
zoomActive: true,// 布局状态
+
+ answerSts: false,// 接听状态
+ queryParam: {
+ phone: '',
+ name: '',
+ idCard: ''
+ },
+ tableData: [],
+ total:0,
}
},
mounted() {
+ this.initLoad()
},
methods: {
+ initLoad() {
+ let phoneNumber = this.acceptDialog.phone;
+ phoneNumber = phoneNumber.slice(4);
+ this.queryParam.phone = phoneNumber;
+ this.getCaseList();
+ },
toggleZoom() {
this.zoomActive = !this.zoomActive;
},
+
+ getCaseList() {
+ voiceCall.caseMatchList(this.queryParam).then(res => {
+ if (!res.code) {
+ this.tableData = res;
+ }
+ })
+ },
+ // 呼入接听
+ async handleAccept() {
+ try {
+ console.log({ sessionId: this.acceptDialog.sessionId }, '---主动接听')
+ await window.tccc.Call.accept({ sessionId: this.acceptDialog.sessionId })
+ this.answerSts = true;
+ } catch (error) {
+ console.error(`呼入接听:${error.message}`)
+ }
+ },
+ // 挂断
+ async handleHungUp() {
+ try {
+ console.log({ sessionId: this.acceptDialog.sessionId }, '---主动挂断')
+ await window.tccc.Call.hungUp({ sessionId: this.acceptDialog.sessionId })
+ this.$emit('update:acceptDialog', null)
+ } catch (error) {
+ console.error(`挂断:${error.message}`)
+ }
+ },
+ // 标记来电
+ async handleMarkers(item) {
+ try {
+ // voiceCall.caseMatchList(this.queryParam).then(res => {
+ // if (!res.code) {
+ // this.tableData = res;
+ // }
+ // })
+ } catch (error) {
+ console.error(`${error}`)
+ }
+ },
+ // 关联案件-详情
+ async handleRelevance(item) {
+ try {
+ voiceCall.caseMatch({caseId: item.caseId, sessionId: this.acceptDialog.sessionId}).then(res => {
+ this.$router.push(`/mediation-page?sourcePage=sourcePage&caseId=${item.caseId}`);
+ })
+ } catch (error) {
+ console.error(`${error}`)
+ }
+ }
}
}
\ No newline at end of file