Selaa lähdekoodia

reactor:新增部门满意度统计表;

zhangchong 1 vuosi sitten
vanhempi
commit
6c07bc2f20

+ 1 - 1
.env.production

@@ -11,7 +11,7 @@ VITE_API_URL=http://110.188.24.28:50100
 VITE_API_SOCKET_URL=http://110.188.24.28:50100/hubs/hotline
 
 # 上传 API
-VITE_API_UPLOAD_URL=http://110.188.24.28:50120
+VITE_API_UPLOAD_URL=http://110.188.24.28:50102/upload
 
 # 文件上传地址前缀
 VITE_FILE_PREFIX=http://open.fs.12345lm.cn

+ 10 - 0
src/api/business/delay.ts

@@ -65,6 +65,16 @@ export const workflowDelayParams= () => {
         method: 'get'
     });
 };
+/**
+ * @description 延期审批参数
+ * @param {string} workflowId
+ */
+export const delayApproveParams = (workflowId:string) => {
+    return request({
+        url: `/api/v1/Order/delay/${workflowId}/nextsteps`,
+        method: 'get'
+    });
+}
 /**
  * @description 延期修改
  * @param {object} data

+ 5 - 1
src/components/ProcessAudit/index.vue

@@ -468,7 +468,7 @@ import {
 	workflowReject,
 } from '@/api/system/workflow';
 import { redoApply, redoBaseData } from '@/api/business/redo';
-import { delayApply, delayBaseData, delayCalcEndTime, workflowDelayParams } from '@/api/business/delay';
+import { delayApply, delayApproveParams, delayBaseData, delayCalcEndTime, workflowDelayParams } from "@/api/business/delay";
 import { discernApply, screenBaseData, workflowDiscernParams } from '@/api/business/discern';
 import { debounce } from '@/utils/tools';
 import {
@@ -571,6 +571,10 @@ const openDialog = async (val: any) => {
 				timeType.value = responseDelay.result?.timeType ?? []; // 延期时间单位
 				handleResult(workflowDelayResponse);
 				break;
+      case '延期审批': // 延期审批
+        const [nextResponseDelayAudit] = await Promise.all([delayApproveParams(state.workflowId)]); //获取延期审批流程参数
+        handleResult(nextResponseDelayAudit);
+        break;
 			case '甄别申请': // 甄别申请
 				const [workflowDiscernResponse, responseDiscern] = await Promise.all([workflowDiscernParams(), screenBaseData()]); //获取开启流程参数
 				screenTypeOptions.value = responseDiscern.result?.screenType ?? []; // 甄别理由

+ 18 - 17
src/views/statistics/department/satisfaction.vue

@@ -1,5 +1,5 @@
 <template>
-	<div class="statistics-department-overdue-container layout-pd">
+	<div class="statistics-department-satisfaction-container layout-pd">
 		<!-- 搜索  -->
 		<el-card shadow="never">
 			<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
@@ -49,28 +49,28 @@
 				:summary-method="getSummaries"
 			>
 				<template #orgName="{ row }">
-					<el-button link type="primary">{{ row.orgName }}</el-button>
+					<el-button link type="primary" @click="onDetailOrg(row)">{{ row.orgName }}</el-button>
 				</template>
 				<template #verySatisfiedCount="{ row }">
-					<el-button link type="primary">{{ row.verySatisfiedCount }}</el-button>
+					<el-button link type="primary" @click="onDetail(row.verySatisfiedKey,row,'非常满意')">{{ row.verySatisfiedCount }}</el-button>
 				</template>
 				<template #satisfiedCount="{ row }">
-					<el-button link type="primary">{{ row.satisfiedCount }}</el-button>
+					<el-button link type="primary" @click="onDetail(row.satisfiedKey,row,'满意')">{{ row.satisfiedCount }}</el-button>
 				</template>
 				<template #generalSatisfiedCount="{ row }">
-					<el-button link type="primary">{{ row.generalSatisfiedCount }}</el-button>
+					<el-button link type="primary" @click="onDetail(row.generalSatisfiedKey,row,'视为满意')">{{ row.generalSatisfiedCount }}</el-button>
 				</template>
 				<template #noSatisfiedCount="{ row }">
-					<el-button link type="primary">{{ row.noSatisfiedCount }}</el-button>
+					<el-button link type="primary" @click="onDetail(row.noSatisfiedKey,row,'默认满意')">{{ row.noSatisfiedCount }}</el-button>
 				</template>
 				<template #veryNoSatisfiedCount="{ row }">
-					<el-button link type="primary">{{ row.veryNoSatisfiedCount }}</el-button>
+					<el-button link type="primary" @click="onDetail(row.veryNoSatisfiedKey,row,'不满意')">{{ row.veryNoSatisfiedCount }}</el-button>
 				</template>
 				<template #noEvaluateCount="{ row }">
-					<el-button link type="primary">{{ row.noEvaluateCount }}</el-button>
+					<el-button link type="primary" @click="onDetail(row.noEvaluateKey,row,'未作评价')">{{ row.noEvaluateCount }}</el-button>
 				</template>
 				<template #noPutThroughCount="{ row }">
-					<el-button link type="primary">{{ row.noPutThroughCount }}</el-button>
+					<el-button link type="primary" @click="onDetail(row.noPutThroughKey,row,'未接通')">{{ row.noPutThroughCount }}</el-button>
 				</template>
 			</ProTable>
 		</el-card>
@@ -88,7 +88,7 @@ import dayjs from 'dayjs';
 const columns = ref<any[]>([
 	{ type: 'index', fixed: 'left', width: 55, label: '序号', align: 'center' },
 	{ prop: 'orgName', label: '部门名称', minWidth: 200 },
-	{ prop: 'orgType', label: '部门类别', minWidth: 120 },
+	{ prop: 'orgTypeText', label: '部门类别', minWidth: 120 },
 	{ prop: 'totalSumCount', label: '小计' },
 	{ prop: 'totalSumRate', label: '总满意率', minWidth: 120 },
 	{ prop: 'verySatisfiedCount', label: '非常满意', minWidth: 120 },
@@ -147,13 +147,6 @@ const queryList = throttle(() => {
 			state.loading = false;
 		});
 }, 300);
-// 排序
-const sortChange = (val: any) => {
-	state.queryParams.SortField = val.order ? val.prop : null;
-	// 0 升序 1 降序
-	state.queryParams.SortRule = val.order ? (val.order == 'descending' ? 1 : 0) : null;
-	queryList();
-};
 /** 重置按钮操作 */
 const resetQuery = throttle((formEl: FormInstance | undefined) => {
 	if (!formEl) return;
@@ -189,6 +182,14 @@ const getSummaries = (param: any) => {
 	});
 	return sums;
 };
