Procházet zdrojové kódy

refactor(quality): 重构质检详情和结果组件以提升代码复用性

将质检详情和质检结果的逻辑提取为独立组件,并在多个视图中复用,减少代码冗余,提高可维护性
闪电 %!s(int64=8) %!d(string=před) měsíci
rodič
revize
d5f1c0ac9f

+ 4 - 0
src/assets/style.css

@@ -1089,6 +1089,10 @@ video {
1089 1089
   width: 400px;
1090 1090
 }
1091 1091
 
1092
+.w-\[600px\] {
1093
+  width: 600px;
1094
+}
1095
+
1092 1096
 .min-w-0 {
1093 1097
   min-width: 0px;
1094 1098
 }

+ 142 - 0
src/components/quality/detail.vue

@@ -0,0 +1,142 @@
1
+<template>
2
+    <div class="flex-1 bg-white">
3
+        <div class="mb-6">
4
+            <h2 class="text-xl font-medium">质检详情</h2>
5
+            <div class="mt-4 grid grid-cols-4 gap-4 text-sm text-gray-600">
6
+                <div>质检ID: {{ inspectionId }}</div>
7
+                <div>外呼号码: {{ phoneNumber }}</div>
8
+                <div>外呼时间: {{ callTime }}</div>
9
+                <div>坐席: {{ agent }}</div>
10
+            </div>
11
+        </div>
12
+        <div class="space-y-6 overflow-y-auto max-h-[calc(100vh-280px)]  px-4">
13
+            <template v-for="(msg, index) in messages" :key="index">
14
+                <div :class="['flex', msg.type === 'agent' ? 'justify-end' : '']">
15
+                    <div
16
+                        :class="['flex items-start gap-3 max-w-[80%]', msg.type === 'agent' ? 'flex-row-reverse' : '']">
17
+                        <div class="w-8 h-8 rounded-full bg-gray-200 flex-shrink-0 overflow-hidden">
18
+                            <el-icon class="w-full h-full p-1.5 text-gray-500">
19
+                                <User v-if="msg.type === 'customer'" />
20
+                                <Service v-else />
21
+                            </el-icon>
22
+                        </div>
23
+                        <div :class="['rounded-lg relative group']">
24
+                            <div :class="['text-sm mb-1', msg.type === 'agent' ? 'text-right' : '']">
25
+                                {{ msg.type === 'agent' ? '坐席' : '客户' }} ({{ msg.time
26
+                                }})
27
+                            </div>
28
+                            <div
29
+                                :class="['p-3 rounded-lg relative group', msg.type === 'agent' ? 'bg-blue-500 text-white' : 'bg-gray-100']">
30
+                                <div>{{ msg.content }}</div>
31
+
32
+                            </div>
33
+                            <div v-if="msg.warning" class="mt-2 text-xs text-red-500">{{ msg.warning }}
34
+                                <div v-if="msg.type === 'agent' && msg.warning"
35
+                                    class="hidden group-hover:flex items-center justify-center absolute top-0 -left-[55px] -translate-x-1/2 !p-1 ">
36
+                                    <el-button @click.stop="handleAppeal">
37
+                                        <el-icon>
38
+                                            <CirclePlus />
39
+                                        </el-icon>
40
+                                        加入申诉
41
+                                    </el-button>
42
+                                </div>
43
+                            </div>
44
+                        </div>
45
+                    </div>
46
+                </div>
47
+            </template>
48
+        </div>
49
+        <div class="mt-6 border-t pt-4">
50
+            <audio-player></audio-player>
51
+            <div class="mt-4 flex items-center text-sm text-gray-500">
52
+                <span class="mr-4">准确率: {{ accuracy }}%</span>
53
+                <span>识别率: {{ recognition }}%</span>
54
+            </div>
55
+        </div>
56
+    </div>
57
+</template>
58
+
59
+<script lang="ts" setup>
60
+import { ref } from 'vue';
61
+import audioPlayer from '../audio/audioPlayer.vue';
62
+import { User, Service, VideoPlay, VideoPause, Close } from '@element-plus/icons-vue';
63
+const inspectionId = '893821';
64
+const phoneNumber = '137 8651 5262';
65
+const callTime = '2024-12-09 15:30';
66
+const agent = '李世海';
67
+const messages = ref([
68
+    {
69
+        type: 'agent',
70
+        time: '00:06',
71
+        content: '你好,欢迎拨打......',
72
+        warning: '语速 160字/分钟 命中规则条件:语速不符合标准'
73
+    },
74
+    {
75
+        type: 'customer',
76
+        time: '00:16',
77
+        content: '你好,我想咨询一下......'
78
+    },
79
+    {
80
+        type: 'agent',
81
+        time: '00:59',
82
+        content: '好的,很高兴为您解答。请问您想具体了解哪方面的......',
83
+        warning: '语速 160字/分钟 命中规则条件:语速不符合标准'
84
+    },
85
+    {
86
+        type: 'agent',
87
+        time: '00:59',
88
+        content: '好的,很高兴为您解答。请问您想具体了解哪方面的......',
89
+        warning: '语速 160字/分钟 命中规则条件:语速不符合标准'
90
+    },
91
+    {
92
+        type: 'agent',
93
+        time: '00:59',
94
+        content: '好的,很高兴为您解答。请问您想具体了解哪方面的......',
95
+        warning: '语速 160字/分钟 命中规则条件:语速不符合标准'
96
+    },
97
+    {
98
+        type: 'agent',
99
+        time: '00:59',
100
+        content: '好的,很高兴为您解答。请问您想具体了解哪方面的......',
101
+        warning: '语速 160字/分钟 命中规则条件:语速不符合标准'
102
+    },
103
+    {
104
+        type: 'agent',
105
+        time: '00:59',
106
+        content: '好的,很高兴为您解答。请问您想具体了解哪方面的......',
107
+        warning: '语速 160字/分钟 命中规则条件:语速不符合标准'
108
+    }
109
+]);
110
+
111
+const accuracy = ref(95.3);
112
+const recognition = ref(98.6);
113
+
114
+const handleAppeal = () => {
115
+    // 处理申诉逻辑
116
+};
117
+</script>
118
+<style scoped>
119
+.el-slider {
120
+    --el-slider-button-size: 16px;
121
+    --el-slider-height: 6px;
122
+}
123
+
124
+:deep(.el-table) {
125
+    --el-table-border-color: #e5e7eb;
126
+    --el-table-header-bg-color: #f9fafb;
127
+    --el-table-row-hover-bg-color: #f3f4f6;
128
+}
129
+
130
+:deep(.el-table th) {
131
+    font-weight: 500;
132
+    color: #374151;
133
+}
134
+
135
+:deep(.el-table td) {
136
+    color: #6b7280;
137
+}
138
+
139
+:deep(.el-button) {
140
+    font-weight: 500;
141
+}
142
+</style>

