|
@@ -170,6 +170,30 @@
|
|
|
v-model:limit="state.queryParams.PageSize"
|
|
|
@pagination="queryList"
|
|
|
/>
|
|
|
+
|
|
|
+ <ProTable
|
|
|
+ ref="proTableRef"
|
|
|
+ :columns="columns"
|
|
|
+ :data="state.tableData"
|
|
|
+ @updateTable="queryList"
|
|
|
+ :loading="loading"
|
|
|
+ :total="state.total"
|
|
|
+ v-model:page-index="state.queryParams.PageIndex"
|
|
|
+ v-model:page-size="state.queryParams.PageSize"
|
|
|
+ :key="Math.random()"
|
|
|
+ v-model:radio="tableRadio"
|
|
|
+ @current-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <template #title="{ row }">
|
|
|
+ <span v-if="state.ruleForm.isOrder">{{row.title}}</span>
|
|
|
+ <span v-else>{{row.order?.title}}</span>
|
|
|
+ </template>
|
|
|
+ <template #employeeName="{ row }">
|
|
|
+ <span
|
|
|
+ >{{ row.order?.acceptorName }} <span v-if="row.order?.acceptorStaffNo">[{{ row.order?.acceptorStaffNo }}]</span>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </ProTable>
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
<el-button @click="closeDialog" class="default-button">取 消</el-button>
|
|
@@ -180,12 +204,16 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<script lang="ts" setup name="blackAdd">
|
|
|
-import { ref, reactive } from 'vue';
|
|
|
+<script lang="tsx" setup name="blackAdd">
|
|
|
+import { ref, reactive,defineAsyncComponent } from 'vue';
|
|
|
import { ElButton, ElMessage } from 'element-plus';
|
|
|
import { formatDate } from '@/utils/formatTime';
|
|
|
import { callLogLink, callLogOrder, callLogVisit } from '@/api/tels/callLog';
|
|
|
|
|
|
+
|
|
|
+const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
|
|
|
+
|
|
|
+
|
|
|
const props = defineProps({
|
|
|
specialFlagList: {
|
|
|
type: Array,
|
|
@@ -195,8 +223,73 @@ const props = defineProps({
|
|
|
// 定义子组件向父组件传值/事件
|
|
|
const emit = defineEmits(['updateList']);
|
|
|
|
|
|
-// 定义变量内容
|
|
|
+const proTableRef = ref<RefType>(); // 表格ref
|
|
|
+// 表格配置项
|
|
|
+const columns = ref<any[]>([
|
|
|
+
|
|
|
+]);
|
|
|
+// 工单表头
|
|
|
+const orderColumns = [
|
|
|
+ { type: 'radio', fixed: 'left', width: 80, label: '请选择' },
|
|
|
+ { prop: 'no', label: '工单编码', width: 150 },
|
|
|
+ { prop: 'isProvince', label: '省/市工单', width: 100, render: (scope: any) => (scope.row.isProvince ? '省工单' : '市工单') },
|
|
|
+ { prop: 'actualHandleStepName', label: '办理节点', width: 150 },
|
|
|
+ { prop: 'statusText', label: '工单状态', width: 100 },
|
|
|
+ { prop: 'title', label: '标题', width: 300 },
|
|
|
+ { prop: 'startTime', label: '受理时间', width: 170, render: (scope: any) => formatDate(scope.row.startTime, 'YYYY-mm-dd HH:MM:SS') },
|
|
|
+ { prop: 'expiredTime', label: '工单期满时间', width: 170, render: (scope: any) => formatDate(scope.row.expiredTime, 'YYYY-mm-dd HH:MM:SS') },
|
|
|
+ { prop: 'filedTime', label: '办结时间', width: 170, render: (scope: any) => formatDate(scope.row.filedTime, 'YYYY-mm-dd HH:MM:SS') },
|
|
|
+ { prop: 'orgLevelOneName', label: '一级部门', width: 170 },
|
|
|
+ { prop: 'actualHandleOrgName', label: '接办部门', width: 170 },
|
|
|
+ { prop: 'acceptType', label: '受理类型', width: 150 },
|
|
|
+ { prop: 'counterSignTypeText', label: '是否会签', width: 100 },
|
|
|
+ { prop: 'sourceChannel', label: '来源方式', width: 100 },
|
|
|
+ { prop: 'hotspotName', label: '热点分类', width: 200 },
|
|
|
+ { prop: 'employeeName', label: '受理人', width: 120 },
|
|
|
+];
|
|
|
+const visitColumns = [
|
|
|
+ { type: 'radio', fixed: 'left', width: 80, label: '请选择' },
|
|
|
+ { prop: 'order.no', label: '工单编码', width: 150 },
|
|
|
+ { prop: 'order.isProvince', label: '省/市工单', width: 100, render: (scope: any) => (scope.row.order?.isProvince ? '省工单' : '市工单') },
|
|
|
+ { prop: 'order.title', label: '工单标题', width: 300 },
|
|
|
+ { prop: 'order.sourceChannel', label: '来源方式' },
|
|
|
+ { prop: 'visitStateText', label: '回访状态', width: 100 },
|
|
|
+ { prop: 'visitTypeText', label: '回访方式', width: 100 },
|
|
|
+ { prop: 'order.acceptType', label: '受理类型', width: 120 },
|
|
|
+ { prop: 'order.hotspotName', label: '热点分类', width: 200 },
|
|
|
+ { prop: 'expiredTime', label: '受理人', width: 170, render: (scope: any) => `${scope.row.order?.acceptorName} [${scope.row.order?.acceptorStaffNo}]` },
|
|
|
+ { prop: 'order.orgLevelOneName', label: '一级部门', width: 150 },
|
|
|
+ { prop: 'order.actualHandleOrgName', label: '接办部门', width: 150 },
|
|
|
+ { prop: 'order.startTime', label: '受理时间', width: 170, render: (scope: any) => formatDate(scope.row.order?.startTime, 'YYYY-mm-dd HH:MM:SS') },
|
|
|
+ { prop: 'order.filedTime', label: '办结时间', width: 170, render: (scope: any) => formatDate(scope.row.order?.filedTime, 'YYYY-mm-dd HH:MM:SS') },
|
|
|
+ { prop: 'publishTime', label: '发布时间', width: 170, render: (scope: any) => formatDate(scope.row.publishTime, 'YYYY-mm-dd HH:MM:SS') },
|
|
|
+ { prop: 'creationTime', label: '回访任务创建时间', width: 170, render: (scope: any) => formatDate(scope.row.creationTime, 'YYYY-mm-dd HH:MM:SS') },
|
|
|
+ { prop: 'employeeName', label: '回访人', width: 170 },
|
|
|
+ { prop: 'visitTime', label: '回访时间', width: 170, render: (scope: any) => formatDate(scope.row.visitTime, 'YYYY-mm-dd HH:MM:SS') },
|
|
|
+ { prop: 'order.counterSignTypeText', label: '是否会签' },
|
|
|
+ {
|
|
|
+ label: '语音评价',
|
|
|
+ width: 150,
|
|
|
+ render: (scope: any) => {
|
|
|
+ return scope.row.orderVisitDetails
|
|
|
+ .filter((item: any) => item.visitTarget === 10)
|
|
|
+ .map((item: any) => item.voiceEvaluateText)
|
|
|
+ .join(' ');
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '话务员满意度',
|
|
|
+ width: 150,
|
|
|
+ render: (scope: any) => {
|
|
|
+ return scope.row.orderVisitDetails
|
|
|
+ .filter((item: any) => item.visitTarget === 10)
|
|
|
+ .map((item: any) => item.seatEvaluateText)
|
|
|
+ .join(' ');
|
|
|
+ },
|
|
|
+ },
|
|
|
+]
|
|
|
|
|
|
+// 定义变量内容
|
|
|
const state = reactive<any>({
|
|
|
ruleForm: {
|
|
|
isOrder: true, // 是否工单
|
|
@@ -222,6 +315,7 @@ const openDialog = (val: any) => {
|
|
|
};
|
|
|
const queryList = () => {
|
|
|
loading.value = true;
|
|
|
+ columns.value = state.ruleForm.isOrder ? orderColumns : visitColumns;
|
|
|
if (state.ruleForm.isOrder) {
|
|
|
callLogOrder(state.queryParams)
|
|
|
.then((res: any) => {
|