<!-- 事件查询 -->
<template>
<app-container>
<case-search :list-query="listQuery" @search="search"/>
<case-list-table :list-query="listQuery" :list="list" :total="total" :columns="columns" :list-loading="listLoading" @changePage="changePage">
<template slot="operations">
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="text" size="small" @click.stop="goDetail(scope.row)">查看详情</el-button>
</template>
</el-table-column>
</template>
</case-list-table>
</app-container>
</template>
<script>
import AppContainer from '@/components/layout/AppContainer'
import CaseSearch from './caseCommon/caseSearch'
import CaseListTable from './caseCommon/caseListTable'
import { searchList } from '@/api/callCase'
export default {
name: 'CompletedList',
components: { AppContainer, CaseSearch, CaseListTable },
data() {
return {
list: [],
total: 0,
listLoading: true, // 列表加载动画
listQuery: {
caseId: '', // 事件编号
title: '', // 事件标题
description: '', // 事件内容
reporterPhone: '', // 联系方式
reporterName: '', // 联系人
startTime: '', // 来电开始时间
endTime: '', // 来电结束时间
caseState: '', // 处理方式
state: '', // 处理状态
isDelay: '', // 事件状态
source: '', // 事件来源
caseLevel: '', // 紧急程度
offset: 1,
limit: 20,
sort: 'createTime',
order: 'desc'
}, // 筛选条件
columns: [
{
text: '事件标题',
value: 'title',
align: 'center',
showOverflow: true
},
{
text: '联系人',
value: 'reporterName',
align: 'center'
},
{
text: '联系方式',
value: 'reporterPhone',
align: 'center'
},
{
text: '来电时间',
value: 'callTime',
width: 140,
align: 'center'
},
{
text: '创建时间',
value: 'createTime',
width: 140,
align: 'center'
},
{
text: '处理状态',
value: 'stateName',
align: 'center'
},
{
text: '事件内容',
value: 'description',
align: 'center',
showOverflow: true
},
{
text: '处理方式',
value: 'caseStateName',
align: 'center'
}
] // 显示列
}
},
mounted() {
this.fetchData()
},
methods: {
search(listQuery) {
console.log('search')
this.listQuery.offset = 1
this.fetchData()
},
changePage(listQuery) {
console.log('changePage')
this.fetchData()
},
fetchData() {
this.listLoading = true
searchList(this.listQuery).then(response => {
this.list = response.data.rows
this.total = response.data.total
this.listLoading = false
})
},
// 任务办理
goDetail(row) {
this.$router.push({
path: '/caseDetail/' + row.id,
query: {
showProcess: false
}
})
}
}
}
</script>