+ 131 - 0
src/components/quality/result.vue

@@ -0,0 +1,131 @@
1
+<template>
2
+    <div class="bg-white rounded-lg mb-6">
3
+        <div v-if="showScore" class="flex justify-between items-center mb-6">
4
+            <h3 class="text-lg font-medium">AI质检</h3>
5
+            <div class="flex items-center gap-2">
6
+                <span class="text-green-500">合格</span>
7
+                <span class="text-blue-500 text-xl font-medium">{{ score }}分</span>
8
+            </div>
9
+        </div>
10
+        <div class="space-y-6 overflow-y-auto max-h-[calc(100vh-280px)]">
11
+            <div>
12
+                <h4 class="text-base font-medium mb-4">质检概况</h4>
13
+                <div class="grid grid-cols-3 gap-4">
14
+                    <div class="text-center p-3 bg-gray-50 rounded">
15
+                        <div class="text-sm text-gray-500">平均语速</div>
16
+                        <div class="mt-1 font-medium">{{ stats.speed }}字/分钟</div>
17
+                    </div>
18
+                    <div class="text-center p-3 bg-gray-50 rounded">
19
+                        <div class="text-sm text-gray-500">平均分值</div>
20
+                        <div class="mt-1 font-medium">{{ stats.avgScore }}分</div>
21
+                    </div>
22
+                    <div class="text-center p-3 bg-gray-50 rounded">
23
+                        <div class="text-sm text-gray-500">静音时长</div>
24
+                        <div class="mt-1 font-medium">{{ stats.silenceTime }}s</div>
25
+                    </div>
26
+                </div>
27
+            </div>
28
+            <div v-if="standardShowType === 'list'">
29
+                <h4 class="text-base font-medium mb-4">评分标准</h4>
30
+                <el-table :data="scoreStandards" border stripe>
31
+                    <el-table-column prop="item" label="命中项" />
32
+                    <el-table-column prop="status" label="是否致命" />
33
+                    <el-table-column prop="score" label="分数">
34
+                        <template #default="scope">
35
+                            <span :class="scope.row.score < 0 ? 'text-red-500' : ''">{{ scope.row.score
36
+                                }}</span>
37
+                        </template>
38
+                    </el-table-column>
39
+                </el-table>
40
+            </div>
41
+            <div v-if="standardShowType === 'text'" class="mb-8">
42
+                <h3 class="text-gray-900 font-medium mb-4">评分标准</h3>
43
+                <div class="flex gap-8">
44
+                    <div class="flex items-center">
45
+                        <el-tooltip class="box-item" effect="dark" content="语速不能超过150字/分钟"
46
+                            placement="top-start">
47
+                            <el-icon class="mr-2 text-gray-400">
48
+                                <Warning />
49
+                            </el-icon>
50
+                        </el-tooltip>
51
+
52
+                        <span>语速不规范 (-5分)</span>
53
+                    </div>
54
+                    <div class="flex items-center">
55
+                        <el-tooltip class="box-item" effect="dark" content="语速不能超过150字/分钟"
56
+                            placement="top-start">
57
+                            <el-icon class="mr-2 text-gray-400">
58
+                                <Warning />
59
+                            </el-icon>
60
+                        </el-tooltip>
61
+                        <span>音量不规范 (-5分)</span>
62
+                    </div>
63
+                    <div class="flex items-center">
64
+                        <el-tooltip class="box-item" effect="dark" content="语速不能超过150字/分钟"
65
+                            placement="top-start">
66
+                            <el-icon class="mr-2 text-gray-400">
67
+                                <Warning />
68
+                            </el-icon>
69
+                        </el-tooltip>
70
+                        <span>反问客户 (-5分)</span>
71
+                    </div>
72
+                </div>
73
+            </div>
74
+        </div>
75
+
76
+    </div>
77
+</template>
78
+<script lang="ts" setup>
79
+import { ref, defineProps } from 'vue';
80
+// import audioPlayer from '../../components/audio/audioPlayer.vue';
81
+import { User, Service, VideoPlay, VideoPause, Close } from '@element-plus/icons-vue';
82
+
83
+const props = defineProps({
84
+    showScore: {
85
+        type: Boolean,
86
+        default: false
87
+    },
88
+    standardShowType: { // text 文本展示,list 列表展示
89
+        type: String,
90
+        default: 'list'
91
+    },
92
+});
93
+
94
+
95
+const score = ref(90);
96
+const stats = ref({
97
+    speed: 150,
98
+    avgScore: 60,
99
+    silenceTime: 20
100
+});
101
+const scoreStandards = ref([
102
+    { item: '语速不规范', status: '不致命', score: -5 },
103
+    { item: '音量不规范', status: '不致命', score: -5 },
104
+    { item: '反问客户', status: '不致命', score: -5 }
105
+]);
106
+</script>
107
+<style scoped>
108
+.el-slider {
109
+    --el-slider-button-size: 16px;
110
+    --el-slider-height: 6px;
111
+}
112
+
113
+:deep(.el-table) {
114
+    --el-table-border-color: #e5e7eb;
115
+    --el-table-header-bg-color: #f9fafb;
116
+    --el-table-row-hover-bg-color: #f3f4f6;
117
+}
118
+
119
+:deep(.el-table th) {
120
+    font-weight: 500;
121
+    color: #374151;
122
+}
123
+
124
+:deep(.el-table td) {
125
+    color: #6b7280;
126
+}
127
+
128
+:deep(.el-button) {
129
+    font-weight: 500;
130
+}
131
+</style>

