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

reactor:对接随手拍报表;

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

+ 85 - 1
src/api/snapshot/statistics.ts

@@ -536,7 +536,7 @@ export const getSSPStatisticsIndustry = (params?: object) => {
 }
 /**
  * @description 随手拍行业导出
- * @param {object} params
+ * @param {object} data
  */
 export const getSSPStatisticsIndustryExport = (data: object) => {
 	return request(
@@ -550,4 +550,88 @@ export const getSSPStatisticsIndustryExport = (data: object) => {
 			reduce_data_format: false,
 		}
 	);
+}
+/**
+ * @description 获取随手拍部门平均办理时间
+ * @param {object} params
+ */
+export const getSSPStatisticsDepartment = (params?: object) => {
+	return request({
+		url: '/api/v1/BiSnapshot/department-avetime-statistics',
+		method: 'get',
+		params,
+	});
+}
+/**
+ * @description 随手拍部门平均办理时间导出
+ * @param {object} data
+ */
+export const getSSPStatisticsDepartmentExport = (data: object) => {
+	return request(
+		{
+			url: '/api/v1/BiSnapshot/department-avetime-statistics/export_excel',
+			method: 'post',
+			data,
+			responseType: 'blob',
+		},
+		{
+			reduce_data_format: false,
+		}
+	);
+}
+/**
+ * @description 获取随手拍部门平均办理时间详情
+ * @param {object} params
+ */
+export const getSSPStatisticsDepartmentDetail = (params?: object) => {
+	return request({
+		url: '/api/v1/BiSnapshot/department-avetime-statistics-detail',
+		method: 'get',
+		params,
+	});
+}
+/**
+ * @description 随手拍部门平均办理时间详情导出
+ * @param {object} data
+ */
+export const getSSPStatisticsDepartmentDetailExport = (data: object) => {
+	return request(
+		{
+			url: '/api/v1/BiSnapshot/department-avetime-statistics-detail/export_excel',
+			method: 'post',
+			data,
+			responseType: 'blob',
+		},
+		{
+			reduce_data_format: false,
+		}
+	);
+}
+/**
+ * @description 获取随手拍部门考核统计
+ * @param {object} params
+ */
+export const getSSPStatisticsDepartmentAssessment = (params?: object) => {
+	return request({
+		url: '/api/v1/BiSnapshot/department-statistics',
+		method: 'get',
+		params,
+	});
+}
+/**
+ * @description 随手拍部门考核统计导出
+ * @param {object} data
+ */
+export const getSSPStatisticsDepartmentAssessmentExport = (data: object) => {
+	return request(
+		{
+			url: '/api/v1/BiSnapshot/department-statistics/export_excel',
+			method: 'post',
+			data,
+			responseType: 'blob',
+		},
+		{
+			reduce_data_format: false,
+		}
+	);
 }

+ 3 - 3
src/router/route.ts

@@ -629,9 +629,9 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
 		},
 	},
 	{
-		path: '/snapshot/statistic/detailDepartmentAverage',
-		name: 'snapshotStatisticsDetailDepartmentAverage',
-		component: () => import('@/views/snapshot/statistics/detailDepartmentAverage.vue'),
+		path: '/snapshot/statistic/detailAverageHandleTime',
+		name: 'snapshotStatisticsDetailAverageHandleTime',
+		component: () => import('@/views/snapshot/statistics/detailAverageHandleTime.vue'),
 		meta: {
 			title: '部门平均办理时间明细',
 			isKeepAlive: true,

+ 12 - 15
src/views/snapshot/statistics/averageHandleTime.vue

@@ -24,7 +24,7 @@
 import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
 import { FormInstance } from 'element-plus';
 import { defaultDate } from '@/utils/constants';
-import { getSSPStatisticsBaseData, getSSPStatisticsProcess, getSSPStatisticsProcessExport } from '@/api/snapshot/statistics';
+import { getSSPStatisticsDepartment, getSSPStatisticsDepartmentExport } from '@/api/snapshot/statistics';
 import Other from '@/utils/other';
 import { useRouter } from 'vue-router';
 
@@ -79,40 +79,39 @@ const gridOptions = reactive<any>({
 			fixed: 'left',
 		},
 		{
-			field: 'ybOrderCountNum',
+			field: 'totalMinutes',
 			title: '总分钟数',
 		},
 		{
-			field: 'ybOrderCountNum',
+			field: 'orderCountNum',
 			title: '工单数',
 			slots: {
 				default({ row }) {
 					return (
-						<el-button type="primary" onClick={() => linkDetail(row, 'ybOrderCountNum')} link>
-							{row.ybOrderCountNum}
+						<el-button type="primary" onClick={() => linkDetail(row)} link>
+							{row.orderCountNum}
 						</el-button>
 					);
 				},
 			},
 		},
 		{
-			field: 'ybOrderCountNum',
+			field: 'avgMinutes',
 			title: '平均分钟数',
 		},
 		{
-			field: 'ybOrderCountNum',
+			field: 'avgHours',
 			title: '平均小时数',
 		},
 	],
 	data: [],
 	params: {
-		exportMethod: getSSPStatisticsProcessExport,
+		exportMethod: getSSPStatisticsDepartmentExport,
 		exportParams: requestParams,
 	},
 });
 /** 搜索按钮操作 节流操作 */
 const handleQuery = () => {
-	state.queryParams.PageIndex = 1;
 	queryList();
 };
 // 获取参数列表
