<!-- * @Description: 我的质检结果 * @Author: 王晓颖 * @Date: 2020-04-27 14:27:37 --> <template> <app-container> <el-row type="flex"> <el-col :span="24"> <search-area :need-clear="true" :need-search-more="false" :size="size" type="default" search-more-type="default" @search="search" @clear="clearInput"> <!--一般查询条件--> <search-item> <el-input v-model.trim="listQuery.callerid" :size="size" placeholder="录音编号" clearable/> </search-item> <search-item/> <search-item> <el-select v-model="listQuery.checkTemplate" :size="size" placeholder="请选择质检模块" style="width:250px;"> <el-option v-for="item of modularList" :key="item.id" :label="item.modularName" :value="item.id"/> </el-select> </search-item> <search-item> <el-select v-model="listQuery.checkTwice" :size="size" placeholder="复核情况" clearable> <el-option v-for="item in checkStatusList" :label="item.name" :value="item.value"/> </el-select> </search-item> <search-item> <el-input v-model.trim="listQuery.minScore" :size="size" placeholder="最低分" clearable/> </search-item> <search-item> <el-input v-model.trim="listQuery.maxScore" :size="size" placeholder="最高分" clearable/> </search-item> <search-item> <el-date-picker v-model="timeRange" :size="size" type="datetimerange" range-separator="至" value-format="yyyy-MM-dd HH:mm:ss" start-placeholder="质检开始时间" end-placeholder="质检结束时间"/> </search-item> </search-area> <normal-table :data="list" :head="tableOption.head" :size="size" :query="listQuery" :total="total" :columns="columns" :list-loading="listLoading" :options="tableOption.options" :tools-option="tableOption.toolsOption" @change="changePage"> <template slot="columns"> <el-table-column label="复核状态" align="center" width="80"> <template slot-scope="scope"> <el-tag v-if="scope.row.checkTwice=='未复核'">未复核</el-tag> <el-tag v-if="scope.row.checkTwice=='已复核'" type="success">已复核</el-tag> </template> </el-table-column> <el-table-column label="操作" align="center" width="80"> <template slot-scope="scope"> <el-button type="text" size="small" @click="goCheck(scope.row)">详情</el-button> </template> </el-table-column> </template> </normal-table> </el-col> </el-row> <quality-check ref="qualitycheck"/> </app-container> </template> <script> import NormalTable from '@/components/NomalTable' 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 UserList from './components/userList' import { getQModulerList, getCheckedSoundList } from '@/api/qualityCheck' import QualityCheck from './qualityCheck' export default { name: 'MyQualityChecked', components: { QualityCheck, UserList, AppContainer, SearchArea, SearchItem, CreateCase, NormalTable }, data() { return { listQuery: { callerid: '', // 通话编号 agentUser: this.$store.getters.id, // 受理人 startTime: '', // 来电开始时间 endTime: '', // 来电结束时间 checkTemplate: '', // 质检模块 hangupCause: '', // 挂机方向 checkTwice: '', // 复核情况 minScore: '', // 最低分 maxScore: '', // 最高分 offset: 1, limit: 20, sort: '', order: '' }, // 筛选条件 columns: [ { text: '录音编号', value: 'callid', align: 'center' }, { text: '受理人', value: 'agentUserName', align: 'center' }, { text: '质检模板', value: 'checkModularName', align: 'center' }, { text: '质检评语', value: 'checkComment', align: 'center' }, { text: '质检总分', value: 'checkScore', align: 'center' }, { text: '质检时间', value: 'checkTime', align: 'center' } ], // 显示列 timeRange: [], // 时间范围 list: [], // 列表数据 total: 0, // 数据总数 listLoading: true, // 列表加载动画 tableOption: { head: { show: false, // 是否需要标题栏, text: '数据列表' // 标题名称 }, options: { needIndex: true // 是否需要序号列 }, toolsOption: { selectColumns: false, // 是否需要筛选列 refresh: false // 是否需要刷新按钮 } }, // 表格属性 showAddCase: false, sound: { url: '', controlList: 'noDownload noSpeed onlyOnePlaying' }, size: 'small', soundShow: false, // 显示音频弹窗 userList: [], modularList: [], // 模块列表 checkStatusList: [{ name: '已复核', value: '1' }, { name: '未复核', value: '0' }] // 挂机方向列表 } }, created() { this.fetchModularList() this.search() }, activated() { this.search() }, methods: { search() { this.fetchData(false) }, // 获取质检模块列表 fetchModularList() { getQModulerList().then(response => { this.modularList = response.data }) }, fetchData(isNowPage = true) { this.listLoading = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 this.listQuery.offset = 1 } this.listLoading = true getCheckedSoundList(this.listQuery).then(response => { if (response.code === 200) { this.listLoading = false this.list = response.data.rows // this.list = response.data.records this.total = response.data.total } }) }, // 打开质检页面 goCheck(row) { this.$refs.qualitycheck.initDialog('info', true, row) }, // 关闭新建案件弹窗 closeCreateDialog() { this.showAddCase = false // 关闭弹窗 this.search() }, // 更改坐席 changeSeat(val) { this.listQuery.agentUser = val.id }, // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 changePage(val) { if (val && val.size) { this.listQuery.limit = val.size } if (val && val.page) { this.listQuery.offset = val.page } this.fetchData() }, // 清除输入 clearInput() { this.listQuery = { callerid: '', // 通话编号 agentUser: this.$store.getters.id, // 受理人 startTime: '', // 来电开始时间 endTime: '', // 来电结束时间 checkTemplate: '', // 质检模块 hangupCause: '', // 挂机方向 checkTwice: '', // 复核情况 minScore: '', // 最低分 maxScore: '', // 最高分 offset: 1, limit: 20, sort: '', order: '' } this.timeRange = [] } } } </script> <style rel="stylesheet/scss" lang="scss" scoped> </style>