浏览代码

reactor:新增部门满意度明细;新增部门延期明细;

zhangchong 6 月之前
父节点
当前提交
a9c4e09399

+ 1 - 1
src/views/statistics/department/detailSatisfiedList.vue

@@ -33,7 +33,7 @@
 				</template>
 				</template>
 				<template #tableHeader="scope">
 				<template #tableHeader="scope">
 					<el-button type="primary" @click="onJbExport" :disabled="!scope.isSelected" :loading="state.loading"
 					<el-button type="primary" @click="onJbExport" :disabled="!scope.isSelected" :loading="state.loading"
-						><SvgIcon name="iconfont icon-daochu" class="mr5" />交办单导出
+						><SvgIcon name="iconfont icon-daochu" class="mr5" />交办单导出<span v-if="proTableRef?.selectedList?.length">({{proTableRef?.selectedList?.length}})</span>
 					</el-button>
 					</el-button>
 				</template>
 				</template>
 				<template #description>
 				<template #description>

+ 315 - 0
src/views/statistics/department/dpSatisfied.vue

@@ -0,0 +1,315 @@
+<template>
+	<div class="statistics-department-dp-satisfied-container layout-padding">
+		<div class="layout-padding-auto layout-padding-view pd20">
+			<ProTable
+				ref="proTableRef"
+				:columns="columns"
+				:data="state.tableData"
+				@updateTable="queryList"
+				:loading="state.loading"
+				:total="state.total"
+				v-model:page-index="state.queryParams.PageIndex"
+				v-model:page-size="state.queryParams.PageSize"
+				:toolButton="['refresh', 'setting', 'exportCurrent', 'exportAll']"
+				:exportMethod="departmentSatisfactionListExport"
+				:exportParams="requestParams"
+			>
+				<template #table-search>
+					<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
+						<el-form-item prop="hfTime">
+							<statistical-time v-model="state.queryParams.hfTime" @change="handleQuery" ref="statisticalTimeRef" />
+						</el-form-item>
+						<el-form-item label="工单标题" prop="Keyword">
+							<el-input v-model="state.queryParams.Keyword" placeholder="工单标题" clearable @keyup.enter="handleQuery" class="keyword-input" />
+						</el-form-item>
+						<el-form-item label="工单编码" prop="No">
+							<el-input v-model="state.queryParams.No" placeholder="工单编码" clearable @keyup.enter="handleQuery" class="keyword-input" />
+						</el-form-item>
+						<el-form-item>
+							<el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
+							<el-button @click="drawer = true" class="default-button"> <SvgIcon name="ele-Search" class="mr5" />更多查询</el-button>
+						</el-form-item>
+					</el-form>
+				</template>
+				<template #tableHeader="scope">
+					<el-button type="primary" @click="onJbExport" :disabled="!scope.isSelected" :loading="state.loading"
+					><SvgIcon name="iconfont icon-daochu" class="mr5" />交办单导出<span v-if="proTableRef?.selectedList?.length">({{proTableRef?.selectedList?.length}})</span>
+					</el-button>
+				</template>
+				<template #description>
+					<el-popover :width="500" trigger="click">
+						<template #reference>
+							<el-button circle title="口径说明"><SvgIcon name="ele-QuestionFilled" /></el-button>
+						</template>
+						<el-descriptions title="" :column="1" border>
+							<el-descriptions-item label="工单编码">工单编号</el-descriptions-item>
+							<el-descriptions-item label="重办次数">发布时重办的次数</el-descriptions-item>
+							<el-descriptions-item label="甄别">甄别中、未甄别、甄别退回、不同意、</el-descriptions-item>
+							<el-descriptions-item label="回访信息"> 工单回访内容 </el-descriptions-item>
+							<el-descriptions-item label="受理时间"> 工单新建时间 </el-descriptions-item>
+							<el-descriptions-item label="工单标题"> 工单的标题(点击可查看工单详情)</el-descriptions-item>
+							<el-descriptions-item label="回访人"> 工单回访用户</el-descriptions-item>
+							<el-descriptions-item label="回访部门"> 工单回访用户所在部门 </el-descriptions-item>
+							<el-descriptions-item label="回访时间"> 工单回访时间 </el-descriptions-item>
+							<el-descriptions-item label="满意度"> 回访时的满意度 </el-descriptions-item>
+							<el-descriptions-item label="办结时间"> 工单办理完成的时间 </el-descriptions-item>
+						</el-descriptions>
+					</el-popover>
+				</template>
+				<template #title="{ row }">
+					<order-detail :order="row" @updateList="queryList">{{ row.title }}</order-detail>
+				</template>
+				<template #operation="{ row }">
+					<el-button link type="primary" @click="visitDetail(row)" title="查看回访详情"> 回访详情 </el-button>
+				</template>
+			</ProTable>
+		</div>
+		<!-- 回访详情 -->
+		<visit-detail-com ref="visitDetailRef" @updateList="queryList" />
+		<!--	更多查询	-->
+		<el-drawer v-model="drawer" title="更多查询" size="500px">
+			<el-form :model="state.queryParams" ref="drawerRuleFormRef" @submit.native.prevent label-width="100px">
+				<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="handleQuery"
+						value-format="YYYY-MM-DD[T]HH:mm:ss"
+						:default-time="defaultTimeStartEnd"
+					/>
+				</el-form-item>
+				<el-form-item label="回访人姓名" prop="VisitUser">
+					<el-input v-model="state.queryParams.VisitUser" placeholder="回访人姓名" clearable @keyup.enter="handleQuery" />
+				</el-form-item>
+				<el-form-item label="办件结果" prop="OrgProcessingResults">
+					<el-select v-model="state.queryParams.OrgProcessingResults" placeholder="请选择来办件结果" clearable class="w100" @change="handleQuery">
+						<el-option v-for="item in state.visitSatisfaction" :value="item.dicDataValue" :key="item.dicDataValue" :label="item.dicDataName" />
+					</el-select>
+				</el-form-item>
+				<el-form-item label="热点分类" prop="Hotspot">
+					<el-input v-model="state.queryParams.Hotspot" placeholder="热点分类名称" clearable @keyup.enter="handleQuery" />
+				</el-form-item>
+				<el-form-item label="回访部门" prop="OrgId">
+					<el-cascader
+						:options="state.orgsOptions"
+						filterable
+						:show-all-levels="false"
+						:props="{ checkStrictly: true, value: 'id', label: 'name', emitPath: false }"
+						placeholder="请选择回访部门"
+						clearable
+						class="w100"
+						v-model="state.queryParams.OrgId"
+						@change="handleQuery"
+					>
+					</el-cascader>
+				</el-form-item>
+				<el-form-item label="办结时间" prop="doneTime">
+					<el-date-picker
+						v-model="state.queryParams.doneTime"
+						type="datetimerange"
+						unlink-panels
+						range-separator="至"
+						start-placeholder="开始时间"
+						end-placeholder="结束时间"
+						:shortcuts="shortcuts"
+						@change="handleQuery"
+						value-format="YYYY-MM-DD[T]HH:mm:ss"
+						:default-time="defaultTimeStartEnd"
+					/>
+				</el-form-item>
+				<el-form-item label="来电主体" prop="TypeCode">
+					<el-select v-model="state.queryParams.TypeCode" placeholder="请选择来电主体" @change="handleQuery">
+						<el-option :value="0" label="全部" />
+						<el-option :value="1" label="市民" />
+						<el-option :value="2" label="企业" />
+					</el-select>
+				</el-form-item>
+			</el-form>
+			<template #footer>
+				<el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
+				<el-button @click="resetQuery(drawerRuleFormRef)" class="default-button"> <SvgIcon name="ele-Refresh" class="mr5" />重置 </el-button>
+			</template>
+		</el-drawer>
+	</div>
+</template>
+<script setup lang="tsx" name="statisticsDepartmentDpSatisfied">
+import { onMounted, reactive, ref, defineAsyncComponent } from 'vue';
+import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
+import { departmentSatisfactionDetailBase, departmentSatisfactionList, departmentSatisfactionListExport } from '@/api/statistics/department';
+import { formatDate } from '@/utils/formatTime';
+import { defaultDateOne, defaultTimeStartEnd, shortcuts } from '@/utils/constants';
+import { useRoute } from 'vue-router';
+import Other from '@/utils/other';
+import { exportJbOrder } from '@/api/business/order';
+import { downloadZip } from '@/utils/tools';
+
+// 引入组件
+const VisitDetailCom = defineAsyncComponent(() => import('@/views/business/visit/components/Visit-detail.vue')); // 回访
+const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
+const StatisticalTime = defineAsyncComponent(() => import('@/components/StatisticalTime/index.vue')); // 日期类型选择组件
+// 表格配置项
+const columns = ref<any[]>([
+	{ type: 'selection', width: 40, align: 'center' },
+	{ prop: 'no', label: '工单编码', width: 140 },
+	{ prop: 'reTransactNum', label: '重办次数' },
+	{ prop: 'orderScreenStatusText', label: '甄别', minWidth: 100 },
+	{ prop: 'visitContent', label: '回访信息', minWidth: 150 },
+	{ prop: 'hotspotSpliceName', label: '热点全称', minWidth: 150 },
+	{ prop: 'orgLevelOneName', label: '一级部门', minWidth: 140 },
+	{ prop: 'actualHandleOrgName', label: '接办部门', minWidth: 140 },
+	{
+		prop: 'creationTime',
+		label: '受理时间',
+		minWidth: 160,
+		render: (scope) => {
+			return <span>{formatDate(scope.row.creationTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
+		},
+	},
+	{ prop: 'title', label: '工单标题', width: 200 },
+	{ prop: 'visitUser', label: '回访人', minWidth: 120 },
+	{ prop: 'visitOrgName', label: '回访部门', minWidth: 140 },
+	{ prop: 'visitTypeText', label: '回访方式', minWidth: 100 },
+	{
+		prop: 'visitTime',
+		label: '回访时间',
+		minWidth: 160,
+		render: (scope) => {
+			return <span>{formatDate(scope.row.visitTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
+		},
+	},
+	{ prop: 'orgProcessingResults', label: '满意度', minWidth: 120 },
+	{ prop: 'content', label: '受理内容', minWidth: 150 },
+	{ prop: 'fileOpinion', label: '承办意见', minWidth: 150 },
+	{
+		prop: 'filedTime',
+		label: '办结时间',
+		minWidth: 160,
+		render: (scope) => {
+			return <span>{formatDate(scope.row.filedTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
+		},
+	},
+	{ prop: 'operation', label: '操作', fixed: 'right', width: 90, align: 'center' },
+]);
+// 定义变量内容
+const state = reactive<any>({
+	queryParams: {
+		// 查询条件
+		PageIndex: 1,
+		PageSize: 20,
+		hfTime: defaultDateOne, // 回访事件
+		VisitTimeStart: null,
+		VisitTimeEnd: null,
+		crTime: [],
+		CreationTimeStart: null,
+		CreationTimeEnd: null,
+		doneTime: [], // 办结时间
+		ActualHandleTimeStart: null,
+		ActualHandleTimeEnd: null,
+		VisitUser: null,
+		OrgProcessingResults: null,
+		OrgId: null,
+		TypeId: '1',
+		TypeCode: 0,
+	},
+	tableData: [], //表单
+	loading: false, // 加载
+	total: 0, // 总数
+});
+/** 搜索按钮操作 */
+const handleQuery = () => {
+	state.queryParams.PageIndex = 1;
+	queryList();
+};
+
+/** 获取列表 */
+const requestParams = ref<EmptyObjectType>({});
+const queryList = () => {
+	state.loading = true;
+	requestParams.value = Other.deepClone(state.queryParams);
+	requestParams.value.VisitTimeStart = state.queryParams.hfTime === null ? null : state.queryParams.hfTime[0]; // 回访时间
+	requestParams.value.VisitTimeEnd = state.queryParams.hfTime === null ? null : state.queryParams.hfTime[1];
+	Reflect.deleteProperty(requestParams.value, 'hfTime'); // 删除无用的参数
+	requestParams.value.CreationTimeStart = state.queryParams.crTime === null ? null : state.queryParams.crTime[0]; // 受理时间
+	requestParams.value.CreationTimeEnd = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
+	Reflect.deleteProperty(requestParams.value, 'crTime'); // 删除无用的参数
+	requestParams.value.ActualHandleTimeStart = state.queryParams.doneTime === null ? null : state.queryParams.doneTime[0]; // 生成时间
+	requestParams.value.ActualHandleTimeEnd = state.queryParams.doneTime === null ? null : state.queryParams.doneTime[1];
+	Reflect.deleteProperty(requestParams.value, 'doneTime'); // 删除无用的参数
+	departmentSatisfactionList(requestParams.value)
+		.then((res: any) => {
+			state.tableData = res.result?.items ?? [];
+			state.total = res.result.total ?? 0;
+			state.loading = false;
+		})
+		.catch(() => {
+			state.loading = false;
+		});
+};
+/** 重置按钮操作 */
+const drawerRuleFormRef = ref();
+const ruleFormRef = ref<RefType>(); // 表单ref
+const drawer = ref(false);
+const statisticalTimeRef = ref<RefType>();
+const resetQuery = (formEl: FormInstance | undefined) => {
+	if (!formEl) return;
+	formEl.resetFields();
+	ruleFormRef.value?.resetFields();
+	statisticalTimeRef.value.reset();
+	queryList();
+};
+// 回访详情
+const visitDetailRef = ref<RefType>();
+const visitDetail = (row: any) => {
+	visitDetailRef.value.openDialog({ ...row, id: row.visitId }, '回访详情');
+};
+// 获取查询条件基础信息
+const getBaseData = async () => {
+	try {
+		const res: any = await departmentSatisfactionDetailBase();
+		const mappings: any = {
+			visitSatisfaction: 'visitSatisfaction',
+			orgsOptions: 'orgsOptions',
+		};
+		for (const key in mappings) {
+			state[key] = res.result?.[mappings[key]] ?? [];
+		}
+	} catch (error) {
+		console.log(error);
+	}
+};
+// 交办单导出
+const proTableRef = ref<RefType>();
+const onJbExport = () => {
+	const ids = proTableRef.value.selectedList.map((item: any) => item.id);
+	ElMessageBox.confirm(`您确定导出选中的${proTableRef.value.selectedList.length}个工单的交办单,是否继续?`, '提示', {
+		confirmButtonText: '确认',
+		cancelButtonText: '取消',
+		type: 'warning',
+		draggable: true,
+		cancelButtonClass: 'default-button',
+		autofocus: false,
+	})
+		.then(() => {
+			state.loading = true;
+			exportJbOrder(ids)
+				.then((res: any) => {
+					downloadZip(res);
+					state.loading = false;
+					ElMessage.success('导出成功');
+				})
+				.catch(() => {
+					state.loading = false;
+				});
+		})
+		.catch(() => {});
+};
+onMounted(() => {
+	getBaseData();
+	queryList();
+});
+</script>

+ 186 - 0
src/views/statistics/department/listDelay.vue

@@ -0,0 +1,186 @@
+<template>
+	<div class="statistics-department-list-delay-container layout-padding">
+		<div class="layout-padding-auto layout-padding-view pd20">
+			<ProTable
+				ref="proTableRef"
+				:columns="columns"
+				:data="state.tableData"
+				@updateTable="queryList"
+				:loading="state.loading"
+				:total="state.total"
+				v-model:page-index="state.queryParams.PageIndex"
+				v-model:page-size="state.queryParams.PageSize"
+				:toolButton="['refresh', 'setting', 'exportCurrent', 'exportAll']"
+				:exportMethod="departmentDelayDetailExport"
+				:exportParams="requestParams"
+			>
+				<template #table-search>
+					<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
+						<el-form-item prop="crTime">
+							<statistical-time v-model="state.queryParams.crTime" @change="handleQuery" ref="statisticalTimeRef"/>
+						</el-form-item>
+						<el-form-item label="来电主体" prop="TypeId">
+							<el-select v-model="state.queryParams.TypeId" placeholder="请选择来电主体" @change="handleQuery">
+								<el-option :value="0" label="全部" />
+								<el-option :value="1" label="市民" />
+								<el-option :value="2" label="企业" />
+							</el-select>
+						</el-form-item>
+						<el-form-item>
+							<el-button type="primary" @click="handleQuery" :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>
+				</template>
+				<template #expiredStatusText="{ row }">
+					<span :class="'overdue-status-' + row.order?.expiredStatus" :title="row.order?.expiredStatusText"></span>
+				</template>
+				<template #title="{ row }">
+					<order-detail :order="row.order" @updateList="queryList">{{ row.order?.title }}</order-detail>
+				</template>
+				<template #operation="{ row }">
+					<el-button link type="primary" @click="onDetail(row)" title="查看延期详情"> 延期详情 </el-button>
+					<order-detail :order="row.order" @updateList="queryList" />
+				</template>
+			</ProTable>
+		</div>
+		<!--  延期详情  -->
+		<delay-detail-com ref="delayDetailRef" @updateList="queryList" />
+	</div>
+</template>
+<script setup lang="tsx" name="statisticsDepartmentListDelay">
+import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
+import { FormInstance } from 'element-plus';
+import { formatDate } from '@/utils/formatTime';
+import { departmentDelayDetail, departmentDelayDetailExport } from '@/api/statistics/department';
+import Other from '@/utils/other';
+import { defaultDate } from '@/utils/constants';
+
+// 引入组件
+const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
+const DelayDetailCom = defineAsyncComponent(() => import('@/views/business/delay/components/Delay-detail.vue')); // 延期详情
+const StatisticalTime = defineAsyncComponent(() => import('@/components/StatisticalTime/index.vue')); // 日期类型选择组件
+
+const proTableRef = ref<RefType>(); // 表格ref
+// 表格配置项
+const columns = ref<any[]>([
+	{ prop: 'order.expiredStatusText', label: '超期状态', align: 'center', width: 80 },
+	{ prop: 'order.no', label: '工单编码', minWidth: 140 },
+	{ prop: 'order.isProvinceText', label: '省/市工单', minWidth: 90 },
+	{ prop: 'order.title', label: '工单标题', minWidth: 200 },
+	{ prop: 'order.currentStepName', label: '当前节点', width: 100 },
+	{ prop: 'delayStateText', label: '延期申请状态', minWidth: 110 },
+	{
+		prop: 'order.startTime',
+		label: '受理时间',
+		width: 160,
+		render: (scope) => {
+			return <span>{formatDate(scope.row.order?.startTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
+		},
+	},
+	{ prop: 'order.acceptorName', label: '受理人', width: 120 },
+	{ prop: 'order.hotspotName', label: '热点分类', minWidth: 150 },
+	{ prop: 'order.acceptType', label: '受理类型', minWidth: 100 },
+	{ prop: 'order.orgLevelOneName', label: '一级部门', width: 140 },
+	{ prop: 'order.actualHandleOrgName', label: '接办部门', width: 140 },
+	{
+		prop: 'order.actualHandleTime',
+		label: '接办时间',
+		width: 160,
+		render: (scope) => {
+			return <span>{formatDate(scope.row.order?.actualHandleTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
+		},
+	},
+	{
+		prop: 'creationTime',
+		label: '延期申请时间',
+		width: 160,
+		render: (scope) => {
+			return <span>{formatDate(scope.row.creationTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
+		},
+	},
+	{ prop: 'creatorName', label: '延期申请人', width: 120 },
+	{ prop: 'creatorOrgName', label: '延期申请部门', width: 140 },
+	{ prop: 'delayNum', label: '延期申请时限', width: 110 },
+	{ prop: 'delayUnitText', label: '延期申请单位', width: 110 },
+	{ prop: 'delayReason', label: '申请理由', width: 150 },
+	{
+		prop: 'beforeDelay',
+		label: '申请前期满时间',
+		width: 160,
+		render: (scope) => {
+			return <span>{formatDate(scope.row.beforeDelay, 'YYYY-mm-dd HH:MM:SS')}</span>;
+		},
+	},
+	{
+		prop: 'afterDelay',
+		label: '通过后期满时间',
+		width: 160,
+		render: (scope) => {
+			return <span>{formatDate(scope.row.afterDelay, 'YYYY-mm-dd HH:MM:SS')}</span>;
+		},
+	},
+	{ prop: 'operation', label: '操作', fixed: 'right', width: 160, align: 'center' },
+]);
+// 定义变量内容
+const ruleFormRef = ref<RefType>(); // 表单ref
+const state = reactive<any>({
+	queryParams: {
+		// 查询条件
+		PageIndex: 1,
+		PageSize: 20,
+		TypeId: 0,
+		crTime:defaultDate,
+	},
+	tableData: [{}], //表单
+	loading: false, // 加载
+	total: 0, // 总数
+});
+// 手动查询,将页码设置为1
+const handleQuery = () => {
+	state.queryParams.PageIndex = 1;
+	queryList();
+};
+/** 获取列表 */
+const requestParams = ref<EmptyObjectType>({});
+const queryList = () => {
+	state.loading = true;
+	requestParams.value = Other.deepClone(state.queryParams);
+	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');
+	departmentDelayDetail(requestParams.value)
+		.then((res) => {
+			state.tableData = res.result?.items ?? [];
+			state.total = res.result?.total ?? 0;
+			state.loading = false;
+		})
+		.catch((err) => {
+			console.log(err);
+		})
+		.finally(() => {
+			state.loading = false;
+		});
+};
+
+/** 重置按钮操作 */
+const resetQuery = (formEl: FormInstance | undefined) => {
+	if (!formEl) return;
+	formEl.resetFields();
+	queryList();
+};
+// 延期详情
+const delayDetailRef = ref<RefType>();
+const onDetail = async (row: any) => {
+	try {
+		delayDetailRef.value.openDialog(row);
+	} catch (e) {
+		console.log(e);
+	}
+};
+onMounted(async () => {
+	queryList();
+});
+</script>