+// 点击部门名称
+const onDetailOrg = (row: any) => {
+  console.log(row);
+};
+// 点击数字
+const onDetail = (key: string,row) => {
+  console.log(key,row);
+};
 onMounted(() => {
 	queryList();
 });

+ 196 - 0
src/views/statistics/department/satisfactionDetail.vue

@@ -0,0 +1,196 @@
+<template>
+	<div class="statistics-department-satisfaction-detail-container layout-pd">
+		<!-- 搜索  -->
+		<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" />
+				</el-form-item>
+				<el-form-item label="时间段" prop="crTime">
+					<el-date-picker
+						v-model="state.queryParams.crTime"
+						type="datetimerange"
+						unlink-panels
+						range-separator="至"
+						start-placeholder="开始时间"
+						end-placeholder="结束时间"
+						:shortcuts="shortcuts"
+						@change="queryList"
+						value-format="YYYY-MM-DD[T]HH:mm:ss"
+					/>
+				</el-form-item>
+				<el-form-item label="类型" prop="TypeId">
+					<el-select v-model="state.queryParams.TypeId" placeholder="类型" @change="queryList">
+						<el-option label="办件结果" value="1" />
+						<el-option label="办件态度" value="2" />
+					</el-select>
+				</el-form-item>
+				<el-form-item label="电话线路" prop="LineNum">
+					<el-input v-model="state.queryParams.LineNum" placeholder="电话线路" clearable @keyup.enter="queryList" class="keyword-input" />
+				</el-form-item>
+				<el-form-item>
+					<el-button type="primary" @click="queryList" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
+					<el-button @click="resetQuery(ruleFormRef)" class="default-button" :loading="state.loading">
+						<SvgIcon name="ele-Refresh" class="mr5" />重置
+					</el-button>
+				</el-form-item>
+			</el-form>
+		</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>
+				</template>
+				<template #generalSatisfiedCount="{ row }">
+					<el-button link type="primary" @click="onDetail(row.generalSatisfiedKey,row)">{{ row.generalSatisfiedCount }}</el-button>
+				</template>
+				<template #noSatisfiedCount="{ row }">
+					<el-button link type="primary" @click="onDetail(row.noSatisfiedKey,row)">{{ row.noSatisfiedCount }}</el-button>
+				</template>
+				<template #veryNoSatisfiedCount="{ row }">
+					<el-button link type="primary" @click="onDetail(row.veryNoSatisfiedKey,row)">{{ row.veryNoSatisfiedCount }}</el-button>
+				</template>
+				<template #noEvaluateCount="{ row }">
+					<el-button link type="primary" @click="onDetail(row.noEvaluateKey,row)">{{ row.noEvaluateCount }}</el-button>
+				</template>
+				<template #noPutThroughCount="{ row }">
+					<el-button link type="primary" @click="onDetail(row.noPutThroughKey,row)">{{ row.noPutThroughCount }}</el-button>
+				</template>
+			</ProTable>
+		</el-card>
+	</div>
+</template>
+<script setup lang="tsx" name="statisticsDepartmentSatisfactionDetail">
+import { onMounted, reactive, ref } 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 dayjs from 'dayjs';
+
+// 表格配置项
+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 },
+]);
+// 定义变量内容
+const ruleFormRef = ref<RefType>(); // 表单ref
+const state = reactive({
+	queryParams: {
+		// 查询条件
+		PageIndex: 1,
+		PageSize: 10,
+		TypeId: '1', //
+		LineNum: null,
+		crTime: [dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss'), dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss')], // 时间默认今天开始到今天结束
+	},
+	tableData: [], //表单
+	loading: false, // 加载
+	total: 0, // 总数
+});
+/** 获取列表 */
+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,
+	};
+	departmentSatisfaction(request)
+		.then((res: any) => {
+			state.tableData = res.result ?? [];
+			state.loading = false;
+		})
+		.catch(() => {
+			state.loading = false;
+		});
+}, 300);
+/** 重置按钮操作 */
+const resetQuery = throttle((formEl: FormInstance | undefined) => {
+	if (!formEl) return;
+	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);
+};
+onMounted(() => {
+	queryList();
+});
+</script>

