|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
<el-form-item label="公司名" prop="companyId">
|
|
|
<el-select filterable style="width: 220px" v-model="queryParams.companyId" placeholder="请选择公司名" @change="companyChange" clearable size="small">
|
|
|
<el-option
|
|
@@ -45,9 +45,51 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="状态" prop="status">
|
|
|
+ <el-select v-model="queryParams.status" placeholder="请选择" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in statusOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="来源渠道" prop="source">
|
|
|
+ <el-select v-model="queryParams.source" placeholder="请选择" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in sourceOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="时长" prop="times">
|
|
|
+ <el-select v-model="queryParams.times" placeholder="请选择" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in timesOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="开始时间" prop="startTime">
|
|
|
<el-date-picker v-model="dateRange" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="客户创建时间" prop="createTime">
|
|
|
+ <el-date-picker
|
|
|
+ style="width:205.4px"
|
|
|
+ clearable size="small"
|
|
|
+ v-model="createTimeRange"
|
|
|
+ type="daterange"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
@@ -90,9 +132,9 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="主叫" align="center" prop="callerPhone" />
|
|
|
<el-table-column label="被叫" align="center" prop="calleePhone" />
|
|
|
- <el-table-column label="时长(秒)" align="center" prop="times" width="180">
|
|
|
+ <el-table-column label="时长" align="center" prop="times" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.voiceUrl!=null">{{ scope.row.times}}秒 </span>
|
|
|
+ <span v-if="scope.row.voiceUrl!=null">{{ formatTime(scope.row.times)}} </span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="计费时长(分)" align="center" prop="billingTime" width="180">
|
|
@@ -141,6 +183,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ timesOptions:[],
|
|
|
statusOptions:[],
|
|
|
companys:[],
|
|
|
deptOptions:[],
|
|
@@ -161,6 +204,8 @@ export default {
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
dateRange: [],
|
|
|
+ createTimeRange:[],
|
|
|
+ sourceOptions:[],
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
// 查询参数
|
|
@@ -190,9 +235,15 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
+ this.getDicts("crm_customer_source").then((response) => {
|
|
|
+ this.sourceOptions = response.data;
|
|
|
+ });
|
|
|
this.getDicts("company_voice_logs_status").then((response) => {
|
|
|
this.statusOptions = response.data;
|
|
|
});
|
|
|
+ this.getDicts("company_voice_logs_times").then((response) => {
|
|
|
+ this.timesOptions = response.data;
|
|
|
+ });
|
|
|
getCompanyList().then(response => {
|
|
|
this.companys = response.data;
|
|
|
if(this.companys!=null&&this.companys.length>0){
|
|
@@ -203,11 +254,37 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ formatTime(value) {
|
|
|
+ const hours = Math.floor(value / 3600);
|
|
|
+ const minutes = Math.floor((value % 3600) / 60);
|
|
|
+ const seconds = value % 60;
|
|
|
+ if(hours == 0 && minutes == 0 ){
|
|
|
+ return `${seconds}秒`;
|
|
|
+ }else if(hours == 0 && minutes != 0 ){
|
|
|
+ return `${minutes}分钟${seconds}秒`;
|
|
|
+ }else{
|
|
|
+ return `${hours}小时${minutes}分钟${seconds}秒`;
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
/** 查询通话记录列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listCompanyVoiceLogs(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
|
|
- this.companyVoiceLogsList = response.rows;
|
|
|
+ if(this.createTimeRange!=null&&this.createTimeRange.length==2){
|
|
|
+ this.queryParams.createTimeRange=this.createTimeRange[0]+"--"+this.createTimeRange[1]
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.queryParams.createTimeRange=null;
|
|
|
+ }
|
|
|
+ if(this.dateRange!=null&&this.dateRange.length==2){
|
|
|
+ this.queryParams.dateRange=this.dateRange[0]+"--"+this.dateRange[1]
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.queryParams.dateRangee=null;
|
|
|
+ }
|
|
|
+
|
|
|
+ listCompanyVoiceLogs(this.queryParams).then(response => {
|
|
|
+ this.companyVoiceLogsList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
});
|