Przeglądaj źródła

refactor:553 工单详情弹窗的来电人信息区域,增加“政治身份”

zhangchong 3 dni temu
rodzic
commit
a16ddecd6b
1 zmienionych plików z 77 dodań i 78 usunięć
  1. 77 78
      src/views/statistics/department/detailHandleOrg.vue

+ 77 - 78
src/views/statistics/department/detailHandleOrg.vue

@@ -35,7 +35,7 @@
 					:loading="state.loading"
 					:data="state.tableData"
 					:column-config="{ resizable: true }"
-					:row-config="{ isCurrent: true, isHover: true, height: 30,useKey: true }"
+					:row-config="{ isCurrent: true, isHover: true, height: 30, useKey: true }"
 					ref="tableRef"
 					height="auto"
 					auto-resize
@@ -48,12 +48,12 @@
 					showHeaderOverflow
 					:params="{ exportMethod: departmentOrderOrgExport, exportParams: requestParams }"
 					show-footer
-					:footer-method="footerMethod"
+					:footer-data="state.footerData"
 				>
 					<vxe-column field="orgName" title="部门名称" min-width="200" fixed="left">
-						<template #default="scope">
-							<el-button type="primary" link @click="linkDetail(scope)">
-								{{ scope.row.orgName }}
+						<template #default="{ row }">
+							<el-button type="primary" link @click="linkDetail(row)">
+								{{ row.orgName }}
 							</el-button>
 						</template>
 					</vxe-column>
@@ -61,16 +61,16 @@
 					<vxe-column field="orderCountNum" title="信件总量" min-width="90" fixed="left"> </vxe-column>
 					<vxe-colgroup title="办件信息" align="center">
 						<vxe-column title="已办案件" field="ybOrderCountNum" min-width="100">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '0')">
-									{{ scope.row.ybOrderCountNum }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '0')">
+									{{ row.ybOrderCountNum }}
 								</el-button>
 							</template>
 						</vxe-column>
 						<vxe-column title="在办案件" field="zbOrderCountNum" min-width="100">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '1')">
-									{{ scope.row.zbOrderCountNum }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '1')">
+									{{ row.zbOrderCountNum }}
 								</el-button>
 							</template>
 						</vxe-column>
@@ -79,9 +79,9 @@
 					</vxe-colgroup>
 					<vxe-colgroup title="延期次数" align="center">
 						<vxe-column title="延期次数" field="orderDelayCount" min-width="100">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '2')">
-									{{ scope.row.orderDelayCount }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '2')">
+									{{ row.orderDelayCount }}
 								</el-button>
 							</template>
 						</vxe-column>
@@ -89,9 +89,9 @@
 					</vxe-colgroup>
 					<vxe-colgroup title="超期信息" align="center">
 						<vxe-column title="已办超期" field="ybOverdue" min-width="100">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '3')">
-									{{ scope.row.ybOverdue }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '3')">
+									{{ row.ybOverdue }}
 								</el-button>
 							</template>
 						</vxe-column>
@@ -103,23 +103,23 @@
 							</template>
 						</vxe-column>
 						<vxe-column title="会签已办超期" field="hqybOverdue" min-width="110">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '5')">
-									{{ scope.row.hqybOverdue }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '5')">
+									{{ row.hqybOverdue }}
 								</el-button>
 							</template>
 						</vxe-column>
 						<vxe-column title="会签待办超期" field="hqzbOverdue" min-width="110">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '6')">
-									{{ scope.row.hqzbOverdue }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '6')">
+									{{ row.hqzbOverdue }}
 								</el-button>
 							</template>
 						</vxe-column>
 						<vxe-column title="超期件数" field="subtotalOverdue" min-width="100">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '7')">
-									{{ scope.row.subtotalOverdue }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '7')">
+									{{ row.subtotalOverdue }}
 								</el-button>
 							</template>
 						</vxe-column>
@@ -127,85 +127,85 @@
 					</vxe-colgroup>
 					<vxe-colgroup title="会签信息" align="center">
 						<vxe-column title="会签已办" field="delayEnd" min-width="100">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '8')">
-									{{ scope.row.delayEnd }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '8')">
+									{{ row.delayEnd }}
 								</el-button>
 							</template>
 						</vxe-column>
 						<vxe-column title="会签待办" field="delayWait" min-width="100">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '9')">
-									{{ scope.row.delayWait }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '9')">
+									{{ row.delayWait }}
 								</el-button>
 							</template>
 						</vxe-column>
 					</vxe-colgroup>
 					<vxe-colgroup title="归档信息" align="center">
 						<vxe-column title="待归档" field="toBeArchived" min-width="100">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '10')">
-									{{ scope.row.toBeArchived }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '10')">
+									{{ row.toBeArchived }}
 								</el-button>
 							</template>
 						</vxe-column>
 						<vxe-column title="已归档" field="archived" min-width="100">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '11')">