+ 182 - 0
src/views/appeals/audit.vue

@@ -0,0 +1,182 @@
1
+<!-- 代码已包含 CSS:使用 TailwindCSS , 安装 TailwindCSS 后方可看到布局样式效果 -->
2
+<template>
3
+    <div class="app-container bg-gray-50">
4
+        <div class="mx-auto">
5
+            <div class="flex gap-6">
6
+                <!-- 左侧对话区域 -->
7
+                <div class="flex-1 bg-white rounded-lg shadow-sm p-6">
8
+                    <qualityDetail/>
9
+                </div>
10
+                <!-- 右侧质检信息 -->
11
+                <div class="w-[600px] bg-white rounded-lg shadow-sm p-6">
12
+                    <div class="flex justify-between items-center mb-6">
13
+                        <h3 class="text-lg font-medium">AI质检</h3>
14
+                        <div class="flex items-center gap-2">
15
+                            <span class="text-green-500">合格</span>
16
+                            <span class="text-blue-500 text-xl font-medium">{{ score }}分</span>
17
+                        </div>
18
+                    </div>
19
+                    <div class="space-y-6 overflow-y-auto max-h-[calc(100vh-280px)]">
20
+                        <div>
21
+                            <qualityResult/>
22
+                        </div>
23
+                        <div>
24
+                            <h4 class="text-base font-medium mb-4">申诉列表</h4>
25
+                            <div class="space-y-3">
26
+                                <div v-for="(appeal, index) in appeals" :key="index"
27
+                                    class="p-3 bg-gray-50 rounded relative group">
28
+                                    <div class="flex justify-between items-center">
29
+                                        <div class="font-medium">申诉片段 {{ index + 1 }}</div>
30
+                                        <div class="text-sm text-gray-500">{{ appeal.time }}</div>
31
+                                    </div>
32
+                                    <div class="mt-2 text-sm">{{ appeal.content }}</div>
33
+                                    <div class="mt-1 text-xs text-red-500">{{ appeal.warning }}</div>
34
+                                    <div
35
+                                        class="hidden group-hover:block absolute -bottom-1 right-1 !p-1 !rounded-tl-none !rounded-br-none">
36
+                                        <el-icon class="text-xs " @click.stop="removeAppeal(index)"
37
+                                            style="color: #ff4d4f;">
38
+                                            <Delete />
39
+                                        </el-icon>
40
+
41
+                                    </div>
42
+                                </div>
43
+                            </div>
44
+                        </div>
45
+                    </div>
46
+                </div>
47
+                <!-- 右侧审核信息
48
+                <div class="w-[600px] bg-white rounded-lg shadow-sm p-6">
49
+                    <div class="flex justify-between items-center mb-6">
50
+                        <h3 class="text-lg font-medium">AI质检</h3>
51
+                        <div class="flex items-center gap-2">
52
+                            <span class="text-green-500">合格</span>
53
+                            <span class="text-blue-500 text-xl font-medium">{{ score }}分</span>
54
+                        </div>
55
+                    </div>
56
+                </div> -->
57
+            </div>
58
+        </div>
59
+    </div>
60
+</template>
61
+<script lang="ts" setup>
62
+import { ref } from 'vue';
63
+// import audioPlayer from '../../components/audio/audioPlayer.vue';
64
+import qualityDetail from '../../components/quality/detail.vue';
65
+import qualityResult from '../../components/quality/result.vue';
66
+import { User, Service, VideoPlay, VideoPause, Close } from '@element-plus/icons-vue';
67
+const inspectionId = '893821';
68
+const phoneNumber = '137 8651 5262';
69
+const callTime = '2024-12-09 15:30';
70
+const agent = '李世海';
71
+const messages = ref([
72
+    {
73
+        type: 'agent',
74
+        time: '00:06',
75
+        content: '你好,欢迎拨打......',
76
+        warning: '语速 160字/分钟 命中规则条件:语速不符合标准'
77
+    },
78
+    {
79
+        type: 'customer',
80
+        time: '00:16',
81
+        content: '你好,我想咨询一下......'
82
+    },
83
+    {
84
+        type: 'agent',
85
+        time: '00:59',
86
+        content: '好的,很高兴为您解答。请问您想具体了解哪方面的......',
87
+        warning: '语速 160字/分钟 命中规则条件:语速不符合标准'
88
+    },
89
+    {
90
+        type: 'agent',
91
+        time: '00:59',
92
+        content: '好的,很高兴为您解答。请问您想具体了解哪方面的......',
93
+        warning: '语速 160字/分钟 命中规则条件:语速不符合标准'
94
+    },
95
+    {
96
+        type: 'agent',
97
+        time: '00:59',
98
+        content: '好的,很高兴为您解答。请问您想具体了解哪方面的......',
99
+        warning: '语速 160字/分钟 命中规则条件:语速不符合标准'
100
+    },
101
+    {
102
+        type: 'agent',
103
+        time: '00:59',
104
+        content: '好的,很高兴为您解答。请问您想具体了解哪方面的......',
105
+        warning: '语速 160字/分钟 命中规则条件:语速不符合标准'
106
+    },
107
+    {
108
+        type: 'agent',
109
+        time: '00:59',
110
+        content: '好的,很高兴为您解答。请问您想具体了解哪方面的......',
111
+        warning: '语速 160字/分钟 命中规则条件:语速不符合标准'
112
+    }
113
+]);
114
+const isPlaying = ref(false);
115
+const progress = ref(0);
116
+const currentTime = ref(0);
117
+const totalTime = ref(139);
118
+const accuracy = ref(95.3);
119
+const recognition = ref(98.6);
120
+const score = ref(90);
121
+const stats = ref({
122
+    speed: 150,
123
+    avgScore: 60,
124
+    silenceTime: 20
125
+});
126
+const scoreStandards = ref([
127
+    { item: '语速不规范', status: '不致命', score: -5 },
128
+    { item: '音量不规范', status: '不致命', score: -5 },
129
+    { item: '反问客户', status: '不致命', score: -5 }
130
+]);
131
+const appeals = ref([
132
+    {
133
+        time: '坐席(00:06)',
134
+        content: '你好,欢迎拨打......',
135
+        warning: '命中规则条件:语速不符合标准'
136
+    },
137
+    {
138
+        time: '坐席(00:06)',
139
+        content: '你好,欢迎拨打......',
140
+        warning: '命中规则条件:语速不符合标准'
141
+    }
142
+]);
143
+const togglePlay = () => {
144
+    isPlaying.value = !isPlaying.value;
145
+};
146
+const formatTime = (seconds: number) => {
147
+    const minutes = Math.floor(seconds / 60);
148
+    const remainingSeconds = Math.floor(seconds % 60);
149
+    return `${String(minutes).padStart(2, '0')}:${String(remainingSeconds).padStart(2, '0')}`;
150
+};
151
+const handleAppeal = () => {
152
+    // 处理申诉逻辑
153
+};
154
+const removeAppeal = (index: number) => {
155
+    appeals.value.splice(index, 1);
156
+};
157
+</script>
158
+<style scoped>
159
+.el-slider {
160
+    --el-slider-button-size: 16px;
161
+    --el-slider-height: 6px;
162
+}
163
+
164
+:deep(.el-table) {
165
+    --el-table-border-color: #e5e7eb;
166
+    --el-table-header-bg-color: #f9fafb;
167
+    --el-table-row-hover-bg-color: #f3f4f6;
168
+}
169
+
170
+:deep(.el-table th) {
171
+    font-weight: 500;
172
+    color: #374151;
173
+}
174
+
175
+:deep(.el-table td) {
176
+    color: #6b7280;
177
+}
178
+
179
+:deep(.el-button) {
180
+    font-weight: 500;
181
+}
182
+</style>

