index.vue
4.96 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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<!--
* @Author: huyue
* @Date: 2022-02-11 10:20:32
* @LastEditTime: 2022-07-11 18:22:25
* @LastEditors: huyue
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-pay\src\views\account\index.vue
-->
<template>
<div class="container">
<div>
<span class="container-header">代开发应用配置</span>
<span class="container-tip">提供企微代开发应用的配置管理</span>
</div>
<div class="table-box">
<GLCombiForm :rowNumber="1" :formObj="searchForm.condition" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable ref="accountTable" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <el-button type="text" @click="viewConfig(scope.scope)">查看配置</el-button> -->
<GLButton type="text" @click="viewConfig(scope.scope)" fn="查看配置">查看配置</GLButton>
</template>
</GLTable>
</div>
</div>
</template>
<script>
import { MODEL } from '@/utils/data'
import url from '@/assets/empty.png'
export default {
name: 'AppConfig',
data() {
return {
url,
searchForm: {
condition: {}
},
searchFormData: [
{
label: '模式',
name: 'merchantModel',
type: 'select',
optionList: [
{
label: '全部',
value: ''
},
{
label: '单店企微模式',
value: 2
},
{
label: '集团企微模式',
value: 1
}
],
optionId: 'value',
optionLabel: 'label',
isClear: true
},
{
label: '商户名称',
name: 'merchantName',
type: 'input',
isClear: true
},
{
label: '商户号',
name: 'merchantId',
type: 'input',
isClear: true,
listeners: {
input: value => {
this.searchForm.condition.merchantId = value.replace(/[^\d]/g, '')
}
}
},
{
label: '关联的企微',
name: 'corpAlias',
type: 'input',
isClear: true
}
],
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '商户号',
prop: 'merchantId'
},
{
label: '商户名称',
prop: 'merchantName'
},
{
label: '模式',
prop: 'merchantModel',
formatter: cellValue => {
return MODEL[cellValue.merchantModel]
}
},
{
label: '关联的企业微信',
prop: 'corpAlias'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableData: [
{
id: 1,
merchantId: 10000,
merchantName: '嘀加A门店',
merchantModel: 1,
corpAlias: '嘀加云科技'
},
{
id: 2,
merchantId: 10001,
merchantName: '嘀加b门店',
merchantModel: 2,
corpAlias: '嘀加云科技'
},
{
id: 3,
merchantId: 10002,
merchantName: '嘀加C门店',
merchantModel: 1,
corpAlias: ''
},
{
id: 4,
merchantId: 10003,
merchantName: '嘀加D门店',
merchantModel: 1,
corpAlias: '嘀加云科技'
}
],
getListApi: this.$apis.appConfig.agentList
}
},
mounted() {},
methods: {
viewConfig(row) {
this.$router.push('/appConfig/viewConfig/' + row.appId)
},
handleSearch() {
this.$refs.accountTable.refreshTable()
},
handleReset() {
this.searchForm.condition = {}
this.handleSearch()
},
setTableFinishFun() {
console.log(this.$refs.accountTable.data, '---')
//接收到的数据为空
this.$refs.accountTable.data.length ? (this.$refs.accountTable.tableHeightValues = '') : this.$refs.accountTable.setTableHeightFun()
}
}
}
</script>
<style lang="scss" scoped>
.container {
&-header {
font-size: 20px;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
margin-right: 12px;
}
&-tip {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 20px;
}
.table-box {
margin: 20px 0;
padding: 20px;
background-color: #fff;
}
.footer-btns {
float: right;
}
}
/deep/.el-table th > .cell {
padding: 0 16px;
}
</style>