Browse Source

remove rome presistence

Unknown 6 years ago
parent
commit
a0aa48461f

+ 27 - 32
src/views/room/chipsHistory/index.vue

47
       </el-table>
47
       </el-table>
48
 
48
 
49
       <div v-show="!listLoading" class="pagination-container">
49
       <div v-show="!listLoading" class="pagination-container">
50
-        <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="query.thirdLayer.page"
51
-          :page-sizes="[10,20,30, 50]" :page-size="query.thirdLayer.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
50
+        <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="listQuery.page"
51
+          :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
52
         </el-pagination>
52
         </el-pagination>
53
       </div>
53
       </div>
54
     </div>
54
     </div>
73
       dialogList: null,
73
       dialogList: null,
74
       total: null,
74
       total: null,
75
       listLoading: true,
75
       listLoading: true,
76
-      // listQuery: {
77
-      //   page: 1,
78
-      //   limit: 20,
79
-      //   startAt: null,
80
-      //   endAt: null
81
-      // },
76
+      listQuery: {
77
+        page: 1,
78
+        limit: 20,
79
+        startAt: null,
80
+        endAt: null
81
+      },
82
       pickerOptions: {
82
       pickerOptions: {
83
         shortcuts: [{
83
         shortcuts: [{
84
           text: '本週',
84
           text: '本週',
102
     }
102
     }
103
   },
103
   },
104
   created() {
104
   created() {
105
-    this.date = this.p_date
105
+    // this.date = this.p_date
106
     this.SetVisible(3)
106
     this.SetVisible(3)
107
     this.getList()
107
     this.getList()
108
   },
108
   },
111
     ...mapGetters([
111
     ...mapGetters([
112
       'visible',
112
       'visible',
113
       'data',
113
       'data',
114
-      'query',
115
-      'p_date'
114
+      // 'query',
115
+      // 'p_date'
116
     ])
116
     ])
117
   },
117
   },
118
   methods: {
118
   methods: {
119
     ...mapActions([
119
     ...mapActions([
120
       'SetVisible',
120
       'SetVisible',
121
       'SetData',
121
       'SetData',
122
-      'SetQuery',
123
-      'SetDate'
122
+      // 'SetQuery',
123
+      // 'SetDate'
124
     ]),
124
     ]),
125
     getList() {
125
     getList() {
126
       this.listLoading = true
126
       this.listLoading = true
127
-      fetchChipsHistory(this.data.thirdLayer, this.query.thirdLayer).then(response => {
127
+      fetchChipsHistory(this.data.thirdLayer, this.listQuery).then(response => {
128
         this.list = response.data
128
         this.list = response.data
129
         this.total = response.data.length
129
         this.total = response.data.length
130
         this.listLoading = false
130
         this.listLoading = false
131
       })
131
       })
132
     },
132
     },
133
     handleFilter() {
133
     handleFilter() {
134
-      if (this.p_date) {
135
-        this.SetQuery({layer:3, query: {page: 1,startAt: moment.utc(this.p_date[0]).format(), endAt: moment.utc(this.p_date[1]).format()}})      
134
+      this.listQuery.page = 1 
135
+      if (this.date) { 
136
+        this.listQuery.startAt = moment.utc(this.date[0]).format() 
137
+        this.listQuery.endAt = moment.utc(this.date[1]).format()  
136
       } else {
138
       } else {
137
-         this.SetQuery({layer:3, query: {page: 1,startAt: null, endAt: null}})  
139
+        this.listQuery.startAt = null 
140
+        this.listQuery.endAt = null 
138
       }
141
       }
139
       this.getList()
142
       this.getList()
140
     },
143
     },
141
     handleSizeChange(val) {
144
     handleSizeChange(val) {
142
-      if (this.p_date) {
143
-        this.SetQuery({layer:3, query: {limit: val, startAt: moment.utc(this.p_date[0]).format(), endAt: moment.utc(this.p_date[1]).format()}})      
144
-      } else {
145
-         this.SetQuery({layer:3, query: {limit: val,startAt: null, endAt: null}})  
146
-      }
145
+      this.listQuery.limit = val 
147
       this.getList()
146
       this.getList()
148
     },
147
     },
149
     handleCurrentChange(val) {
148
     handleCurrentChange(val) {
150
-      if (this.p_date) {
151
-        this.SetQuery({layer:3, query: {page: val, startAt: moment.utc(this.p_date[0]).format(), endAt: moment.utc(this.p_date[1]).format()}})      
152
-      } else {
153
-         this.SetQuery({layer:3, query: {page: val,startAt: null, endAt: null}})  
154
-      }
149
+      this.listQuery.page = val
155
       this.getList()
150
       this.getList()
156
     },
151
     },
157
     moment(time) {
152
     moment(time) {
175
   destroyed() {
170
   destroyed() {
176
     this.SetVisible(2)
171
     this.SetVisible(2)
177
   },
172
   },
178
-  watch: {
179
-    'date': function(val) {
180
-     this.SetDate(val)
181
-    }
182
-  }
173
+  // watch: {
174
+  //   'date': function(val) {
175
+  //    this.SetDate(val)
176
+  //   }
177
+  // }
183
 }
178
 }
184
 </script>
179
 </script>

+ 28 - 27
src/views/room/gameHistory/index.vue

53
       </el-table>
53
       </el-table>
54
 
54
 
55
       <div v-show="!listLoading" class="pagination-container">
55
       <div v-show="!listLoading" class="pagination-container">
56
-        <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="query.thirdLayer.page"
57
-          :page-sizes="[10,20,30, 50]" :page-size="query.thirdLayer.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
56
+        <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="listQuery.page"
57
+          :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
58
         </el-pagination>
58
         </el-pagination>
59
       </div>
59
       </div>
60
 
60
 
116
       dialogList: null,
116
       dialogList: null,
117
       total: null,
117
       total: null,
118
       listLoading: true,
118
       listLoading: true,
119
+      listQuery: { 
120
+        page: 1, 
121
+        limit: 20, 
122
+        startAt: null, 
123
+        endAt: null 
124
+      }, 
119
       pickerOptions: {
125
       pickerOptions: {
120
         shortcuts: [{
126
         shortcuts: [{
121
           text: '本週',
127
           text: '本週',
133
           }
139
           }
134
         }]
140
         }]
135
       },
141
       },