+ 6 - 83
src/views/quality/appeal.vue

@@ -5,62 +5,10 @@
5 5
             <div class="flex gap-6">
6 6
                 <!-- 左侧对话区域 -->
7 7
                 <div class="flex-1 bg-white rounded-lg shadow-sm p-6">
8
-                    <div class="mb-6">
9
-                        <h2 class="text-xl font-medium">质检详情</h2>
10
-                        <div class="mt-4 grid grid-cols-4 gap-4 text-sm text-gray-600">
11
-                            <div>质检ID: {{ inspectionId }}</div>
12
-                            <div>外呼号码: {{ phoneNumber }}</div>
13
-                            <div>外呼时间: {{ callTime }}</div>
14
-                            <div>坐席: {{ agent }}</div>
15
-                        </div>
16
-                    </div>
17
-                    <div class="space-y-6 overflow-y-auto max-h-[calc(100vh-280px)]  px-4">
18
-                        <template v-for="(msg, index) in messages" :key="index">
19
-                            <div :class="['flex', msg.type === 'agent' ? 'justify-end' : '']">
20
-                                <div
21
-                                    :class="['flex items-start gap-3 max-w-[80%]', msg.type === 'agent' ? 'flex-row-reverse' : '']">
22
-                                    <div class="w-8 h-8 rounded-full bg-gray-200 flex-shrink-0 overflow-hidden">
23
-                                        <el-icon class="w-full h-full p-1.5 text-gray-500">
24
-                                            <User v-if="msg.type === 'customer'" />
25
-                                            <Service v-else />
26
-                                        </el-icon>
27
-                                    </div>
28
-                                    <div
29
-                                        :class="['rounded-lg relative group']">
30
-                                        <div :class="['text-sm mb-1', msg.type === 'agent' ? 'text-right' : '']">
31
-                                            {{ msg.type === 'agent' ? '坐席' : '客户' }} ({{ msg.time
32
-                                            }})
33
-                                        </div>
34
-                                        <div :class="['p-3 rounded-lg relative group', msg.type === 'agent' ? 'bg-blue-500 text-white' : 'bg-gray-100']">
35
-                                            <div>{{ msg.content }}</div>
36
-                                           
37
-                                            </div>
38
-                                            <div v-if="msg.warning" class="mt-2 text-xs text-red-500">{{ msg.warning }}
39
-                                            <div v-if="msg.type === 'agent' && msg.warning"
40
-                                                class="hidden group-hover:flex items-center justify-center absolute top-0 -left-[55px] -translate-x-1/2 !p-1 ">
41
-                                                <el-button @click.stop="handleAppeal">
42
-                                                    <el-icon>
43
-                                                        <CirclePlus />
44
-                                                    </el-icon>
45
-                                                    加入申诉
46
-                                                </el-button>
47
-                                            </div>
48
-                                        </div>
49
-                                    </div>
50
-                                </div>
51
-                            </div>
52
-                        </template>
53
-                    </div>
54
-                    <div class="mt-6 border-t pt-4">
55
-                        <audio-player></audio-player>
56
-                        <div class="mt-4 flex items-center text-sm text-gray-500">
57
-                            <span class="mr-4">准确率: {{ accuracy }}%</span>
58
-                            <span>识别率: {{ recognition }}%</span>
59
-                        </div>
60
-                    </div>
8
+                    <qualityDetail/>
61 9
                 </div>
