index.vue
4.37 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<template>
<div class="scrm-sub-client-container">
<el-button type="primary" icon="el-icon-plus">创建员工</el-button>
<div class="pageContent">
<search-form :ploading="sloading" class="searchTop border-shadow" :formModel="searchForm" :formList="employeeFormList" @setTableHeightEvent="setTableHeightEvent" @resetTable="resetTable" @searchTable="searchTable">
<span class="inline-b" slot="form-slot">
<!-- :id="tableParams.btnId" -->
<el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button>
<!-- <el-button type="primary" @click="syncClick" :loading="sloading">同步数据</el-button> -->
</span>
</search-form>
<GLTable @setTableFinishFun="setTableFinishFun" ref="employeeManage" :hasNum="true" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<template slot="auth-button" slot-scope="scope">
<span @click="btnClick('edit', scope.scope)" class="blue-text">编辑标签组</span>
</template>
</GLTable>
</div>
</div>
</template>
<script>
export default {
data() {
return {
searchForm: {},
employeeFormList: [
{
type: 'select',
prop: 'merchantName',
label: '商户名称',
placeholder: '请选择',
options: [
{
label: '冒烟商户AB',
value: 1
},
{
label: '冒烟门店2021',
value: 2
}
]
},
{
type: 'input',
inputType: 'text',
prop: 'creator',
label: '创建者',
placeholder: '请输入创建者'
},
{
type: 'select',
prop: 'status',
label: '状态',
placeholder: '请选择',
options: [
{
label: '开启',
value: 1
},
{
label: '关闭',
value: 2
}
]
},
{
type: 'input',
inputType: 'text',
prop: 'staffName',
label: '员工姓名',
placeholder: '请输入员工姓名'
},
{
type: 'input',
inputType: 'text',
prop: 'staffPhone',
label: '手机号',
placeholder: '请输入手机号'
},
],
tableParams: {
listName: 'data',
tableColumns: [
{
label: '员工姓名',
prop: 'staffName',
width: 120,
},
{
label: '角色',
prop: 'roleName',
},
{
label: '登录手机号',
prop: 'staffPhone',
width: 125
},
{
label: '企微号',
prop: 'entmicroName',
width: 125
},
{
label: '状态',
prop: 'statusName',
width: 80
},
{
label: '创建者',
prop: 'createdAccount'
},
{
label: '商户名(商户号)',
prop: 'merchantName',
width: 160
},
{
label: '更新时间',
prop: 'updatedTime',
width: 110
},
{
label: '启用开关',
prop: 'statusName',
width: 85
}
],
tableOption: {
width: 170
}
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
getListApi: ''
}
},
methods: {
setTableFinishFun(content) {
},
setTableHeightEvent() {
this.$refs.employeeManage.setTableHeightFun()
},
btnClick() {},
//搜索表格
searchTable() {
this.$refs.employeeManage.refreshTable()
},
//重置表格
resetTable() {
this.searchForm = {}
this.$refs.employeeManage.refreshTable()
}
}
}
</script>
<style lang="scss" scoped>
.scrm-sub-client-container {
.pageContent {
padding: 6px 20px 30px;
margin-top: 20px;
background-color: #fff;
.el-button + .el-button {
margin-left: 20px;
}
}
}
</style>