136
-      date: [],
142
+      date: null,
137
       dialogFormVisible: false
143
       dialogFormVisible: false
138
 
144
 
139
     }
145
     }
147
     ...mapGetters([
153
     ...mapGetters([
148
       'visible',
154
       'visible',
149
       'data',
155
       'data',
150
-      'query',
151
-      'p_date'
156
+      // 'query',
157
+      // 'p_date'
152
     ])
158
     ])
153
   },
159
   },
154
   methods: {
160
   methods: {
155
     ...mapActions([
161
     ...mapActions([
156
       'SetVisible',
162
       'SetVisible',
157
       'SetData',
163
       'SetData',
158
-      'SetQuery',
159
-      'SetDate'
164
+      // 'SetQuery',
165
+      // 'SetDate'
160
     ]),
166
     ]),
161
     getList() {
167
     getList() {
162
       this.listLoading = true
168
       this.listLoading = true
163
       this.list = []
169
       this.list = []
164
-      fetchGameHistory(this.data.thirdLayer, this.query.thirdLayer).then(response => {
170
+      fetchGameHistory(this.data.thirdLayer, this.listQuery).then(response => {
165
         this.chipLogList = response.data
171
         this.chipLogList = response.data
166
         this.chipLogList.map((item) => {
172
         this.chipLogList.map((item) => {
167
           this.list.push({
173
           this.list.push({
174
         })
180
         })
175
         this.listLoading = false
181
         this.listLoading = false
176
       })
182
       })
177
-      fetchChipsHistory(this.data.thirdLayer, this.query.thirdLayer).then(response => {
183
+      fetchChipsHistory(this.data.thirdLayer, this.listQuery).then(response => {
178
         this.gameRecordList = response.data
184
         this.gameRecordList = response.data
179
         this.gameRecordList.map((item) => {
185
         this.gameRecordList.map((item) => {
180
           if(item.type === config.const.GambleMemberChipsLog.type.deposit) item.type =  '上 / 下 分';
186
           if(item.type === config.const.GambleMemberChipsLog.type.deposit) item.type =  '上 / 下 分';
211
       console.log('Game detail')
217
       console.log('Game detail')
212
     },
218
     },
213
     handleFilter() {
219
     handleFilter() {
214
-      if (this.p_date) {
215
-        this.SetQuery({layer:3, query: {page: 1,startAt: moment.utc(this.p_date[0]).format(), endAt: moment.utc(this.p_date[1]).format()}})      
220
+      this.listQuery.page = 1 
221
+      if (this.date) { 
222
+        this.listQuery.startAt = moment.utc(this.date[0]).format() 
223
+        this.listQuery.endAt = moment.utc(this.date[1]).format()  
216
       } else {
224
       } else {
217
-         this.SetQuery({layer:3, query: {page: 1,startAt: null, endAt: null}})  
225
+        this.listQuery.startAt = null 
226
+        this.listQuery.endAt = null 
218
       }
227
       }
219
       this.getList()
228
       this.getList()
220
     },
229
     },
221
     handleSizeChange(val) {
230
     handleSizeChange(val) {
222
-      if (this.p_date) {
223
-        this.SetQuery({layer:3, query: {limit: val, startAt: moment.utc(this.p_date[0]).format(), endAt: moment.utc(this.p_date[1]).format()}})      
224
-      } else {
225
-         this.SetQuery({layer:3, query: {limit: val,startAt: null, endAt: null}})  
226
-      }
231
+      this.listQuery.limit = val
227
       this.getList()
232
       this.getList()
228
     },
233
     },
229
     handleCurrentChange(val) {
234
     handleCurrentChange(val) {
230
-      if (this.p_date) {
231
-        this.SetQuery({layer:3, query: {page: val, startAt: moment.utc(this.p_date[0]).format(), endAt: moment.utc(this.p_date[1]).format()}})      
232
-      } else {
233
-         this.SetQuery({layer:3, query: {page: val,startAt: null, endAt: null}})  
234
-      }
235
+      this.listQuery.page = val
235
       this.getList()
236
       this.getList()
236
     },
237
     },
237
     moment(time) {
238
     moment(time) {
264
     this.SetVisible(2)
265
     this.SetVisible(2)
265
   },
266
   },
266
   // time 持久化
267
   // time 持久化
267
-  watch: {
268
-    'date': function(val) {
269
-     this.SetDate(val)
270
-    }
271
-  }
268
+  // watch: {
269
+  //   'date': function(val) {
270
+  //    this.SetDate(val)
271
+  //   }
272
+  // }
272
 }
273
 }
273
 </script>
274
 </script>

+ 13 - 9
src/views/room/index.vue

3
 <div class="app-container calendar-list-container">
3
 <div class="app-container calendar-list-container">
4
   <div  v-show="visible.firstLayer">
4
   <div  v-show="visible.firstLayer">
5
     <div class="app-container">
5
     <div class="app-container">
6
-      <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="房間名" v-model="query.firstLayer.name">
6
+      <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="房間名" v-model="listQuery.name">
7
       </el-input>
7
       </el-input>
8
       <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">搜尋</el-button>
8
       <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">搜尋</el-button>
9
       <el-button class="filter-item" @click="handleCreate" type="primary" icon="el-icon-edit">創建</el-button>
9
       <el-button class="filter-item" @click="handleCreate" type="primary" icon="el-icon-edit">創建</el-button>
38
     </el-table>
38
     </el-table>
39
 
39
 
40
     <div v-show="!listLoading" class="pagination-container">
40
     <div v-show="!listLoading" class="pagination-container">
41
-      <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="query.firstLayer.page"
42
-        :page-sizes="[10,20,30, 50]" :page-size="query.firstLayer.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
41
+      <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="listQuery.page"
42
+        :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
43
       </el-pagination>
43
       </el-pagination>
44
     </div>
44
     </div>
45
 
45
 
80
       temp: {
80
       temp: {
81
         name: '',
81
         name: '',
82
       },
82
       },
83
+      listQuery: { 
84
+        page: 1, 
85
+        limit: 20, 
86
+      }, 
83
       rules: {
87
       rules: {
84
         name: [{ type: 'string', required: true, message: '必填', trigger: 'change' }]
88
         name: [{ type: 'string', required: true, message: '必填', trigger: 'change' }]
85
       },
89
       },
93
   computed: {
97
   computed: {
94
     ...mapGetters([
98
     ...mapGetters([
95
       'visible',
99
       'visible',
96
-      'query',
100
+      // 'query',
97
       'data'
101
       'data'
98
     ])
102
     ])
99
   },
103
   },
101
     ...mapActions([
105
     ...mapActions([
102
       'SetVisible',
106
       'SetVisible',
103
       'SetData',
107
       'SetData',
104
-      'SetQuery'
108
+      // 'SetQuery'
105
     ]),
109
     ]),
106
     getList() {
110
     getList() {
107
       this.listLoading = true
111
       this.listLoading = true
108
-      fetchWechatRooms(this.query.firstLayer).then(response => {
112
+      fetchWechatRooms(this.listQuery).then(response => {
109
         this.list = response.data
113
         this.list = response.data
110
         this.total = response.data.length
114
         this.total = response.data.length
111
         this.listLoading = false
115
         this.listLoading = false
148
       })
152
       })
149
     },
153
     },
150
     handleFilter() {
154
     handleFilter() {
151
-      this.SetQuery({layer:1, query: {page: 1, name: this.query.firstLayer.name}})
155
+      this.listQuery.page = 1
152
       this.getList()
156
       this.getList()
153
     },
157
     },
154
     handleSizeChange(val) {
158
     handleSizeChange(val) {
155
-      this.SetQuery({layer:1, query: {limit: val, name: this.query.firstLayer.name}})      
159
+      this.listQuery.limit = val 
156
       this.getList()
160
       this.getList()
157
     },
161
     },
158
     handleCurrentChange(val) {
162
     handleCurrentChange(val) {
159
-      this.SetQuery({layer:1, query: {page: val, name: this.query.firstLayer.name}})      
163
+      this.listQuery.page = val
160
       this.getList()
164
       this.getList()
161
     },
165
     },
162
     handleDialogClose() {
166
     handleDialogClose() {

+ 7 - 7
src/views/room/wechatGameMaster/index.vue

3
 <div class="app-container calendar-list-container">
3
 <div class="app-container calendar-list-container">
4
   <div  v-show="visible.secondLayer">
4
   <div  v-show="visible.secondLayer">
5
     <div class="app-container">
5
     <div class="app-container">
6
-      <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="名稱" v-model="query.secondLayer.name">
6
+      <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="名稱" v-model="listQuery.name">
7
       </el-input>
7
       </el-input>
8
       <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">搜尋</el-button>
8
       <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">搜尋</el-button>
9
       <el-button class="filter-item" @click="handleCreate" type="primary" icon="el-icon-edit">創建</el-button>
9
       <el-button class="filter-item" @click="handleCreate" type="primary" icon="el-icon-edit">創建</el-button>
108
     ...mapGetters([
108
     ...mapGetters([
109
       'visible',
109
       'visible',
110
       'data',
110
       'data',
111
-      'query'
111
+      // 'query'
112
     ])
112
     ])
113
   },
113
   },
114
   methods: {
114
   methods: {
115
     ...mapActions([
115
     ...mapActions([
116
       'SetVisible',
116
       'SetVisible',
117
       'SetData',
117
       'SetData',
118
-      'SetQuery'
118
+      // 'SetQuery'
119
     ]),
119
     ]),
120
     getList() {
120
     getList() {
121
       this.listLoading = true
121
       this.listLoading = true
122
-      fetchWechatGameMaster(this.data.secondLayer, this.query.secondLayer).then(response => {
122
+      fetchWechatGameMaster(this.data.secondLayer, this.listQuery).then(response => {
123
         this.list = response.data.rows
123
         this.list = response.data.rows
124
         this.total = response.data.count
124
         this.total = response.data.count
125
         this.listLoading = false
125
         this.listLoading = false
158
       })
158
       })
159
     },
159
     },
160
     handleFilter() {
160
     handleFilter() {
161
-      this.SetQuery({layer:2, query: {page: 1, name: this.query.secondLayer.name}})
161
+      this.listQuery.page = 1 
162
       this.getList()
162
       this.getList()
163
     },
163
     },
164
     handleSizeChange(val) {
164
     handleSizeChange(val) {
165
-      this.SetQuery({layer:2, query: {limit: val, name: this.query.secondLayer.name}})   
165
+      this.listQuery.limit = val
166
       this.getList()
166
       this.getList()
167
     },
167
     },
168
     handleCurrentChange(val) {
168
     handleCurrentChange(val) {
169
-      this.SetQuery({layer:2, query: {page: val, name: this.query.secondLayer.name}})    
169
+      this.listQuery.page = val 
170
       this.getList()
170
       this.getList()
171
     },
171
     },
172
     handleDialogClose() {
172
     handleDialogClose() {

+ 16 - 9
src/views/room/wechatMember/index.vue

2
   <div class="app-container calendar-list-container">
2
   <div class="app-container calendar-list-container">
3
     <div  v-show="visible.secondLayer">
3
     <div  v-show="visible.secondLayer">
4
       <div class="app-container">
4
       <div class="app-container">
5
-        <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="名稱" v-model="query.secondLayer.name">
5
+        <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="名稱" v-model="listQuery.name">
6
         </el-input>
6
         </el-input>
7
         <!-- <el-select clearable @change='handleFilter' style="width: 120px" class="filter-item" v-model="listQuery.chipsSort" placeholder="點數">
7
         <!-- <el-select clearable @change='handleFilter' style="width: 120px" class="filter-item" v-model="listQuery.chipsSort" placeholder="點數">
8
           <el-option v-for="item in chipsSortOptions" :key="item.label" :label="item.label" :value="item.key">
8
           <el-option v-for="item in chipsSortOptions" :key="item.label" :label="item.label" :value="item.key">
52
       </el-table>
52
       </el-table>
53
 
53
 
54
       <div v-show="!listLoading" class="pagination-container">
54
       <div v-show="!listLoading" class="pagination-container">
55
-        <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="query.secondLayer.page"
56
-          :page-sizes="[10,20,30, 50]" :page-size="query.secondLayer.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
55
+        <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="listQuery.page"
56
+          :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
57
         </el-pagination>
57
         </el-pagination>
58
       </div>
58
       </div>
59
 
59
 
145
       list: null,
145
       list: null,
146
       total: null,
146
       total: null,
147
       listLoading: true,
147
       listLoading: true,
148
+      listQuery: { 
149
+        page: 1, 
150
+        limit: 20, 
151
+        name: '', 
152
+        chipsSort: '', 
153
+        updatedSort: '' 
154
+      }, 
148
       temp: {
155
       temp: {
149
         id: '',
156
         id: '',
150
         WeChatUser: {
157
         WeChatUser: {
184
     ...mapGetters([
191
     ...mapGetters([
185
       'visible',
192
       'visible',
186
       'data',
193
       'data',
187
-      'query'
194
+      // 'query'
188
     ])
195
     ])
189
   },
196
   },
190
   methods: {
197
   methods: {
191
     ...mapActions([
198
     ...mapActions([
192
       'SetVisible',
199
       'SetVisible',
193
       'SetData',
200
       'SetData',
194
-      'SetQuery'
201
+      // 'SetQuery'
195
     ]),
202
     ]),
196
     getList() {
203
     getList() {
197
       this.listLoading = true
204
       this.listLoading = true
198
-      fetchWeChatMemberList(this.data.secondLayer, this.query.secondLayer).then(response => {
205
+      fetchWeChatMemberList(this.data.secondLayer, this.listQuery).then(response => {
199
         this.list = response.data.rows
206
         this.list = response.data.rows
200
         this.total = response.data.count
207
         this.total = response.data.count
201
         this.listLoading = false
208
         this.listLoading = false
257
       this.SetData({layer:3, data: temp.WeChatUser.GambleMember})
264
       this.SetData({layer:3, data: temp.WeChatUser.GambleMember})
258
     },
265
     },
259
     handleFilter() {
266
     handleFilter() {
260
-      this.SetQuery({layer:2, query: {page: 1, name: this.query.secondLayer.name}})
267
+      this.listQuery.page = 1
261
       this.getList()
268
       this.getList()
262
     },
269
     },
263
     handleSizeChange(val) {
270
     handleSizeChange(val) {
264
-      this.SetQuery({layer:2, query: {limit: val, name: this.query.secondLayer.name}})   
271
+      this.listQuery.limit = val 
265
       this.getList()
272
       this.getList()
266
     },
273
     },
267
     handleCurrentChange(val) {
274
     handleCurrentChange(val) {
268
-      this.SetQuery({layer:2, query: {page: val, name: this.query.secondLayer.name}})    
275
+      this.listQuery.page = val
269
       this.getList()
276
       this.getList()
270
     },
277
     },
271
     handleClick(tab, event) {
278
     handleClick(tab, event) {