diff --git a/src/api/cti.js b/src/api/cti.js index a1e60b8..790c156 100644 --- a/src/api/cti.js +++ b/src/api/cti.js @@ -8,10 +8,10 @@ // root:[{"Call_pbxName":"spzc_pbx","Call_city":"","Call_isp":"中国联通","Call_number":"18513995803","Call_province":"北京","Call_callStatus":"接通","Call_id":"b7c32570-8acd-11ea-96b3-89e56eb1026b","Call_staySeconds":"8","Call_talkSeconds":"4","Call_ivrName":"座席组--客服","Call_agentName":"888","Call_otherLegNumber":"6001","Call_agentStaffid":"1","Call_sp_entityName":"Call"}]} export function getCurrentCalls(params) { return request({ - url: '/sound/list', - // url: '/server/invoke', - method: 'get', - params: { + // url: '/sound/list', + url: '/server/invoke', + method: 'post', + data: { method: '/spcc/interface/json/calls.do.do', type: 'get', params: { diff --git a/src/api/cti.js b/src/api/cti.js index a1e60b8..790c156 100644 --- a/src/api/cti.js +++ b/src/api/cti.js @@ -8,10 +8,10 @@ // root:[{"Call_pbxName":"spzc_pbx","Call_city":"","Call_isp":"中国联通","Call_number":"18513995803","Call_province":"北京","Call_callStatus":"接通","Call_id":"b7c32570-8acd-11ea-96b3-89e56eb1026b","Call_staySeconds":"8","Call_talkSeconds":"4","Call_ivrName":"座席组--客服","Call_agentName":"888","Call_otherLegNumber":"6001","Call_agentStaffid":"1","Call_sp_entityName":"Call"}]} export function getCurrentCalls(params) { return request({ - url: '/sound/list', - // url: '/server/invoke', - method: 'get', - params: { + // url: '/sound/list', + url: '/server/invoke', + method: 'post', + data: { method: '/spcc/interface/json/calls.do.do', type: 'get', params: { diff --git a/src/api/statistics.js b/src/api/statistics.js index 4877667..2f8bab9 100644 --- a/src/api/statistics.js +++ b/src/api/statistics.js @@ -63,9 +63,51 @@ // 坐席效能统计 export function seatStatistics(params) { return request({ - url: '/urge/departmentEffectiveStatistics', - // url: '/urge/seatEffectiveStatistics', + // url: '/urge/departmentEffectiveStatistics', + url: '/urge/seatEffectiveStatistics', method: 'get', params }) } +// 签出置忙统计 +export function outBusyStatistics(params) { + return request({ + url: '/callStatics/outBusyStatistics', + method: 'get', + params + }) +} +// 呼入呼出统计 +export function callInOutStatistics(params) { + return request({ + url: '/callStatics/callInOutStatistics', + method: 'get', + params + }) +} +// 呼叫满意度统计 +export function callSatisfiedStatistics(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + method: 'get', + params + }) +} +// 接通率统计 +export function callSuccessStatistics(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + // url: '/callStatics/callByHour', + method: 'get', + params + }) +} +// 按小时统计话务量统计 +export function callStatisticsByHour(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + method: 'get', + params + }) +} + diff --git a/src/api/cti.js b/src/api/cti.js index a1e60b8..790c156 100644 --- a/src/api/cti.js +++ b/src/api/cti.js @@ -8,10 +8,10 @@ // root:[{"Call_pbxName":"spzc_pbx","Call_city":"","Call_isp":"中国联通","Call_number":"18513995803","Call_province":"北京","Call_callStatus":"接通","Call_id":"b7c32570-8acd-11ea-96b3-89e56eb1026b","Call_staySeconds":"8","Call_talkSeconds":"4","Call_ivrName":"座席组--客服","Call_agentName":"888","Call_otherLegNumber":"6001","Call_agentStaffid":"1","Call_sp_entityName":"Call"}]} export function getCurrentCalls(params) { return request({ - url: '/sound/list', - // url: '/server/invoke', - method: 'get', - params: { + // url: '/sound/list', + url: '/server/invoke', + method: 'post', + data: { method: '/spcc/interface/json/calls.do.do', type: 'get', params: { diff --git a/src/api/statistics.js b/src/api/statistics.js index 4877667..2f8bab9 100644 --- a/src/api/statistics.js +++ b/src/api/statistics.js @@ -63,9 +63,51 @@ // 坐席效能统计 export function seatStatistics(params) { return request({ - url: '/urge/departmentEffectiveStatistics', - // url: '/urge/seatEffectiveStatistics', + // url: '/urge/departmentEffectiveStatistics', + url: '/urge/seatEffectiveStatistics', method: 'get', params }) } +// 签出置忙统计 +export function outBusyStatistics(params) { + return request({ + url: '/callStatics/outBusyStatistics', + method: 'get', + params + }) +} +// 呼入呼出统计 +export function callInOutStatistics(params) { + return request({ + url: '/callStatics/callInOutStatistics', + method: 'get', + params + }) +} +// 呼叫满意度统计 +export function callSatisfiedStatistics(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + method: 'get', + params + }) +} +// 接通率统计 +export function callSuccessStatistics(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + // url: '/callStatics/callByHour', + method: 'get', + params + }) +} +// 按小时统计话务量统计 +export function callStatisticsByHour(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + method: 'get', + params + }) +} + diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue index f006096..37f4eae 100644 --- a/src/views/monitor/realtimeMonitor/components/callLine.vue +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -11,23 +11,20 @@ diff --git a/src/api/cti.js b/src/api/cti.js index a1e60b8..790c156 100644 --- a/src/api/cti.js +++ b/src/api/cti.js @@ -8,10 +8,10 @@ // root:[{"Call_pbxName":"spzc_pbx","Call_city":"","Call_isp":"中国联通","Call_number":"18513995803","Call_province":"北京","Call_callStatus":"接通","Call_id":"b7c32570-8acd-11ea-96b3-89e56eb1026b","Call_staySeconds":"8","Call_talkSeconds":"4","Call_ivrName":"座席组--客服","Call_agentName":"888","Call_otherLegNumber":"6001","Call_agentStaffid":"1","Call_sp_entityName":"Call"}]} export function getCurrentCalls(params) { return request({ - url: '/sound/list', - // url: '/server/invoke', - method: 'get', - params: { + // url: '/sound/list', + url: '/server/invoke', + method: 'post', + data: { method: '/spcc/interface/json/calls.do.do', type: 'get', params: { diff --git a/src/api/statistics.js b/src/api/statistics.js index 4877667..2f8bab9 100644 --- a/src/api/statistics.js +++ b/src/api/statistics.js @@ -63,9 +63,51 @@ // 坐席效能统计 export function seatStatistics(params) { return request({ - url: '/urge/departmentEffectiveStatistics', - // url: '/urge/seatEffectiveStatistics', + // url: '/urge/departmentEffectiveStatistics', + url: '/urge/seatEffectiveStatistics', method: 'get', params }) } +// 签出置忙统计 +export function outBusyStatistics(params) { + return request({ + url: '/callStatics/outBusyStatistics', + method: 'get', + params + }) +} +// 呼入呼出统计 +export function callInOutStatistics(params) { + return request({ + url: '/callStatics/callInOutStatistics', + method: 'get', + params + }) +} +// 呼叫满意度统计 +export function callSatisfiedStatistics(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + method: 'get', + params + }) +} +// 接通率统计 +export function callSuccessStatistics(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + // url: '/callStatics/callByHour', + method: 'get', + params + }) +} +// 按小时统计话务量统计 +export function callStatisticsByHour(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + method: 'get', + params + }) +} + diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue index f006096..37f4eae 100644 --- a/src/views/monitor/realtimeMonitor/components/callLine.vue +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -11,23 +11,20 @@ diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue index 32879cc..60239de 100644 --- a/src/views/monitor/realtimeMonitor/components/waitStatics.vue +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -6,7 +6,7 @@ - @@ -44,39 +43,75 @@ diff --git a/src/api/cti.js b/src/api/cti.js index a1e60b8..790c156 100644 --- a/src/api/cti.js +++ b/src/api/cti.js @@ -8,10 +8,10 @@ // root:[{"Call_pbxName":"spzc_pbx","Call_city":"","Call_isp":"中国联通","Call_number":"18513995803","Call_province":"北京","Call_callStatus":"接通","Call_id":"b7c32570-8acd-11ea-96b3-89e56eb1026b","Call_staySeconds":"8","Call_talkSeconds":"4","Call_ivrName":"座席组--客服","Call_agentName":"888","Call_otherLegNumber":"6001","Call_agentStaffid":"1","Call_sp_entityName":"Call"}]} export function getCurrentCalls(params) { return request({ - url: '/sound/list', - // url: '/server/invoke', - method: 'get', - params: { + // url: '/sound/list', + url: '/server/invoke', + method: 'post', + data: { method: '/spcc/interface/json/calls.do.do', type: 'get', params: { diff --git a/src/api/statistics.js b/src/api/statistics.js index 4877667..2f8bab9 100644 --- a/src/api/statistics.js +++ b/src/api/statistics.js @@ -63,9 +63,51 @@ // 坐席效能统计 export function seatStatistics(params) { return request({ - url: '/urge/departmentEffectiveStatistics', - // url: '/urge/seatEffectiveStatistics', + // url: '/urge/departmentEffectiveStatistics', + url: '/urge/seatEffectiveStatistics', method: 'get', params }) } +// 签出置忙统计 +export function outBusyStatistics(params) { + return request({ + url: '/callStatics/outBusyStatistics', + method: 'get', + params + }) +} +// 呼入呼出统计 +export function callInOutStatistics(params) { + return request({ + url: '/callStatics/callInOutStatistics', + method: 'get', + params + }) +} +// 呼叫满意度统计 +export function callSatisfiedStatistics(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + method: 'get', + params + }) +} +// 接通率统计 +export function callSuccessStatistics(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + // url: '/callStatics/callByHour', + method: 'get', + params + }) +} +// 按小时统计话务量统计 +export function callStatisticsByHour(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + method: 'get', + params + }) +} + diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue index f006096..37f4eae 100644 --- a/src/views/monitor/realtimeMonitor/components/callLine.vue +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -11,23 +11,20 @@ diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue index 32879cc..60239de 100644 --- a/src/views/monitor/realtimeMonitor/components/waitStatics.vue +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -6,7 +6,7 @@ - @@ -44,39 +43,75 @@ diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue index 768deae..864f275 100644 --- a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -2,18 +2,18 @@ diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue index 768deae..864f275 100644 --- a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -2,18 +2,18 @@ diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue index 768deae..864f275 100644 --- a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -2,18 +2,18 @@ @@ -41,7 +41,7 @@ }, computed: { canJudge() { // 判断是否可以进行质检,通话中的可以进行实时质检 - if (this.seatForm.state && this.seatForm.state.includes('通话')) { + if (this.seatForm.callid) { return false } else { return true diff --git a/src/api/cti.js b/src/api/cti.js index a1e60b8..790c156 100644 --- a/src/api/cti.js +++ b/src/api/cti.js @@ -8,10 +8,10 @@ // root:[{"Call_pbxName":"spzc_pbx","Call_city":"","Call_isp":"中国联通","Call_number":"18513995803","Call_province":"北京","Call_callStatus":"接通","Call_id":"b7c32570-8acd-11ea-96b3-89e56eb1026b","Call_staySeconds":"8","Call_talkSeconds":"4","Call_ivrName":"座席组--客服","Call_agentName":"888","Call_otherLegNumber":"6001","Call_agentStaffid":"1","Call_sp_entityName":"Call"}]} export function getCurrentCalls(params) { return request({ - url: '/sound/list', - // url: '/server/invoke', - method: 'get', - params: { + // url: '/sound/list', + url: '/server/invoke', + method: 'post', + data: { method: '/spcc/interface/json/calls.do.do', type: 'get', params: { diff --git a/src/api/statistics.js b/src/api/statistics.js index 4877667..2f8bab9 100644 --- a/src/api/statistics.js +++ b/src/api/statistics.js @@ -63,9 +63,51 @@ // 坐席效能统计 export function seatStatistics(params) { return request({ - url: '/urge/departmentEffectiveStatistics', - // url: '/urge/seatEffectiveStatistics', + // url: '/urge/departmentEffectiveStatistics', + url: '/urge/seatEffectiveStatistics', method: 'get', params }) } +// 签出置忙统计 +export function outBusyStatistics(params) { + return request({ + url: '/callStatics/outBusyStatistics', + method: 'get', + params + }) +} +// 呼入呼出统计 +export function callInOutStatistics(params) { + return request({ + url: '/callStatics/callInOutStatistics', + method: 'get', + params + }) +} +// 呼叫满意度统计 +export function callSatisfiedStatistics(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + method: 'get', + params + }) +} +// 接通率统计 +export function callSuccessStatistics(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + // url: '/callStatics/callByHour', + method: 'get', + params + }) +} +// 按小时统计话务量统计 +export function callStatisticsByHour(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + method: 'get', + params + }) +} + diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue index f006096..37f4eae 100644 --- a/src/views/monitor/realtimeMonitor/components/callLine.vue +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -11,23 +11,20 @@ diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue index 32879cc..60239de 100644 --- a/src/views/monitor/realtimeMonitor/components/waitStatics.vue +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -6,7 +6,7 @@ - @@ -44,39 +43,75 @@ diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue index 768deae..864f275 100644 --- a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -2,18 +2,18 @@ @@ -41,7 +41,7 @@ }, computed: { canJudge() { // 判断是否可以进行质检,通话中的可以进行实时质检 - if (this.seatForm.state && this.seatForm.state.includes('通话')) { + if (this.seatForm.callid) { return false } else { return true diff --git a/src/views/monitor/seatMonitor/seatMonitor.vue b/src/views/monitor/seatMonitor/seatMonitor.vue index eac078a..3857336 100644 --- a/src/views/monitor/seatMonitor/seatMonitor.vue +++ b/src/views/monitor/seatMonitor/seatMonitor.vue @@ -3,7 +3,7 @@ - + @@ -152,6 +152,8 @@ }, // 根据坐席号获取当前用户详情 fetchUserDetail(loginId, name, exten, state) { + console.log('fetchUserDetail') + console.log(loginId) if (loginId) { for (const user of this.userList) { if (user.id === loginId) { @@ -160,14 +162,14 @@ this.currentUser.phone = user.phone this.currentUser.exten = exten this.currentUser.state = state + // 测试数据 + // this.currentUser.callid = 'test' + // this.currentUser.callerNumber = 'test' + // this.currentUser.calleeNumber = 'test' if (state.includes('通话')) { - const res = this.fetchCurrentCalls(loginId) - if (res) { - this.currentUser.callerNumber = res.callerNumber - this.currentUser.calleeNumber = res.calleeNumber - this.currentUser.callid = res.callid - } + this.fetchCurrentCalls(loginId) } + break } } } else { @@ -186,21 +188,16 @@ // 获取当前正在通话列表 fetchCurrentCalls(loginId) { getCurrentCalls().then(response => { - console.log(response) - response = { - root: [{ 'Call_pbxName': 'spzc_pbx', 'Call_city': '', 'Call_isp': '中国联通', 'Call_number': '18513995803', 'Call_province': '北京', 'Call_callStatus': '接通', 'Call_id': 'b7c32570-8acd-11ea-96b3-89e56eb1026b', 'Call_staySeconds': '8', 'Call_talkSeconds': '4', 'Call_ivrName': '座席组--客服', 'Call_agentName': '888', 'Call_otherLegNumber': '6001', 'Call_agentStaffid': '1', 'Call_sp_entityName': 'Call' }] - } - this.callList = response.root + console.log(response.data) + this.callList = response.data.root for (const call of this.callList) { if (call.Call_agentStaffid === loginId) { - return { - callerNumber: call.Call_number, - calleeNumber: call.Call_otherLegNumber, - callid: call.Call_id - } + console.log('find') + this.currentUser.callerNumber = call.Call_number + this.currentUser.calleeNumber = call.Call_number + this.currentUser.callid = call.Call_id } } - return null }) } } diff --git a/src/api/cti.js b/src/api/cti.js index a1e60b8..790c156 100644 --- a/src/api/cti.js +++ b/src/api/cti.js @@ -8,10 +8,10 @@ // root:[{"Call_pbxName":"spzc_pbx","Call_city":"","Call_isp":"中国联通","Call_number":"18513995803","Call_province":"北京","Call_callStatus":"接通","Call_id":"b7c32570-8acd-11ea-96b3-89e56eb1026b","Call_staySeconds":"8","Call_talkSeconds":"4","Call_ivrName":"座席组--客服","Call_agentName":"888","Call_otherLegNumber":"6001","Call_agentStaffid":"1","Call_sp_entityName":"Call"}]} export function getCurrentCalls(params) { return request({ - url: '/sound/list', - // url: '/server/invoke', - method: 'get', - params: { + // url: '/sound/list', + url: '/server/invoke', + method: 'post', + data: { method: '/spcc/interface/json/calls.do.do', type: 'get', params: { diff --git a/src/api/statistics.js b/src/api/statistics.js index 4877667..2f8bab9 100644 --- a/src/api/statistics.js +++ b/src/api/statistics.js @@ -63,9 +63,51 @@ // 坐席效能统计 export function seatStatistics(params) { return request({ - url: '/urge/departmentEffectiveStatistics', - // url: '/urge/seatEffectiveStatistics', + // url: '/urge/departmentEffectiveStatistics', + url: '/urge/seatEffectiveStatistics', method: 'get', params }) } +// 签出置忙统计 +export function outBusyStatistics(params) { + return request({ + url: '/callStatics/outBusyStatistics', + method: 'get', + params + }) +} +// 呼入呼出统计 +export function callInOutStatistics(params) { + return request({ + url: '/callStatics/callInOutStatistics', + method: 'get', + params + }) +} +// 呼叫满意度统计 +export function callSatisfiedStatistics(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + method: 'get', + params + }) +} +// 接通率统计 +export function callSuccessStatistics(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + // url: '/callStatics/callByHour', + method: 'get', + params + }) +} +// 按小时统计话务量统计 +export function callStatisticsByHour(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + method: 'get', + params + }) +} + diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue index f006096..37f4eae 100644 --- a/src/views/monitor/realtimeMonitor/components/callLine.vue +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -11,23 +11,20 @@ diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue index 32879cc..60239de 100644 --- a/src/views/monitor/realtimeMonitor/components/waitStatics.vue +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -6,7 +6,7 @@ - @@ -44,39 +43,75 @@ diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue index 768deae..864f275 100644 --- a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -2,18 +2,18 @@ @@ -41,7 +41,7 @@ }, computed: { canJudge() { // 判断是否可以进行质检,通话中的可以进行实时质检 - if (this.seatForm.state && this.seatForm.state.includes('通话')) { + if (this.seatForm.callid) { return false } else { return true diff --git a/src/views/monitor/seatMonitor/seatMonitor.vue b/src/views/monitor/seatMonitor/seatMonitor.vue index eac078a..3857336 100644 --- a/src/views/monitor/seatMonitor/seatMonitor.vue +++ b/src/views/monitor/seatMonitor/seatMonitor.vue @@ -3,7 +3,7 @@ - + @@ -152,6 +152,8 @@ }, // 根据坐席号获取当前用户详情 fetchUserDetail(loginId, name, exten, state) { + console.log('fetchUserDetail') + console.log(loginId) if (loginId) { for (const user of this.userList) { if (user.id === loginId) { @@ -160,14 +162,14 @@ this.currentUser.phone = user.phone this.currentUser.exten = exten this.currentUser.state = state + // 测试数据 + // this.currentUser.callid = 'test' + // this.currentUser.callerNumber = 'test' + // this.currentUser.calleeNumber = 'test' if (state.includes('通话')) { - const res = this.fetchCurrentCalls(loginId) - if (res) { - this.currentUser.callerNumber = res.callerNumber - this.currentUser.calleeNumber = res.calleeNumber - this.currentUser.callid = res.callid - } + this.fetchCurrentCalls(loginId) } + break } } } else { @@ -186,21 +188,16 @@ // 获取当前正在通话列表 fetchCurrentCalls(loginId) { getCurrentCalls().then(response => { - console.log(response) - response = { - root: [{ 'Call_pbxName': 'spzc_pbx', 'Call_city': '', 'Call_isp': '中国联通', 'Call_number': '18513995803', 'Call_province': '北京', 'Call_callStatus': '接通', 'Call_id': 'b7c32570-8acd-11ea-96b3-89e56eb1026b', 'Call_staySeconds': '8', 'Call_talkSeconds': '4', 'Call_ivrName': '座席组--客服', 'Call_agentName': '888', 'Call_otherLegNumber': '6001', 'Call_agentStaffid': '1', 'Call_sp_entityName': 'Call' }] - } - this.callList = response.root + console.log(response.data) + this.callList = response.data.root for (const call of this.callList) { if (call.Call_agentStaffid === loginId) { - return { - callerNumber: call.Call_number, - calleeNumber: call.Call_otherLegNumber, - callid: call.Call_id - } + console.log('find') + this.currentUser.callerNumber = call.Call_number + this.currentUser.calleeNumber = call.Call_number + this.currentUser.callid = call.Call_id } } - return null }) } } diff --git a/src/views/statistic/callStatistic/allStatistic.vue b/src/views/statistic/callStatistic/allStatistic.vue index 35c54a5..84807fe 100644 --- a/src/views/statistic/callStatistic/allStatistic.vue +++ b/src/views/statistic/callStatistic/allStatistic.vue @@ -5,18 +5,19 @@ --> diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue index 768deae..864f275 100644 --- a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -2,18 +2,18 @@ @@ -41,7 +41,7 @@ }, computed: { canJudge() { // 判断是否可以进行质检,通话中的可以进行实时质检 - if (this.seatForm.state && this.seatForm.state.includes('通话')) { + if (this.seatForm.callid) { return false } else { return true diff --git a/src/views/monitor/seatMonitor/seatMonitor.vue b/src/views/monitor/seatMonitor/seatMonitor.vue index eac078a..3857336 100644 --- a/src/views/monitor/seatMonitor/seatMonitor.vue +++ b/src/views/monitor/seatMonitor/seatMonitor.vue @@ -3,7 +3,7 @@ - + @@ -152,6 +152,8 @@ }, // 根据坐席号获取当前用户详情 fetchUserDetail(loginId, name, exten, state) { + console.log('fetchUserDetail') + console.log(loginId) if (loginId) { for (const user of this.userList) { if (user.id === loginId) { @@ -160,14 +162,14 @@ this.currentUser.phone = user.phone this.currentUser.exten = exten this.currentUser.state = state + // 测试数据 + // this.currentUser.callid = 'test' + // this.currentUser.callerNumber = 'test' + // this.currentUser.calleeNumber = 'test' if (state.includes('通话')) { - const res = this.fetchCurrentCalls(loginId) - if (res) { - this.currentUser.callerNumber = res.callerNumber - this.currentUser.calleeNumber = res.calleeNumber - this.currentUser.callid = res.callid - } + this.fetchCurrentCalls(loginId) } + break } } } else { @@ -186,21 +188,16 @@ // 获取当前正在通话列表 fetchCurrentCalls(loginId) { getCurrentCalls().then(response => { - console.log(response) - response = { - root: [{ 'Call_pbxName': 'spzc_pbx', 'Call_city': '', 'Call_isp': '中国联通', 'Call_number': '18513995803', 'Call_province': '北京', 'Call_callStatus': '接通', 'Call_id': 'b7c32570-8acd-11ea-96b3-89e56eb1026b', 'Call_staySeconds': '8', 'Call_talkSeconds': '4', 'Call_ivrName': '座席组--客服', 'Call_agentName': '888', 'Call_otherLegNumber': '6001', 'Call_agentStaffid': '1', 'Call_sp_entityName': 'Call' }] - } - this.callList = response.root + console.log(response.data) + this.callList = response.data.root for (const call of this.callList) { if (call.Call_agentStaffid === loginId) { - return { - callerNumber: call.Call_number, - calleeNumber: call.Call_otherLegNumber, - callid: call.Call_id - } + console.log('find') + this.currentUser.callerNumber = call.Call_number + this.currentUser.calleeNumber = call.Call_number + this.currentUser.callid = call.Call_id } } - return null }) } } diff --git a/src/views/statistic/callStatistic/allStatistic.vue b/src/views/statistic/callStatistic/allStatistic.vue index 35c54a5..84807fe 100644 --- a/src/views/statistic/callStatistic/allStatistic.vue +++ b/src/views/statistic/callStatistic/allStatistic.vue @@ -5,18 +5,19 @@ --> diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue index 32879cc..60239de 100644 --- a/src/views/monitor/realtimeMonitor/components/waitStatics.vue +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -6,7 +6,7 @@ - @@ -44,39 +43,75 @@ diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue index 768deae..864f275 100644 --- a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -2,18 +2,18 @@ @@ -41,7 +41,7 @@ }, computed: { canJudge() { // 判断是否可以进行质检,通话中的可以进行实时质检 - if (this.seatForm.state && this.seatForm.state.includes('通话')) { + if (this.seatForm.callid) { return false } else { return true diff --git a/src/views/monitor/seatMonitor/seatMonitor.vue b/src/views/monitor/seatMonitor/seatMonitor.vue index eac078a..3857336 100644 --- a/src/views/monitor/seatMonitor/seatMonitor.vue +++ b/src/views/monitor/seatMonitor/seatMonitor.vue @@ -3,7 +3,7 @@ - + @@ -152,6 +152,8 @@ }, // 根据坐席号获取当前用户详情 fetchUserDetail(loginId, name, exten, state) { + console.log('fetchUserDetail') + console.log(loginId) if (loginId) { for (const user of this.userList) { if (user.id === loginId) { @@ -160,14 +162,14 @@ this.currentUser.phone = user.phone this.currentUser.exten = exten this.currentUser.state = state + // 测试数据 + // this.currentUser.callid = 'test' + // this.currentUser.callerNumber = 'test' + // this.currentUser.calleeNumber = 'test' if (state.includes('通话')) { - const res = this.fetchCurrentCalls(loginId) - if (res) { - this.currentUser.callerNumber = res.callerNumber - this.currentUser.calleeNumber = res.calleeNumber - this.currentUser.callid = res.callid - } + this.fetchCurrentCalls(loginId) } + break } } } else { @@ -186,21 +188,16 @@ // 获取当前正在通话列表 fetchCurrentCalls(loginId) { getCurrentCalls().then(response => { - console.log(response) - response = { - root: [{ 'Call_pbxName': 'spzc_pbx', 'Call_city': '', 'Call_isp': '中国联通', 'Call_number': '18513995803', 'Call_province': '北京', 'Call_callStatus': '接通', 'Call_id': 'b7c32570-8acd-11ea-96b3-89e56eb1026b', 'Call_staySeconds': '8', 'Call_talkSeconds': '4', 'Call_ivrName': '座席组--客服', 'Call_agentName': '888', 'Call_otherLegNumber': '6001', 'Call_agentStaffid': '1', 'Call_sp_entityName': 'Call' }] - } - this.callList = response.root + console.log(response.data) + this.callList = response.data.root for (const call of this.callList) { if (call.Call_agentStaffid === loginId) { - return { - callerNumber: call.Call_number, - calleeNumber: call.Call_otherLegNumber, - callid: call.Call_id - } + console.log('find') + this.currentUser.callerNumber = call.Call_number + this.currentUser.calleeNumber = call.Call_number + this.currentUser.callid = call.Call_id } } - return null }) } } diff --git a/src/views/statistic/callStatistic/allStatistic.vue b/src/views/statistic/callStatistic/allStatistic.vue index 35c54a5..84807fe 100644 --- a/src/views/statistic/callStatistic/allStatistic.vue +++ b/src/views/statistic/callStatistic/allStatistic.vue @@ -5,18 +5,19 @@ --> + + diff --git a/src/api/cti.js b/src/api/cti.js index a1e60b8..790c156 100644 --- a/src/api/cti.js +++ b/src/api/cti.js @@ -8,10 +8,10 @@ // root:[{"Call_pbxName":"spzc_pbx","Call_city":"","Call_isp":"中国联通","Call_number":"18513995803","Call_province":"北京","Call_callStatus":"接通","Call_id":"b7c32570-8acd-11ea-96b3-89e56eb1026b","Call_staySeconds":"8","Call_talkSeconds":"4","Call_ivrName":"座席组--客服","Call_agentName":"888","Call_otherLegNumber":"6001","Call_agentStaffid":"1","Call_sp_entityName":"Call"}]} export function getCurrentCalls(params) { return request({ - url: '/sound/list', - // url: '/server/invoke', - method: 'get', - params: { + // url: '/sound/list', + url: '/server/invoke', + method: 'post', + data: { method: '/spcc/interface/json/calls.do.do', type: 'get', params: { diff --git a/src/api/statistics.js b/src/api/statistics.js index 4877667..2f8bab9 100644 --- a/src/api/statistics.js +++ b/src/api/statistics.js @@ -63,9 +63,51 @@ // 坐席效能统计 export function seatStatistics(params) { return request({ - url: '/urge/departmentEffectiveStatistics', - // url: '/urge/seatEffectiveStatistics', + // url: '/urge/departmentEffectiveStatistics', + url: '/urge/seatEffectiveStatistics', method: 'get', params }) } +// 签出置忙统计 +export function outBusyStatistics(params) { + return request({ + url: '/callStatics/outBusyStatistics', + method: 'get', + params + }) +} +// 呼入呼出统计 +export function callInOutStatistics(params) { + return request({ + url: '/callStatics/callInOutStatistics', + method: 'get', + params + }) +} +// 呼叫满意度统计 +export function callSatisfiedStatistics(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + method: 'get', + params + }) +} +// 接通率统计 +export function callSuccessStatistics(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + // url: '/callStatics/callByHour', + method: 'get', + params + }) +} +// 按小时统计话务量统计 +export function callStatisticsByHour(params) { + return request({ + url: '/callStatics/statisfiedStatistics', + method: 'get', + params + }) +} + diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue index f006096..37f4eae 100644 --- a/src/views/monitor/realtimeMonitor/components/callLine.vue +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -11,23 +11,20 @@ diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue index 32879cc..60239de 100644 --- a/src/views/monitor/realtimeMonitor/components/waitStatics.vue +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -6,7 +6,7 @@ - @@ -44,39 +43,75 @@ diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue index 768deae..864f275 100644 --- a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -2,18 +2,18 @@ @@ -41,7 +41,7 @@ }, computed: { canJudge() { // 判断是否可以进行质检,通话中的可以进行实时质检 - if (this.seatForm.state && this.seatForm.state.includes('通话')) { + if (this.seatForm.callid) { return false } else { return true diff --git a/src/views/monitor/seatMonitor/seatMonitor.vue b/src/views/monitor/seatMonitor/seatMonitor.vue index eac078a..3857336 100644 --- a/src/views/monitor/seatMonitor/seatMonitor.vue +++ b/src/views/monitor/seatMonitor/seatMonitor.vue @@ -3,7 +3,7 @@ - + @@ -152,6 +152,8 @@ }, // 根据坐席号获取当前用户详情 fetchUserDetail(loginId, name, exten, state) { + console.log('fetchUserDetail') + console.log(loginId) if (loginId) { for (const user of this.userList) { if (user.id === loginId) { @@ -160,14 +162,14 @@ this.currentUser.phone = user.phone this.currentUser.exten = exten this.currentUser.state = state + // 测试数据 + // this.currentUser.callid = 'test' + // this.currentUser.callerNumber = 'test' + // this.currentUser.calleeNumber = 'test' if (state.includes('通话')) { - const res = this.fetchCurrentCalls(loginId) - if (res) { - this.currentUser.callerNumber = res.callerNumber - this.currentUser.calleeNumber = res.calleeNumber - this.currentUser.callid = res.callid - } + this.fetchCurrentCalls(loginId) } + break } } } else { @@ -186,21 +188,16 @@ // 获取当前正在通话列表 fetchCurrentCalls(loginId) { getCurrentCalls().then(response => { - console.log(response) - response = { - root: [{ 'Call_pbxName': 'spzc_pbx', 'Call_city': '', 'Call_isp': '中国联通', 'Call_number': '18513995803', 'Call_province': '北京', 'Call_callStatus': '接通', 'Call_id': 'b7c32570-8acd-11ea-96b3-89e56eb1026b', 'Call_staySeconds': '8', 'Call_talkSeconds': '4', 'Call_ivrName': '座席组--客服', 'Call_agentName': '888', 'Call_otherLegNumber': '6001', 'Call_agentStaffid': '1', 'Call_sp_entityName': 'Call' }] - } - this.callList = response.root + console.log(response.data) + this.callList = response.data.root for (const call of this.callList) { if (call.Call_agentStaffid === loginId) { - return { - callerNumber: call.Call_number, - calleeNumber: call.Call_otherLegNumber, - callid: call.Call_id - } + console.log('find') + this.currentUser.callerNumber = call.Call_number + this.currentUser.calleeNumber = call.Call_number + this.currentUser.callid = call.Call_id } } - return null }) } } diff --git a/src/views/statistic/callStatistic/allStatistic.vue b/src/views/statistic/callStatistic/allStatistic.vue index 35c54a5..84807fe 100644 --- a/src/views/statistic/callStatistic/allStatistic.vue +++ b/src/views/statistic/callStatistic/allStatistic.vue @@ -5,18 +5,19 @@ --> + + diff --git a/src/views/statistic/callStatistic/components/satisfiedPie.vue b/src/views/statistic/callStatistic/components/satisfiedPie.vue index 9e67eba..55e0bc5 100644 --- a/src/views/statistic/callStatistic/components/satisfiedPie.vue +++ b/src/views/statistic/callStatistic/components/satisfiedPie.vue @@ -4,10 +4,16 @@ diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue index 32879cc..60239de 100644 --- a/src/views/monitor/realtimeMonitor/components/waitStatics.vue +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -6,7 +6,7 @@ - @@ -44,39 +43,75 @@ diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue index 768deae..864f275 100644 --- a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -2,18 +2,18 @@ @@ -41,7 +41,7 @@ }, computed: { canJudge() { // 判断是否可以进行质检,通话中的可以进行实时质检 - if (this.seatForm.state && this.seatForm.state.includes('通话')) { + if (this.seatForm.callid) { return false } else { return true diff --git a/src/views/monitor/seatMonitor/seatMonitor.vue b/src/views/monitor/seatMonitor/seatMonitor.vue index eac078a..3857336 100644 --- a/src/views/monitor/seatMonitor/seatMonitor.vue +++ b/src/views/monitor/seatMonitor/seatMonitor.vue @@ -3,7 +3,7 @@ - + @@ -152,6 +152,8 @@ }, // 根据坐席号获取当前用户详情 fetchUserDetail(loginId, name, exten, state) { + console.log('fetchUserDetail') + console.log(loginId) if (loginId) { for (const user of this.userList) { if (user.id === loginId) { @@ -160,14 +162,14 @@ this.currentUser.phone = user.phone this.currentUser.exten = exten this.currentUser.state = state + // 测试数据 + // this.currentUser.callid = 'test' + // this.currentUser.callerNumber = 'test' + // this.currentUser.calleeNumber = 'test' if (state.includes('通话')) { - const res = this.fetchCurrentCalls(loginId) - if (res) { - this.currentUser.callerNumber = res.callerNumber - this.currentUser.calleeNumber = res.calleeNumber - this.currentUser.callid = res.callid - } + this.fetchCurrentCalls(loginId) } + break } } } else { @@ -186,21 +188,16 @@ // 获取当前正在通话列表 fetchCurrentCalls(loginId) { getCurrentCalls().then(response => { - console.log(response) - response = { - root: [{ 'Call_pbxName': 'spzc_pbx', 'Call_city': '', 'Call_isp': '中国联通', 'Call_number': '18513995803', 'Call_province': '北京', 'Call_callStatus': '接通', 'Call_id': 'b7c32570-8acd-11ea-96b3-89e56eb1026b', 'Call_staySeconds': '8', 'Call_talkSeconds': '4', 'Call_ivrName': '座席组--客服', 'Call_agentName': '888', 'Call_otherLegNumber': '6001', 'Call_agentStaffid': '1', 'Call_sp_entityName': 'Call' }] - } - this.callList = response.root + console.log(response.data) + this.callList = response.data.root for (const call of this.callList) { if (call.Call_agentStaffid === loginId) { - return { - callerNumber: call.Call_number, - calleeNumber: call.Call_otherLegNumber, - callid: call.Call_id - } + console.log('find') + this.currentUser.callerNumber = call.Call_number + this.currentUser.calleeNumber = call.Call_number + this.currentUser.callid = call.Call_id } } - return null }) } } diff --git a/src/views/statistic/callStatistic/allStatistic.vue b/src/views/statistic/callStatistic/allStatistic.vue index 35c54a5..84807fe 100644 --- a/src/views/statistic/callStatistic/allStatistic.vue +++ b/src/views/statistic/callStatistic/allStatistic.vue @@ -5,18 +5,19 @@ --> + + diff --git a/src/views/statistic/callStatistic/components/satisfiedPie.vue b/src/views/statistic/callStatistic/components/satisfiedPie.vue index 9e67eba..55e0bc5 100644 --- a/src/views/statistic/callStatistic/components/satisfiedPie.vue +++ b/src/views/statistic/callStatistic/components/satisfiedPie.vue @@ -4,10 +4,16 @@ diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue index 32879cc..60239de 100644 --- a/src/views/monitor/realtimeMonitor/components/waitStatics.vue +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -6,7 +6,7 @@ - @@ -44,39 +43,75 @@ diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue index 768deae..864f275 100644 --- a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -2,18 +2,18 @@ @@ -41,7 +41,7 @@ }, computed: { canJudge() { // 判断是否可以进行质检,通话中的可以进行实时质检 - if (this.seatForm.state && this.seatForm.state.includes('通话')) { + if (this.seatForm.callid) { return false } else { return true diff --git a/src/views/monitor/seatMonitor/seatMonitor.vue b/src/views/monitor/seatMonitor/seatMonitor.vue index eac078a..3857336 100644 --- a/src/views/monitor/seatMonitor/seatMonitor.vue +++ b/src/views/monitor/seatMonitor/seatMonitor.vue @@ -3,7 +3,7 @@ - + @@ -152,6 +152,8 @@ }, // 根据坐席号获取当前用户详情 fetchUserDetail(loginId, name, exten, state) { + console.log('fetchUserDetail') + console.log(loginId) if (loginId) { for (const user of this.userList) { if (user.id === loginId) { @@ -160,14 +162,14 @@ this.currentUser.phone = user.phone this.currentUser.exten = exten this.currentUser.state = state + // 测试数据 + // this.currentUser.callid = 'test' + // this.currentUser.callerNumber = 'test' + // this.currentUser.calleeNumber = 'test' if (state.includes('通话')) { - const res = this.fetchCurrentCalls(loginId) - if (res) { - this.currentUser.callerNumber = res.callerNumber - this.currentUser.calleeNumber = res.calleeNumber - this.currentUser.callid = res.callid - } + this.fetchCurrentCalls(loginId) } + break } } } else { @@ -186,21 +188,16 @@ // 获取当前正在通话列表 fetchCurrentCalls(loginId) { getCurrentCalls().then(response => { - console.log(response) - response = { - root: [{ 'Call_pbxName': 'spzc_pbx', 'Call_city': '', 'Call_isp': '中国联通', 'Call_number': '18513995803', 'Call_province': '北京', 'Call_callStatus': '接通', 'Call_id': 'b7c32570-8acd-11ea-96b3-89e56eb1026b', 'Call_staySeconds': '8', 'Call_talkSeconds': '4', 'Call_ivrName': '座席组--客服', 'Call_agentName': '888', 'Call_otherLegNumber': '6001', 'Call_agentStaffid': '1', 'Call_sp_entityName': 'Call' }] - } - this.callList = response.root + console.log(response.data) + this.callList = response.data.root for (const call of this.callList) { if (call.Call_agentStaffid === loginId) { - return { - callerNumber: call.Call_number, - calleeNumber: call.Call_otherLegNumber, - callid: call.Call_id - } + console.log('find') + this.currentUser.callerNumber = call.Call_number + this.currentUser.calleeNumber = call.Call_number + this.currentUser.callid = call.Call_id } } - return null }) } } diff --git a/src/views/statistic/callStatistic/allStatistic.vue b/src/views/statistic/callStatistic/allStatistic.vue index 35c54a5..84807fe 100644 --- a/src/views/statistic/callStatistic/allStatistic.vue +++ b/src/views/statistic/callStatistic/allStatistic.vue @@ -5,18 +5,19 @@ --> + + diff --git a/src/views/statistic/callStatistic/components/satisfiedPie.vue b/src/views/statistic/callStatistic/components/satisfiedPie.vue index 9e67eba..55e0bc5 100644 --- a/src/views/statistic/callStatistic/components/satisfiedPie.vue +++ b/src/views/statistic/callStatistic/components/satisfiedPie.vue @@ -4,10 +4,16 @@ diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue index 32879cc..60239de 100644 --- a/src/views/monitor/realtimeMonitor/components/waitStatics.vue +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -6,7 +6,7 @@ - @@ -44,39 +43,75 @@ diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue index 768deae..864f275 100644 --- a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -2,18 +2,18 @@ @@ -41,7 +41,7 @@ }, computed: { canJudge() { // 判断是否可以进行质检,通话中的可以进行实时质检 - if (this.seatForm.state && this.seatForm.state.includes('通话')) { + if (this.seatForm.callid) { return false } else { return true diff --git a/src/views/monitor/seatMonitor/seatMonitor.vue b/src/views/monitor/seatMonitor/seatMonitor.vue index eac078a..3857336 100644 --- a/src/views/monitor/seatMonitor/seatMonitor.vue +++ b/src/views/monitor/seatMonitor/seatMonitor.vue @@ -3,7 +3,7 @@ - + @@ -152,6 +152,8 @@ }, // 根据坐席号获取当前用户详情 fetchUserDetail(loginId, name, exten, state) { + console.log('fetchUserDetail') + console.log(loginId) if (loginId) { for (const user of this.userList) { if (user.id === loginId) { @@ -160,14 +162,14 @@ this.currentUser.phone = user.phone this.currentUser.exten = exten this.currentUser.state = state + // 测试数据 + // this.currentUser.callid = 'test' + // this.currentUser.callerNumber = 'test' + // this.currentUser.calleeNumber = 'test' if (state.includes('通话')) { - const res = this.fetchCurrentCalls(loginId) - if (res) { - this.currentUser.callerNumber = res.callerNumber - this.currentUser.calleeNumber = res.calleeNumber - this.currentUser.callid = res.callid - } + this.fetchCurrentCalls(loginId) } + break } } } else { @@ -186,21 +188,16 @@ // 获取当前正在通话列表 fetchCurrentCalls(loginId) { getCurrentCalls().then(response => { - console.log(response) - response = { - root: [{ 'Call_pbxName': 'spzc_pbx', 'Call_city': '', 'Call_isp': '中国联通', 'Call_number': '18513995803', 'Call_province': '北京', 'Call_callStatus': '接通', 'Call_id': 'b7c32570-8acd-11ea-96b3-89e56eb1026b', 'Call_staySeconds': '8', 'Call_talkSeconds': '4', 'Call_ivrName': '座席组--客服', 'Call_agentName': '888', 'Call_otherLegNumber': '6001', 'Call_agentStaffid': '1', 'Call_sp_entityName': 'Call' }] - } - this.callList = response.root + console.log(response.data) + this.callList = response.data.root for (const call of this.callList) { if (call.Call_agentStaffid === loginId) { - return { - callerNumber: call.Call_number, - calleeNumber: call.Call_otherLegNumber, - callid: call.Call_id - } + console.log('find') + this.currentUser.callerNumber = call.Call_number + this.currentUser.calleeNumber = call.Call_number + this.currentUser.callid = call.Call_id } } - return null }) } } diff --git a/src/views/statistic/callStatistic/allStatistic.vue b/src/views/statistic/callStatistic/allStatistic.vue index 35c54a5..84807fe 100644 --- a/src/views/statistic/callStatistic/allStatistic.vue +++ b/src/views/statistic/callStatistic/allStatistic.vue @@ -5,18 +5,19 @@ --> + + diff --git a/src/views/statistic/callStatistic/components/satisfiedPie.vue b/src/views/statistic/callStatistic/components/satisfiedPie.vue index 9e67eba..55e0bc5 100644 --- a/src/views/statistic/callStatistic/components/satisfiedPie.vue +++ b/src/views/statistic/callStatistic/components/satisfiedPie.vue @@ -4,10 +4,16 @@ diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue index 32879cc..60239de 100644 --- a/src/views/monitor/realtimeMonitor/components/waitStatics.vue +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -6,7 +6,7 @@ - @@ -44,39 +43,75 @@ diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue index 768deae..864f275 100644 --- a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -2,18 +2,18 @@ @@ -41,7 +41,7 @@ }, computed: { canJudge() { // 判断是否可以进行质检,通话中的可以进行实时质检 - if (this.seatForm.state && this.seatForm.state.includes('通话')) { + if (this.seatForm.callid) { return false } else { return true diff --git a/src/views/monitor/seatMonitor/seatMonitor.vue b/src/views/monitor/seatMonitor/seatMonitor.vue index eac078a..3857336 100644 --- a/src/views/monitor/seatMonitor/seatMonitor.vue +++ b/src/views/monitor/seatMonitor/seatMonitor.vue @@ -3,7 +3,7 @@ - + @@ -152,6 +152,8 @@ }, // 根据坐席号获取当前用户详情 fetchUserDetail(loginId, name, exten, state) { + console.log('fetchUserDetail') + console.log(loginId) if (loginId) { for (const user of this.userList) { if (user.id === loginId) { @@ -160,14 +162,14 @@ this.currentUser.phone = user.phone this.currentUser.exten = exten this.currentUser.state = state + // 测试数据 + // this.currentUser.callid = 'test' + // this.currentUser.callerNumber = 'test' + // this.currentUser.calleeNumber = 'test' if (state.includes('通话')) { - const res = this.fetchCurrentCalls(loginId) - if (res) { - this.currentUser.callerNumber = res.callerNumber - this.currentUser.calleeNumber = res.calleeNumber - this.currentUser.callid = res.callid - } + this.fetchCurrentCalls(loginId) } + break } } } else { @@ -186,21 +188,16 @@ // 获取当前正在通话列表 fetchCurrentCalls(loginId) { getCurrentCalls().then(response => { - console.log(response) - response = { - root: [{ 'Call_pbxName': 'spzc_pbx', 'Call_city': '', 'Call_isp': '中国联通', 'Call_number': '18513995803', 'Call_province': '北京', 'Call_callStatus': '接通', 'Call_id': 'b7c32570-8acd-11ea-96b3-89e56eb1026b', 'Call_staySeconds': '8', 'Call_talkSeconds': '4', 'Call_ivrName': '座席组--客服', 'Call_agentName': '888', 'Call_otherLegNumber': '6001', 'Call_agentStaffid': '1', 'Call_sp_entityName': 'Call' }] - } - this.callList = response.root + console.log(response.data) + this.callList = response.data.root for (const call of this.callList) { if (call.Call_agentStaffid === loginId) { - return { - callerNumber: call.Call_number, - calleeNumber: call.Call_otherLegNumber, - callid: call.Call_id - } + console.log('find') + this.currentUser.callerNumber = call.Call_number + this.currentUser.calleeNumber = call.Call_number + this.currentUser.callid = call.Call_id } } - return null }) } } diff --git a/src/views/statistic/callStatistic/allStatistic.vue b/src/views/statistic/callStatistic/allStatistic.vue index 35c54a5..84807fe 100644 --- a/src/views/statistic/callStatistic/allStatistic.vue +++ b/src/views/statistic/callStatistic/allStatistic.vue @@ -5,18 +5,19 @@ --> + + diff --git a/src/views/statistic/callStatistic/components/satisfiedPie.vue b/src/views/statistic/callStatistic/components/satisfiedPie.vue index 9e67eba..55e0bc5 100644 --- a/src/views/statistic/callStatistic/components/satisfiedPie.vue +++ b/src/views/statistic/callStatistic/components/satisfiedPie.vue @@ -4,10 +4,16 @@