Browse Source

reactor:新增智能应答录音;

zhangchong 11 months ago
parent
commit
20f24ba72d

+ 3 - 3
src/components/ProTable/components/ColSetting.vue

@@ -1,9 +1,9 @@
 <template>
 	<!-- 列设置 -->
 	<el-drawer v-model="drawerVisible" title="列设置" append-to-body destroy-on-close>
-		<el-table :data="colSetting" row-key="prop" default-expand-all border :tree-props="{ children: '_children' }">
-			<el-table-column prop="label" align="center" label="列名" />
-			<el-table-column v-slot="scope" prop="isShow" align="center" label="显示">
+		<el-table :data="colSetting" row-key="prop" default-expand-all border :tree-props="{ children: '_children' }" v-horizontal-scroll="'always'">
+			<el-table-column prop="label" align="center" label="列名" width="80"/>
+			<el-table-column v-slot="scope" prop="isShow" align="center" label="显示" width="70">
 				<el-checkbox v-model="scope.row.isShow" @change="update"></el-checkbox>
 			</el-table-column>
 			<el-table-column v-slot="scope" prop="fixed" align="center" label="固定">

+ 67 - 67
src/views/statistics/order/centerCount.vue

@@ -2,7 +2,7 @@
 	<div class="statistics-order-center-count-container layout-pd">
 		<!-- 搜索  -->
 		<el-card shadow="never">
-			<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent  inline>
+			<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
 				<el-form-item label="姓名" prop="Keyword">
 					<el-input v-model="state.queryParams.Keyword" placeholder="姓名" clearable @keyup.enter="handleQuery" class="keyword-input" />
 				</el-form-item>
@@ -17,7 +17,7 @@
 						:shortcuts="shortcuts"
 						@change="handleQuery"
 						value-format="YYYY-MM-DD"
-            :clearable="false"
+						:clearable="false"
 					/>
 				</el-form-item>
 				<el-form-item>
@@ -29,23 +29,21 @@
 			</el-form>
 		</el-card>
 		<el-card shadow="never">
-      <ProTable
-          ref="proTableRef"
-          :columns="columns"
-          :data="state.tableData"
-          @updateTable="queryList"
-          :loading="state.loading"
-          show-summary
-          border
-          row-key="orgId"
-          @sort-change="sortChange"
-          :total="state.total"
-          v-model:page-index="state.queryParams.PageIndex"
-          v-model:page-size="state.queryParams.PageSize"
-          :summary-method="getSummaries"
-          role-key="userId"
-      >
-      </ProTable>
+			<ProTable
+				ref="proTableRef"
+				:columns="columns"
+				:data="state.tableData"
+				@updateTable="queryList"
+				:loading="state.loading"
+				show-summary
+				border
+				row-key="orgId"
+				@sort-change="sortChange"
+				:pagination="false"
+				:summary-method="getSummaries"
+				role-key="userId"
+			>
+			</ProTable>
 		</el-card>
 	</div>
 </template>
@@ -53,29 +51,35 @@
 import { onMounted, reactive, ref } from 'vue';
 import { FormInstance } from 'element-plus';
 import { centerList } from '@/api/statistics/order';
