index.vue
7.01 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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<template>
<div style="background-color:#f7f7f7;padding:10px 10px;">
<div class="zhuti">
<div style="height:58px;line-height:58px;">
<div style="color:#0006"> <span>交易联机</span> <span style="padding:0 5px;">></span> <span
style="color:#000000e6">日志查询分析</span></div>
</div>
<div>
<!-- 表格 -->
<el-table :data="tableData"
:header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}">
<el-table-column label="序号" min-width="80">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column label="请求时间" prop="createTime" min-width="250">
</el-table-column>
<el-table-column label="请求用户" prop="name" min-width="200">
</el-table-column>
<el-table-column label="请求IP" prop="ip" min-width="300">
</el-table-column>
<el-table-column label="请求设备" prop="browserName" min-width="250">
</el-table-column>
<el-table-column prop="payState" label="支付状态" min-width="300">
</el-table-column>
<el-table-column prop="type" label="请求类型" min-width="150">
<template slot-scope="scope">
{{scope.row.type == '1'?'平台端':scope.row.type == '2'?'商家端':'C端'}}
</template>
</el-table-column>
<el-table-column prop="time" label="请求耗时" min-width="100">
<template slot-scope="scope">
{{scope.row.time}}秒
</template>
</el-table-column>
<el-table-column label="操作" width="auto" min-width="80">
<template slot-scope="scope">
<div @click="delList(scope.row)" class="tableBtn greens">删除</div>
</template>
</el-table-column>
</el-table>
<div class="fenye">
<div style="line-height: 34px">共{{total}}条</div>
<el-pagination class="pagination" :hide-on-single-page="flag" background
:current-page="pageindex.page+1" :page-sizes="[10, 20, 50, 100]" :page-size="pageSize"
layout="prev, pager,next" :total="total " @current-change="handleCurrentChange" />
</div>
<!-- 新建商家弹框 -->
<el-dialog :title="index == 1?'新增':index == 2?'详情':'编辑'" :visible.sync="ggXin"
custom-class="diaslog_zhong" style="padding: 0;" width="80%" class="dialog_css_Xq" center
:close-on-click-modal="false" :show-close="false">
<div>
<div style="margin-bottom: 20px;">
<el-form ref="form" :model="formInline" label-width="80px">
<el-form-item label="渠道名称">
<el-input v-model="formInline.name"
:disabled="index == 1?false:index == 2?true:false" size="mini"
placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="渠道类型">
<el-select v-model="formInline.createUser" placeholder="请选择" size="mini"
:disabled="index == 1?false:index == 2?true:false" style="width:100%">
<el-option label="APP" value="APP" />
</el-select>
</el-form-item>
<el-form-item label="备注">
<el-input type="textarea" v-model="formInline.textarea" :rows="4"
:disabled="index == 1?false:index == 2?true:false"></el-input>
</el-form-item>
</el-form>
</div>
<div style="display: flex;justify-content: flex-end;">
<el-button plain @click="closeFn(1)" size="mini"
style="background-color: #fff;color: #000;width: 70px;height: 30px;border-color: #B2B2B2;">返回</el-button>
<el-button plain @click="bianji()" v-if="index == 2" size="mini"
style="background-color: #3F9B6A;color: #fff;width: 70px;height: 30px;border-color: #3F9B6A;">编辑</el-button>
<el-button plain @click="addCheck(0)" v-if="index!= 2" size="mini"
style="background-color: #3F9B6A;color: #fff;width: 70px;height: 30px;border-color: #3F9B6A;">确定</el-button>
</div>
</div>
</el-dialog>
</div>
</div>
</div>
</template>
<script>
import {
logQuery,
deleteList
} from '../../../api/online.js'
export default {
data() {
return {
total: 0,
flag: false,
ggXin: false,
index: 1,
formInline: {
merchantName: '', // 商家名称
storeId: '', // 编码
contacts: '', // 联系人
businessEntity: '', //经营主体
page: 0, // 当前页
pageSize: 10 // 每页记录数
},
tableData: [],
multipleSelection: 0,
pageindex: {
page: 0,
pageSize: 10,
},
}
},
computed: {},
mounted() {
this.getAll()
},
methods: {
async getAll() {
const res = await logQuery(this.pageindex)
this.tableData = res.data.content
this.total = res.data.totalElements
},
handleCurrentChange(val) {
this.pageindex.page = val - 1
this.getAll()
},
closeFn() {
this.ggXin = false
this.index = 1
},
delList(item) {
const h = this.$createElement;
this.$msgbox({
title: '消息',
message: h('p', null, [
h('span', null, '是否删除 '),
]),
showCancelButton: true,
showClose: false,
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'oe-dialog-btn',
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
deleteList({
id: item.webLogId
}).then(res => {
this.getAll()
done();
})
} else {
done();
}
}
})
}
}
}
</script>
<style scoped>
.zhuti {
padding: 0 20px 20px 20px;
min-height: calc(100vh - 50px - 20px);
background-color: #Fff;
position: relative;
}
/deep/ .el-form-item__content {
line-height: 0;
}
.tableBtn {
display: inline-block;
margin-right: 10px;
}
::v-deep .formSearch {
position: relative;
margin-bottom: 20px;
display: flex;
width: 100%;
height: 30px;
font-size: 14px;
justify-content: space-between;
.el-form-item__label {
line-height: 28px;
font-size: 14px;
color: #000;
font-weight: 100;
}
}
.greens {
color: #3F9B6A;
}
.fenye {
margin-top: 20px;
display: flex;
justify-content: space-between;
;
position: relative;
}
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: #3F9B6A;
}
.el-row {
margin-bottom: 20px;
}
:last-child {
margin-bottom: 0;
}
.el-col {
border-radius: 4px;
}
.bg-purple-dark {
background: #99a9bf;
}
.bg-purple {
background: #d3dce6;
}
.bg-purple-light {
background: #e5e9f2;
}
.grid-content {
border-radius: 4px;
min-height: 36px;
}
.row-bg {
padding: 10px 0;
background-color: #f9fafc;
}
/deep/ .bg-purple[data-v-0e3fe4ec] {
background: #fff;
height: 50px;
}
/deep/ .el-form--label-top .el-form-item__label {
padding: 0;
}
.demo-input-suffix {
display: flex;
margin-right: 20px;
}
.pagination {
text-align: right;
line-height: 20px;
}
/deep/ .el-pagination__total {
margin-top: 4px;
}
::v-deep .buttonHover:hover {
color: #3f9b6a !important;
border-color: #c5e1d2 !important;
background-color: #ecf5f0 !important;
outline: none;
}
</style>