62 10
                 <!-- 右侧质检信息 -->
63
-                <div class="w-[400px] bg-white rounded-lg shadow-sm p-6">
11
+                <div class="w-[600px] bg-white rounded-lg shadow-sm p-6">
64 12
                     <div class="flex justify-between items-center mb-6">
65 13
                         <h3 class="text-lg font-medium">AI质检</h3>
66 14
                         <div class="flex items-center gap-2">
@@ -70,34 +18,7 @@
70 18
                     </div>
71 19
                     <div class="space-y-6 overflow-y-auto max-h-[calc(100vh-280px)]">
72 20
                         <div>
73
-                            <h4 class="text-base font-medium mb-4">质检概况</h4>
74
-                            <div class="grid grid-cols-3 gap-4">
75
-                                <div class="text-center p-3 bg-gray-50 rounded">
76
-                                    <div class="text-sm text-gray-500">平均语速</div>
77
-                                    <div class="mt-1 font-medium">{{ stats.speed }}字/分钟</div>
78
-                                </div>
79
-                                <div class="text-center p-3 bg-gray-50 rounded">
80
-                                    <div class="text-sm text-gray-500">平均分值</div>
81
-                                    <div class="mt-1 font-medium">{{ stats.avgScore }}分</div>
82
-                                </div>
83
-                                <div class="text-center p-3 bg-gray-50 rounded">
84
-                                    <div class="text-sm text-gray-500">静音时长</div>
85
-                                    <div class="mt-1 font-medium">{{ stats.silenceTime }}s</div>
86
-                                </div>
87
-                            </div>
88
-                        </div>
89
-                        <div>
90
-                            <h4 class="text-base font-medium mb-4">评分标准</h4>
91
-                            <el-table :data="scoreStandards" border stripe>
92
-                                <el-table-column prop="item" label="命中项" />
93
-                                <el-table-column prop="status" label="是否致命" />
94
-                                <el-table-column prop="score" label="分数">
95
-                                    <template #default="scope">
96
-                                        <span :class="scope.row.score < 0 ? 'text-red-500' : ''">{{ scope.row.score
97
-                                            }}</span>
98
-                                    </template>
99
-                                </el-table-column>
100
-                            </el-table>
21
+                            <qualityResult/>
101 22
                         </div>
