|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div class="statistics-department-satisfaction-detail-container layout-pd">
|
|
<div class="statistics-department-satisfaction-detail-container layout-pd">
|
|
<!-- 搜索 -->
|
|
<!-- 搜索 -->
|
|
- <el-card shadow="never">
|
|
|
|
|
|
+ <!-- <el-card shadow="never">
|
|
<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
|
|
<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
|
|
<el-form-item label="部门名称" prop="OrgName">
|
|
<el-form-item label="部门名称" prop="OrgName">
|
|
<el-input v-model="state.queryParams.OrgName" placeholder="部门名称" clearable @keyup.enter="queryList" class="keyword-input" />
|
|
<el-input v-model="state.queryParams.OrgName" placeholder="部门名称" clearable @keyup.enter="queryList" class="keyword-input" />
|
|
@@ -35,76 +35,112 @@
|
|
</el-button>
|
|
</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
- </el-card>
|
|
|
|
|
|
+ </el-card>-->
|
|
<el-card shadow="never">
|
|
<el-card shadow="never">
|
|
- <ProTable
|
|
|
|
- ref="proTableRef"
|
|
|
|
- :columns="columns"
|
|
|
|
- :data="state.tableData"
|
|
|
|
- @updateTable="queryList"
|
|
|
|
- :loading="state.loading"
|
|
|
|
- show-summary
|
|
|
|
- border
|
|
|
|
- :pagination="false"
|
|
|
|
- :summary-method="getSummaries"
|
|
|
|
- >
|
|
|
|
- <template #orgName="{ row }">
|
|
|
|
- <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>
|
|
|
|
- </template>
|
|
|
|
- <template #satisfiedCount="{ row }">
|
|
|
|
- <el-button link type="primary" @click="onDetail(row.satisfiedKey,row,'满意')">{{ row.satisfiedCount }}</el-button>
|
|
|
|
|
|
+ <ProTable ref="proTableRef" :columns="columns" :data="state.tableData" @updateTable="queryList" :loading="state.loading" :pagination="false">
|
|
|
|
+ <template #isProvince="{ row }">
|
|
|
|
+ <span>{{ row.order?.isProvince ? '省工单' : '市工单' }}</span>
|
|
</template>
|
|
</template>
|
|
- <template #generalSatisfiedCount="{ row }">
|
|
|
|
- <el-button link type="primary" @click="onDetail(row.generalSatisfiedKey,row)">{{ row.generalSatisfiedCount }}</el-button>
|
|
|
|
|
|
+ <template #title="{ row }">
|
|
|
|
+ <order-detail :order="row.order" @updateList="queryList">{{ row.order?.title }}</order-detail>
|
|
</template>
|
|
</template>
|
|
- <template #noSatisfiedCount="{ row }">
|
|
|
|
- <el-button link type="primary" @click="onDetail(row.noSatisfiedKey,row)">{{ row.noSatisfiedCount }}</el-button>
|
|
|
|
|
|
+ <template #acceptorName="{ row }">
|
|
|
|
+ <span
|
|
|
|
+ >{{ row.order?.acceptorName }} <span v-if="row.order?.acceptorStaffNo">[{{ row.order?.acceptorStaffNo }}]</span>
|
|
|
|
+ </span>
|
|
</template>
|
|
</template>
|
|
- <template #veryNoSatisfiedCount="{ row }">
|
|
|
|
- <el-button link type="primary" @click="onDetail(row.veryNoSatisfiedKey,row)">{{ row.veryNoSatisfiedCount }}</el-button>
|
|
|
|
|
|
+ <template #voicePj="{ row }">
|
|
|
|
+ <span v-for="item in row.orderVisit.orderVisitDetails">
|
|
|
|
+ <span v-if="item.visitTarget === 10">{{ item.voiceEvaluateText }}</span>
|
|
|
|
+ </span>
|
|
</template>
|
|
</template>
|
|
- <template #noEvaluateCount="{ row }">
|
|
|
|
- <el-button link type="primary" @click="onDetail(row.noEvaluateKey,row)">{{ row.noEvaluateCount }}</el-button>
|
|
|
|
|
|
+ <template #hwyPj="{ row }">
|
|
|
|
+ <span v-for="item in row.orderVisit.orderVisitDetails">
|
|
|
|
+ <span v-if="item.visitTarget === 10">{{ item.seatEvaluateText }}</span>
|
|
|
|
+ </span>
|
|
</template>
|
|
</template>
|
|
- <template #noPutThroughCount="{ row }">
|
|
|
|
- <el-button link type="primary" @click="onDetail(row.noPutThroughKey,row)">{{ row.noPutThroughCount }}</el-button>
|
|
|
|
|
|
+ <!-- 表格操作 -->
|
|
|
|
+ <template #operation="{ row }">
|
|
|
|
+ <el-button link type="primary" @click="visitDetail(row)" title="查看回访详情"> 回访详情 </el-button>
|
|
|
|
+ <order-detail :order="row.order" @updateList="queryList" />
|
|
</template>
|
|
</template>
|
|
</ProTable>
|
|
</ProTable>
|
|
</el-card>
|
|
</el-card>
|
|
|
|
+ <!-- 回访详情 -->
|
|
|
|
+ <visit-detail-com ref="visitDetailRef" @updateList="queryList" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script setup lang="tsx" name="statisticsDepartmentSatisfiedDetail">
|
|
<script setup lang="tsx" name="statisticsDepartmentSatisfiedDetail">
|
|
-import { onMounted, reactive, ref } from 'vue';
|
|
|
|
|
|
+import { onMounted, reactive, ref, defineAsyncComponent } from 'vue';
|
|
import { ElButton, FormInstance } from 'element-plus';
|
|
import { ElButton, FormInstance } from 'element-plus';
|
|
import { throttle } from '@/utils/tools';
|
|
import { throttle } from '@/utils/tools';
|
|
-import { departmentSatisfaction } from '@/api/statistics/department';
|
|
|
|
-import { shortcuts } from '@/utils/constants';
|
|
|
|
|
|
+import { departmentSatisfactionDetail } from '@/api/statistics/department';
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
|
|
+import { formatDate } from '@/utils/formatTime';
|
|
|
|
+
|
|
|
|
+// 引入组件
|
|
|
|
+const VisitDetailCom = defineAsyncComponent(() => import('@/views/business/visit/component/Visit-detail.vue')); // 回访
|
|
|
|
+const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
|
|
|
|
|
|
// 表格配置项
|
|
// 表格配置项
|
|
const columns = ref<any[]>([
|
|
const columns = ref<any[]>([
|
|
- { type: 'index', fixed: 'left', width: 55, label: '序号', align: 'center' },
|
|
|
|
- { prop: 'orgName', label: '部门名称', minWidth: 200 },
|
|
|
|
- { prop: 'orgTypeText', label: '部门类别', minWidth: 120 },
|
|
|
|
- { prop: 'totalSumCount', label: '小计' },
|
|
|
|
- { prop: 'totalSumRate', label: '总满意率', minWidth: 120 },
|
|
|
|
- { prop: 'verySatisfiedCount', label: '非常满意', minWidth: 120 },
|
|
|
|
- { prop: 'verySatisfiedRate', label: '非常满意率', minWidth: 120 },
|
|
|
|
- { prop: 'satisfiedCount', label: '满意', minWidth: 120 },
|
|
|
|
- { prop: 'satisfiedRate', label: '满意率', minWidth: 120 },
|
|
|
|
- { prop: 'generalSatisfiedCount', label: '视为满意', minWidth: 120 },
|
|
|
|
- { prop: 'generalSatisfiedRate', label: '视为满意率', minWidth: 120 },
|
|
|
|
- { prop: 'noSatisfiedCount', label: '默认满意', minWidth: 120 },
|
|
|
|
- { prop: 'noSatisfiedRate', label: '默认满意率', minWidth: 120 },
|
|
|
|
- { prop: 'veryNoSatisfiedCount', label: '不满意', minWidth: 120 },
|
|
|
|
- { prop: 'veryNoSatisfiedRate', label: '不满意率', minWidth: 120 },
|
|
|
|
- { prop: 'noEvaluateCount', label: '未作评价', minWidth: 120 },
|
|
|
|
- { prop: 'noEvaluateRate', label: '未作评价率', minWidth: 120 },
|
|
|
|
- { prop: 'noPutThroughCount', label: '未接通', minWidth: 120 },
|
|
|
|
- { prop: 'noPutThroughRate', label: '未接通率', minWidth: 120 },
|
|
|
|
|
|
+ { type: 'selection', fixed: 'left', width: 55 },
|
|
|
|
+ { prop: 'order.no', label: '工单编码', width: 150 },
|
|
|
|
+ { prop: 'isProvince', label: '省/市工单', width: 100 },
|
|
|
|
+ { prop: 'title', label: '工单标题', width: 300 },
|
|
|
|
+ { prop: 'order.sourceChannel', label: '来源方式', width: 100 },
|
|
|
|
+ { prop: 'orderVisit.visitStateText', label: '回访状态', width: 100 },
|
|
|
|
+ { prop: 'orderVisit.visitTypeText', label: '回访方式', width: 100 },
|
|
|
|
+ { prop: 'order.acceptType', label: '受理类型', width: 150 },
|
|
|
|
+ { prop: 'order.hotspotName', label: '热点分类', width: 200 },
|
|
|
|
+ { prop: 'acceptorName', label: '受理人', width: 170 },
|
|
|
|
+ { prop: 'order.orgLevelOneName', label: '一级部门', width: 150 },
|
|
|
|
+ { prop: 'order.actualHandleOrgName', label: '接办部门', width: 120 },
|
|
|
|
+ {
|
|
|
|
+ prop: 'order.startTime',
|
|
|
|
+ label: '受理时间',
|
|
|
|
+ width: 170,
|
|
|
|
+ render: (scope) => {
|
|
|
|
+ return <span>{formatDate(scope.row.order?.startTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: 'order.filedTime',
|
|
|
|
+ label: '办结时间',
|
|
|
|
+ width: 170,
|
|
|
|
+ render: (scope) => {
|
|
|
|
+ return <span>{formatDate(scope.row.order?.filedTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: 'publishTime',
|
|
|
|
+ label: '发布时间',
|
|
|
|
+ width: 170,
|
|
|
|
+ render: (scope) => {
|
|
|
|
+ return <span>{formatDate(scope.row.publishTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: 'orderVisit.creationTime',
|
|
|
|
+ label: '回访任务创建时间',
|
|
|
|
+ width: 170,
|
|
|
|
+ render: (scope) => {
|
|
|
|
+ return <span>{formatDate(scope.row.orderVisit.creationTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ { prop: 'orderVisit.employeeName', label: '回访人', width: 150 },
|
|
|
|
+ {
|
|
|
|
+ prop: 'orderVisit.visitTime',
|
|
|
|
+ label: '回访时间',
|
|
|
|
+ width: 170,
|
|
|
|
+ render: (scope) => {
|
|
|
|
+ return <span>{formatDate(scope.row.orderVisit.visitTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ { prop: 'order.counterSignTypeText', label: '是否会签', width: 100 },
|
|
|
|
+ { prop: 'voicePj', label: '语音评价', width: 150 },
|
|
|
|
+ { prop: 'hwyPj', label: '话务员满意度', width: 150 },
|
|
|
|
+ { prop: 'operation', label: '操作', fixed: 'right', width: 170, align: 'center' },
|
|
]);
|
|
]);
|
|
// 定义变量内容
|
|
// 定义变量内容
|
|
const ruleFormRef = ref<RefType>(); // 表单ref
|
|
const ruleFormRef = ref<RefType>(); // 表单ref
|
|
@@ -121,24 +157,19 @@ const state = reactive({
|
|
loading: false, // 加载
|
|
loading: false, // 加载
|
|
total: 0, // 总数
|
|
total: 0, // 总数
|
|
});
|
|
});
|
|
|
|
+const historyParams = history.state;
|
|
/** 获取列表 */
|
|
/** 获取列表 */
|
|
const queryList = throttle(() => {
|
|
const queryList = throttle(() => {
|
|
state.loading = true;
|
|
state.loading = true;
|
|
- let StartDate = null;
|
|
|
|
- let EndDate = null;
|
|
|
|
- if (state.queryParams?.crTime) {
|
|
|
|
- StartDate = state.queryParams?.crTime[0];
|
|
|
|
- EndDate = state.queryParams?.crTime[1];
|
|
|
|
- }
|
|
|
|
const request = {
|
|
const request = {
|
|
- StartDate,
|
|
|
|
- EndDate,
|
|
|
|
- TypeId: state.queryParams.TypeId,
|
|
|
|
- PageIndex: state.queryParams.PageIndex,
|
|
|
|
- PageSize: state.queryParams.PageSize,
|
|
|
|
- LineNum: state.queryParams.LineNum,
|
|
|
|
|
|
+ StartDate: historyParams.StartDate,
|
|
|
|
+ EndDate: historyParams.StartDate,
|
|
|
|
+ TypeId: historyParams.TypeId,
|
|
|
|
+ LineNum: historyParams.LineNum,
|
|
|
|
+ OrgCode: historyParams.OrgCode,
|
|
|
|
+ DateValue: historyParams.DateValue,
|
|
};
|
|
};
|
|
- departmentSatisfaction(request)
|
|
|
|
|
|
+ departmentSatisfactionDetail(request)
|
|
.then((res: any) => {
|
|
.then((res: any) => {
|
|
state.tableData = res.result ?? [];
|
|
state.tableData = res.result ?? [];
|
|
state.loading = false;
|
|
state.loading = false;
|
|
@@ -153,42 +184,14 @@ const resetQuery = throttle((formEl: FormInstance | undefined) => {
|
|
formEl.resetFields();
|
|
formEl.resetFields();
|
|
queryList();
|
|
queryList();
|
|
}, 300);
|
|
}, 300);
|
|
-// 合计
|
|
|
|
-const getSummaries = (param: any) => {
|
|
|
|
- const { columns, data } = param;
|
|
|
|
- const sums: string[] = [];
|
|
|
|
- columns.forEach((column: { property: string }, index: number) => {
|
|
|
|
- if (index === 0) {
|
|
|
|
- sums[index] = '合计';
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- const values = data.map((item: { [x: string]: any }) => Number(item[column.property]));
|
|
|
|
- if (['orgName'].includes(column.property)) {
|
|
|
|
- //百分比不能计算
|
|
|
|
- sums[index] = '';
|
|
|
|
- return '';
|
|
|
|
- } else if (!values.every((value: unknown) => Number.isNaN(value))) {
|
|
|
|
- sums[index] = `${values.reduce((prev: any, curr: any) => {
|
|
|
|
- const value = Number(curr);
|
|
|
|
- if (!Number.isNaN(value)) {
|
|
|
|
- return prev + curr;
|
|
|
|
- } else {
|
|
|
|
- return prev;
|
|
|
|
- }
|
|
|
|
- }, 0)}`;
|
|
|
|
- } else {
|
|
|
|
- sums[index] = ' ';
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- return sums;
|
|
|
|
-};
|
|
|
|
-// 点击部门名称
|
|
|
|
-const onDetailOrg = (row: any) => {
|
|
|
|
- console.log(row);
|
|
|
|
-};
|
|
|
|
-// 点击数字
|
|
|
|
-const onDetail = (key: string,row) => {
|
|
|
|
- console.log(key,row);
|
|
|
|
|
|
+// 回访详情
|
|
|
|
+const visitDetailRef = ref<RefType>();
|
|
|
|
+const visitDetail = (row: any) => {
|
|
|
|
+ if ([10, 20].includes(row.visitState)) {
|
|
|
|
+ visitDetailRef.value.openDialog(row, '回访');
|
|
|
|
+ } else {
|
|
|
|
+ visitDetailRef.value.openDialog(row, '回访详情');
|
|
|
|
+ }
|
|
};
|
|
};
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
queryList();
|
|
queryList();
|