|
@@ -2,7 +2,7 @@
|
2
|
2
|
<div class="app-container calendar-list-container">
|
3
|
3
|
<div class="app-container" v-show="visible.firstLayer">
|
4
|
4
|
<div class="app-container">
|
5
|
|
- <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="莊家" v-model="query.firstLayer.bookie">
|
|
5
|
+ <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="莊家" v-model="listQuery.bookie">
|
6
|
6
|
</el-input>
|
7
|
7
|
<el-date-picker
|
8
|
8
|
v-model="date"
|
|
@@ -42,8 +42,8 @@
|
42
|
42
|
</el-table>
|
43
|
43
|
|
44
|
44
|
<div v-show="!listLoading" class="pagination-container">
|
45
|
|
- <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="query.firstLayer.page"
|
46
|
|
- :page-sizes="[10,20,30, 50]" :page-size="query.firstLayer.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
|
|
45
|
+ <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="listQuery.page"
|
|
46
|
+ :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
|
47
|
47
|
</el-pagination>
|
48
|
48
|
</div>
|
49
|
49
|
</div>
|
|
@@ -68,13 +68,13 @@ export default {
|
68
|
68
|
listLoading: true,
|
69
|
69
|
total: null,
|
70
|
70
|
// bucket: '',
|
71
|
|
- // listQuery: {
|
72
|
|
- // page: 1,
|
73
|
|
- // limit: 20,
|
74
|
|
- // startAt: null,
|
75
|
|
- // endAt: null,
|
76
|
|
- // bookie: null
|
77
|
|
- // },
|
|
71
|
+ listQuery: {
|
|
72
|
+ page: 1,
|
|
73
|
+ limit: 20,
|
|
74
|
+ startAt: null,
|
|
75
|
+ endAt: null,
|
|
76
|
+ bookie: null
|
|
77
|
+ },
|
78
|
78
|
// temp: {},
|
79
|
79
|
pickerOptions: {
|
80
|
80
|
shortcuts: [{
|
|
@@ -104,21 +104,21 @@ export default {
|
104
|
104
|
computed: {
|
105
|
105
|
...mapGetters([
|
106
|
106
|
'visible',
|
107
|
|
- 'query',
|
|
107
|
+ // 'query',
|
108
|
108
|
'data',
|
109
|
|
- 'p_date'
|
|
109
|
+ // 'p_date'
|
110
|
110
|
])
|
111
|
111
|
},
|
112
|
112
|
methods: {
|
113
|
113
|
...mapActions([
|
114
|
114
|
'SetVisible',
|
115
|
115
|
'SetData',
|
116
|
|
- 'SetQuery',
|
117
|
|
- 'SetDate'
|
|
116
|
+ // 'SetQuery',
|
|
117
|
+ // 'SetDate'
|
118
|
118
|
]),
|
119
|
119
|
getList() {
|
120
|
120
|
this.listLoading = true
|
121
|
|
- fetchList(this.query.firstLayer).then(response => {
|
|
121
|
+ fetchList(this.listQuery).then(response => {
|
122
|
122
|
this.list = response.data.rows
|
123
|
123
|
this.total = response.data.count
|
124
|
124
|
this.listLoading = false
|
|
@@ -137,37 +137,32 @@ export default {
|
137
|
137
|
this.SetData({layer:2, data: temp})
|
138
|
138
|
},
|
139
|
139
|
handleFilter() {
|
140
|
|
- if (this.p_date) {
|
141
|
|
- this.SetQuery({layer:1, query: {page: 1, bookie: this.query.firstLayer.bookie, startAt: moment.utc(this.p_date[0]).format(), endAt: moment.utc(this.p_date[1]).format()}})
|
|
140
|
+ this.listQuery.page = 1
|
|
141
|
+ if (this.date) {
|
|
142
|
+ this.listQuery.startAt = moment.utc(this.date[0]).format()
|
|
143
|
+ this.listQuery.endAt = moment.utc(this.date[1]).format()
|
142
|
144
|
} else {
|
143
|
|
- this.SetQuery({layer:1, query: {page: 1, bookie: this.query.firstLayer.bookie,startAt: null, endAt: null}})
|
|
145
|
+ this.listQuery.startAt = null
|
|
146
|
+ this.listQuery.endAt = null
|
144
|
147
|
}
|
145
|
148
|
this.getList()
|
146
|
149
|
},
|
147
|
150
|
handleSizeChange(val) {
|
148
|
|
- if (this.p_date) {
|
149
|
|
- this.SetQuery({layer:1, query: {limit: val, bookie: this.query.firstLayer.bookie, startAt: moment.utc(this.p_date[0]).format(), endAt: moment.utc(this.p_date[1]).format()}})
|
150
|
|
- } else {
|
151
|
|
- this.SetQuery({layer:1, query: {limit: val, bookie: this.query.firstLayer.bookie,startAt: null, endAt: null}})
|
152
|
|
- }
|
|
151
|
+ this.listQuery.limit = val
|
153
|
152
|
this.getList()
|
154
|
153
|
},
|
155
|
154
|
handleCurrentChange(val) {
|
156
|
|
- if (this.p_date) {
|
157
|
|
- this.SetQuery({layer:1, query: {page: val, bookie: this.query.firstLayer.bookie, startAt: moment.utc(this.p_date[0]).format(), endAt: moment.utc(this.p_date[1]).format()}})
|
158
|
|
- } else {
|
159
|
|
- this.SetQuery({layer:1, query: {page: val, bookie: this.query.firstLayer.bookie,startAt: null, endAt: null}})
|
160
|
|
- }
|
|
155
|
+ this.listQuery.page = val
|
161
|
156
|
this.getList()
|
162
|
157
|
},
|
163
|
158
|
moment(time) {
|
164
|
159
|
return moment(time).tz('Asia/Taipei').format('YYYY-MM-DD HH:mm:ss')
|
165
|
160
|
}
|
166
|
161
|
},
|
167
|
|
- watch: {
|
168
|
|
- 'date': function(val) {
|
169
|
|
- this.SetDate(val)
|
170
|
|
- }
|
171
|
|
- }
|
|
162
|
+ // watch: {
|
|
163
|
+ // 'date': function(val) {
|
|
164
|
+ // this.SetDate(val)
|
|
165
|
+ // }
|
|
166
|
+ // }
|
172
|
167
|
}
|
173
|
168
|
</script>
|