102 23
                         <div>
103 24
                             <h4 class="text-base font-medium mb-4">申诉列表</h4>
@@ -138,7 +59,9 @@
138 59
 </template>
139 60
 <script lang="ts" setup>
140 61
 import { ref } from 'vue';
141
-import audioPlayer from '../../components/audio/audioPlayer.vue';
62
+// import audioPlayer from '../../components/audio/audioPlayer.vue';
63
+import qualityDetail from '../../components/quality/detail.vue';
64
+import qualityResult from '../../components/quality/result.vue';
142 65
 import { User, Service, VideoPlay, VideoPause, Close } from '@element-plus/icons-vue';
143 66
 const inspectionId = '893821';
144 67
 const phoneNumber = '137 8651 5262';

+ 4 - 76
src/views/quality/detail.vue

@@ -27,84 +27,11 @@
27 27
   
28 28
         <!-- AI质检结果 -->
29 29
         <div class="bg-white rounded-lg p-6 mb-6 shadow-sm">
30
-          <div class="flex justify-between items-center mb-8">
31
-            <h2 class="text-xl font-medium">AI质检</h2>
32
-            <div class="flex items-center">
33
-              <span class="text-green-600 mr-4">合格</span>
34
-              <span class="text-blue-600 text-xl font-medium">90分</span>
35
-            </div>
36
-          </div>
37
-  
38
-          <div class="mb-8">
39
-            <h3 class="text-gray-900 font-medium mb-4">质检概况</h3>
40
-            <div class="grid grid-cols-5 gap-6">
41
-              <div class="text-center p-4 bg-gray-50 rounded-lg">
42
-                <div class="text-gray-600 mb-2">平均语速</div>
43
-                <div class="text-gray-900">150字/分钟</div>
44
-              </div>
45
-              <div class="text-center p-4 bg-gray-50 rounded-lg">
46
-                <div class="text-gray-600 mb-2">平均分贝</div>
47
-                <div class="text-gray-900">60分贝</div>
48
-              </div>
49
-              <div class="text-center p-4 bg-gray-50 rounded-lg">
50
-                <div class="text-gray-600 mb-2">静音时长</div>
51
-                <div class="text-gray-900">20s</div>
52
-              </div>
53
-              <div class="text-center p-4 bg-gray-50 rounded-lg">
54
-                <div class="text-gray-600 mb-2">客户情绪</div>
55
-                <div class="text-gray-900">中立</div>
56
-              </div>
57
-              <div class="text-center p-4 bg-gray-50 rounded-lg">
58
-                <div class="text-gray-600 mb-2">客服情绪</div>
59
-                <div class="text-gray-900">中立</div>
60
-              </div>
61
-            </div>
62
-          </div>
63
-  
64
-          <div class="mb-8">
65
-            <h3 class="text-gray-900 font-medium mb-4">评分标准</h3>
66
-            <div class="flex gap-8">
67
-              <div class="flex items-center">
68
-                <el-icon class="mr-2 text-gray-400"><Warning /></el-icon>
69
-                <span>语速不规范 (-5分)</span>
70
-              </div>
71
-              <div class="flex items-center">
72
-                <el-icon class="mr-2 text-gray-400"><Warning /></el-icon>
73
-                <span>音量不规范 (-5分)</span>
74
-              </div>
75
-              <div class="flex items-center">
76
-                <el-icon class="mr-2 text-gray-400"><Warning /></el-icon>
77
-                <span>反问客户 (-5分)</span>
78
-              </div>
79
-            </div>
80
-          </div>
81
-  
30
+          <!-- AI质检结果 -->
31
+          <qualityResult :showScore="true" :standardShowType="'text'"/>
82 32
           <!-- 通话录音 -->