-									{{ scope.row.archived }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '11')">
+									{{ row.archived }}
 								</el-button>
 							</template>
 						</vxe-column>
 					</vxe-colgroup>
 					<vxe-colgroup title="发布信息" align="center">
 						<vxe-column title="待发布" field="waitPublished" min-width="100">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '12')">
-									{{ scope.row.waitPublished }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '12')">
+									{{ row.waitPublished }}
 								</el-button>
 							</template>
 						</vxe-column>
 						<vxe-column title="公开件" field="publishedOpen" min-width="100">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '13')">
-									{{ scope.row.publishedOpen }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '13')">
+									{{ row.publishedOpen }}
 								</el-button>
 							</template>
 						</vxe-column>
 						<vxe-column title="不公开件" field="publishedNoOpen" min-width="100">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '14')">
-									{{ scope.row.publishedNoOpen }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '14')">
+									{{ row.publishedNoOpen }}
 								</el-button>
 							</template>
 						</vxe-column>
 					</vxe-colgroup>
 					<vxe-colgroup title="甄别件" align="center">
 						<vxe-column title="申请总量" field="screenCount" min-width="100">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '15')">
-									{{ scope.row.screenCount }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '15')">
+									{{ row.screenCount }}
 								</el-button>
 							</template>
 						</vxe-column>
 						<vxe-column title="待甄别" field="screenApproval" min-width="100">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '16')">
-									{{ scope.row.screenApproval }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '16')">
+									{{ row.screenApproval }}
 								</el-button>
 							</template>
 						</vxe-column>
 						<vxe-column title="已同意" field="screenPass" min-width="100">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '17')">
-									{{ scope.row.screenPass }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '17')">
+									{{ row.screenPass }}
 								</el-button>
 							</template>
 						</vxe-column>
 						<vxe-column title="未同意" field="screenNotPass" min-width="100">
-							<template #default="scope">
-								<el-button type="primary" link @click="linkDetail(scope, '18')">
-									{{ scope.row.screenNotPass }}
+							<template #default="{ row }">
+								<el-button type="primary" link @click="linkDetail(row, '18')">
+									{{ row.screenNotPass }}
 								</el-button>
 							</template>
 						</vxe-column>
@@ -221,7 +221,6 @@ import { onMounted, reactive, ref } from 'vue';
 import { FormInstance } from 'element-plus';
 import { departmentOrderOrg, departmentOrderOrgExport } from '@/api/statistics/department';
 import { useRoute, useRouter } from 'vue-router';
-import XEUtils from 'xe-utils';
 
 // 定义变量内容
 const ruleFormRef = ref<RefType>(); // 表单ref
@@ -233,7 +232,7 @@ const state = reactive({
 	},
 	tableData: [], //表单
 	loading: false, // 加载
-	totalCount: 0, // 总计
+	footerData: [],
 });
 /** 搜索按钮操作 */
 const handleQuery = () => {
@@ -261,7 +260,7 @@ const queryList = () => {
 	departmentOrderOrg(requestParams.value)
 		.then((res: any) => {
 			state.tableData = res.result?.list ?? [];
-			state.totalCount = res.result?.total;
+			state.footerData = [res.result?.total] ?? [];
 			state.loading = false;
 		})
 		.catch(() => {
@@ -274,31 +273,31 @@ const resetQuery = (formEl: FormInstance | undefined) => {
 	formEl.resetFields();
 	queryList();
 };
-// 计算合计
-const footerMethod = ({ columns, data }) => {
-	return [
-		columns.map((column: any, columnIndex: number) => {
-			if (columnIndex === 0) {
-				return '合计';
-			}
-			// 后端返回了数据集合 state.totalCount 所以不需要计算 直接进行赋值
-			return XEUtils.get(state.totalCount, column.property);
-		}),
-	];
-};
 // 查看详情
 const router = useRouter();
-const linkDetail = (scope, key?: string) => {
+const linkDetail = (row: any, key?: string, isFooter?: boolean) => {
 	const StartTime = routeQueryParams.StartTime;
 	const EndTime = routeQueryParams.EndTime;
-	if (key) {
+	if (isFooter) {
+		// 点击合计
+		router.push({
+			name: 'statisticsDepartmentDetailHandle',
+			query: {
+				StartTime,
+				EndTime,
+				StatisticsType: key,
+				isProvince: routeQueryParams.isProvince,
+				ParentOrgCode: routeQueryParams.id,
+			},
+		});
+	} else if (key) {
 		// 点击数字
 		router.push({
 			name: 'statisticsDepartmentDetailHandle',
 			query: {
 				StartTime,
 				EndTime,
-				OrgCode: scope.row.orgCode,
+				OrgCode: row.orgCode,
 				StatisticsType: key,
 				isProvince: routeQueryParams.isProvince,
 				ParentOrgCode: routeQueryParams.id,
@@ -312,7 +311,7 @@ const linkDetail = (scope, key?: string) => {
 				StartTime,
 				EndTime,
 				isProvince: routeQueryParams.isProvince,
-				id: scope.row.orgCode,
+				id: row.orgCode,
 				ParentOrgCode: routeQueryParams.id,
 			},
 		});