Browse Source

remove rome presistence

Unknown 6 years ago
parent
commit
a0aa48461f

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

@@ -47,8 +47,8 @@
47 47
       </el-table>
48 48
 
49 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 52
         </el-pagination>
53 53
       </div>
54 54
     </div>
@@ -73,12 +73,12 @@ export default {
73 73
       dialogList: null,
74 74
       total: null,
75 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 82
       pickerOptions: {
83 83
         shortcuts: [{
84 84
           text: '本週',
@@ -102,7 +102,7 @@ export default {
102 102
     }
103 103
   },
104 104
   created() {
105
-    this.date = this.p_date
105
+    // this.date = this.p_date
106 106
     this.SetVisible(3)
107 107
     this.getList()
108 108
   },
@@ -111,47 +111,42 @@ export default {
111 111
     ...mapGetters([
112 112
       'visible',
113 113
       'data',
114
-      'query',
115
-      'p_date'
114
+      // 'query',
115
+      // 'p_date'
116 116
     ])
117 117
   },
118 118
   methods: {
119 119
     ...mapActions([
120 120
       'SetVisible',
121 121
       'SetData',
122
-      'SetQuery',
123
-      'SetDate'
122
+      // 'SetQuery',
123
+      // 'SetDate'
124 124
     ]),
125 125
     getList() {
126 126
       this.listLoading = true
127
-      fetchChipsHistory(this.data.thirdLayer, this.query.thirdLayer).then(response => {
127
+      fetchChipsHistory(this.data.thirdLayer, this.listQuery).then(response => {
128 128
         this.list = response.data
129 129
         this.total = response.data.length
130 130
         this.listLoading = false
131 131
       })
132 132
     },
133 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 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 142
       this.getList()
140 143
     },
141 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 146
       this.getList()
148 147
     },
149 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 150
       this.getList()
156 151
     },
157 152
     moment(time) {
@@ -175,10 +170,10 @@ export default {
175 170
   destroyed() {
176 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 179
 </script>

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

@@ -53,8 +53,8 @@
53 53
       </el-table>
54 54
 
55 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 58
         </el-pagination>
59 59
       </div>
60 60
 
@@ -116,6 +116,12 @@ export default {
116 116
       dialogList: null,
117 117
       total: null,
118 118
       listLoading: true,
119
+      listQuery: { 
120
+        page: 1, 
121
+        limit: 20, 
122
+        startAt: null, 
123
+        endAt: null 
124
+      }, 
119 125
       pickerOptions: {
120 126
         shortcuts: [{
121 127
           text: '本週',
@@ -133,7 +139,7 @@ export default {
133 139
           }
134 140
         }]
135 141
       },
136
-      date: [],
142
+      date: null,
137 143
       dialogFormVisible: false
138 144
 
139 145
     }
@@ -147,21 +153,21 @@ export default {
147 153
     ...mapGetters([
148 154
       'visible',
149 155
       'data',
150
-      'query',
151
-      'p_date'
156
+      // 'query',
157
+      // 'p_date'
152 158
     ])
153 159
   },
154 160
   methods: {
155 161
     ...mapActions([
156 162
       'SetVisible',
157 163
       'SetData',
158
-      'SetQuery',
159
-      'SetDate'
164
+      // 'SetQuery',
165
+      // 'SetDate'
160 166
     ]),
161 167
     getList() {
162 168
       this.listLoading = true
163 169
       this.list = []
164
-      fetchGameHistory(this.data.thirdLayer, this.query.thirdLayer).then(response => {
170
+      fetchGameHistory(this.data.thirdLayer, this.listQuery).then(response => {
165 171
         this.chipLogList = response.data
166 172
         this.chipLogList.map((item) => {
167 173
           this.list.push({
@@ -174,7 +180,7 @@ export default {
174 180
         })
175 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 184
         this.gameRecordList = response.data
179 185
         this.gameRecordList.map((item) => {
180 186
           if(item.type === config.const.GambleMemberChipsLog.type.deposit) item.type =  '上 / 下 分';
@@ -211,27 +217,22 @@ export default {
211 217
       console.log('Game detail')
212 218
     },
213 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 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 228
       this.getList()
220 229
     },
221 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 232
       this.getList()
228 233
     },
229 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 236
       this.getList()
236 237
     },
237 238
     moment(time) {
@@ -264,10 +265,10 @@ export default {
264 265
     this.SetVisible(2)
265 266
   },
266 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 274
 </script>

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

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

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

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

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

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