index.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <zj-form-container>
  3. <zj-form-module title="通话记录">
  4. <zj-table
  5. ref="tableEl"
  6. :is-drop="true"
  7. :columns="callLogColumns"
  8. :table-data="callLogData"
  9. :table-attributes="{
  10. border: true
  11. }"
  12. />
  13. </zj-form-module>
  14. </zj-form-container>
  15. </template>
  16. <script>
  17. import { unCallListOrder } from '@/api/cloudCall.js'
  18. export default {
  19. props: {
  20. id: {
  21. type: [String, Number],
  22. default: null
  23. }
  24. },
  25. data() {
  26. return {
  27. callLogData: []
  28. }
  29. },
  30. computed: {
  31. callLogColumns() {
  32. return [
  33. {
  34. columnAttributes: {
  35. label: '呼叫方式',
  36. prop: 'callDirection'
  37. }
  38. },
  39. {
  40. columnAttributes: {
  41. label: '通话类型',
  42. prop: 'callType'
  43. }
  44. },
  45. {
  46. columnAttributes: {
  47. label: '通话发起时间',
  48. prop: 'callStartTime',
  49. 'min-width': 130
  50. }
  51. },
  52. {
  53. columnAttributes: {
  54. label: '客户手机号',
  55. prop: 'userMobile',
  56. 'min-width': 130
  57. }
  58. },
  59. {
  60. columnAttributes: {
  61. label: '后台云呼信息',
  62. width: 170,
  63. prop: 'backTel'
  64. }
  65. },
  66. {
  67. columnAttributes: {
  68. label: '通话时长(秒)',
  69. prop: 'callHoldTime',
  70. width: 130
  71. }
  72. },
  73. {
  74. columnAttributes: {
  75. label: '振铃时长(秒)',
  76. prop: 'callWaitTime',
  77. width: 130
  78. },
  79. render: (_h, { row, column, $index }) => {
  80. const { callWaitTime } = row
  81. return <div style="margin:13px 0 0 0">{callWaitTime ? Number(callWaitTime) / 1000 : 0}</div>
  82. }
  83. },
  84. {
  85. columnAttributes: {
  86. label: '通话录音',
  87. prop: 'fileUrl',
  88. 'min-width': 300
  89. },
  90. render: (_h, { row, column, $index }) => {
  91. const { fileUrl } = row
  92. return (
  93. <div style="margin:13px 0 0 0">
  94. <audio controls>
  95. <source src={fileUrl} type="audio/ogg" contentEditable="true" />
  96. <source src={fileUrl} type="audio/mpeg" contentEditable="true" />
  97. </audio>
  98. </div>
  99. )
  100. }
  101. }
  102. ]
  103. }
  104. },
  105. mounted() {
  106. this.getOrderQualityLis2()
  107. },
  108. methods: {
  109. getOrderQualityLis2() {
  110. let params = {
  111. pageNum: 1,
  112. pageSize: -1,
  113. params: [{ param: 'a.order_base_id', compare: 'like', value: this.id }]
  114. }
  115. unCallListOrder(params).then(res => {
  116. this.callLogData = res.data.records
  117. })
  118. }
  119. }
  120. }
  121. </script>
  122. <style>
  123. a {
  124. justify-content: space-between;
  125. }
  126. </style>