|
@@ -29,6 +29,7 @@
|
|
|
:refresh="{
|
|
|
queryMethod: queryList,
|
|
|
}"
|
|
|
+ :tools="[{ toolRender: { name: 'exportCurrent' } }, { toolRender: { name: 'exportAll' } }]"
|
|
|
>
|
|
|
</vxe-toolbar>
|
|
|
<div style="overflow: hidden; width: 100%; height: 100%; flex: 1">
|
|
@@ -46,10 +47,14 @@
|
|
|
id="statisticsCallDetailTalkTime"
|
|
|
:custom-config="{ storage: true }"
|
|
|
showHeaderOverflow
|
|
|
+ :sort-config="{ remote: true }"
|
|
|
+ @sort-change="sortChangeEvent"
|
|
|
+ :params="{ exportMethod: callPeriodDetailExport, exportParams: requestParams }"
|
|
|
>
|
|
|
+ >
|
|
|
<vxe-column field="cpn" title="主叫号码"></vxe-column>
|
|
|
<vxe-column field="cdpn" title="被叫号码"></vxe-column>
|
|
|
- <vxe-column field="createdTime" title="来电时间" width="160">
|
|
|
+ <vxe-column field="createdTime" title="来电时间" width="160" sortable>
|
|
|
<template #default="{ row }">
|
|
|
{{ formatDate(row.createdTime, 'YYYY-mm-dd HH:MM:SS') }}
|
|
|
</template>
|
|
@@ -69,7 +74,7 @@
|
|
|
<script setup lang="tsx" name="statisticsCallDetailTalkTime">
|
|
|
import { computed, defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
|
|
import { FormInstance } from 'element-plus';
|
|
|
-import { callPeriodBase, callPeriodDetail } from '@/api/statistics/call';
|
|
|
+import { callPeriodBase, callPeriodDetail, callPeriodDetailExport } from '@/api/statistics/call';
|
|
|
import { defaultDate } from '@/utils/constants';
|
|
|
import { formatDate } from '@/utils/formatTime';
|
|
|
import { useRoute } from 'vue-router';
|
|
@@ -123,6 +128,12 @@ const queryList = () => {
|
|
|
state.loading = false;
|
|
|
});
|
|
|
};
|
|
|
+const sortChangeEvent = (val: any) => {
|
|
|
+ state.queryParams.SortField = val.order ? val.field : null;
|
|
|
+ // 0 升序 1 降序
|
|
|
+ state.queryParams.SortRule = val.order ? (val.order == 'desc' ? 1 : 0) : null;
|
|
|
+ queryList();
|
|
|
+};
|
|
|
/** 重置按钮操作 */
|
|
|
const resetQuery = (formEl: FormInstance | undefined) => {
|
|
|
if (!formEl) return;
|