|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="statistics-department-satisfaction-container layout-pd">
|
|
|
+ <div class="statistics-department-satisfied-container layout-pd">
|
|
|
<!-- 搜索 -->
|
|
|
<el-card shadow="never">
|
|
|
<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
|
|
@@ -52,37 +52,38 @@
|
|
|
<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>
|
|
|
+ <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>
|
|
|
+ <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>
|
|
|
+ <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>
|
|
|
+ <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>
|
|
|
+ <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>
|
|
|
+ <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>
|
|
|
+ <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="statisticsDepartmentSatisfaction">
|
|
|
+<script setup lang="tsx" name="statisticsDepartmentSatisfied">
|
|
|
import { onMounted, reactive, ref } from 'vue';
|
|
|
-import { ElButton, FormInstance } from 'element-plus';
|
|
|
+import { ElButton, ElMessage, FormInstance } from 'element-plus';
|
|
|
import { throttle } from '@/utils/tools';
|
|
|
import { departmentSatisfaction } from '@/api/statistics/department';
|
|
|
import { shortcuts } from '@/utils/constants';
|
|
|
import dayjs from 'dayjs';
|
|
|
+import { useRouter } from 'vue-router';
|
|
|
|
|
|
// 表格配置项
|
|
|
const columns = ref<any[]>([
|
|
@@ -182,13 +183,36 @@ const getSummaries = (param: any) => {
|
|
|
});
|
|
|
return sums;
|
|
|
};
|
|
|
+const router = useRouter();
|
|
|
// 点击部门名称
|
|
|
const onDetailOrg = (row: any) => {
|
|
|
- console.log(row);
|
|
|
+ console.log(row);
|
|
|
+ if (!router.hasRoute('statisticsDepartmentSatisfiedOrg')) {
|
|
|
+ ElMessage.warning('当前用户未配置部门满意度明细');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ router.push({
|
|
|
+ name: 'statisticsDepartmentSatisfiedOrg',
|
|
|
+ params: {
|
|
|
+ key: row.orgCode,
|
|
|
+ tagsViewName: '知识查看',
|
|
|
+ },
|
|
|
+ });
|
|
|
};
|
|
|
// 点击数字
|
|
|
-const onDetail = (key: string,row) => {
|
|
|
- console.log(key,row);
|
|
|
+const onDetail = (key: string, row, type: string) => {
|
|
|
+ console.log(key, row);
|
|
|
+ if (!router.hasRoute('statisticsDepartmentSatisfiedDetail')) {
|
|
|
+ ElMessage.warning('当前用户未配置部门满意度明细');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ router.push({
|
|
|
+ name: 'statisticsDepartmentSatisfiedDetail',
|
|
|
+ params: {
|
|
|
+ key: key,
|
|
|
+ tagsViewName: '知识查看',
|
|
|
+ },
|
|
|
+ });
|
|
|
};
|
|
|
onMounted(() => {
|
|
|
queryList();
|