-import { defaultDate, shortcuts } from "@/utils/constants";
+import { defaultDate, shortcuts } from '@/utils/constants';
 
 // 表格配置项
 const columns = ref<any[]>([
-  { type: 'index', fixed: 'left', width: 55, label: '序号', align: 'center' },
-  { prop: 'userName', label: '姓名', align: 'center' },
-  { label: '有效件', align: 'center',prop:'effective', _children: [
-    { prop: 'centreArchive', label: '中心归档件', align: 'center', sortable: 'custom' },
-    { prop: 'centreCareOf', label: '转办信件', align: 'center', sortable: 'custom' }
-  ] },
-  { prop: 'invalid', label: '无效信件', align: 'center', sortable: 'custom' },
-  { prop: 'repeat', label: '重复信件', align: 'center', sortable: 'custom' },
-  { prop: 'subtotal', label: '所有信件', align: 'center', sortable: 'custom' },
+	{ type: 'index', fixed: 'left', width: 55, label: '序号', align: 'center' },
+	{ prop: 'userName', label: '姓名', align: 'center' },
+	{
+		label: '有效件',
+		align: 'center',
+		prop: 'effective',
+		_children: [
+			{ prop: 'centreArchive', label: '中心归档件', align: 'center', sortable: 'custom' },
+			{ prop: 'centreCareOf', label: '转办信件', align: 'center', sortable: 'custom' },
+			{ prop: 'noCentreCareOf', label: '待转办信件', align: 'center', sortable: 'custom' },
+		],
+	},
+	{ prop: 'invalid', label: '无效信件', align: 'center', sortable: 'custom' },
+	{ prop: 'repeat', label: '重复信件', align: 'center', sortable: 'custom' },
+	{ prop: 'subtotal', label: '所有信件', align: 'center', sortable: 'custom' },
 ]);
 // 定义变量内容
 const ruleFormRef = ref<RefType>(); // 表单ref
 const state = reactive({
 	queryParams: {
 		// 查询条件
-		PageIndex: 1,
-		PageSize: 10,
 		Keyword: null, // 关键词
-		crTime: defaultDate
+		crTime: defaultDate,
+		SortField: null,
+		SortRule: null,
 	},
 	tableData: [], //表单
 	loading: false, // 加载
@@ -83,8 +87,8 @@ const state = reactive({
 });
 /** 搜索按钮操作 */
 const handleQuery = () => {
-  state.queryParams.PageIndex = 1;
-  queryList();
+	// state.queryParams.PageIndex = 1;
+	queryList();
 };
 /** 获取列表 */
 const queryList = () => {
@@ -98,23 +102,19 @@ const queryList = () => {
 	const request = {
 		StartTime,
 		EndTime,
-		DelayState: state.queryParams.DelayState,
-		PageIndex: state.queryParams.PageIndex,
-		PageSize: state.queryParams.PageSize,
 		Keyword: state.queryParams.Keyword,
 		SortField: state.queryParams.SortField,
 		SortRule: state.queryParams.SortRule,
 	};
 	centerList(request)
 		.then((res: any) => {
-			state.tableData = res.result?.items ?? [];
-			state.total = res.result?.total ?? 0;
+			state.tableData = res.result;
 			state.loading = false;
 		})
 		.catch(() => {
 			state.loading = false;
 		});
-}
+};
 // 排序
 const sortChange = (val: any) => {
 	state.queryParams.SortField = val.order ? val.prop : null;
@@ -127,35 +127,35 @@ const resetQuery = (formEl: FormInstance | undefined) => {
 	if (!formEl) return;
 	formEl.resetFields();
 	queryList();
-}
+};
 // 合计
 const getSummaries = (param: any) => {
-  const { columns, data } = param;
-  const sums: string[] = [];
-  columns.forEach((column: { property: string }, index: number) => {
-    if (index === 0) {
-      sums[index] = '合计';
-      return;
-    }
-    const values = data.map((item: { [x: string]: any }) => Number(item[column.property]));
-    if (['userName'].includes(column.property)) {
-      //百分比不能计算
-      sums[index] = '';
-      return '';
-    } else if (!values.every((value: unknown) => Number.isNaN(value))) {
-      sums[index] = `${values.reduce((prev: any, curr: any) => {
-        const value = Number(curr);
-        if (!Number.isNaN(value)) {
-          return prev + curr;
-        } else {
-          return prev;
-        }
-      }, 0)}`;
-    } else {
-      sums[index] = ' ';
-    }
-  });
-  return sums;
+	const { columns, data } = param;
+	const sums: string[] = [];
+	columns.forEach((column: { property: string }, index: number) => {
+		if (index === 0) {
+			sums[index] = '合计';
+			return;
+		}
+		const values = data.map((item: { [x: string]: any }) => Number(item[column.property]));
+		if (['userName'].includes(column.property)) {
+			//百分比不能计算
+			sums[index] = '';
+			return '';
+		} else if (!values.every((value: unknown) => Number.isNaN(value))) {
+			sums[index] = `${values.reduce((prev: any, curr: any) => {
+				const value = Number(curr);
+				if (!Number.isNaN(value)) {
+					return prev + curr;
+				} else {
+					return prev;
+				}
+			}, 0)}`;
+		} else {
+			sums[index] = ' ';
+		}
+	});
+	return sums;
 };
 
 onMounted(() => {

+ 1 - 0
src/views/tels/callLog/index.vue

@@ -469,6 +469,7 @@ const noColumns = [
 	{ prop: 'gateway', label: '中继号码', width: 120 },
 	{ prop: 'userName', label: '话务员' },
 	{ prop: 'callDirectionText', label: '电话方向' },
+	{ prop: 'endByText', label: '挂机类型', width: 120 },
 	{
 		prop: 'beginIvrTime',
 		label: 'ivr开始时间',