83 33
           <audio-player ></audio-player>
84
-          <!-- <div>
85
-            <h3 class="text-gray-900 font-medium mb-4">通话录音</h3>
86
-            <div class="bg-gray-50 p-4 rounded-lg">
87
-              <div class="flex items-center gap-4">
88
-                <button class="flex items-center !rounded-button whitespace-nowrap">
89
-                  <el-icon class="mr-2"><Microphone /></el-icon>
90
-                  音量
91
-                </button>
92
-                <div class="flex-1 h-2 bg-gray-200 rounded-full">
93
-                  <div class="w-3/4 h-full bg-blue-500 rounded-full"></div>
94
-                </div>
95
-                <span class="text-gray-600">02:19</span>
96
-                <button class="text-blue-600 !rounded-button whitespace-nowrap">
97
-                  <el-icon><Mute /></el-icon>
98
-                </button>
99
-                <button class="text-blue-600 !rounded-button whitespace-nowrap">
100
-                  <el-icon><VideoPlay /></el-icon>
101
-                </button>
102
-                <button class="text-blue-600 !rounded-button whitespace-nowrap">
103
-                  <el-icon><Refresh /></el-icon>
104
-                </button>
105
-              </div>
106
-            </div>
107
-          </div> -->
34
+          
108 35
         </div>
109 36
   
110 37
         <!-- 申诉处理 -->
@@ -147,6 +74,7 @@
147 74
   import { ref } from 'vue';
148 75
   import { ArrowLeft, Warning, Microphone, Mute, VideoPlay, Refresh, Timer } from '@element-plus/icons-vue';
149 76
   import audioPlayer from '../../components/audio/audioPlayer.vue';
77
+  import qualityResult from '../../components/quality/result.vue';
150 78
   </script>
151 79
   
152 80
   <style scoped>