|
|
@@ -96,7 +96,7 @@
|
|
96
|
96
|
margin-left: 5px;
|
|
97
|
97
|
cursor: pointer;
|
|
98
|
98
|
"
|
|
99
|
|
- @click="oncall(scope.row.CallNumber, scope.row.CallRecordsId)"
|
|
|
99
|
+ @click="oncall(scope.row, scope.$index)"
|
|
100
|
100
|
/>
|
|
101
|
101
|
</template>
|
|
102
|
102
|
</el-table-column>
|
|
|
@@ -223,144 +223,144 @@ import {
|
|
223
|
223
|
getCallRecords,
|
|
224
|
224
|
getCallOutprefix,
|
|
225
|
225
|
getListExpt,
|
|
226
|
|
- getUpdateCallRecord,
|
|
227
|
|
-} from "@/api/trafficData/trafficData";
|
|
228
|
|
-import { Send } from "@/utils/telWebsocket";
|
|
229
|
|
-import fieldDATA from "@/utils/fieldsData.js";
|
|
230
|
|
-import { GetFiledState, AddFiled } from "@/api/commonAPI";
|
|
231
|
|
-import addDefinedList from "@/components/context/addDefinedList";
|
|
232
|
|
-import audioPlayer from "@/components/context/audioPlayer";
|
|
233
|
|
-import { pickerOptions } from "@/utils";
|
|
234
|
|
-import { exportExcel } from "@/utils";
|
|
235
|
|
-import Pagination from "@/components/context/Pagination"; // 对el-pagination 二次封装
|
|
236
|
|
-import store from "@/store";
|
|
237
|
|
-import { mapGetters } from "vuex";
|
|
|
226
|
+ getUpdateCallRecord
|
|
|
227
|
+} from '@/api/trafficData/trafficData'
|
|
|
228
|
+import { Send } from '@/utils/telWebsocket'
|
|
|
229
|
+import fieldDATA from '@/utils/fieldsData.js'
|
|
|
230
|
+import { GetFiledState, AddFiled } from '@/api/commonAPI'
|
|
|
231
|
+import addDefinedList from '@/components/context/addDefinedList'
|
|
|
232
|
+import audioPlayer from '@/components/context/audioPlayer'
|
|
|
233
|
+import { pickerOptions } from '@/utils'
|
|
|
234
|
+import { exportExcel } from '@/utils'
|
|
|
235
|
+import Pagination from '@/components/context/Pagination' // 对el-pagination 二次封装
|
|
|
236
|
+import store from '@/store'
|
|
|
237
|
+import { mapGetters } from 'vuex'
|
|
238
|
238
|
export default {
|
|
239
|
|
- name: "CallRecord",
|
|
|
239
|
+ name: 'CallRecord',
|
|
240
|
240
|
components: {
|
|
241
|
|
- Pagination,
|
|
|
241
|
+ Pagination
|
|
242
|
242
|
},
|
|
243
|
243
|
filters: {
|
|
244
|
244
|
// 呼叫类型
|
|
245
|
245
|
calltypeFilter(status) {
|
|
246
|
246
|
const statusMap = {
|
|
247
|
|
- 0: "呼入",
|
|
248
|
|
- 1: "呼出",
|
|
249
|
|
- };
|
|
250
|
|
- return statusMap[status];
|
|
|
247
|
+ 0: '呼入',
|
|
|
248
|
+ 1: '呼出'
|
|
|
249
|
+ }
|
|
|
250
|
+ return statusMap[status]
|
|
251
|
251
|
},
|
|
252
|
252
|
// 呼叫状态
|
|
253
|
253
|
statusFilter(status) {
|
|
254
|
254
|
const statusMap = {
|
|
255
|
|
- 0: "未接通",
|
|
256
|
|
- 1: "已接通",
|
|
257
|
|
- };
|
|
258
|
|
- return statusMap[status];
|
|
|
255
|
+ 0: '未接通',
|
|
|
256
|
+ 1: '已接通'
|
|
|
257
|
+ }
|
|
|
258
|
+ return statusMap[status]
|
|
259
|
259
|
},
|
|
260
|
260
|
// 外呼类型
|
|
261
|
261
|
callopttypeFilter(status) {
|
|
262
|
262
|
const statusMap = {
|
|
263
|
|
- 0: "拨号外呼",
|
|
264
|
|
- 1: "回访外呼",
|
|
265
|
|
- };
|
|
266
|
|
- return statusMap[status];
|
|
|
263
|
+ 0: '拨号外呼',
|
|
|
264
|
+ 1: '回访外呼'
|
|
|
265
|
+ }
|
|
|
266
|
+ return statusMap[status]
|
|
267
|
267
|
},
|
|
268
|
268
|
// 满意度
|
|
269
|
269
|
evaluationFilter(status) {
|
|
270
|
270
|
const statusMap = {
|
|
271
|
|
- 0: "-",
|
|
272
|
|
- 1: "非常满意",
|
|
273
|
|
- 2: "基本满意",
|
|
274
|
|
- 3: "不满意",
|
|
275
|
|
- };
|
|
276
|
|
- return statusMap[status];
|
|
|
271
|
+ 0: '-',
|
|
|
272
|
+ 1: '非常满意',
|
|
|
273
|
+ 2: '基本满意',
|
|
|
274
|
+ 3: '不满意'
|
|
|
275
|
+ }
|
|
|
276
|
+ return statusMap[status]
|
|
277
|
277
|
},
|
|
278
|
278
|
// 时间格式化
|
|
279
|
279
|
timesFilter(tm) {
|
|
280
|
|
- if (tm === "1970-01-01 08:00:00") {
|
|
281
|
|
- return "-";
|
|
|
280
|
+ if (tm === '1970-01-01 08:00:00') {
|
|
|
281
|
+ return '-'
|
|
282
|
282
|
} else {
|
|
283
|
|
- return tm;
|
|
|
283
|
+ return tm
|
|
284
|
284
|
}
|
|
285
|
285
|
},
|
|
286
|
286
|
// 是否回访
|
|
287
|
287
|
isReturnvisitFilter(status) {
|
|
288
|
288
|
const statusMap = {
|
|
289
|
|
- 0: "未回访",
|
|
290
|
|
- 1: "已回访",
|
|
291
|
|
- };
|
|
292
|
|
- return statusMap[status];
|
|
293
|
|
- },
|
|
|
289
|
+ 0: '未回访',
|
|
|
290
|
+ 1: '已回访'
|
|
|
291
|
+ }
|
|
|
292
|
+ return statusMap[status]
|
|
|
293
|
+ }
|
|
294
|
294
|
},
|
|
295
|
295
|
data() {
|
|
296
|
296
|
return {
|
|
297
|
297
|
loading: false,
|
|
298
|
|
- keyword: "",
|
|
299
|
|
- roleId: "",
|
|
300
|
|
- CallType: "", // 呼叫类型
|
|
301
|
|
- CallState: "", // 呼叫状态
|
|
302
|
|
- searchDate: "",
|
|
|
298
|
+ keyword: '',
|
|
|
299
|
+ roleId: '',
|
|
|
300
|
+ CallType: '', // 呼叫类型
|
|
|
301
|
+ CallState: '', // 呼叫状态
|
|
|
302
|
+ searchDate: '',
|
|
303
|
303
|
pickerOptions,
|
|
304
|
|
- timer: "",
|
|
305
|
|
- recordpath: "", // 录音的路径
|
|
|
304
|
+ timer: '',
|
|
|
305
|
+ recordpath: '', // 录音的路径
|
|
306
|
306
|
fieldListFlag: {},
|
|
307
|
307
|
pageParams: {
|
|
308
|
308
|
pageindex: 1, // 当前第几页
|
|
309
|
309
|
pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
|
|
310
|
|
- total: 0, // 总共多少数据
|
|
|
310
|
+ total: 0 // 总共多少数据
|
|
311
|
311
|
},
|
|
312
|
312
|
dataLists: [], // 列表数据
|
|
313
|
|
- multipleSelection: [], // 选中数据
|
|
314
|
|
- };
|
|
|
313
|
+ multipleSelection: [] // 选中数据
|
|
|
314
|
+ }
|
|
315
|
315
|
},
|
|
316
|
316
|
computed: {
|
|
317
|
317
|
...mapGetters([
|
|
318
|
|
- "token",
|
|
319
|
|
- "usercode", // 工号
|
|
320
|
|
- "extension", // 分机号
|
|
321
|
|
- "telIsVisCallout", // 外呼面板是否显示
|
|
322
|
|
- ]),
|
|
|
318
|
+ 'token',
|
|
|
319
|
+ 'usercode', // 工号
|
|
|
320
|
+ 'extension', // 分机号
|
|
|
321
|
+ 'telIsVisCallout' // 外呼面板是否显示
|
|
|
322
|
+ ])
|
|
323
|
323
|
},
|
|
324
|
324
|
created() {
|
|
325
|
|
- this.getFiledTabDetail(this.$route.path.split("/").join("_"));
|
|
326
|
|
- this.getList();
|
|
|
325
|
+ this.getFiledTabDetail(this.$route.path.split('/').join('_'))
|
|
|
326
|
+ this.getList()
|
|
327
|
327
|
document.onkeyup = (e) => {
|
|
328
|
328
|
if (e.keyCode === 13) {
|
|
329
|
|
- this.getList();
|
|
|
329
|
+ this.getList()
|
|
330
|
330
|
}
|
|
331
|
|
- };
|
|
|
331
|
+ }
|
|
332
|
332
|
},
|
|
333
|
333
|
mounted() {
|
|
334
|
334
|
this.timer = setInterval(() => {
|
|
335
|
|
- this.getList();
|
|
336
|
|
- }, 12000);
|
|
|
335
|
+ this.getList()
|
|
|
336
|
+ }, 12000)
|
|
337
|
337
|
},
|
|
338
|
338
|
methods: {
|
|
339
|
339
|
getList() {
|
|
340
|
|
- this.loading = true;
|
|
|
340
|
+ this.loading = true
|
|
341
|
341
|
return new Promise((resolve) => {
|
|
342
|
342
|
const params = {
|
|
343
|
343
|
page: this.pageParams.pageindex, // 第几页
|
|
344
|
344
|
pagesize: this.pageParams.pagesize, // 每页几条信息
|
|
345
|
|
- phone: this.keyword.replace(/\s*/g, ""), // 否 string 模糊查询(呼叫号码)
|
|
|
345
|
+ phone: this.keyword.replace(/\s*/g, ''), // 否 string 模糊查询(呼叫号码)
|
|
346
|
346
|
usercode: this.roleId, // 否 string 模糊查询(呼叫号码) CallNumber
|
|
347
|
|
- calltype: this.CallType == null ? "" : this.CallType, // 呼叫类型
|
|
|
347
|
+ calltype: this.CallType == null ? '' : this.CallType, // 呼叫类型
|
|
348
|
348
|
callstate: this.CallState, // 呼叫状态
|
|
349
|
349
|
starttime: this.searchDate && this.searchDate[0],
|
|
350
|
|
- endtime: this.searchDate && this.searchDate[1],
|
|
351
|
|
- };
|
|
|
350
|
+ endtime: this.searchDate && this.searchDate[1]
|
|
|
351
|
+ }
|
|
352
|
352
|
getCallRecords(params).then((response) => {
|
|
353
|
|
- this.loading = false;
|
|
354
|
|
- if (response.state.toLowerCase() === "success") {
|
|
355
|
|
- this.pageParams.total = response.total;
|
|
356
|
|
- this.dataLists = response.rows;
|
|
|
353
|
+ this.loading = false
|
|
|
354
|
+ if (response.state.toLowerCase() === 'success') {
|
|
|
355
|
+ this.pageParams.total = response.total
|
|
|
356
|
+ this.dataLists = response.rows
|
|
357
|
357
|
}
|
|
358
|
|
- });
|
|
359
|
|
- resolve();
|
|
360
|
|
- });
|
|
|
358
|
+ })
|
|
|
359
|
+ resolve()
|
|
|
360
|
+ })
|
|
361
|
361
|
},
|
|
362
|
362
|
btn_search() {
|
|
363
|
|
- this.getList();
|
|
|
363
|
+ this.getList()
|
|
364
|
364
|
},
|
|
365
|
365
|
btn_add_list() {
|
|
366
|
366
|
this.$layer.iframe({
|
|
|
@@ -368,120 +368,123 @@ export default {
|
|
368
|
368
|
content: addDefinedList, // 传递的组件对象
|
|
369
|
369
|
parent: this, // 当前的vue对象
|
|
370
|
370
|
data: {
|
|
371
|
|
- definedId: this.$route.path,
|
|
372
|
|
- }, // props
|
|
|
371
|
+ definedId: this.$route.path
|
|
|
372
|
+ } // props
|
|
373
|
373
|
},
|
|
374
|
|
- area: ["70%", "30%"],
|
|
375
|
|
- title: "自定义字段",
|
|
376
|
|
- });
|
|
|
374
|
+ area: ['70%', '30%'],
|
|
|
375
|
+ title: '自定义字段'
|
|
|
376
|
+ })
|
|
377
|
377
|
},
|
|
378
|
378
|
getFiledTabDetail(TableId) {
|
|
379
|
379
|
GetFiledState(TableId).then((res) => {
|
|
380
|
380
|
if (res.F_Fileds) {
|
|
381
|
|
- this.fieldListFlag = fieldDATA.getFieldListFlag(res.F_Fileds);
|
|
382
|
|
- this.$refs["multipleTable"].doLayout();
|
|
|
381
|
+ this.fieldListFlag = fieldDATA.getFieldListFlag(res.F_Fileds)
|
|
|
382
|
+ this.$refs['multipleTable'].doLayout()
|
|
383
|
383
|
} else {
|
|
384
|
|
- const Fileds = fieldDATA.getOptionsValue(fieldDATA[TableId]);
|
|
|
384
|
+ const Fileds = fieldDATA.getOptionsValue(fieldDATA[TableId])
|
|
385
|
385
|
AddFiled({ TableId, Fileds })
|
|
386
|
386
|
.then((response) => {
|
|
387
|
|
- if (response.state.toLowerCase() === "success") {
|
|
388
|
|
- this.getFiledTabDetail(TableId);
|
|
|
387
|
+ if (response.state.toLowerCase() === 'success') {
|
|
|
388
|
+ this.getFiledTabDetail(TableId)
|
|
389
|
389
|
}
|
|
390
|
390
|
})
|
|
391
|
391
|
.catch(() => {
|
|
392
|
|
- this.loading = false;
|
|
393
|
|
- });
|
|
|
392
|
+ this.loading = false
|
|
|
393
|
+ })
|
|
394
|
394
|
}
|
|
395
|
|
- });
|
|
|
395
|
+ })
|
|
396
|
396
|
},
|
|
397
|
397
|
|
|
398
|
|
- oncall(phone, callid) {
|
|
|
398
|
+ oncall(callLogInfo, index) {
|
|
399
|
399
|
const pas = {
|
|
400
|
|
- id: callid,
|
|
401
|
|
- };
|
|
|
400
|
+ id: callLogInfo.CallRecordsId
|
|
|
401
|
+ }
|
|
402
|
402
|
getUpdateCallRecord(pas).then((response) => {
|
|
403
|
|
- if (response.state.toLowerCase() === "success") {
|
|
|
403
|
+ if (response.state.toLowerCase() === 'success') {
|
|
|
404
|
+ if (callLogInfo.Showstate !== '已回复') {
|
|
|
405
|
+ this.dataLists[index].Showstate = '已回复'
|
|
|
406
|
+ }
|
|
404
|
407
|
}
|
|
405
|
|
- });
|
|
|
408
|
+ })
|
|
406
|
409
|
const params = {
|
|
407
|
|
- phone: phone,
|
|
408
|
|
- };
|
|
|
410
|
+ phone: callLogInfo.CallNumber
|
|
|
411
|
+ }
|
|
409
|
412
|
getCallOutprefix(params).then((response) => {
|
|
410
|
|
- if (response.state.toLowerCase() === "success") {
|
|
|
413
|
+ if (response.state.toLowerCase() === 'success') {
|
|
411
|
414
|
const scoketDatas = {
|
|
412
|
|
- Type: "MakeCall",
|
|
413
|
|
- AgentID: localStorage.getItem("storageUsercode"),
|
|
414
|
|
- AgentExten: localStorage.getItem("ext"),
|
|
|
415
|
+ Type: 'MakeCall',
|
|
|
416
|
+ AgentID: localStorage.getItem('storageUsercode'),
|
|
|
417
|
+ AgentExten: localStorage.getItem('ext'),
|
|
415
|
418
|
Header: response.data.fix,
|
|
416
|
|
- DestinationNumber: response.data.phone,
|
|
417
|
|
- };
|
|
418
|
|
- Send(scoketDatas);
|
|
|
419
|
+ DestinationNumber: response.data.phone
|
|
|
420
|
+ }
|
|
|
421
|
+ Send(scoketDatas)
|
|
419
|
422
|
}
|
|
420
|
|
- });
|
|
|
423
|
+ })
|
|
421
|
424
|
},
|
|
422
|
425
|
// 导出
|
|
423
|
426
|
btn_export() {
|
|
424
|
427
|
const exportparams = {
|
|
425
|
428
|
pageindex: this.pageParams.pageindex,
|
|
426
|
429
|
pagesize: this.pageParams.pagesize,
|
|
427
|
|
- phone: this.keyword.replace(/\s+/g, ""),
|
|
|
430
|
+ phone: this.keyword.replace(/\s+/g, ''),
|
|
428
|
431
|
usercode: this.roleId,
|
|
429
|
|
- calltype: this.CallType == null ? "" : this.CallType,
|
|
|
432
|
+ calltype: this.CallType == null ? '' : this.CallType,
|
|
430
|
433
|
callstate: this.CallState,
|
|
431
|
434
|
starttime: this.searchDate && this.searchDate[0],
|
|
432
|
435
|
endtime: this.searchDate && this.searchDate[1],
|
|
433
|
|
- isdc: 1,
|
|
434
|
|
- };
|
|
435
|
|
- exportExcel(exportparams, getListExpt);
|
|
|
436
|
+ isdc: 1
|
|
|
437
|
+ }
|
|
|
438
|
+ exportExcel(exportparams, getListExpt)
|
|
436
|
439
|
},
|
|
437
|
440
|
// 播放录音
|
|
438
|
441
|
playSound(rec_file, artist) {
|
|
439
|
|
- console.log("artist", artist);
|
|
|
442
|
+ console.log('artist', artist)
|
|
440
|
443
|
this.$layer.iframe({
|
|
441
|
444
|
content: {
|
|
442
|
445
|
content: audioPlayer, // 传递的组件对象
|
|
443
|
446
|
parent: this, // 当前的vue对象
|
|
444
|
447
|
data: {
|
|
445
|
448
|
recFiles: rec_file,
|
|
446
|
|
- artists: artist.toString(),
|
|
447
|
|
- }, // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
|
|
|
449
|
+ artists: artist.toString()
|
|
|
450
|
+ } // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
|
|
448
|
451
|
},
|
|
449
|
|
- area: ["600px", "230px"],
|
|
|
452
|
+ area: ['600px', '230px'],
|
|
450
|
453
|
shadeClose: true,
|
|
451
|
|
- title: "录音详情",
|
|
452
|
|
- });
|
|
|
454
|
+ title: '录音详情'
|
|
|
455
|
+ })
|
|
453
|
456
|
},
|
|
454
|
457
|
handleSelectionChange(selection) {
|
|
455
|
|
- this.multipleSelection = selection;
|
|
|
458
|
+ this.multipleSelection = selection
|
|
456
|
459
|
},
|
|
457
|
460
|
formtTime(val) {
|
|
458
|
461
|
if (!val) {
|
|
459
|
|
- return "0秒";
|
|
|
462
|
+ return '0秒'
|
|
460
|
463
|
}
|
|
461
|
|
- var secondTime = parseInt(val);
|
|
462
|
|
- var minuteTime = 0;
|
|
463
|
|
- var hourTime = 0;
|
|
|
464
|
+ var secondTime = parseInt(val)
|
|
|
465
|
+ var minuteTime = 0
|
|
|
466
|
+ var hourTime = 0
|
|
464
|
467
|
if (secondTime > 60) {
|
|
465
|
|
- minuteTime = parseInt(secondTime / 60);
|
|
466
|
|
- secondTime = parseInt(secondTime % 60);
|
|
|
468
|
+ minuteTime = parseInt(secondTime / 60)
|
|
|
469
|
+ secondTime = parseInt(secondTime % 60)
|
|
467
|
470
|
if (minuteTime > 60) {
|
|
468
|
|
- hourTime = parseInt(minuteTime / 60);
|
|
469
|
|
- minuteTime = parseInt(minuteTime % 60);
|
|
|
471
|
+ hourTime = parseInt(minuteTime / 60)
|
|
|
472
|
+ minuteTime = parseInt(minuteTime % 60)
|
|
470
|
473
|
}
|
|
471
|
474
|
}
|
|
472
|
|
- var result = "" + parseInt(secondTime) + "秒";
|
|
|
475
|
+ var result = '' + parseInt(secondTime) + '秒'
|
|
473
|
476
|
if (minuteTime > 0) {
|
|
474
|
|
- result = "" + parseInt(minuteTime) + "分" + result;
|
|
|
477
|
+ result = '' + parseInt(minuteTime) + '分' + result
|
|
475
|
478
|
}
|
|
476
|
479
|
if (hourTime > 0) {
|
|
477
|
|
- result = "" + parseInt(hourTime) + "小时" + result;
|
|
|
480
|
+ result = '' + parseInt(hourTime) + '小时' + result
|
|
478
|
481
|
}
|
|
479
|
|
- return result;
|
|
|
482
|
+ return result
|
|
480
|
483
|
},
|
|
481
|
484
|
|
|
482
|
485
|
// 外呼
|
|
483
|
486
|
clickCallOut(phoneNumber, id) {
|
|
484
|
|
- this.callOut(phoneNumber, id);
|
|
|
487
|
+ this.callOut(phoneNumber, id)
|
|
485
|
488
|
},
|
|
486
|
489
|
// 外呼
|
|
487
|
490
|
callOut(phoneNumber, id) {
|
|
|
@@ -504,13 +507,13 @@ export default {
|
|
504
|
507
|
// })
|
|
505
|
508
|
} else {
|
|
506
|
509
|
this.$message({
|
|
507
|
|
- message: "请先输入电话号码!",
|
|
508
|
|
- type: "warning",
|
|
509
|
|
- });
|
|
|
510
|
+ message: '请先输入电话号码!',
|
|
|
511
|
+ type: 'warning'
|
|
|
512
|
+ })
|
|
510
|
513
|
}
|
|
511
|
|
- },
|
|
512
|
|
- },
|
|
513
|
|
-};
|
|
|
514
|
+ }
|
|
|
515
|
+ }
|
|
|
516
|
+}
|
|
514
|
517
|
</script>
|
|
515
|
518
|
|
|
516
|
519
|
<style rel="stylesheet/scss" lang="scss" scoped>
|