123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406 |
- <template>
-
- <div class="callLogStatistics">
- <div class="filteroption">
- <el-row class="search_box" type="flex" :gutter="10" justify="space-between">
- <el-col :span="16" class="searchs">
- <el-date-picker
- v-model="statisticvalue1"
- size="small"
- clearable
- type="date"
- placeholder="开始日期"
- value-format="yyyy-MM-dd"
- />
- 至
- <el-date-picker
- v-model="statisticvalue2"
- size="small"
- clearable
- type="date"
- placeholder="结束日期"
- value-format="yyyy-MM-dd"
- />
-
- <el-button
- type="primary"
- size="small"
- @click="searchBtn"
- >查询</el-button>
- </el-col>
- <el-col :span="8" style="text-align:end;">
- <el-button
- type="primary"
- size="small"
- :disabled="multipleSelection.length!==1"
- @click="start"
- >播放</el-button>
- <el-button
- type="primary"
- size="small"
- :disabled="multipleSelection.length!==1"
- @click="dowmMP3"
- >下载</el-button>
- </el-col>
- </el-row>
- </div>
- <div class="tableheight">
- <table-item
- :id="'pdfDom'"
- :table-data="statisData"
- :column="statisColumn"
- :pagination="true"
- :pagesize="pagination.size"
- :currentpage="pagination.current"
- :total="pagination.total"
- :for-id="true"
- :border="true"
- :multiple="true"
- :fixed="true"
- :isdelete="false"
- class="tableFont"
- @handleCurrentChange="handleCurrentChange"
- @handleSizeChange="handleSizeChange"
- @handleSelectionChange="handleSelectionChange"
- />
- </div>
- <el-dialog title="录音播放" :visible.sync="dialogVisible" width="20%" :before-close="pause">
- <template>
- <center>
- <audio
- ref="audio"
- :src="audioSrc"
- autoplay="autoplay"
- controls="controls"
- >Your browser does not support the audio element.</audio>
- </center>
- </template>
- </el-dialog>
- </div>
- </template>
- <script>
- import TableItem from '@/components/TableAuto'
- import { IP } from '@/utils/request'
- import { client } from '@/utils/index'
- import { getCallRecord } from '@/api/hotline'
- import { parseTime } from '@/utils/index'
- import { getFileAudio2 } from '@/api/xjWorkSiteCheckApi'
- export default {
- components: { TableItem },
- data() {
- const end = new Date()
- const start = new Date()
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
- return {
- dialogVisible: false,
- audioSrc: '',
- dialogGDVisible: false,
- activeName: '1',
- actives: [],
- activeNum: [],
- gdEditRow: {},
-
- Bm: '',
- user: '',
- departmentList: [],
- UserList: [],
- statisticvalue1: parseTime(start, '{y}-{m}-{d}'),
- statisticvalue2: parseTime(end, '{y}-{m}-{d}'),
- statisData: [],
- searchDate: {
- start: '',
- end: ''
- },
-
- Bm2: '',
- user2: '',
- departmentList2: [],
- UserList2: [],
- stateList: [{
- id: '',
- name: '全部'
- }, {
- id: '0',
- name: '已质检'
- }, {
- id: '1',
- name: '未质检'
- }],
- statisColumn: [
- {
- label: '员工',
- prop: 'empName'
- }, {
- label: '呼叫类型',
- prop: 'callTypeName'
- },
- {
- label: '服务类型',
- prop: 'callReasultName'
- },
- {
- label: '用户号码',
- prop: 'telephone'
- },
- {
- label: '系统号码',
- prop: 'sysphone'
- },
- {
- label: '分机号码',
- prop: 'rate'
- },
- {
- label: '呼叫时间',
- prop: 'callTime'
- },
- {
- label: '接通时间',
- prop: 'connectTime'
- },
- {
- label: '话后处理时间',
- prop: 'rate'
- },
- {
- label: '挂机时间',
- prop: 'hangupTime'
- },
- {
- label: '呼叫结果',
- prop: 'causeValue'
- },
- {
- label: '转坐席结果',
- prop: 'rate'
- }
- ],
- pagination: { current: 1, size: 20, total: 0 },
-
- showStatistic: true,
- gdlx: '',
- gzxq: '',
- date: [],
- client: client().height,
- value1: parseTime(start, '{y}-{m}-{d}'),
- value2: parseTime(end, '{y}-{m}-{d}'),
- workOrderType: [],
- malfunction: [],
- isState: '',
-
- total: 0,
-
- listLoading: true,
-
- multipleSelection: [],
-
- dialogTitle: '',
-
- editData: {},
-
- dialogDelete: false,
-
- disabledBtn: true,
- width: '1200px',
- sfQxList: { '0': '清晰', '1': '不清晰' },
- sfCbzList: { '0': '有错别字', '1': '无错别字' },
- sfSlsxList: { '0': '超过', '1': '未超过' }
- }
- },
- computed: {
- mapHeight() {
- return '500px'
- },
- },
- watch: {
- multipleSelection(value) {
- this.disabledBtn = this.multipleSelection.length !== 1
- }
- },
- created() {
- this.getStaticInfo()
-
-
-
-
-
-
-
-
-
-
-
-
- },
- methods: {
-
- handleCurrentChange(currentPage) {
- this.pagination.current = currentPage
- this.getStaticInfo()
- },
-
- handleSizeChange(pagesize) {
- this.pagination.size = pagesize
- this.getStaticInfo()
- },
-
- handleSelectionChange(value) {
- this.multipleSelection = value
- },
-
- searchBtn() {
- this.pagination.current = 1
- this.getStaticInfo()
- },
-
- getStaticInfo() {
- if (!this.statisticvalue1) {
- this.$message.error('请选择开始时间!')
- return
- }
- if (!this.statisticvalue2) {
- this.$message.error('请选择结束时间!')
- return
- }
- if (this.statisticvalue1 > this.statisticvalue2) {
- this.$message.error('开始时间不能大于结束时间!')
- return
- }
- const params = {
- endTime: this.statisticvalue2 + ' 23:59:59',
- startTime: this.statisticvalue1 + ' 00:00:00'
- }
- Object.assign(params, this.pagination)
- getCallRecord(params).then(res => {
- if (res.code == 1) {
- this.statisData = res.result.records
- this.pagination.total = res.result.total
- }
- })
- },
- start() {
- if (!this.multipleSelection[0].recordFile) {
- this.$message.info('暂无音频')
- return
- }
- this.dialogVisible = true
- var token = this.$store.state.user.token
- console.log(this.multipleSelection,'this.multipleSelection')
-
- this.audioSrc = `http://172.31.21.200:8089/calllist${this.multipleSelection[0].recordFile}`
- this.$nextTick(()=>{
- console.log(this.$refs.audio,'audio')
- this.$refs.audio.play()
- })
-
- },
- pause() {
- this.dialogVisible = false
- this.$refs.audio.pause()
- this.$refs.audio.currentTime = 0
- },
- dowmMP3() {
- if (!this.multipleSelection[0].recordFile) {
- this.$message.info('暂无音频')
- return
- }
- getFileAudio2(
- this.$store.state.user.token,
- this.multipleSelection[0].recordFile).then(src => {
- console.log(src,'src')
- let BLOB = new Blob([src]);
- console.log(BLOB,'blob')
- let url = window.URL.createObjectURL(BLOB);
- console.log(url,'url')
- const a = document.createElement('a')
- a.download = '录音文件'
-
- a.href = url
- console.log(a.href,'href')
- document.body.appendChild(a)
- a.click()
- document.body.removeChild(a)
- })
- },
-
- strIsNull(strVal) {
- strVal = strVal || ''
- return (typeof (strVal) === 'undefined' || strVal == null || strVal == '')
- },
- exportPdf() {
- this.getPdf('工单质检统计')
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .callLogStatistics {
- height: 100%;
- width: 100%;
- padding: 5px;
- .filteroption {
- width: 100%;
- height: 40px;
- font-size: 14px;
- display: flex;
- align-items: center;
- .search_box{
- width: 100%;
- }
- }
- .tableheight {
- margin-top: 4px;
- height: calc(100% - 44px);
- }
- .delete {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- :nth-child(1) {
- font-size: 50px;
- color: red;
- margin-bottom: 10px;
- }
- p {
- font-size: 20px;
- }
- }
- .dialog_style {
- width: 100%;
- /deep/ .el-table {
- text-align: center;
- vertical-align: middle;
- }
- }
- /deep/ .dialog > div > div:nth-child(2) {
- padding: 10px 20px;
- }
- .datebox{
- display: flex;
- justify-content: center;
- align-items: center;
- }
- /deep/ .el-table__footer-wrapper td{
- text-align: center !important;
- }
- }
- .Cecharts{
- margin-top: 10px;
- height: 375px;
- width: 90%;
- }
- </style>
|