Эх сурвалжийг харах

reactor:377 【坐席话务统计分析】修改部分字段计算方式等

zhangchong 1 сар өмнө
parent
commit
cd3e4a471f

+ 12 - 2
src/views/tels/callLog/zgCallLog.vue

@@ -61,6 +61,7 @@
 							}
 						},
 					}"
+					@sort-change="sortChange"
 				>
 					<vxe-column field="fromNo" title="主叫号码" min-width="120"></vxe-column>
 					<vxe-column field="toNo" title="被叫号码" min-width="120"></vxe-column>
@@ -93,7 +94,7 @@
 							{{ formatDate(row.endTime, 'YYYY-mm-dd HH:MM:SS') }}
 						</template>
 					</vxe-column>
-					<vxe-column field="waitDuration" title="等待时长(秒)" width="120" :visible="['3'].includes(state.queryParams.type)"></vxe-column>
+					<vxe-column field="waitDuration" title="等待时长(秒)" width="140" :visible="['3'].includes(state.queryParams.type)" sortable></vxe-column>
 					<vxe-column title="操作" fixed="right" width="240" align="center" v-if="['1', '2'].includes(state.queryParams.type)">
 						<template #default="{ row }">
 							<el-button
@@ -189,7 +190,7 @@
 import { defineAsyncComponent, onMounted, reactive, ref, onActivated, onBeforeUnmount } from 'vue';
 import type { FormInstance } from 'element-plus';
 import { ElMessageBox } from 'element-plus';
-import { debounce, downloadFileBySrc, getNeedArr } from '@/utils/tools';
+import { debounce, downloadFileBySrc } from '@/utils/tools';
 import { formatDate } from '@/utils/formatTime';
 import { defaultTimeStartEnd, shortcuts } from '@/utils/constants';
 import { useRouter } from 'vue-router';
@@ -224,6 +225,8 @@ const state = reactive<any>({
 		WaitDurationStart: null,
 		WaitDurationEnd: null,
 		IsMissOrder: null,
+		SortField: null,
+		SortRule: null,
 	},
 	tableData: [], // 列表数据
 	loading: false, // 加载
@@ -272,6 +275,13 @@ const getTotal = () => {
 		})
 		.catch(() => {});
 };
+// 排序
+const sortChange = (val: any) => {
+	state.queryParams.SortField = val.order ? val.field : null;
+	// 0 升序 1 降序
+	state.queryParams.SortRule = val.order ? (val.order == 'desc' ? 1 : 0) : null;
+	handleQuery();
+};
 // 失联工单
 const IsMissOrder = ref(false);
 const changeMissOrder = (val: any) => {