diff --git a/src/views/soundsManage/soundsManage.vue b/src/views/soundsManage/soundsManage.vue index 01d30b2..153f72d 100644 --- a/src/views/soundsManage/soundsManage.vue +++ b/src/views/soundsManage/soundsManage.vue @@ -1,63 +1,57 @@ + - + - + - - + + + + + + + + + + + + + start-placeholder="来电开始时间" + end-placeholder="来电结束时间"/> - - - - - - - - - - - - - - - - - - 添加 - 修改 - 删除 - + - + - 详情 - 编辑 - 采集 + + + + + @@ -66,70 +60,81 @@ import AppContainer from '@/components/layout/AppContainer' import SearchArea from '@/components/SearchArea/SearchArea' import SearchItem from '@/components/SearchArea/SearchItem' +import CreateCase from '@/views/caseManage/createCase' +import AudioPlayer from '../../components/AudioPlayer/AudioPlayer' +// import { realFormatSecond } from '@/utils/stringutils' +import { getUserSimpleList } from '@/api/system/user' +import { getAllSoundList } from '@/api/sound' export default { - name: 'TableExample', - components: { SearchItem, SearchArea, AppContainer, NormalTable }, + name: 'SoundsManage', + components: { AudioPlayer, SearchItem, SearchArea, AppContainer, NormalTable, CreateCase }, data() { return { listQuery: { - name: '', // 姓名 - sex: '', // 性别 - nation: '', // 民族 - collReason: '', // 采集原因 - cardType: '', // 证件类型 - idCardNo: '', // 证件号码 - personTag: '', // 人员标签 - startTime: '', // 创建开始时间 - endTime: '', // 创建结束时间 + callerNumber: '', // 主叫号码 + agentUser: '', // 受理人 + startTime: '', // 来电开始时间 + endTime: '', // 来电结束时间 + minTime: '', // 通话最短时间 + maxTime: '', // 通话最长时间 + callWay: '', // 呼叫方向 + hangupCause: '', // 挂机方向 offset: 1, limit: 20, - sort: 'createTime', + sort: 'dialStartStamp', order: 'desc' }, // 筛选条件 columns: [ { - text: '姓名', - value: 'name', + text: '主叫号码', + value: 'callerNumber', align: 'center' }, { - text: '性别', - value: 'sexName', + text: '被叫号码', + value: 'calleeNumber', + align: 'center' + }, + { + text: '呼叫方向', + value: 'callWayName', + align: 'center' + }, + { + text: '挂机方向', + value: 'hangupCauseName', + align: 'center' + }, + { + text: '通话开始时间', + value: 'dialStartStamp', + align: 'center' + }, + { + text: '通话结束时间', + value: 'dialEndStamp', + align: 'center' + }, + { + text: '通话时长', + value: 'bridgeStamp', + align: 'center' + }, + { + text: '坐席工号', + value: 'agentName', + align: 'center' + }, + { + text: '坐席姓名', + value: 'agentUserName', + align: 'center' + }, + { + text: '归属地', + value: 'isp', align: 'center', - width: 60 - }, - { - text: '民族', - value: 'nationName', - width: 50, - align: 'center' - }, - { - text: '采集原因', - value: 'collReasonName', - align: 'center' - }, - { - text: '证件类型', - value: 'cardTypeName', - align: 'center', - width: 80 - }, - { - text: '证件号码', - value: 'idCardNo', - align: 'center' - }, - { - text: '户籍地址', - value: 'residenceAddr', - align: 'center' - }, - { - text: '创建时间', - value: 'createTime', - width: 120, - align: 'center' + width: 100 } ], // 显示列 timeRange: [], // 时间范围 @@ -142,39 +147,88 @@ text: '数据列表' // 标题名称 }, options: { - needIndex: false // 是否需要序号列 + needIndex: true // 是否需要序号列 }, toolsOption: { selectColumns: false, // 是否需要筛选列 refresh: false // 是否需要刷新按钮 } - } // 表格属性 + }, // 表格属性 + showAddCase: false, + sound: { + url: '', + controlList: 'noDownload noSpeed onlyOnePlaying' + }, + size: 'small', + soundShow: false, // 显示音频弹窗 + userList: [], + callWayList:[{name:'呼入',value:'1'},{name:'呼出',value:'2'},{name:'本地通话',value:'3'},{name:'未知',value:'4'}], // 呼叫方向列表 + hangupCauseList:[{name:'主叫挂机',value:'1'},{name:'被叫挂机',value:'2'}] // 挂机方向列表 } }, created() { - this.fetchData() + this.fetchUserList() + this.search() + }, + activated() { + this.search() }, methods: { - fetchData() { + search() { + this.fetchData(false) + }, + fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } + this.listLoading = true + getAllSoundList(this.listQuery).then(response => { + if (response.code === 200) { + this.listLoading = false + this.list = response.data.rows + this.total = response.data.total + } + }) + }, + // 播放录音 + openSound(row) { + this.soundShow = true + // this.sound.url = 'https://wdd.js.org/element-audio/static/falling-star.mp3' + this.sound.url = row.recordName + }, + // 关闭播放弹窗 + closeSound() { + this.$refs.adplayer.pausePlay() + }, + // 创建工单 + createCase(row) { + this.showAddCase = true + const data = { + callid: row.callid, + number: row.callerNumber, + dialStartStamp: row.dialStartStamp + } + console.log(data) const that = this setTimeout(function() { - that.list = [ - { name: '张三', sexName: '男', nationName: '汉族', collReasonName: '工作人员', cardTypeName: '身份证', idCardNo: '1101264987431551155', residenceAddr: '北京市' }, - { name: '张三', sexName: '男', nationName: '汉族', collReasonName: '工作人员', cardTypeName: '身份证', idCardNo: '1101264987431551155', residenceAddr: '北京市' }, - { name: '张三', sexName: '男', nationName: '汉族', collReasonName: '工作人员', cardTypeName: '身份证', idCardNo: '1101264987431551155', residenceAddr: '北京市' }, - { name: '张三', sexName: '男', nationName: '汉族', collReasonName: '工作人员', cardTypeName: '身份证', idCardNo: '1101264987431551155', residenceAddr: '北京市' }, - { name: '张三', sexName: '男', nationName: '汉族', collReasonName: '工作人员', cardTypeName: '身份证', idCardNo: '1101264987431551155', residenceAddr: '北京市' }, - { name: '张三', sexName: '男', nationName: '汉族', collReasonName: '工作人员', cardTypeName: '身份证', idCardNo: '1101264987431551155', residenceAddr: '北京市' }, - { name: '张三', sexName: '男', nationName: '汉族', collReasonName: '工作人员', cardTypeName: '身份证', idCardNo: '1101264987431551155', residenceAddr: '北京市' }, - { name: '张三', sexName: '男', nationName: '汉族', collReasonName: '工作人员', cardTypeName: '身份证', idCardNo: '1101264987431551155', residenceAddr: '北京市' }, - { name: '张三', sexName: '男', nationName: '汉族', collReasonName: '工作人员', cardTypeName: '身份证', idCardNo: '1101264987431551155', residenceAddr: '北京市' }, - { name: '张三', sexName: '男', nationName: '汉族', collReasonName: '工作人员', cardTypeName: '身份证', idCardNo: '1101264987431551155', residenceAddr: '北京市' }, - { name: '张三', sexName: '男', nationName: '汉族', collReasonName: '工作人员', cardTypeName: '身份证', idCardNo: '1101264987431551155', residenceAddr: '北京市' } - ] - that.total = 200 - that.listLoading = false - }, 2000) + that.$refs['addcase'].initData(data) + }, 500) + }, + // 关闭新建案件弹窗 + closeCreateDialog() { + this.showAddCase = false // 关闭弹窗 + this.search() + }, + fetchUserList() { + const params = { + roleTips: 'receiver,monitor' + } + getUserSimpleList(params).then(response => { + if (response.code === 200) { + this.userList = response.data + } + }) }, // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 changePage(val) { @@ -194,7 +248,10 @@ } -