|
@@ -50,81 +50,9 @@
|
|
|
border
|
|
|
:pagination="false"
|
|
|
:summary-method="getSummaries"
|
|
|
- :toolButton="['refresh', 'setting', 'exportAll']"
|
|
|
- @export-all="exportTable($event, true)"
|
|
|
+ :toolButton="['refresh', 'setting', 'exportAll']"
|
|
|
+ @export-all="exportTable($event, true)"
|
|
|
>
|
|
|
- <template #orgName="{ row }">
|
|
|
- <el-button link type="primary" @click="onDetailOrg(row)" v-if="!['市直合计', '区县合计'].includes(row.orgName)">{{
|
|
|
- row.orgName
|
|
|
- }}</el-button>
|
|
|
- <span v-else>{{ row.orgName }}</span>
|
|
|
- </template>
|
|
|
- <template #verySatisfiedCount="{ row }">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- @click="onDetail(row.verySatisfiedKey, row, '非常满意')"
|
|
|
- v-if="!['市直合计', '区县合计'].includes(row.orgName)"
|
|
|
- >{{ row.verySatisfiedCount }}</el-button
|
|
|
- >
|
|
|
- <span v-else>{{ row.verySatisfiedCount }}</span>
|
|
|
- </template>
|
|
|
- <template #satisfiedCount="{ row }">
|
|
|
- <el-button link type="primary" @click="onDetail(row.satisfiedKey, row, '满意')" v-if="!['市直合计', '区县合计'].includes(row.orgName)">{{
|
|
|
- row.satisfiedCount
|
|
|
- }}</el-button>
|
|
|
- <span v-else>{{ row.satisfiedCount }}</span>
|
|
|
- </template>
|
|
|
- <template #regardedAsSatisfiedCount="{ row }">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- @click="onDetail(row.regardedAsSatisfiedKey, row, '视为满意')"
|
|
|
- v-if="!['市直合计', '区县合计'].includes(row.orgName)"
|
|
|
- >{{ row.regardedAsSatisfiedCount }}</el-button
|
|
|
- >
|
|
|
- <span v-else>{{ row.regardedAsSatisfiedCount }}</span>
|
|
|
- </template>
|
|
|
- <template #defaultSatisfiedCount="{ row }">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- @click="onDetail(row.defaultSatisfiedKey, row, '默认满意')"
|
|
|
- v-if="!['市直合计', '区县合计'].includes(row.orgName)"
|
|
|
- >{{ row.defaultSatisfiedCount }}</el-button
|
|
|
- >
|
|
|
- <span v-else>{{ row.defaultSatisfiedCount }}</span>
|
|
|
- </template>
|
|
|
- <template #noSatisfiedCount="{ row }">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- @click="onDetail(row.noSatisfiedKey, row, '不满意')"
|
|
|
- v-if="!['市直合计', '区县合计'].includes(row.orgName)"
|
|
|
- >{{ row.noSatisfiedCount }}</el-button
|
|
|
- >
|
|
|
- <span v-else>{{ row.noSatisfiedCount }}</span>
|
|
|
- </template>
|
|
|
- <template #noEvaluateCount="{ row }">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- @click="onDetail(row.noEvaluateKey, row, '未作评价')"
|
|
|
- v-if="!['市直合计', '区县合计'].includes(row.orgName)"
|
|
|
- >{{ row.noEvaluateCount }}</el-button
|
|
|
- >
|
|
|
- <span v-else>{{ row.noEvaluateCount }}</span>
|
|
|
- </template>
|
|
|
- <template #noPutThroughCount="{ row }">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- @click="onDetail(row.noPutThroughKey, row, '未接通')"
|
|
|
- v-if="!['市直合计', '区县合计'].includes(row.orgName)"
|
|
|
- >{{ row.noPutThroughCount }}</el-button
|
|
|
- >
|
|
|
- <span v-else>{{ row.noPutThroughCount }}</span>
|
|
|
- </template>
|
|
|
</ProTable>
|
|
|
</el-card>
|
|
|
</div>
|
|
@@ -132,16 +60,33 @@
|
|
|
<script setup lang="tsx" name="statisticsDepartmentSatisfied">
|
|
|
import { onMounted, reactive, ref } from 'vue';
|
|
|
import { FormInstance } from 'element-plus';
|
|
|
-import { departmentSatisfaction, departmentSatisfactionExport } from "@/api/statistics/department";
|
|
|
+import { departmentSatisfaction, departmentSatisfactionExport } from '@/api/statistics/department';
|
|
|
import { defaultDate, shortcuts } from '@/utils/constants';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
-import { downloadFileByStream, guid } from "@/utils/tools";
|
|
|
+import { downloadFileByStream } from '@/utils/tools';
|
|
|
import { callPeriodBase } from '@/api/statistics/call';
|
|
|
import Other from '@/utils/other';
|
|
|
|
|
|
// 表格配置项
|
|
|
const columns = ref<any[]>([
|
|
|
- { prop: 'orgName', label: '部门名称', minWidth: 200 },
|
|
|
+ {
|
|
|
+ prop: 'orgName',
|
|
|
+ label: '部门名称',
|
|
|
+ minWidth: 200,
|
|
|
+ render: (scope) => {
|
|
|
+ return (
|
|
|
+ <>
|
|
|
+ {!['市直合计', '区县合计'].includes(scope.row.orgName) ? (
|
|
|
+ <el-button type="primary" link onClick={() => onDetailOrg(scope.row)}>
|
|
|
+ {scope.row.orgName}
|
|
|
+ </el-button>
|
|
|
+ ) : (
|
|
|
+ <span>{scope.row.orgName}</span>
|
|
|
+ )}
|
|
|
+ </>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
{ prop: 'orgTypeText', label: '部门类别', minWidth: 120 },
|
|
|
{ prop: 'totalSumCount', label: '小计' },
|
|
|
{
|
|
@@ -149,43 +94,142 @@ const columns = ref<any[]>([
|
|
|
label: '总满意率',
|
|
|
minWidth: 120,
|
|
|
},
|
|
|
- { prop: 'verySatisfiedCount', label: '非常满意', minWidth: 120 },
|
|
|
+ {
|
|
|
+ prop: 'verySatisfiedCount',
|
|
|
+ label: '非常满意',
|
|
|
+ minWidth: 120,
|
|
|
+ render: (scope) => {
|
|
|
+ return (
|
|
|
+ <>
|
|
|
+ {!['市直合计', '区县合计'].includes(scope.row.orgName) ? (
|
|
|
+ <el-button type="primary" link onClick={() => onDetail(scope.row.verySatisfiedKey, scope.row)}>
|
|
|
+ {scope.row.verySatisfiedCount}
|
|
|
+ </el-button>
|
|
|
+ ) : (
|
|
|
+ <span>{scope.row.verySatisfiedCount}</span>
|
|
|
+ )}
|
|
|
+ </>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
{
|
|
|
prop: 'verySatisfiedRateText',
|
|
|
label: '非常满意率',
|
|
|
minWidth: 120,
|
|
|
},
|
|
|
- { prop: 'satisfiedCount', label: '满意', minWidth: 120 },
|
|
|
+ {
|
|
|
+ prop: 'satisfiedCount',
|
|
|
+ label: '满意',
|
|
|
+ minWidth: 120,
|
|
|
+ render: (scope) => {
|
|
|
+ return (
|
|
|
+ <>
|
|
|
+ {!['市直合计', '区县合计'].includes(scope.row.orgName) ? (
|
|
|
+ <el-button type="primary" link onClick={() => onDetail(scope.row.satisfiedKey, scope.row)}>
|
|
|
+ {scope.row.satisfiedCount}
|
|
|
+ </el-button>
|
|
|
+ ) : (
|
|
|
+ <span>{scope.row.satisfiedCount}</span>
|
|
|
+ )}
|
|
|
+ </>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
{
|
|
|
prop: 'satisfiedRateText',
|
|
|
label: '满意率',
|
|
|
minWidth: 120,
|
|
|
},
|
|
|
- { prop: 'regardedAsSatisfiedCount', label: '视为满意', minWidth: 120 },
|
|
|
+ {
|
|
|
+ prop: 'regardedAsSatisfiedCount',
|
|
|
+ label: '视为满意',
|
|
|
+ minWidth: 120,
|
|
|
+ render: (scope) => {
|
|
|
+ return (
|
|
|
+ <>
|
|
|
+ {!['市直合计', '区县合计'].includes(scope.row.orgName) ? (
|
|
|
+ <el-button type="primary" link onClick={() => onDetail(scope.row.regardedAsSatisfiedKey, scope.row)}>
|
|
|
+ {scope.row.regardedAsSatisfiedCount}
|
|
|
+ </el-button>
|
|
|
+ ) : (
|
|
|
+ <span>{scope.row.regardedAsSatisfiedCount}</span>
|
|
|
+ )}
|
|
|
+ </>
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
prop: 'regardedAsSatisfiedRateText',
|
|
|
label: '视为满意率',
|
|
|
minWidth: 120,
|
|
|
},
|
|
|
- { prop: 'defaultSatisfiedCount', label: '默认满意', minWidth: 120 },
|
|
|
+ { prop: 'defaultSatisfiedCount', label: '默认满意', minWidth: 120,render: (scope) => {
|
|
|
+ return (
|
|
|
+ <>
|
|
|
+ {!['市直合计', '区县合计'].includes(scope.row.orgName) ? (
|
|
|
+ <el-button type="primary" link onClick={() => onDetail(scope.row.defaultSatisfiedKey, scope.row)}>
|
|
|
+ {scope.row.defaultSatisfiedCount}
|
|
|
+ </el-button>
|
|
|
+ ) : (
|
|
|
+ <span>{scope.row.defaultSatisfiedCount}</span>
|
|
|
+ )}
|
|
|
+ </>
|
|
|
+ );
|
|
|
+ } },
|
|
|
{
|
|
|
prop: 'defaultSatisfiedRateText',
|
|
|
label: '默认满意率',
|
|
|
minWidth: 120,
|
|
|
},
|
|
|
- { prop: 'noSatisfiedCount', label: '不满意', minWidth: 120 },
|
|
|
+ { prop: 'noSatisfiedCount', label: '不满意', minWidth: 120,render: (scope) => {
|
|
|
+ return (
|
|
|
+ <>
|
|
|
+ {!['市直合计', '区县合计'].includes(scope.row.orgName) ? (
|
|
|
+ <el-button type="primary" link onClick={() => onDetail(scope.row.noSatisfiedKey, scope.row)}>
|
|
|
+ {scope.row.noSatisfiedCount}
|
|
|
+ </el-button>
|
|
|
+ ) : (
|
|
|
+ <span>{scope.row.noSatisfiedCount}</span>
|
|
|
+ )}
|
|
|
+ </>
|
|
|
+ );
|
|
|
+ }},
|
|
|
{
|
|
|
prop: 'noSatisfiedRateText',
|
|
|
label: '不满意率',
|
|
|
minWidth: 120,
|
|
|
},
|
|
|
- { prop: 'noEvaluateCount', label: '未作评价', minWidth: 120 },
|
|
|
+ { prop: 'noEvaluateCount', label: '未作评价', minWidth: 120,render: (scope) => {
|
|
|
+ return (
|
|
|
+ <>
|
|
|
+ {!['市直合计', '区县合计'].includes(scope.row.orgName) ? (
|
|
|
+ <el-button type="primary" link onClick={() => onDetail(scope.row.noEvaluateKey, scope.row)}>
|
|
|
+ {scope.row.noEvaluateCount}
|
|
|
+ </el-button>
|
|
|
+ ) : (
|
|
|
+ <span>{scope.row.noEvaluateCount}</span>
|
|
|
+ )}
|
|
|
+ </>
|
|
|
+ );
|
|
|
+ } },
|
|
|
{
|
|
|
prop: 'noEvaluateRateText',
|
|
|
label: '未作评价率',
|
|
|
minWidth: 120,
|
|
|
},
|
|
|
- { prop: 'noPutThroughCount', label: '未接通', minWidth: 120 },
|
|
|
+ { prop: 'noPutThroughCount', label: '未接通', minWidth: 120,render: (scope) => {
|
|
|
+ return (
|
|
|
+ <>
|
|
|
+ {!['市直合计', '区县合计'].includes(scope.row.orgName) ? (
|
|
|
+ <el-button type="primary" link onClick={() => onDetail(scope.row.noPutThroughKey, scope.row)}>
|
|
|
+ {scope.row.noPutThroughCount}
|
|
|
+ </el-button>
|
|
|
+ ) : (
|
|
|
+ <span>{scope.row.noPutThroughCount}</span>
|
|
|
+ )}
|
|
|
+ </>
|
|
|
+ );
|
|
|
+ } },
|
|
|
{
|
|
|
prop: 'noPutThroughRateText',
|
|
|
label: '未接通率',
|
|
@@ -252,9 +296,9 @@ const getSummaries = (param: any) => {
|
|
|
return;
|
|
|
}
|
|
|
switch (column.property) {
|
|
|
- case 'orgTypeText':
|
|
|
- sums[index] = state.totalCount?.orgTypeText;
|
|
|
- break;
|
|
|
+ case 'orgTypeText':
|
|
|
+ sums[index] = state.totalCount?.orgTypeText;
|
|
|
+ break;
|
|
|
case 'totalSumCount':
|
|
|
sums[index] = state.totalCount?.totalSumCount;
|
|
|
break;
|
|
@@ -313,40 +357,26 @@ const getSummaries = (param: any) => {
|
|
|
const router = useRouter();
|
|
|
// 点击部门名称
|
|
|
const onDetailOrg = (row: any) => {
|
|
|
- let StartDate = null;
|
|
|
- let EndDate = null;
|
|
|
- if (state.queryParams?.crTime) {
|
|
|
- StartDate = state.queryParams?.crTime[0];
|
|
|
- EndDate = state.queryParams?.crTime[1];
|
|
|
- }
|
|
|
+ const StartDate = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
|
|
|
+ const EndDate = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
|
|
|
router.push({
|
|
|
name: 'statisticsDepartmentSatisfiedOrg',
|
|
|
- state: {
|
|
|
+ query: {
|
|
|
StartDate,
|
|
|
EndDate,
|
|
|
OrgCode: row.orgCode,
|
|
|
TypeId: state.queryParams.TypeId,
|
|
|
LineNum: state.queryParams.LineNum,
|
|
|
},
|
|
|
- params: {
|
|
|
- key: guid(),
|
|
|
- },
|
|
|
});
|
|
|
};
|
|
|
// 点击数字
|
|
|
-const onDetail = (key: string, row, type: string) => {
|
|
|
- let StartDate = null;
|
|
|
- let EndDate = null;
|
|
|
- if (state.queryParams?.crTime) {
|
|
|
- StartDate = state.queryParams?.crTime[0];
|
|
|
- EndDate = state.queryParams?.crTime[1];
|
|
|
- }
|
|
|
+const onDetail = (key: string, row: any) => {
|
|
|
+ const StartDate = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
|
|
|
+ const EndDate = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
|
|
|
router.push({
|
|
|
name: 'statisticsDepartmentSatisfiedDetail',
|
|
|
- params: {
|
|
|
- key: guid(),
|
|
|
- },
|
|
|
- state: {
|
|
|
+ query: {
|
|
|
StartDate,
|
|
|
EndDate,
|
|
|
OrgCode: row.orgCode,
|
|
@@ -366,24 +396,24 @@ const getBaseInfo = async () => {
|
|
|
}
|
|
|
};
|
|
|
const exportTable = (columnInfos: any, isExportAll = false) => {
|
|
|
- let request = Other.deepClone(state.queryParams);
|
|
|
- request.StartDate = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
|
|
|
- request.EndDate = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
|
|
|
- Reflect.deleteProperty(request, 'crTime');
|
|
|
- const req = {
|
|
|
- queryDto: request,
|
|
|
- columnInfos,
|
|
|
- isExportAll,
|
|
|
- };
|
|
|
- state.loading = true;
|
|
|
- departmentSatisfactionExport(req)
|
|
|
- .then((res: any) => {
|
|
|
- state.loading = false;
|
|
|
- downloadFileByStream(res);
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- state.loading = false;
|
|
|
- });
|
|
|
+ let request = Other.deepClone(state.queryParams);
|
|
|
+ request.StartDate = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
|
|
|
+ request.EndDate = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
|
|
|
+ Reflect.deleteProperty(request, 'crTime');
|
|
|
+ const req = {
|
|
|
+ queryDto: request,
|
|
|
+ columnInfos,
|
|
|
+ isExportAll,
|
|
|
+ };
|
|
|
+ state.loading = true;
|
|
|
+ departmentSatisfactionExport(req)
|
|
|
+ .then((res: any) => {
|
|
|
+ state.loading = false;
|
|
|
+ downloadFileByStream(res);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ state.loading = false;
|
|
|
+ });
|
|
|
};
|
|
|
onMounted(() => {
|
|
|
getBaseInfo();
|