readPerDetail.vue
3.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<template>
<div>
<glsx-combi-form ref="readPerDetailFormRef" :formObj="searchForm" :formData="readPerDetailFormData" :inline="true">
<span slot="footer" slot-scope="scope" class="select-pro">
<el-button type="default" :size="size" @click="handleReset(scope)">重置</el-button>
<el-button type="primary" :size="size" @click="handleSearch(scope)">查询</el-button>
</span>
</glsx-combi-form>
<GLTable ref="readPerDetailRef" @setTableFinishFun="setTableFinishFun" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
<div slot="departName" slot-scope="scope">
<el-tag type="info" v-for="item in scope.scope.departName" effect="plain" :key="item">
<i class="el-icon-user-solid" style="color: #75acff"></i>
{{ item }}
</el-tag>
</div>
</GLTable>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'readPerDetail',
props: ['materialId', 'startTime', 'endTime'],
data() {
return {
url,
searchForm: {
customerName: '',
customerPhone: '',
staffName: '',
materialId: this.materialId,
startTime: this.startTime,
endTime: this.endTime
},
getListApi: this.$apis.material.readDetailPage,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
readPerDetailFormData: [
{
label: '名称:',
name: 'customerName',
maxlength: 10,
type: 'input',
placeholder: '请输入名称'
},
{
label: '客户手机号:',
name: 'customerPhone',
placeholder: '请输入客户手机号',
type: 'input'
},
{
label: '发送人:',
name: 'staffName',
maxlength: 10,
placeholder: '请输入发送人',
type: 'input'
}
],
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '客户名称',
prop: 'customerName'
},
{
label: '电话号码',
prop: 'customerPhone'
},
{
label: '发送人',
prop: 'staffName'
},
{
label: '所属企微成员',
prop: 'departName',
addHtml: 'departName'
},
{
label: '阅读次数',
prop: 'readNumber'
},
{
label: '首次阅读时间',
prop: 'firstReadTime'
},
{
label: '最后阅读时间',
prop: 'lastReadTime'
}
]
}
}
},
methods: {
// 搜索
handleSearch() {
this.$refs.readPerDetailRef.refreshTable()
},
// 重置
handleReset() {
this.searchForm = {
customerName: '',
customerPhone: '',
staffName: '',
materialId: this.materialId
}
this.handleSearch()
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.readPerDetailRef.data.length ? (this.$refs.readPerDetailRef.tableHeightValues = '') : this.$refs.readPerDetailRef.setTableHeightFun()
}
}
}
</script>
<style lang="" scoped></style>