|
|
@@ -225,8 +225,106 @@
|
|
225
|
225
|
</div>
|
|
226
|
226
|
</div>
|
|
227
|
227
|
</el-tab-pane>
|
|
228
|
|
- <el-tab-pane label="更新信息" name="third">Role</el-tab-pane>
|
|
229
|
|
- <el-tab-pane label="任务列表" name="fourth">Role</el-tab-pane>
|
|
|
228
|
+ <el-tab-pane label="更新信息" name="third">
|
|
|
229
|
+ <div class="p-4">
|
|
|
230
|
+ <el-timeline>
|
|
|
231
|
+ <el-timeline-item v-for="(log, index) in operationLogs" :key="index" placement="top">
|
|
|
232
|
+ <el-card>
|
|
|
233
|
+ <div class="text-xs text-gray-500 mb-2">{{ log.operationTime }}</div>
|
|
|
234
|
+ <div class="flex items-baseline">
|
|
|
235
|
+ <h4 class="text-base font-bold mr-2">{{ log.operator }}</h4>
|
|
|
236
|
+ <span>{{ log.operationContent }}</span>
|
|
|
237
|
+ </div>
|
|
|
238
|
+
|
|
|
239
|
+ </el-card>
|
|
|
240
|
+ </el-timeline-item>
|
|
|
241
|
+ </el-timeline>
|
|
|
242
|
+ </div>
|
|
|
243
|
+ </el-tab-pane>
|
|
|
244
|
+ <el-tab-pane label="任务列表" name="fourth">
|
|
|
245
|
+ <div class="mb-4 px-4">
|
|
|
246
|
+
|
|
|
247
|
+ <div class="flex items-center justify-between mb-2 cursor-pointer" @click="toggleFilterPanel">
|
|
|
248
|
+ <h3 class="text-lg font-medium mb-4">任务列表</h3>
|
|
|
249
|
+ <div class="flex items-center">
|
|
|
250
|
+ <span class="mr-2 text-sm text-gray-500">{{ showFilterPanel ? '折叠筛选' : '展开筛选' }}</span>
|
|
|
251
|
+ <el-icon :class="[showFilterPanel ? 'rotate-180' : '']">
|
|
|
252
|
+ <ArrowDown />
|
|
|
253
|
+ </el-icon>
|
|
|
254
|
+ </div>
|
|
|
255
|
+ </div>
|
|
|
256
|
+
|
|
|
257
|
+ <el-collapse-transition>
|
|
|
258
|
+ <div v-show="showFilterPanel" class="space-y-4">
|
|
|
259
|
+ <div class="grid grid-cols-4 gap-4">
|
|
|
260
|
+ <el-input v-model="searchForm.callNumber" placeholder="外呼号码" />
|
|
|
261
|
+
|
|
|
262
|
+ <el-select v-model="searchForm.fatalItem" placeholder="致命项">
|
|
|
263
|
+ <el-option label="是" value="1" />
|
|
|
264
|
+ <el-option label="否" value="0" />
|
|
|
265
|
+ </el-select>
|
|
|
266
|
+ <el-select v-model="searchForm.agentName" placeholder="坐席名称">
|
|
|
267
|
+ <el-option v-for="item in agentOptions" :key="item.value" :label="item.label"
|
|
|
268
|
+ :value="item.value" />
|
|
|
269
|
+ </el-select>
|
|
|
270
|
+ <el-select v-model="searchForm.scoreRange" placeholder="得分区间">
|
|
|
271
|
+ <el-option label="60分以下" value="0-60" />
|
|
|
272
|
+ <el-option label="60-70分" value="60-70" />
|
|
|
273
|
+ <el-option label="70-80分" value="70-80" />
|
|
|
274
|
+ <el-option label="80-90分" value="80-90" />
|
|
|
275
|
+ <el-option label="90-100分" value="90-100" />
|
|
|
276
|
+ </el-select>
|
|
|
277
|
+ <el-select v-model="searchForm.result" placeholder="质检结果">
|
|
|
278
|
+ <el-option label="合格" value="pass" />
|
|
|
279
|
+ <el-option label="不合格" value="fail" />
|
|
|
280
|
+ </el-select>
|
|
|
281
|
+ <el-date-picker v-model="searchForm.callTime" type="daterange" range-separator="至"
|
|
|
282
|
+ start-placeholder="开始日期" end-placeholder="结束日期" class="mr-4" style="margin-right: 1rem;"/>
|
|
|
283
|
+ </div>
|
|
|
284
|
+
|
|
|
285
|
+ <div class="flex justify-end gap-4">
|
|
|
286
|
+ <el-button @click="resetSearch">重置</el-button>
|
|
|
287
|
+ <el-button type="primary" @click="handleSearch">查询</el-button>
|
|
|
288
|
+ </div>
|
|
|
289
|
+ </div>
|
|
|
290
|
+ </el-collapse-transition>
|
|
|
291
|
+ </div>
|
|
|
292
|
+ <div class="flex items-center gap-4 mb-4">
|
|
|
293
|
+ <el-button type="primary" @click="handleBatchExport">批量导出</el-button>
|
|
|
294
|
+ <el-button type="danger" @click="handleBatchDelete">批量删除</el-button>
|
|
|
295
|
+ </div>
|
|
|
296
|
+ <el-table :data="taskList" stripe style="width: 100%" v-loading="loading">
|
|
|
297
|
+ <el-table-column type="selection" width="55" />
|
|
|
298
|
+ <el-table-column prop="id" label="质检 Id" fixed="left" width="120" />
|
|
|
299
|
+ <el-table-column prop="callNumber" label="外呼号码" width="120" />
|
|
|
300
|
+ <el-table-column prop="callDate" label="外呼日期" width="180" />
|
|
|
301
|
+ <el-table-column prop="fatalItem" label="致命项" width="100" />
|
|
|
302
|
+ <el-table-column prop="score" label="质检得分" width="100" />
|
|
|
303
|
+ <el-table-column prop="agentName" label="坐席名称" width="120" />
|
|
|
304
|
+ <el-table-column label="录音" width="80">
|
|
|
305
|
+ <template #default>
|
|
|
306
|
+ <el-icon class="cursor-pointer">
|
|
|
307
|
+ <Headset />
|
|
|
308
|
+ </el-icon>
|
|
|
309
|
+ </template>
|
|
|
310
|
+ </el-table-column>
|
|
|
311
|
+ <el-table-column prop="result" label="质检结果" width="120" />
|
|
|
312
|
+ <el-table-column prop="reviewTime" label="人工复检时间" width="180" />
|
|
|
313
|
+ <el-table-column prop="reviewNote" label="复检备注" />
|
|
|
314
|
+ <el-table-column prop="reviewResult" label="复检结果" width="120" />
|
|
|
315
|
+ <el-table-column label="操作" fixed="right" width="120">
|
|
|
316
|
+ <template #default>
|
|
|
317
|
+ <el-link type="primary" :underline="false" @click="handleView">查看</el-link>
|
|
|
318
|
+ </template>
|
|
|
319
|
+ </el-table-column>
|
|
|
320
|
+ </el-table>
|
|
|
321
|
+
|
|
|
322
|
+ <div class="mt-4 flex justify-end ">
|
|
|
323
|
+ <el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :total="total"
|
|
|
324
|
+ layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
|
|
|
325
|
+ @current-change="handleCurrentChange" />
|
|
|
326
|
+ </div>
|
|
|
327
|
+ </el-tab-pane>
|
|
230
|
328
|
</el-tabs>
|
|
231
|
329
|
|
|
232
|
330
|
|
|
|
@@ -243,11 +341,56 @@ import { getPageListData } from '@/api/main/system/system'
|
|
243
|
341
|
import { Edit, Delete, Search, Plus, MoreFilled } from '@element-plus/icons-vue';
|
|
244
|
342
|
import * as moment from 'moment';
|
|
245
|
343
|
import * as echarts from 'echarts';
|
|
|
344
|
+import { ElMessage } from 'element-plus'
|
|
246
|
345
|
|
|
247
|
346
|
const searchQuery = ref('');
|
|
248
|
347
|
const selectedModel = ref(0);
|
|
249
|
348
|
const currentPage = ref(1);
|
|
250
|
349
|
const pageSize = 10;
|
|
|
350
|
+
|
|
|
351
|
+// 任务列表相关状态
|
|
|
352
|
+const loading = ref(false);
|
|
|
353
|
+const taskList = ref([
|
|
|
354
|
+ {
|
|
|
355
|
+ id: 'QC001',
|
|
|
356
|
+ callNumber: '13800138000',
|
|
|
357
|
+ callDate: '2023-05-15 10:30:22',
|
|
|
358
|
+ fatalItem: '否',
|
|
|
359
|
+ score: 85,
|
|
|
360
|
+ agentName: '坐席A',
|
|
|
361
|
+ result: '合格',
|
|
|
362
|
+ reviewTime: '2023-05-15 11:30:00',
|
|
|
363
|
+ reviewNote: '无异常',
|
|
|
364
|
+ reviewResult: '通过'
|
|
|
365
|
+ },
|
|
|
366
|
+ {
|
|
|
367
|
+ id: 'QC002',
|
|
|
368
|
+ callNumber: '13900139000',
|
|
|
369
|
+ callDate: '2023-05-16 14:20:15',
|
|
|
370
|
+ fatalItem: '是',
|
|
|
371
|
+ score: 55,
|
|
|
372
|
+ agentName: '坐席B',
|
|
|
373
|
+ result: '不合格',
|
|
|
374
|
+ reviewTime: '2023-05-16 15:30:00',
|
|
|
375
|
+ reviewNote: '发现致命项',
|
|
|
376
|
+ reviewResult: '不通过'
|
|
|
377
|
+ }
|
|
|
378
|
+]);
|
|
|
379
|
+const total = ref(0);
|
|
|
380
|
+const showFilterPanel = ref(false);
|
|
|
381
|
+const agentOptions = ref([
|
|
|
382
|
+ { label: '坐席A', value: 'agentA' },
|
|
|
383
|
+ { label: '坐席B', value: 'agentB' },
|
|
|
384
|
+ { label: '坐席C', value: 'agentC' }
|
|
|
385
|
+]);
|
|
|
386
|
+const searchForm = ref({
|
|
|
387
|
+ callNumber: '',
|
|
|
388
|
+ callTime: [],
|
|
|
389
|
+ fatalItem: '',
|
|
|
390
|
+ agentName: '',
|
|
|
391
|
+ scoreRange: [],
|
|
|
392
|
+ result: ''
|
|
|
393
|
+});
|
|
251
|
394
|
const scoreChart: any = ref<HTMLElement | null>(null);
|
|
252
|
395
|
const issuesChart: any = ref<HTMLElement | null>(null);
|
|
253
|
396
|
|
|
|
@@ -262,6 +405,27 @@ const currentModel: any = ref({
|
|
262
|
405
|
effectiveDate: [],
|
|
263
|
406
|
conditions: [],
|
|
264
|
407
|
});
|
|
|
408
|
+
|
|
|
409
|
+const operationLogs = ref([
|
|
|
410
|
+ {
|
|
|
411
|
+ operator: '管理员',
|
|
|
412
|
+ operationTime: moment().subtract(1, 'days').format('YYYY-MM-DD HH:mm:ss'),
|
|
|
413
|
+ operationContent: '创建了新规则',
|
|
|
414
|
+ operationType: 'create'
|
|
|
415
|
+ },
|
|
|
416
|
+ {
|
|
|
417
|
+ operator: '测试用户',
|
|
|
418
|
+ operationTime: moment().subtract(2, 'hours').format('YYYY-MM-DD HH:mm:ss'),
|
|
|
419
|
+ operationContent: '更新了规则条件',
|
|
|
420
|
+ operationType: 'update'
|
|
|
421
|
+ },
|
|
|
422
|
+ {
|
|
|
423
|
+ operator: '系统',
|
|
|
424
|
+ operationTime: moment().subtract(30, 'minutes').format('YYYY-MM-DD HH:mm:ss'),
|
|
|
425
|
+ operationContent: '删除了无效规则',
|
|
|
426
|
+ operationType: 'delete'
|
|
|
427
|
+ }
|
|
|
428
|
+]);
|
|
265
|
429
|
const selectModel = (index: number) => {
|
|
266
|
430
|
selectedModel.value = index;
|
|
267
|
431
|
};
|
|
|
@@ -281,6 +445,22 @@ const cancel = () => {
|
|
281
|
445
|
// 取消逻辑
|
|
282
|
446
|
};
|
|
283
|
447
|
|
|
|
448
|
+const handleBatchExport = () => {
|
|
|
449
|
+ if (!taskList.value.length) {
|
|
|
450
|
+ ElMessage.warning('请选择要导出的数据');
|
|
|
451
|
+ return;
|
|
|
452
|
+ }
|
|
|
453
|
+ // 批量导出逻辑
|
|
|
454
|
+};
|
|
|
455
|
+
|
|
|
456
|
+const handleBatchDelete = () => {
|
|
|
457
|
+ if (!taskList.value.length) {
|
|
|
458
|
+ ElMessage.warning('请选择要删除的数据');
|
|
|
459
|
+ return;
|
|
|
460
|
+ }
|
|
|
461
|
+ // 批量删除逻辑
|
|
|
462
|
+};
|
|
|
463
|
+
|
|
284
|
464
|
const getPageList = async () => {
|
|
285
|
465
|
const params = {
|
|
286
|
466
|
ruleName: searchQuery.value,
|
|
|
@@ -293,6 +473,57 @@ const getPageList = async () => {
|
|
293
|
473
|
}
|
|
294
|
474
|
}
|
|
295
|
475
|
|
|
|
476
|
+// 获取任务列表
|
|
|
477
|
+const getTaskList = async () => {
|
|
|
478
|
+ loading.value = true;
|
|
|
479
|
+ try {
|
|
|
480
|
+ // const params = {
|
|
|
481
|
+ // ...searchForm.value,
|
|
|
482
|
+ // pageNum: currentPage.value,
|
|
|
483
|
+ // pageSize: pageSize.value
|
|
|
484
|
+ // };
|
|
|
485
|
+ // const { data, total: totalCount } = await getPageListData(`/quality/tasks`, params);
|
|
|
486
|
+ // taskList.value = data;
|
|
|
487
|
+ // total.value = totalCount;
|
|
|
488
|
+ } finally {
|
|
|
489
|
+ loading.value = false;
|
|
|
490
|
+ }
|
|
|
491
|
+};
|
|
|
492
|
+
|
|
|
493
|
+// 查询
|
|
|
494
|
+const toggleFilterPanel = () => {
|
|
|
495
|
+ showFilterPanel.value = !showFilterPanel.value;
|
|
|
496
|
+};
|
|
|
497
|
+
|
|
|
498
|
+const handleSearch = () => {
|
|
|
499
|
+ currentPage.value = 1;
|
|
|
500
|
+ getTaskList();
|
|
|
501
|
+};
|
|
|
502
|
+
|
|
|
503
|
+// 重置
|
|
|
504
|
+const resetSearch = () => {
|
|
|
505
|
+ searchForm.value = {
|
|
|
506
|
+ callNumber: '',
|
|
|
507
|
+ callTime: [],
|
|
|
508
|
+ fatalItem: '',
|
|
|
509
|
+ agentName: '',
|
|
|
510
|
+ scoreRange: [],
|
|
|
511
|
+ result: ''
|
|
|
512
|
+ };
|
|
|
513
|
+ handleSearch();
|
|
|
514
|
+};
|
|
|
515
|
+
|
|
|
516
|
+// 分页变化
|
|
|
517
|
+const handleSizeChange = (val: number) => {
|
|
|
518
|
+ pageSize.value = val;
|
|
|
519
|
+ getTaskList();
|
|
|
520
|
+};
|
|
|
521
|
+
|
|
|
522
|
+const handleCurrentChange = (val: number) => {
|
|
|
523
|
+ currentPage.value = val;
|
|
|
524
|
+ getTaskList();
|
|
|
525
|
+};
|
|
|
526
|
+
|
|
296
|
527
|
const doScroll = () => {
|
|
297
|
528
|
console.log('doScroll')
|
|
298
|
529
|
const scrollwrapper: any = cardListRef.value
|
|
|
@@ -432,7 +663,8 @@ const initChart = () => {
|
|
432
|
663
|
|
|
433
|
664
|
onMounted(() => {
|
|
434
|
665
|
// initChart();
|
|
435
|
|
- getPageList()
|
|
|
666
|
+ getPageList();
|
|
|
667
|
+ getTaskList();
|
|
436
|
668
|
})
|
|
437
|
669
|
</script>
|
|
438
|
670
|
<style scoped>
|