123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593 |
- <template>
- <div class="statistics-department-handle-container layout-pd">
- <el-card shadow="never">
- <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
- <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 label="部门名称" prop="OrgName">
- <el-input v-model="state.queryParams.OrgName" placeholder="部门名称" clearable @keyup.enter="handleQuery" class="keyword-input" />
- </el-form-item>
- <el-form-item label="时间段" prop="crTime">
- <el-date-picker
- v-model="state.queryParams.crTime"
- type="daterange"
- unlink-panels
- range-separator="至"
- start-placeholder="开始时间"
- end-placeholder="结束时间"
- :shortcuts="shortcuts"
- @change="handleQuery"
- value-format="YYYY-MM-DD"
- :clearable="false"
- />
- </el-form-item>
- <el-form-item label="" prop="isProvince">
- <el-checkbox v-model="state.queryParams.isProvince" label="省来源" border @change="handleQuery" />
- </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-button type="primary" @click="onDetailList" :loading="state.loading"> <SvgIcon name="ele-List" class="mr5" /> 列表明细 </el-button>
- </el-form-item>
- </el-form>
- </el-card>
- <el-card shadow="never">
- <ProTable
- ref="proTableRef"
- :pagination="false"
- :columns="columns"
- :data="state.tableData"
- @updateTable="queryList"
- :loading="state.loading"
- show-summary
- :summary-method="getSummaries"
- :toolButton="['refresh', 'setting', 'exportAll']"
- :exportMethod="departmentOrderExport"
- :exportParams="requestParams"
- >
- </ProTable>
- </el-card>
- </div>
- </template>
- <script setup lang="tsx" name="statisticsDepartmentHandle">
- import { onMounted, reactive, ref } from 'vue';
- import { FormInstance } from 'element-plus';
- import { departmentOrder, departmentOrderExport } from '@/api/statistics/department';
- import { defaultDate, shortcuts } from '@/utils/constants';
- import { useRouter } from 'vue-router';
- import Other from '@/utils/other';
- // 定义变量内容
- const ruleFormRef = ref<RefType>(); // 表单ref
- // ProTable 实例
- const proTableRef = ref<RefType>();
- // 表格配置项
- const columns = reactive<any[]>([
- {
- prop: 'orgName',
- label: '部门名称',
- align: 'center',
- fixed: 'left',
- minWidth: 200,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
- {scope.row.orgName}
- </el-button>
- );
- },
- },
- { prop: 'orgTypeText', label: '部门类别', align: 'center', fixed: 'left', minWidth: 100 },
- { prop: 'orderCountNum', label: '信件总量', align: 'center', fixed: 'left', minWidth: 90 },
- {
- prop: 'bjxx',
- label: '办件信息',
- align: 'center',
- _children: [
- {
- prop: 'ybOrderCountNum',
- label: '已办案件',
- align: 'center',
- minWidth: 90,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '0')}>
- {scope.row.ybOrderCountNum}
- </el-button>
- );
- },
- },
- {
- prop: 'zbOrderCountNum',
- label: '在办案件',
- align: 'center',
- minWidth: 90,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '1')}>
- {scope.row.zbOrderCountNum}
- </el-button>
- );
- },
- },
- {
- prop: 'orderCompletionRate',
- label: '办结率',
- align: 'center',
- minWidth: 90,
- },
- {
- prop: 'completeOnTimeRate',
- label: '按时办结率',
- align: 'center',
- minWidth: 120,
- },
- ],
- },
- {
- prop: 'yqcs',
- label: '延期次数',
- align: 'center',
- _children: [
- {
- prop: 'orderDelayCount',
- label: '延期次数',
- align: 'center',
- minWidth: 90,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '2')}>
- {scope.row.orderDelayCount}
- </el-button>
- );
- },
- },
- {
- prop: 'orderDelayRate',
- label: '延期率',
- align: 'center',
- minWidth: 90,
- },
- ],
- },
- {
- prop: 'cqxx',
- label: '超期信息',
- align: 'center',
- _children: [
- {
- prop: 'ybOverdue',
- label: '已办超期',
- align: 'center',
- minWidth: 90,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '3')}>
- {scope.row.ybOverdue}
- </el-button>
- );
- },
- },
- {
- prop: 'zbOverdue',
- label: '待办超期',
- align: 'center',
- minWidth: 90,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '4')}>
- {scope.row.zbOverdue}
- </el-button>
- );
- },
- },
- {
- prop: 'hqybOverdue',
- label: '会签已办超期',
- align: 'center',
- minWidth: 120,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '5')}>
- {scope.row.hqybOverdue}
- </el-button>
- );
- },
- },
- {
- prop: 'hqzbOverdue',
- label: '会签待办超期',
- align: 'center',
- minWidth: 120,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '6')}>
- {scope.row.hqzbOverdue}
- </el-button>
- );
- },
- },
- {
- prop: 'subtotalOverdue',
- label: '超期件数',
- align: 'center',
- minWidth: 120,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '7')}>
- {scope.row.subtotalOverdue}
- </el-button>
- );
- },
- },
- {
- prop: 'hqOverdueRate',
- label: '超期率',
- align: 'center',
- minWidth: 90,
- },
- ],
- },
- {
- prop: 'hqxx',
- label: '会签信息',
- align: 'center',
- _children: [
- {
- prop: 'delayWait',
- label: '会签待办',
- align: 'center',
- minWidth: 90,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '9')}>
- {scope.row.delayWait}
- </el-button>
- );
- },
- },
- {
- prop: 'delayEnd',
- label: '会签已办',
- align: 'center',
- minWidth: 90,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '8')}>
- {scope.row.delayEnd}
- </el-button>
- );
- },
- },
- ],
- },
- {
- prop: 'gdxx',
- label: '归档信息',
- align: 'center',
- _children: [
- {
- prop: 'toBeArchived',
- label: '待归档',
- align: 'center',
- minWidth: 90,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '10')}>
- {scope.row.toBeArchived}
- </el-button>
- );
- },
- },
- {
- prop: 'archived',
- label: '已归档',
- align: 'center',
- minWidth: 90,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '11')}>
- {scope.row.archived}
- </el-button>
- );
- },
- },
- ],
- },
- {
- prop: 'fbxx',
- label: '发布信息',
- align: 'center',
- _children: [
- {
- prop: 'waitPublished',
- label: '待发布',
- align: 'center',
- minWidth: 90,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '12')}>
- {scope.row.waitPublished}
- </el-button>
- );
- },
- },
- {
- prop: 'publishedOpen',
- label: '公开件',
- align: 'center',
- minWidth: 90,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '13')}>
- {scope.row.publishedOpen}
- </el-button>
- );
- },
- },
- {
- prop: 'publishedNoOpen',
- label: '不公开件',
- align: 'center',
- minWidth: 90,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '14')}>
- {scope.row.publishedNoOpen}
- </el-button>
- );
- },
- },
- ],
- },
- {
- prop: 'zbj',
- label: '甄别件',
- align: 'center',
- _children: [
- {
- prop: 'screenCount',
- label: '申请总量',
- align: 'center',
- minWidth: 90,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '15')}>
- {scope.row.screenCount}
- </el-button>
- );
- },
- },
- {
- prop: 'screenApproval',
- label: '待甄别',
- align: 'center',
- minWidth: 90,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '16')}>
- {scope.row.screenApproval}
- </el-button>
- );
- },
- },
- {
- prop: 'screenNotPass',
- label: '未同意',
- align: 'center',
- minWidth: 90,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '18')}>
- {scope.row.screenNotPass}
- </el-button>
- );
- },
- },
- {
- prop: 'screenPass',
- label: '已同意',
- align: 'center',
- minWidth: 90,
- render: (scope) => {
- return (
- <el-button type="primary" link onClick={() => linkDetail(scope, '17')}>
- {scope.row.screenPass}
- </el-button>
- );
- },
- },
- ],
- },
- {
- prop: 'satisfactionRate',
- label: '总满意率',
- align: 'center',
- minWidth: 90,
- },
- ]);
- const state = reactive<any>({
- queryParams: {
- // 查询条件
- OrgName: null, // 部门名称
- crTime: defaultDate, // 时间默认今天开始到今天结束
- isProvince: null,
- TypeId:0
- },
- tableData: [], //表单
- loading: false, // 加载
- totalCount: 0, // 总计
- IdentityType:0,
- });
- /** 搜索按钮操作 */
- const handleQuery = () => {
- // state.queryParams.PageIndex = 1;
- queryList();
- };
- /** 获取列表 */
- const requestParams = ref({});
- 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');
- departmentOrder(requestParams.value)
- .then((res: any) => {
- state.tableData = res.result?.list ?? [];
- state.totalCount = res.result?.total;
- state.loading = false;
- })
- .catch(() => {
- state.loading = false;
- });
- };
- /** 重置按钮操作 */
- const resetQuery = (formEl: FormInstance | undefined) => {
- if (!formEl) return;
- formEl.resetFields();
- queryList();
- };
- // 合计
- const getSummaries = (param: any) => {
- const { columns } = param;
- const sums: string[] = [];
- columns.forEach((column: { property: string }, index: number) => {
- if (index === 0) {
- sums[index] = '合计';
- return;
- }
- switch (column.property) {
- case 'orgTypeText': // 部门类别
- sums[index] = state.totalCount?.orgTypeText;
- break;
- case 'orderCountNum': // 信件总量
- sums[index] = state.totalCount?.orderCountNum;
- break;
- case 'ybOrderCountNum': // 已办案件
- sums[index] = state.totalCount?.ybOrderCountNum;
- break;
- case 'zbOrderCountNum': // 在办案件
- sums[index] = state.totalCount?.zbOrderCountNum;
- break;
- case 'completeOnTimeRate': // 按时办结率
- sums[index] = state.totalCount?.completeOnTimeRate;
- break;
- case 'orderCompletionRate': // 办结率
- sums[index] = state.totalCount?.orderCompletionRate;
- break;
- case 'orderDelayCount': // 延期次数
- sums[index] = state.totalCount?.orderDelayCount;
- break;
- case 'orderDelayRate': // 延期率
- sums[index] = state.totalCount?.orderDelayRate;
- break;
- case 'ybOverdue': // 已办超期
- sums[index] = state.totalCount?.ybOverdue;
- break;
- case 'zbOverdue': // 待办超期
- sums[index] = state.totalCount?.zbOverdue;
- break;
- case 'hqybOverdue': // 会签已办超期
- sums[index] = state.totalCount?.hqybOverdue;
- break;
- case 'hqzbOverdue': // 会签待办超期
- sums[index] = state.totalCount?.hqzbOverdue;
- break;
- case 'subtotalOverdue': // 超期件数
- sums[index] = state.totalCount?.subtotalOverdue;
- break;
- case 'hqOverdueRate': // 超期率
- sums[index] = state.totalCount?.hqOverdueRate;
- break;
- case 'delayWait': // 会签待办
- sums[index] = state.totalCount?.delayWait;
- break;
- case 'delayEnd': // 会签已办
- sums[index] = state.totalCount?.delayEnd;
- break;
- case 'toBeArchived': // 待归档
- sums[index] = state.totalCount?.toBeArchived;
- break;
- case 'archived': // 已归档
- sums[index] = state.totalCount?.archived;
- break;
- case 'waitPublished': // 待发布
- sums[index] = state.totalCount?.waitPublished;
- break;
- case 'publishedOpen': // 公开件
- sums[index] = state.totalCount?.publishedOpen;
- break;
- case 'publishedNoOpen': // 不公开件
- sums[index] = state.totalCount?.publishedNoOpen;
- break;
- case 'screenCount': // 甄别申请总量
- sums[index] = state.totalCount?.screenCount;
- break;
- case 'screenApproval': // 待甄别
- sums[index] = state.totalCount?.screenApproval;
- break;
- case 'screenNotPass': // 未同意
- sums[index] = state.totalCount?.screenNotPass;
- break;
- case 'screenPass': // 已同意
- sums[index] = state.totalCount?.screenPass;
- break;
- case 'satisfactionRate': // 总满意率
- sums[index] = state.totalCount?.satisfactionRate;
- break;
- default:
- sums[index] = '';
- break;
- }
- });
- return sums;
- };
- // 查看详情
- const router = useRouter();
- const linkDetail = (scope, key?: string) => {
- let StartTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
- let EndTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
- if (key) {
- // 点击数字
- router.push({
- name: 'statisticsDepartmentDetailHandle',
- query: {
- StartTime,
- EndTime,
- OrgCode: scope.row.orgCode,
- StatisticsType: key,
- isProvince: state.queryParams.isProvince,
- },
- });
- } else {
- // 点击部门
- router.push({
- name: 'statisticsDepartmentDetailHandleOrg',
- query: {
- StartTime,
- EndTime,
- isProvince: state.queryParams.isProvince,
- id: scope.row.orgCode,
- },
- });
- }
- };
- // 跳转列表明细
- const onDetailList = () => {
- router.push({
- path: '/statistics/department/detailHandleList',
- });
- };
- onMounted(() => {
- queryList();
- });
- </script>
|