@@ -123,7 +122,7 @@ const queryList = () => {
 	requestParams.value.StartTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[0]; // 受理时间
 	requestParams.value.EndTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
 	Reflect.deleteProperty(requestParams.value, 'crTime'); // 删除无用的参数
-	getSSPStatisticsProcess(requestParams.value)
+	getSSPStatisticsDepartment(requestParams.value)
 		.then((res) => {
 			state.loading = false;
 			gridOptions.data = res.result ?? [];
@@ -145,14 +144,12 @@ const resetQuery = (formEl: FormInstance | undefined) => {
 };
 // 跳转详情
 const router = useRouter();
-const linkDetail = (row: any, FieldName: string) => {
+const linkDetail = (row: any) => {
 	console.log(row, '11');
 	router.push({
-		path: '/snapshot/statistic/detailDepartmentAverage',
+		path: '/snapshot/statistic/detailAverageHandleTime',
 		query: {
-			FieldName,
-			OrgId: row.orgCode,
-			IndustryId: state.queryParams.industryId,
+			OrgCode: row.orgCode,
 			StartTime: state.queryParams.crTime[0],
 			EndTime: state.queryParams.crTime[1],
 		},

+ 8 - 13
src/views/snapshot/statistics/detailDepartmentAverage.vue → src/views/snapshot/statistics/detailAverageHandleTime.vue

@@ -22,13 +22,10 @@
 		</div>
 	</div>
 </template>
-<script setup lang="tsx" name="snapshotStatisticsDetailDepartmentAverage">
+<script setup lang="tsx" name="snapshotStatisticsDetailAverageHandleTime">
 import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
 import Other from '@/utils/other';
-import {
-	getSSPStatisticsProcessDetail,
-	getSSPStatisticsProcessDetailExport,
-} from '@/api/snapshot/statistics';
+import { getSSPStatisticsDepartmentDetail, getSSPStatisticsDepartmentDetailExport } from '@/api/snapshot/statistics';
 import { useRoute } from 'vue-router';
 
 // 引入组件
@@ -70,7 +67,7 @@ const gridOptions = reactive<any>({
 	customConfig: {
 		storage: true,
 	},
-	id: 'snapshotStatisticsDetailDepartmentAverage',
+	id: 'snapshotStatisticsDetailAverageHandleTime',
 	rowConfig: { isHover: true, height: 30, isCurrent: true, useKey: true },
 	height: 'auto',
 	columns: [
@@ -118,8 +115,8 @@ const gridOptions = reactive<any>({
 			sortable: true,
 			formatter: 'formatDate',
 		},
-    { field: 'actualHandleOrgName', title: '办理时长(分)', width: 140 },
-    { field: 'actualHandleOrgName', title: '办理时长(时)', width: 140 },
+		{ field: 'totalMinutes', title: '办理时长(分)', width: 140 },
+		{ field: 'totalHours', title: '办理时长(时)', width: 140 },
 		{ field: 'actualHandleOrgName', title: '接办部门', width: 140 },
 		{
 			field: 'actualHandleTime',
@@ -140,7 +137,7 @@ const gridOptions = reactive<any>({
 	],
 	data: [],
 	params: {
-		exportMethod: getSSPStatisticsProcessDetailExport,
+		exportMethod: getSSPStatisticsDepartmentDetailExport,
 		exportParams: requestParams,
 	},
 	sortConfig: {
@@ -168,12 +165,10 @@ const queryList = () => {
 		requestParams.value = Other.deepClone(state.queryParams);
 		requestParams.value.StartTime = routeQueryParams.StartTime;
 		requestParams.value.EndTime = routeQueryParams.EndTime;
-		requestParams.value.FieldName = routeQueryParams.FieldName;
-		requestParams.value.OrgId = routeQueryParams.OrgId;
-		requestParams.value.IndustryId = routeQueryParams.IndustryId;
+		requestParams.value.OrgCode = routeQueryParams.OrgCode;
 		state.loading = true;
 		gridOptions.loading = true;
-		getSSPStatisticsProcessDetail(requestParams.value)
+		getSSPStatisticsDepartmentDetail(requestParams.value)
 			.then((response: any) => {
 				gridOptions.data = response?.result.items ?? [];
 				state.total = response?.result.total;

+ 18 - 20
src/views/snapshot/statistics/examineDp.vue

@@ -24,9 +24,8 @@
 import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
 import { FormInstance } from 'element-plus';
 import { defaultDate } from '@/utils/constants';
-import { getSSPStatisticsBaseData, getSSPStatisticsProcess, getSSPStatisticsProcessExport } from '@/api/snapshot/statistics';
+import { getSSPStatisticsDepartmentAssessment, getSSPStatisticsDepartmentAssessmentExport } from '@/api/snapshot/statistics';
 import Other from '@/utils/other';
-import { useRouter } from 'vue-router';
 
 // 引入组件
 const StatisticalTime = defineAsyncComponent(() => import('@/components/StatisticalTime/index.vue')); // 日期类型选择组件
@@ -88,77 +87,77 @@ const gridOptions = reactive<any>({
 			title: '办件信息',
 			children: [
 				{
-					field: 'ybOrderCountNum',
+					field: 'onTimeCount',
 					title: '按时办结工单',
 					width: 120,
 				},
 				{
-					field: 'zbOrderCountNum',
+					field: 'timelinessRatio',
 					title: '工单及时响应率',
 					width: 120,
 				},
 				{
-					field: 'completeOnTimeRate',
+					field: 'receiveIn4Hour',
 					title: '四小时内',
 					width: 100,
 				},
 				{
-					field: 'receiveIn20Minutes',
+					field: 'timeOutField',
 					title: '超期办结',
 					width: 120,
 				},
 				{
-					field: 'receiveOut20Minutes',
+					field: 'timeOutNoField',
 					title: '超期未办结',
 					width: 120,
 				},
 				{
-					field: 'promptResponse',
+					field: 'timeOutRate',
 					title: '超期率',
 					width: 120,
 				},
 				{
-					field: 'backNum',
+					field: 'timeOutCount',
 					title: '超期量',
 					width: 100,
 				},
 				{
-					field: 'totalHandleDuration',
+					field: 'closeOnTimeRate',
 					title: '按时办结率',
 					width: 140,
 				},
 				{
-					field: 'end3Day',
+					field: 'satisfiedCount',
 					title: '满意工单',
 					width: 100,
 				},
 				{
-					field: 'end3To5Day',
+					field: 'satisfiedRate',
 					title: '回访满意率',
 					width: 100,
 				},
 				{
-					field: 'end5To7Day',
+					field: 'firstFiledOrderCount',
 					title: '一次性办结工单',
 					width: 120,
 				},
 				{
-					field: 'end7Day',
+					field: 'firstFiledOrderRate',
 					title: '一次性办结率',
 					width: 120,
 				},
 				{
-					field: 'closeOnTimeRate',
+					field: 'secondNum',
 					title: '二次办理',
 					width: 100,
 				},
 				{
-					field: 'satisfiedCount',
+					field: 'secondSatisfied',
 					title: '二次办理满意率',
 					width: 120,
 				},
 				{
-					field: 'noSatisfiedCount',
+					field: 'secondRate',
 					title: '二次办结率',
 					width: 100,
 				},
@@ -167,13 +166,12 @@ const gridOptions = reactive<any>({
 	],
 	data: [],
 	params: {
-		exportMethod: getSSPStatisticsProcessExport,
+		exportMethod: getSSPStatisticsDepartmentAssessmentExport,
 		exportParams: requestParams,
 	},
 });
 /** 搜索按钮操作 节流操作 */
 const handleQuery = () => {
-	state.queryParams.PageIndex = 1;
 	queryList();
 };
 // 获取参数列表
@@ -184,7 +182,7 @@ const queryList = () => {
 	requestParams.value.StartTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[0]; // 受理时间
 	requestParams.value.EndTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
 	Reflect.deleteProperty(requestParams.value, 'crTime'); // 删除无用的参数
-	getSSPStatisticsProcess(requestParams.value)
+	getSSPStatisticsDepartmentAssessment(requestParams.value)
 		.then((res) => {
 			state.loading = false;
 			gridOptions.data = res.result ?? [];