customerVoiceLogsList.vue 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template>
  2. <div>
  3. <el-table border v-loading="loading" :data="list" >
  4. <el-table-column label="ID" align="center" prop="voiceId" />
  5. <el-table-column label="公司名" align="center" prop="companyName" />
  6. <el-table-column label="员工姓名" align="center" prop="userNickName" />
  7. <el-table-column label="录制地址" align="center" show-overflow-tooltip prop="voiceUrl" width="350">
  8. <template slot-scope="scope">
  9. <audio v-if="scope.row.voiceUrl!=null" controls :src="scope.row.voiceUrl"></audio>
  10. </template>
  11. </el-table-column>
  12. <el-table-column label="开始时间" align="center" prop="startTime" width="180">
  13. <template slot-scope="scope">
  14. <span>{{ parseTime(scope.row.startTime) }}</span>
  15. </template>
  16. </el-table-column>
  17. <el-table-column label="结束时间" align="center" prop="finishTime" width="180">
  18. <template slot-scope="scope">
  19. <span>{{ parseTime(scope.row.finishTime) }}</span>
  20. </template>
  21. </el-table-column>
  22. <el-table-column label="主叫" align="center" prop="callerPhone" />
  23. <el-table-column label="被叫" align="center" prop="calleePhone" />
  24. <el-table-column label="时长(秒)" align="center" prop="times" width="180">
  25. <template slot-scope="scope">
  26. <span v-if="scope.row.voiceUrl!=null">{{ scope.row.times}}秒 </span>
  27. </template>
  28. </el-table-column>
  29. <el-table-column label="计费时长(分)" align="center" prop="billingTime" width="180">
  30. </el-table-column>
  31. <el-table-column label="主叫显示号" align="center" prop="displayCallerNumber" />
  32. <el-table-column label="被叫显示号" align="center" prop="displayCalleeNumber" />
  33. <el-table-column label="状态" align="center" prop="status" >
  34. <template slot-scope="scope">
  35. <el-tag prop="status" v-for="(item, index) in statusOptions" v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag>
  36. </template>
  37. </el-table-column>
  38. <el-table-column label="备注" align="center" prop="remark" />
  39. </el-table>
  40. <pagination
  41. v-show="total>0"
  42. :total="total"
  43. :page.sync="queryParams.pageNum"
  44. :limit.sync="queryParams.pageSize"
  45. @pagination="getList"
  46. />
  47. </div>
  48. </template>
  49. <script>
  50. import { listCompanyVoiceLogs, getCompanyVoiceLogs, delCompanyVoiceLogs, addCompanyVoiceLogs, updateCompanyVoiceLogs, exportCompanyVoiceLogs } from "@/api/company/companyVoiceLogs";
  51. export default {
  52. name: "customerVisit",
  53. data() {
  54. return {
  55. statusOptions:[],
  56. // 遮罩层
  57. loading: true,
  58. // 总条数
  59. total: 0,
  60. list: [],
  61. // 查询参数
  62. queryParams: {
  63. pageNum: 1,
  64. pageSize: 10,
  65. customerId: null,
  66. },
  67. };
  68. },
  69. created() {
  70. this.getDicts("company_voice_logs_status").then((response) => {
  71. this.statusOptions = response.data;
  72. });
  73. },
  74. methods: {
  75. getData(customerId){
  76. this.queryParams.customerId=customerId;
  77. this.queryParams.pageNum=1;
  78. this.getList();
  79. },
  80. getList() {
  81. this.loading = true;
  82. listCompanyVoiceLogs(this.queryParams).then(response => {
  83. this.list = response.rows;
  84. this.total = response.total;
  85. this.loading = false;
  86. });
  87. },
  88. }
  89. };
  90. </script>
  91. <style lang="scss" scoped>
  92. </style>