|
@@ -445,7 +445,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
formatterResponseTime(params) {
|
|
|
- console.log(params.data)
|
|
|
let responseTime = 0;
|
|
|
if (params.data.action_end !== null) {
|
|
|
if (params.data.action_type === TCP_TYPE.VOICE ||
|
|
@@ -453,14 +452,10 @@ export default {
|
|
|
params.data.action_type === TCP_TYPE.PHONE
|
|
|
) {
|
|
|
if (params.data.action_start !== null && params.data.action_accept !== null) {
|
|
|
- console.log("params.data.action_accept : " + params.data.action_accept)
|
|
|
- console.log("params.data.action_start : " + params.data.action_start)
|
|
|
responseTime = params.data.action_accept - params.data.action_start
|
|
|
return this.formateSeconds(responseTime)
|
|
|
}
|
|
|
} else {
|
|
|
- console.log("params.data.action_end : " + params.data.action_end)
|
|
|
- console.log("params.data.action_start : " + params.data.action_start)
|
|
|
responseTime = params.data.action_end - params.data.action_start
|
|
|
return this.formateSeconds(responseTime)
|
|
|
}
|
|
@@ -550,9 +545,10 @@ export default {
|
|
|
API_interaction.getList(params).then(res => {
|
|
|
_this.loading = false
|
|
|
import('@/vendor/Export2Excel').then(excel => {
|
|
|
- const tHeader = [this.$t('interaction.fromMemberName'), this.$t('interaction.toMemberName'), this.$t('interaction.actionType'), this.$t('interaction.actionEnd'), this.$t('interaction.data'),
|
|
|
+ const tHeader = [this.$t('interaction.fromMemberName'), this.$t('interaction.toMemberName'), this.$t('interaction.actionType'),
|
|
|
+ this.$t('interaction.actionEnd'), this.$t('interaction.data'), this.$t('interaction.responseTime'),
|
|
|
this.$t('interaction.createDate')] // 表头
|
|
|
- const filterVal = ['fromMemberName', 'toMemberName', 'action_type', 'action_end', 'data', 'create_date']
|
|
|
+ const filterVal = ['fromMemberName', 'toMemberName', 'action_type', 'action_end', 'data', 'responseTime', 'create_date']
|
|
|
const tit = params.start_date + '至' + params.end_date + '交互记录'
|
|
|
const data = _this.formatJson(filterVal, res.data)
|
|
|
excel.export_json_to_excel({
|
|
@@ -571,12 +567,15 @@ export default {
|
|
|
return this.formatterFromName({data: v})
|
|
|
} else if (j === 'toMemberName') {
|
|
|
return this.formatterToName({data: v})
|
|
|
- }else if (j === 'action_type') {
|
|
|
+ } else if (j === 'action_type') {
|
|
|
return this.formatterType({value: v[j]})
|
|
|
- }else if (j === 'action_end') {
|
|
|
+ } else if (j === 'action_end') {
|
|
|
return this.formatterResult2(v[j])
|
|
|
- }else if (j === 'create_date') {
|
|
|
+ } else if (j === 'create_date') {
|
|
|
return this.formatterDate({value: v[j]})
|
|
|
+ } else if (j === 'responseTime') {
|
|
|
+ console.log(v)
|
|
|
+ return this.formatterResponseTime({data: v})
|
|
|
} else {
|
|
|
return v[j]
|
|
|
}
|