Forráskód Böngészése

reactor:固定菜单调整;

zhangchong 1 éve
szülő
commit
90b3b683c8

+ 22 - 0
src/api/statistics/department.ts

@@ -46,4 +46,26 @@ export const departmentSatisfaction = (params: object) => {
     method: 'get',
     params,
   });
+}
+/**
+ * @description 部门满意度统计明细
+ * @param {object} params
+ */
+export const departmentSatisfactionDetail = (params: object) => {
+  return request({
+    url: `/api/v1/BiOrder/visit-org-satisfaction-detail`,
+    method: 'get',
+    params,
+  });
+}
+/**
+ * @description 子部门满意度统计明细
+ * @param {object} params
+ */
+export const departmentSatisfactionOrg = (params: object) => {
+  return request({
+    url: `/api/v1/BiOrder/visit-org-statisfaction-org-detail`,
+    method: 'get',
+    params,
+  });
 }

+ 1 - 1
src/router/index.ts

@@ -30,7 +30,7 @@ const { isRequestRoutes } = themeConfig.value;
  * @link 参考:https://next.router.vuejs.org/zh/api/#createrouter
  */
 export const router = createRouter({
-	history: createWebHistory(),
+	history: createWebHistory('/app/'),
 	/**
 	 * 说明:
 	 * 1、notFoundAndNoPower 默认添加 404、401 界面,防止一直提示 No match found for location with path 'xxx'

+ 105 - 102
src/views/statistics/department/detailSatisfied.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="statistics-department-satisfaction-detail-container layout-pd">
 		<!-- 搜索  -->
-		<el-card shadow="never">
+		<!--		<el-card shadow="never">
 			<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
 				<el-form-item label="部门名称" prop="OrgName">
 					<el-input v-model="state.queryParams.OrgName" placeholder="部门名称" clearable @keyup.enter="queryList" class="keyword-input" />
@@ -35,76 +35,112 @@
 					</el-button>
 				</el-form-item>
 			</el-form>
-		</el-card>
+		</el-card>-->
 		<el-card shadow="never">
-			<ProTable
-				ref="proTableRef"
-				:columns="columns"
-				:data="state.tableData"
-				@updateTable="queryList"
-				:loading="state.loading"
-				show-summary
-				border
-				:pagination="false"
-				:summary-method="getSummaries"
-			>
-				<template #orgName="{ row }">
-					<el-button link type="primary" @click="onDetailOrg(row)">{{ row.orgName }}</el-button>
-				</template>
-				<template #verySatisfiedCount="{ row }">
-					<el-button link type="primary" @click="onDetail(row.verySatisfiedKey,row,'非常满意')">{{ row.verySatisfiedCount }}</el-button>
-				</template>
-				<template #satisfiedCount="{ row }">
-					<el-button link type="primary" @click="onDetail(row.satisfiedKey,row,'满意')">{{ row.satisfiedCount }}</el-button>
+			<ProTable ref="proTableRef" :columns="columns" :data="state.tableData" @updateTable="queryList" :loading="state.loading" :pagination="false">
+				<template #isProvince="{ row }">
+					<span>{{ row.order?.isProvince ? '省工单' : '市工单' }}</span>
 				</template>
-				<template #generalSatisfiedCount="{ row }">
-					<el-button link type="primary" @click="onDetail(row.generalSatisfiedKey,row)">{{ row.generalSatisfiedCount }}</el-button>
+				<template #title="{ row }">
+					<order-detail :order="row.order" @updateList="queryList">{{ row.order?.title }}</order-detail>
 				</template>
-				<template #noSatisfiedCount="{ row }">
-					<el-button link type="primary" @click="onDetail(row.noSatisfiedKey,row)">{{ row.noSatisfiedCount }}</el-button>
+				<template #acceptorName="{ row }">
+					<span
+						>{{ row.order?.acceptorName }} <span v-if="row.order?.acceptorStaffNo">[{{ row.order?.acceptorStaffNo }}]</span>
+					</span>
 				</template>
-				<template #veryNoSatisfiedCount="{ row }">
-					<el-button link type="primary" @click="onDetail(row.veryNoSatisfiedKey,row)">{{ row.veryNoSatisfiedCount }}</el-button>
+				<template #voicePj="{ row }">
+					<span v-for="item in row.orderVisit.orderVisitDetails">
+						<span v-if="item.visitTarget === 10">{{ item.voiceEvaluateText }}</span>
+					</span>
 				</template>
-				<template #noEvaluateCount="{ row }">
-					<el-button link type="primary" @click="onDetail(row.noEvaluateKey,row)">{{ row.noEvaluateCount }}</el-button>
+				<template #hwyPj="{ row }">
+					<span v-for="item in row.orderVisit.orderVisitDetails">
+						<span v-if="item.visitTarget === 10">{{ item.seatEvaluateText }}</span>
+					</span>
 				</template>
-				<template #noPutThroughCount="{ row }">
-					<el-button link type="primary" @click="onDetail(row.noPutThroughKey,row)">{{ row.noPutThroughCount }}</el-button>
+				<!-- 表格操作 -->
+				<template #operation="{ row }">
+					<el-button link type="primary" @click="visitDetail(row)" title="查看回访详情"> 回访详情 </el-button>
+					<order-detail :order="row.order" @updateList="queryList" />
 				</template>
 			</ProTable>
 		</el-card>
+		<!-- 回访详情 -->
+		<visit-detail-com ref="visitDetailRef" @updateList="queryList" />
 	</div>
 </template>
 <script setup lang="tsx" name="statisticsDepartmentSatisfiedDetail">
-import { onMounted, reactive, ref } from 'vue';
+import { onMounted, reactive, ref, defineAsyncComponent } from 'vue';
 import { ElButton, FormInstance } from 'element-plus';
 import { throttle } from '@/utils/tools';
-import { departmentSatisfaction } from '@/api/statistics/department';
-import { shortcuts } from '@/utils/constants';
+import { departmentSatisfactionDetail } from '@/api/statistics/department';
 import dayjs from 'dayjs';
+import { formatDate } from '@/utils/formatTime';
+
+// 引入组件
+const VisitDetailCom = defineAsyncComponent(() => import('@/views/business/visit/component/Visit-detail.vue')); // 回访
+const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
 
 // 表格配置项
 const columns = ref<any[]>([
-	{ type: 'index', fixed: 'left', width: 55, label: '序号', align: 'center' },
-	{ prop: 'orgName', label: '部门名称', minWidth: 200 },
-	{ prop: 'orgTypeText', label: '部门类别', minWidth: 120 },
-	{ prop: 'totalSumCount', label: '小计' },
-	{ prop: 'totalSumRate', label: '总满意率', minWidth: 120 },
-	{ prop: 'verySatisfiedCount', label: '非常满意', minWidth: 120 },
-	{ prop: 'verySatisfiedRate', label: '非常满意率', minWidth: 120 },
-	{ prop: 'satisfiedCount', label: '满意', minWidth: 120 },
-	{ prop: 'satisfiedRate', label: '满意率', minWidth: 120 },
-	{ prop: 'generalSatisfiedCount', label: '视为满意', minWidth: 120 },
-	{ prop: 'generalSatisfiedRate', label: '视为满意率', minWidth: 120 },
-	{ prop: 'noSatisfiedCount', label: '默认满意', minWidth: 120 },
-	{ prop: 'noSatisfiedRate', label: '默认满意率', minWidth: 120 },
-	{ prop: 'veryNoSatisfiedCount', label: '不满意', minWidth: 120 },
-	{ prop: 'veryNoSatisfiedRate', label: '不满意率', minWidth: 120 },
-	{ prop: 'noEvaluateCount', label: '未作评价', minWidth: 120 },
-	{ prop: 'noEvaluateRate', label: '未作评价率', minWidth: 120 },
-	{ prop: 'noPutThroughCount', label: '未接通', minWidth: 120 },
-	{ prop: 'noPutThroughRate', label: '未接通率', minWidth: 120 },
+	{ type: 'selection', fixed: 'left', width: 55 },
+	{ prop: 'order.no', label: '工单编码', width: 150 },
+	{ prop: 'isProvince', label: '省/市工单', width: 100 },
+	{ prop: 'title', label: '工单标题', width: 300 },
+	{ prop: 'order.sourceChannel', label: '来源方式', width: 100 },
+	{ prop: 'orderVisit.visitStateText', label: '回访状态', width: 100 },
+	{ prop: 'orderVisit.visitTypeText', label: '回访方式', width: 100 },
+	{ prop: 'order.acceptType', label: '受理类型', width: 150 },
+	{ prop: 'order.hotspotName', label: '热点分类', width: 200 },
+	{ prop: 'acceptorName', label: '受理人', width: 170 },
+	{ prop: 'order.orgLevelOneName', label: '一级部门', width: 150 },
+	{ prop: 'order.actualHandleOrgName', label: '接办部门', width: 120 },
+	{
+		prop: 'order.startTime',
+		label: '受理时间',
+		width: 170,
+		render: (scope) => {
+			return <span>{formatDate(scope.row.order?.startTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
+		},
+	},
+	{
+		prop: 'order.filedTime',
+		label: '办结时间',
+		width: 170,
+		render: (scope) => {
+			return <span>{formatDate(scope.row.order?.filedTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
+		},
+	},
+	{
+		prop: 'publishTime',
+		label: '发布时间',
+		width: 170,
+		render: (scope) => {
+			return <span>{formatDate(scope.row.publishTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
+		},
+	},
+	{
+		prop: 'orderVisit.creationTime',
+		label: '回访任务创建时间',
+		width: 170,
+		render: (scope) => {
+			return <span>{formatDate(scope.row.orderVisit.creationTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
+		},
+	},
+	{ prop: 'orderVisit.employeeName', label: '回访人', width: 150 },
+	{
+		prop: 'orderVisit.visitTime',
+		label: '回访时间',
+		width: 170,
+		render: (scope) => {
+			return <span>{formatDate(scope.row.orderVisit.visitTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
+		},
+	},
+	{ prop: 'order.counterSignTypeText', label: '是否会签', width: 100 },
+	{ prop: 'voicePj', label: '语音评价', width: 150 },
+	{ prop: 'hwyPj', label: '话务员满意度', width: 150 },
+	{ prop: 'operation', label: '操作', fixed: 'right', width: 170, align: 'center' },
 ]);
 // 定义变量内容
 const ruleFormRef = ref<RefType>(); // 表单ref
@@ -121,24 +157,19 @@ const state = reactive({
 	loading: false, // 加载
 	total: 0, // 总数
 });
+const historyParams = history.state;
 /** 获取列表 */
 const queryList = throttle(() => {
 	state.loading = true;
-	let StartDate = null;
-	let EndDate = null;
-	if (state.queryParams?.crTime) {
-		StartDate = state.queryParams?.crTime[0];
-		EndDate = state.queryParams?.crTime[1];
-	}
 	const request = {
-		StartDate,
-		EndDate,
-		TypeId: state.queryParams.TypeId,
-		PageIndex: state.queryParams.PageIndex,
-		PageSize: state.queryParams.PageSize,
-		LineNum: state.queryParams.LineNum,
+		StartDate: historyParams.StartDate,
+		EndDate: historyParams.StartDate,
+		TypeId: historyParams.TypeId,
+		LineNum: historyParams.LineNum,
+		OrgCode: historyParams.OrgCode,
+		DateValue: historyParams.DateValue,
 	};
-	departmentSatisfaction(request)
+	departmentSatisfactionDetail(request)
 		.then((res: any) => {
 			state.tableData = res.result ?? [];
 			state.loading = false;
@@ -153,42 +184,14 @@ const resetQuery = throttle((formEl: FormInstance | undefined) => {
 	formEl.resetFields();
 	queryList();
 }, 300);
-// 合计
-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 (['orgName'].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 onDetailOrg = (row: any) => {
-  console.log(row);
-};
-// 点击数字
-const onDetail = (key: string,row) => {
-  console.log(key,row);
+// 回访详情
+const visitDetailRef = ref<RefType>();
+const visitDetail = (row: any) => {
+	if ([10, 20].includes(row.visitState)) {
+		visitDetailRef.value.openDialog(row, '回访');
+	} else {
+		visitDetailRef.value.openDialog(row, '回访详情');
+	}
 };
 onMounted(() => {
 	queryList();

+ 21 - 9
src/views/statistics/department/satisfied.vue

@@ -191,8 +191,6 @@ const queryList = throttle(() => {
 		StartDate,
 		EndDate,
 		TypeId: state.queryParams.TypeId,
-		PageIndex: state.queryParams.PageIndex,
-		PageSize: state.queryParams.PageSize,
 		LineNum: state.queryParams.LineNum,
 	};
 	departmentSatisfaction(request)
@@ -231,7 +229,7 @@ const getSummaries = (param: any) => {
 				'noSatisfiedRate',
 				'veryNoSatisfiedRate',
 				'noEvaluateRate',
-        'noPutThroughRate',
+				'noPutThroughRate',
 			].includes(column.property)
 		) {
 			//百分比不能计算
@@ -256,24 +254,38 @@ const router = useRouter();
 // 点击部门名称
 const onDetailOrg = (row: any) => {
 	console.log(row);
-/*	router.push({
+	/*	router.push({
 		name: 'statisticsDepartmentSatisfiedOrg',
 		params: {
 			key: row.orgCode,
-			tagsViewName: '知识查看',
+			tagsViewName: '部门满意度统计明细',
 		},
 	});*/
 };
 // 点击数字
 const onDetail = (key: string, row, type: string) => {
-	console.log(key, row,type);
-/*	router.push({
+	console.log(key, row, type);
+	let StartDate = null;
+	let EndDate = null;
+	if (state.queryParams?.crTime) {
+		StartDate = state.queryParams?.crTime[0];
+		EndDate = state.queryParams?.crTime[1];
+	}
+	router.push({
 		name: 'statisticsDepartmentSatisfiedDetail',
 		params: {
 			key: key,
-			tagsViewName: '知识查看',
+			tagsViewName: '部门满意度统计明细',
 		},
-	});*/
+		state: {
+			StartDate,
+			EndDate,
+			OrgCode: row.orgCode,
+			TypeId: state.queryParams.TypeId,
+			LineNum: state.queryParams.LineNum,
+			DateValue: key,
+		},
+	});
 };
 onMounted(() => {
 	queryList();

+ 0 - 1
src/views/todo/seats/accept/index.vue

@@ -1013,7 +1013,6 @@ const loadBaseData = async () => {
 };
 // 如果是修改加载表单内容
 const historyParams = history.state;
-
 const loadForm = async () => {
 	//  historyParams.createBy  createBy 代表来源  tel:来电弹单  letter:互联网来信 默认表示手动创建
 	if (historyParams.createBy) {