+ 196 - 0
src/views/statistics/department/satisfactionOrg.vue

@@ -0,0 +1,196 @@
+<template>
+	<div class="statistics-department-satisfaction-org-container layout-pd">
+		<!-- 搜索  -->
+		<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" />
+				</el-form-item>
+				<el-form-item label="时间段" prop="crTime">
+					<el-date-picker
+						v-model="state.queryParams.crTime"
+						type="datetimerange"
+						unlink-panels
+						range-separator="至"
+						start-placeholder="开始时间"
+						end-placeholder="结束时间"
+						:shortcuts="shortcuts"
+						@change="queryList"
+						value-format="YYYY-MM-DD[T]HH:mm:ss"
+					/>
+				</el-form-item>
+				<el-form-item label="类型" prop="TypeId">
+					<el-select v-model="state.queryParams.TypeId" placeholder="类型" @change="queryList">
+						<el-option label="办件结果" value="1" />
+						<el-option label="办件态度" value="2" />
+					</el-select>
+				</el-form-item>
+				<el-form-item label="电话线路" prop="LineNum">
+					<el-input v-model="state.queryParams.LineNum" placeholder="电话线路" clearable @keyup.enter="queryList" class="keyword-input" />
+				</el-form-item>
+				<el-form-item>
+					<el-button type="primary" @click="queryList" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
+					<el-button @click="resetQuery(ruleFormRef)" class="default-button" :loading="state.loading">
+						<SvgIcon name="ele-Refresh" class="mr5" />重置
+					</el-button>
+				</el-form-item>
+			</el-form>
+		</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>
+				</template>
+				<template #generalSatisfiedCount="{ row }">
+					<el-button link type="primary" @click="onDetail(row.generalSatisfiedKey,row)">{{ row.generalSatisfiedCount }}</el-button>
+				</template>
+				<template #noSatisfiedCount="{ row }">
+					<el-button link type="primary" @click="onDetail(row.noSatisfiedKey,row)">{{ row.noSatisfiedCount }}</el-button>
+				</template>
+				<template #veryNoSatisfiedCount="{ row }">
+					<el-button link type="primary" @click="onDetail(row.veryNoSatisfiedKey,row)">{{ row.veryNoSatisfiedCount }}</el-button>
+				</template>
+				<template #noEvaluateCount="{ row }">
+					<el-button link type="primary" @click="onDetail(row.noEvaluateKey,row)">{{ row.noEvaluateCount }}</el-button>
+				</template>
+				<template #noPutThroughCount="{ row }">
+					<el-button link type="primary" @click="onDetail(row.noPutThroughKey,row)">{{ row.noPutThroughCount }}</el-button>
+				</template>
+			</ProTable>
+		</el-card>
+	</div>
+</template>
+<script setup lang="tsx" name="statisticsDepartmentSatisfactionOrg">
+import { onMounted, reactive, ref } 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 dayjs from 'dayjs';
+
+// 表格配置项
+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 },
+]);
+// 定义变量内容
+const ruleFormRef = ref<RefType>(); // 表单ref
+const state = reactive({
+	queryParams: {
+		// 查询条件
+		PageIndex: 1,
+		PageSize: 10,
+		TypeId: '1', //
+		LineNum: null,
+		crTime: [dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss'), dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss')], // 时间默认今天开始到今天结束
+	},
+	tableData: [], //表单
+	loading: false, // 加载
+	total: 0, // 总数
+});
+/** 获取列表 */
+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,
+	};
+	departmentSatisfaction(request)
+		.then((res: any) => {
+			state.tableData = res.result ?? [];
+			state.loading = false;
+		})
+		.catch(() => {
+			state.loading = false;
+		});
+}, 300);
+/** 重置按钮操作 */
+const resetQuery = throttle((formEl: FormInstance | undefined) => {
+	if (!formEl) return;
+	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);
+};
+onMounted(() => {
+	queryList();
+});
+</script>

+ 1 - 1
vite.config.ts

@@ -17,7 +17,7 @@ export default defineConfig((mode: ConfigEnv) => {
 		],
 		root: process.cwd(),
 		resolve: { alias: { '@': resolve(__dirname, './src') } },
-		base: mode.command === 'serve' ? './' : '/',
+		base: mode.command === 'serve' ? './' : '/app',
 		hmr: true,
 		server: {
 			host: '0.0.0.0',