|
@@ -9,9 +9,9 @@
|
9
|
9
|
<li>
|
10
|
10
|
<el-select v-model="CaseId" placeholder="请选择案场">
|
11
|
11
|
<el-option
|
12
|
|
- key="all"
|
13
|
|
- label="所有案场"
|
14
|
|
- value="all">
|
|
12
|
+ key=""
|
|
13
|
+ label="不限案场"
|
|
14
|
+ value="">
|
15
|
15
|
</el-option>
|
16
|
16
|
<el-option
|
17
|
17
|
v-for="item in cases"
|
|
@@ -22,12 +22,12 @@
|
22
|
22
|
</el-select>
|
23
|
23
|
</li>
|
24
|
24
|
<li>
|
25
|
|
- <el-select v-model="postData.state" placeholder="请选择状态">
|
|
25
|
+ <el-select v-model="postData.status" placeholder="请选择状态">
|
26
|
26
|
<el-option
|
27
|
|
- v-for="item in cases"
|
28
|
|
- :key="item.CaseId"
|
29
|
|
- :label="item.CaseName"
|
30
|
|
- :value="item.CaseId">
|
|
27
|
+ v-for="item in statusList"
|
|
28
|
+ :key="item.id"
|
|
29
|
+ :label="item.value"
|
|
30
|
+ :value="item.id">
|
31
|
31
|
</el-option>
|
32
|
32
|
</el-select>
|
33
|
33
|
</li>
|
|
@@ -41,7 +41,8 @@
|
41
|
41
|
</ul>
|
42
|
42
|
<el-button
|
43
|
43
|
size="mini"
|
44
|
|
- type="primary">搜索</el-button>
|
|
44
|
+ type="primary"
|
|
45
|
+ @click="searchList">搜索</el-button>
|
45
|
46
|
</div>
|
46
|
47
|
<div class="moreFilter"></div>
|
47
|
48
|
</div>
|
|
@@ -50,33 +51,43 @@
|
50
|
51
|
:data="tableData"
|
51
|
52
|
style="width: 100%">
|
52
|
53
|
<el-table-column
|
53
|
|
- prop="CaseName"
|
|
54
|
+ prop="defaultCaseId"
|
54
|
55
|
label="案场"
|
55
|
56
|
width="180">
|
|
57
|
+ <template slot-scope="scope">
|
|
58
|
+ {{returnCaseName(scope.row.CaseId)}}
|
|
59
|
+ </template>
|
56
|
60
|
</el-table-column>
|
57
|
61
|
<el-table-column
|
58
|
|
- prop="ActivityName"
|
|
62
|
+ prop="Name"
|
59
|
63
|
label="活动名称">
|
60
|
64
|
</el-table-column>
|
61
|
65
|
<el-table-column
|
62
|
|
- prop="StartDate"
|
|
66
|
+ prop="BeginDate"
|
63
|
67
|
label="开始时间">
|
|
68
|
+ <template slot-scope="scope">
|
|
69
|
+ <span v-if="scope.row.BeginDate !== '0001-01-01T00:00:00Z'">{{toolClass.dateFormat(scope.row.BeginDate, 'yyyy-MM-dd')}}</span>
|
|
70
|
+ <span v-else>-</span>
|
|
71
|
+ </template>
|
64
|
72
|
</el-table-column>
|
65
|
73
|
<el-table-column
|
66
|
74
|
prop="EndDate"
|
67
|
75
|
label="结束时间">
|
|
76
|
+ <template slot-scope="scope">
|
|
77
|
+ <span v-if="scope.row.EndDate !== '0001-01-01T00:00:00Z'">{{toolClass.dateFormat(scope.row.EndDate, 'yyyy-MM-dd')}}</span>
|
|
78
|
+ <span v-else>-</span>
|
|
79
|
+ </template>
|
68
|
80
|
</el-table-column>
|
69
|
81
|
<el-table-column
|
70
|
|
- prop="num"
|
|
82
|
+ prop="JoinedNum"
|
71
|
83
|
label="已参与人数">
|
72
|
84
|
</el-table-column>
|
73
|
85
|
<el-table-column
|
74
|
86
|
prop="Status"
|
75
|
87
|
label="状态">
|
76
|
|
- </el-table-column>
|
77
|
|
- <el-table-column
|
78
|
|
- prop="url"
|
79
|
|
- label="活动链接">
|
|
88
|
+ <template slot-scope="scope">
|
|
89
|
+ {{scope.row.Status === 0 ? '已停用' : new Date(scope.row.EndDate).getTime() > new Date().getTime() && scope.row.Status === 1 ? '已启用' : '已结束'}}
|
|
90
|
+ </template>
|
80
|
91
|
</el-table-column>
|
81
|
92
|
<el-table-column
|
82
|
93
|
prop="address"
|
|
@@ -84,49 +95,237 @@
|
84
|
95
|
width="200">
|
85
|
96
|
<template slot-scope="scope">
|
86
|
97
|
<el-button
|
|
98
|
+ v-if="scope.row.Status === 0"
|
|
99
|
+ @click="deleteActivityItem(scope.row.Id)"
|
87
|
100
|
size="mini"
|
88
|
101
|
type="danger">删除</el-button>
|
89
|
102
|
<el-button
|
|
103
|
+ v-if="scope.row.Status === 1 && new Date(scope.row.EndDate).getTime() > new Date().getTime()"
|
90
|
104
|
size="mini"
|
91
|
|
- type="warning">停用</el-button>
|
|
105
|
+ type="warning"
|
|
106
|
+ @click="toStopActivity(scope.row.Id)">停用</el-button>
|
92
|
107
|
<el-button
|
|
108
|
+ v-if="scope.row.Status === 0"
|
93
|
109
|
size="mini"
|
94
|
|
- type="success">启用</el-button>
|
|
110
|
+ type="success"
|
|
111
|
+ @click="toOpenActivity(scope.row.Id)">启用</el-button>
|
95
|
112
|
<el-button
|
96
|
113
|
size="mini"
|
97
|
|
- type="success">编辑</el-button>
|
|
114
|
+ type="success" @click="editActivity(scope.row.Id)">编辑</el-button>
|
98
|
115
|
<el-button
|
99
|
116
|
size="mini"
|
100
|
|
- type="success">分享记录</el-button>
|
|
117
|
+ type="success"
|
|
118
|
+ @click="getShareListInfo(scope.row.Id)">分享记录</el-button>
|
101
|
119
|
<el-button
|
102
|
120
|
size="mini"
|
103
|
|
- type="success">抽奖记录</el-button>
|
|
121
|
+ type="success"
|
|
122
|
+ @click="getRecordListInfo(scope.row.Id)">抽奖记录</el-button>
|
104
|
123
|
</template>
|
105
|
124
|
</el-table-column>
|
106
|
125
|
</el-table>
|
107
|
126
|
</div>
|
108
|
|
- <el-pagination
|
109
|
|
- @current-change="handleCurrentChange"
|
110
|
|
- :current-page.sync="postData.page"
|
111
|
|
- :page-size="postData.pagesize"
|
112
|
|
- layout="prev, pager, next, jumper"
|
113
|
|
- :total="total">
|
114
|
|
- </el-pagination>
|
|
127
|
+ <div style="margin-bottom:20px;">
|
|
128
|
+ <el-pagination
|
|
129
|
+ @current-change="handleCurrentChange"
|
|
130
|
+ :current-page.sync="postData.page"
|
|
131
|
+ :page-size="postData.pagesize"
|
|
132
|
+ layout="prev, pager, next, jumper"
|
|
133
|
+ :total="total">
|
|
134
|
+ </el-pagination>
|
|
135
|
+ </div>
|
|
136
|
+ <el-dialog
|
|
137
|
+ title="分享记录"
|
|
138
|
+ :visible.sync="showShareList"
|
|
139
|
+ width="1000px"
|
|
140
|
+ @closed="emptyShareList"
|
|
141
|
+ center>
|
|
142
|
+ <div class="popupSearch">
|
|
143
|
+ <div style="width:200px;">
|
|
144
|
+ <el-input
|
|
145
|
+ placeholder="请输入手机号"
|
|
146
|
+ v-model="sharePostData.tel"
|
|
147
|
+ clearable>
|
|
148
|
+ </el-input>
|
|
149
|
+ </div>
|
|
150
|
+ <el-button
|
|
151
|
+ type="primary"
|
|
152
|
+ @click="searchShareList">搜索</el-button>
|
|
153
|
+ </div>
|
|
154
|
+ <div style="border:1px solid #eee;border-bottom:none;margin-top:20px;">
|
|
155
|
+ <el-table
|
|
156
|
+ :data="shareList"
|
|
157
|
+ style="width: 100%">
|
|
158
|
+ <el-table-column
|
|
159
|
+ prop="CaseId"
|
|
160
|
+ label="案场"
|
|
161
|
+ width="180">
|
|
162
|
+ <template slot-scope="scope">
|
|
163
|
+ {{returnCaseName(scope.row.CaseId)}}
|
|
164
|
+ </template>
|
|
165
|
+ </el-table-column>
|
|
166
|
+ <el-table-column
|
|
167
|
+ prop="FromCustomerName"
|
|
168
|
+ label="用户昵称">
|
|
169
|
+ </el-table-column>
|
|
170
|
+ <el-table-column
|
|
171
|
+ prop="FromCustomerWxname"
|
|
172
|
+ label="用户姓名">
|
|
173
|
+ </el-table-column>
|
|
174
|
+ <el-table-column
|
|
175
|
+ prop="FromCustomerTel"
|
|
176
|
+ label="手机号">
|
|
177
|
+ </el-table-column>
|
|
178
|
+ <el-table-column
|
|
179
|
+ prop="ToCustomerWxname"
|
|
180
|
+ label="被分享用户昵称">
|
|
181
|
+ </el-table-column>
|
|
182
|
+ <el-table-column
|
|
183
|
+ prop="ToCustomerName"
|
|
184
|
+ label="被分享用户姓名">
|
|
185
|
+ </el-table-column>
|
|
186
|
+ <el-table-column
|
|
187
|
+ prop="ToCustomerTel"
|
|
188
|
+ label="被分享用户手机号">
|
|
189
|
+ </el-table-column>
|
|
190
|
+ <el-table-column
|
|
191
|
+ prop="CreateDate"
|
|
192
|
+ label="分享时间">
|
|
193
|
+ <template slot-scope="scope">
|
|
194
|
+ <span v-if="scope.row.CreateDate !== '0001-01-01T00:00:00Z'">{{toolClass.dateFormat(scope.row.CreateDate, 'yyyy-MM-dd')}}</span>
|
|
195
|
+ <span v-else>-</span>
|
|
196
|
+ </template>
|
|
197
|
+ </el-table-column>
|
|
198
|
+ </el-table>
|
|
199
|
+ </div>
|
|
200
|
+ <div style="padding-bottom:20px;">
|
|
201
|
+ <el-pagination
|
|
202
|
+ @current-change="cutSharePage"
|
|
203
|
+ :current-page.sync="sharePostData.page"
|
|
204
|
+ :page-size="sharePostData.pagesize"
|
|
205
|
+ layout="prev, pager, next, jumper"
|
|
206
|
+ :total="shareTotal">
|
|
207
|
+ </el-pagination>
|
|
208
|
+ </div>
|
|
209
|
+ </el-dialog>
|
|
210
|
+ <el-dialog
|
|
211
|
+ title="抽奖记录"
|
|
212
|
+ :visible.sync="showRecordsList"
|
|
213
|
+ width="1000px"
|
|
214
|
+ @closed="emptyRecordsList"
|
|
215
|
+ center>
|
|
216
|
+ <div class="popupSearch">
|
|
217
|
+ <div style="width:200px;">
|
|
218
|
+ <el-input
|
|
219
|
+ placeholder="请输入手机号"
|
|
220
|
+ v-model="recordsPostData.tel"
|
|
221
|
+ clearable>
|
|
222
|
+ </el-input>
|
|
223
|
+ </div>
|
|
224
|
+ <el-button
|
|
225
|
+ type="primary"
|
|
226
|
+ @click="searchRecordList">搜索</el-button>
|
|
227
|
+ </div>
|
|
228
|
+ <div style="border:1px solid #eee;border-bottom:none;margin-top:20px;">
|
|
229
|
+ <el-table
|
|
230
|
+ :data="recordsList"
|
|
231
|
+ style="width: 100%">
|
|
232
|
+ <el-table-column
|
|
233
|
+ prop="UserName"
|
|
234
|
+ label="姓名">
|
|
235
|
+ </el-table-column>
|
|
236
|
+ <el-table-column
|
|
237
|
+ prop="CustomerName"
|
|
238
|
+ label="微信昵称">
|
|
239
|
+ </el-table-column>
|
|
240
|
+ <el-table-column
|
|
241
|
+ prop="Phone"
|
|
242
|
+ label="手机号">
|
|
243
|
+ </el-table-column>
|
|
244
|
+ <el-table-column
|
|
245
|
+ prop="PrizeName"
|
|
246
|
+ label="获取奖品">
|
|
247
|
+ </el-table-column>
|
|
248
|
+ <el-table-column
|
|
249
|
+ prop="CreateDate"
|
|
250
|
+ label="获取时间">
|
|
251
|
+ <template slot-scope="scope">
|
|
252
|
+ <span v-if="scope.row.CreateDate !== '0001-01-01T00:00:00Z'">{{toolClass.dateFormat(scope.row.CreateDate, 'yyyy-MM-dd')}}</span>
|
|
253
|
+ <span v-else>-</span>
|
|
254
|
+ </template>
|
|
255
|
+ </el-table-column>
|
|
256
|
+ <el-table-column
|
|
257
|
+ prop="WriteoffDate"
|
|
258
|
+ label="核销时间">
|
|
259
|
+ <template slot-scope="scope">
|
|
260
|
+ <span v-if="scope.row.WriteoffDate !== '0001-01-01T00:00:00Z'">{{toolClass.dateFormat(scope.row.WriteoffDate, 'yyyy-MM-dd')}}</span>
|
|
261
|
+ <span v-else>-</span>
|
|
262
|
+ </template>
|
|
263
|
+ </el-table-column>
|
|
264
|
+ <el-table-column
|
|
265
|
+ prop="Status"
|
|
266
|
+ label="状态">
|
|
267
|
+ <template slot-scope="scope">
|
|
268
|
+ {{scope.row.Status === '0' ? '未核销' : '已核销'}}
|
|
269
|
+ </template>
|
|
270
|
+ </el-table-column>
|
|
271
|
+ </el-table>
|
|
272
|
+ </div>
|
|
273
|
+ <div style="padding-bottom:20px;">
|
|
274
|
+ <el-pagination
|
|
275
|
+ @current-change="cutReocrdPage"
|
|
276
|
+ :current-page.sync="recordsPostData.page"
|
|
277
|
+ :page-size="recordsPostData.pagesize"
|
|
278
|
+ layout="prev, pager, next, jumper"
|
|
279
|
+ :total="recordsTotal">
|
|
280
|
+ </el-pagination>
|
|
281
|
+ </div>
|
|
282
|
+ </el-dialog>
|
115
|
283
|
</div>
|
116
|
284
|
</template>
|
117
|
285
|
<script>
|
118
|
|
-import { mapState } from 'vuex'
|
|
286
|
+import { mapState, createNamespacedHelpers } from 'vuex'
|
|
287
|
+const { mapActions: mapActivityLuckDrawActions } = createNamespacedHelpers('activityLuckDraw')
|
119
|
288
|
export default {
|
120
|
289
|
data () {
|
121
|
290
|
return {
|
|
291
|
+ showShareList: false,
|
|
292
|
+ showRecordsList: false,
|
|
293
|
+ statusList: [{
|
|
294
|
+ id: '',
|
|
295
|
+ value: '不限状态'
|
|
296
|
+ }, {
|
|
297
|
+ id: '0',
|
|
298
|
+ value: '已停用'
|
|
299
|
+ }, {
|
|
300
|
+ id: '1',
|
|
301
|
+ value: '已启用'
|
|
302
|
+ }, {
|
|
303
|
+ id: '9',
|
|
304
|
+ value: '已结束'
|
|
305
|
+ }],
|
122
|
306
|
tableData: [],
|
123
|
|
- postData: { // 表格搜索条件 //caseid: '', // 案场id
|
|
307
|
+ postData: {
|
|
308
|
+ caseid: '', // 案场id
|
124
|
309
|
page: 1, // 当前页码
|
125
|
|
- pageSize: 10, // 请求数据量
|
|
310
|
+ pagesize: 10, // 请求数据量
|
126
|
311
|
name: '', // 活动名称
|
127
|
|
- state: '', // 状态
|
|
312
|
+ status: '', // 状态
|
128
|
313
|
},
|
129
|
|
- total: 0 // 数据条数
|
|
314
|
+ total: 0, // 数据条数
|
|
315
|
+ recordsPostData: {
|
|
316
|
+ page: 1, // 当前页码
|
|
317
|
+ pagesize: 5, // 请求数据量
|
|
318
|
+ tel: '', // 电话号码
|
|
319
|
+ },
|
|
320
|
+ recordsTotal: 0, // 数据条数
|
|
321
|
+ recordsList: [], // 抽奖记录
|
|
322
|
+ sharePostData: {
|
|
323
|
+ page: 1, // 当前页码
|
|
324
|
+ pagesize: 5, // 请求数据量
|
|
325
|
+ tel: '', // 电话号码
|
|
326
|
+ },
|
|
327
|
+ shareTotal: 0, // 数据条数
|
|
328
|
+ shareList: [], // 分享记录
|
130
|
329
|
}
|
131
|
330
|
},
|
132
|
331
|
computed: {
|
|
@@ -147,18 +346,181 @@ export default {
|
147
|
346
|
this.getList()
|
148
|
347
|
},
|
149
|
348
|
methods: {
|
|
349
|
+ ...mapActivityLuckDrawActions([
|
|
350
|
+ 'getLuckdrawList',
|
|
351
|
+ 'getRecordsList',
|
|
352
|
+ 'getShareList',
|
|
353
|
+ 'deleteLuckdraw',
|
|
354
|
+ 'openActivity',
|
|
355
|
+ 'stopActivity',
|
|
356
|
+ ]),
|
|
357
|
+ toOpenActivity (id) { // 开启活动
|
|
358
|
+ this.$confirm('确认开启此活动?', '提示', {
|
|
359
|
+ confirmButtonText: '确定',
|
|
360
|
+ cancelButtonText: '取消',
|
|
361
|
+ type: 'warning'
|
|
362
|
+ }).then(() => {
|
|
363
|
+ this.openActivity(id).then(() => {
|
|
364
|
+ this.getList()
|
|
365
|
+ this.$message({
|
|
366
|
+ type: 'success',
|
|
367
|
+ message: '操作成功!'
|
|
368
|
+ })
|
|
369
|
+ })
|
|
370
|
+ }).catch(() => {
|
|
371
|
+ this.$message({
|
|
372
|
+ type: 'info',
|
|
373
|
+ message: '已取消操作'
|
|
374
|
+ })
|
|
375
|
+ })
|
|
376
|
+ },
|
|
377
|
+ toStopActivity (id) { // 停用活动
|
|
378
|
+ this.$confirm('确认停用此活动?', '提示', {
|
|
379
|
+ confirmButtonText: '确定',
|
|
380
|
+ cancelButtonText: '取消',
|
|
381
|
+ type: 'warning'
|
|
382
|
+ }).then(() => {
|
|
383
|
+ this.stopActivity(id).then(() => {
|
|
384
|
+ this.getList()
|
|
385
|
+ this.$message({
|
|
386
|
+ type: 'success',
|
|
387
|
+ message: '操作成功!'
|
|
388
|
+ })
|
|
389
|
+ })
|
|
390
|
+ }).catch(() => {
|
|
391
|
+ this.$message({
|
|
392
|
+ type: 'info',
|
|
393
|
+ message: '已取消操作'
|
|
394
|
+ })
|
|
395
|
+ })
|
|
396
|
+ },
|
|
397
|
+ deleteActivityItem (id) { // 删除活动
|
|
398
|
+ this.$confirm('确认删除此活动?', '提示', {
|
|
399
|
+ confirmButtonText: '确定',
|
|
400
|
+ cancelButtonText: '取消',
|
|
401
|
+ type: 'warning'
|
|
402
|
+ }).then(() => {
|
|
403
|
+ this.deleteLuckdraw(id).then(() => {
|
|
404
|
+ this.getList()
|
|
405
|
+ this.$message({
|
|
406
|
+ type: 'success',
|
|
407
|
+ message: '删除成功!'
|
|
408
|
+ })
|
|
409
|
+ })
|
|
410
|
+ }).catch(() => {
|
|
411
|
+ this.$message({
|
|
412
|
+ type: 'info',
|
|
413
|
+ message: '已取消删除'
|
|
414
|
+ })
|
|
415
|
+ })
|
|
416
|
+ },
|
|
417
|
+ emptyRecordsList () {
|
|
418
|
+ this.recordsList = []
|
|
419
|
+ this.recordsPostData.page = 1
|
|
420
|
+ this.recordsPostData.tel = ''
|
|
421
|
+ this.recordsTotal = 1
|
|
422
|
+ },
|
|
423
|
+ emptyShareList () {
|
|
424
|
+ this.shareList = []
|
|
425
|
+ this.sharePostData.page = 1
|
|
426
|
+ this.sharePostData.tel = ''
|
|
427
|
+ this.shareTotal = 1
|
|
428
|
+ },
|
|
429
|
+ searchRecordList () { // 搜索抽奖记录列表
|
|
430
|
+ this.recordsPostData.page = 1
|
|
431
|
+ this.recordsTotal = 1
|
|
432
|
+ this.toGetRecordList()
|
|
433
|
+ },
|
|
434
|
+ searchShareList () { // 搜索分享记录列表
|
|
435
|
+ this.sharePostData.page = 1
|
|
436
|
+ this.shareTotal = 1
|
|
437
|
+ this.toGetShareList()
|
|
438
|
+ },
|
|
439
|
+ getShareListInfo (id) { // 获取分享记录列表
|
|
440
|
+ this.currentShareId = id
|
|
441
|
+ this.sharePostData.page = 1
|
|
442
|
+ this.shareTotal = 1
|
|
443
|
+ this.showShareList = true
|
|
444
|
+ this.toGetShareList()
|
|
445
|
+ },
|
|
446
|
+ toGetShareList () { // 获取分享记录
|
|
447
|
+ this.getShareList({
|
|
448
|
+ id: this.currentShareId,
|
|
449
|
+ payload: this.sharePostData
|
|
450
|
+ }).then((res) => {
|
|
451
|
+ // console.log(JSON.stringify(res))
|
|
452
|
+ this.shareList = []
|
|
453
|
+ this.shareList = res.list
|
|
454
|
+ this.sharePostData.page = res.page
|
|
455
|
+ this.shareTotal = res.pagenum
|
|
456
|
+ })
|
|
457
|
+ },
|
|
458
|
+ getRecordListInfo (id) { // 获取抽奖记录列表
|
|
459
|
+ this.currentRecordId = id
|
|
460
|
+ this.recordsPostData.page = 1
|
|
461
|
+ this.recordsTotal = 1
|
|
462
|
+ this.showRecordsList = true
|
|
463
|
+ this.toGetRecordList()
|
|
464
|
+ },
|
|
465
|
+ toGetRecordList () { // 获取抽奖记录
|
|
466
|
+ this.getRecordsList({
|
|
467
|
+ id: this.currentRecordId,
|
|
468
|
+ payload: this.recordsPostData
|
|
469
|
+ }).then((res) => {
|
|
470
|
+ console.log(JSON.stringify(res))
|
|
471
|
+ this.recordsList = []
|
|
472
|
+ this.recordsList = res.list
|
|
473
|
+ this.recordsPostData.page = res.page
|
|
474
|
+ this.recordsTotal = res.pagenum
|
|
475
|
+ })
|
|
476
|
+ },
|
|
477
|
+ editActivity (id) {
|
|
478
|
+ this.$router.push({
|
|
479
|
+ name: 'editLotteryActivities',
|
|
480
|
+ query: {
|
|
481
|
+ id,
|
|
482
|
+ }
|
|
483
|
+ })
|
|
484
|
+ },
|
150
|
485
|
handleCurrentChange (val) {
|
151
|
486
|
this.$data.postData.page = val
|
152
|
487
|
this.getList()
|
153
|
488
|
},
|
|
489
|
+ cutSharePage (val) { // 分享记录分页切换
|
|
490
|
+ this.$data.sharePostData.page = val
|
|
491
|
+ this.toGetShareList()
|
|
492
|
+ },
|
|
493
|
+ cutReocrdPage (val) { // 分享抽奖分页切换
|
|
494
|
+ this.$data.recordsPostData.page = val
|
|
495
|
+ this.toGetRecordList()
|
|
496
|
+ },
|
154
|
497
|
redirection (pathName) { // 重定向
|
155
|
498
|
this.$router.push({ name: pathName })
|
156
|
499
|
},
|
157
|
500
|
getList () { // 获取数据列表
|
|
501
|
+ this.getLuckdrawList({
|
|
502
|
+ ...this.postData
|
|
503
|
+ }).then((res) => {
|
|
504
|
+ this.tableData = res.list
|
|
505
|
+ this.postData.page = res.page
|
|
506
|
+ this.total = res.pagenum
|
|
507
|
+ })
|
|
508
|
+ },
|
|
509
|
+ returnCaseName (id) {
|
|
510
|
+ for (var n = 0; n < this.cases.length; n++) {
|
|
511
|
+ if (id === this.cases[n].CaseId) {
|
|
512
|
+ return this.cases[n].CaseName
|
|
513
|
+ }
|
|
514
|
+ }
|
158
|
515
|
},
|
159
|
516
|
addLotteryActivities () {
|
160
|
517
|
this.$router.push({ name: 'addLotteryActivities' })
|
161
|
518
|
},
|
|
519
|
+ searchList () {
|
|
520
|
+ this.postData.page = 1
|
|
521
|
+ this.total = 1
|
|
522
|
+ this.getList()
|
|
523
|
+ },
|
162
|
524
|
},
|
163
|
525
|
}
|
164
|
526
|
</script>
|
|
@@ -166,4 +528,18 @@ export default {
|
166
|
528
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
167
|
529
|
<style lang="scss" scoped>
|
168
|
530
|
@import "page.scss";
|
|
531
|
+table {
|
|
532
|
+ button {
|
|
533
|
+ margin-bottom: 10px;
|
|
534
|
+ }
|
|
535
|
+}
|
|
536
|
+.popupSearch {
|
|
537
|
+ width: 100%;
|
|
538
|
+ text-align: right;
|
|
539
|
+ font-size: 0;
|
|
540
|
+ & > * {
|
|
541
|
+ display: inline-block;
|
|
542
|
+ margin-left: 10px;
|
|
543
|
+ }
|
|
544
|
+}
|
169
|
545
|
</style>
|