Browse Source

add full screen

ethan 6 years ago
parent
commit
39d169ec08
2 changed files with 206 additions and 4 deletions
  1. 205 3
      src/views/gambleGameBucket/detail/index.vue
  2. 1 1
      src/views/layout/components/Navbar.vue

+ 205 - 3
src/views/gambleGameBucket/detail/index.vue

@@ -1,4 +1,4 @@
1
-<template>
1
+<template >
2 2
 <div class="app-container calendar-list-container">
3 3
   <div class="app-container">
4 4
      <div class="block">
@@ -11,11 +11,12 @@
11 11
         </el-select>
12 12
         </el-col >
13 13
         <el-col :offset="10" :span="8">
14
-            <span class="demonstration">時間 : {{moment(this.roundTime)}}</span>
14
+          <span @click="dialogVisible = true" class="demonstration">時間 : {{moment(this.roundTime)}}</span>
15 15
         </el-col>
16 16
       </el-row>
17 17
     </div>
18 18
   </div>
19
+  
19 20
     <el-table header-row-class-name="init" :data="bookie" v-loading.body="listLoading" element-loading-text="Loading" border fit highlight-current-row
20 21
       style="width: 100%">      
21 22
       <el-table-column label="本期開獎" lable-className="title" align="center">   
@@ -185,17 +186,211 @@
185 186
         </el-table-column>
186 187
         </el-table-column>      
187 188
     </el-table>
189
+
190
+
191
+
192
+  <el-dialog
193
+    :visible.sync="dialogVisible"
194
+    fullscreen="true"
195
+    :before-close="handleClose">
196
+    <div class="app-container">
197
+     <div class="block">
198
+      <el-row :gutter="20">
199
+        <el-col :span="6">
200
+          <span class="demonstration">關數</span>
201
+          <el-select @change='handleFilter' style="width: 120px" class="filter-item" v-model="listQuery.round" placeholder="關">
202
+          <el-option v-for="item in roundOptions" :key="item.label" :label="item.label" :value="item.key">
203
+          </el-option>
204
+        </el-select>
205
+          </el-col >
206
+          <el-col :offset="10" :span="8">
207
+            <span @click="dialogVisible = false" class="demonstration">時間 : {{moment(this.roundTime)}}</span>
208
+          </el-col>
209
+        </el-row>
210
+      </div>
211
+    </div>
212
+    <el-table header-row-class-name="init" :data="bookie" v-loading.body="listLoading" element-loading-text="Loading" border fit highlight-current-row
213
+      style="width: 100%">      
214
+      <el-table-column label="本期開獎" lable-className="title" align="center">   
215
+        <el-table-column label="莊家結果" align="center">            
216
+                  
217
+          <el-table-column label="莊家" prop="MemberRecord.GambleMember.name"></el-table-column>
218
+          <el-table-column label="點數">
219
+            <template slot-scope="scope">
220
+              <span>{{`${scope.row.DealingRecord.point1} | ${scope.row.DealingRecord.point2} / ${point(scope.row.DealingRecord)}`}}</span>
221
+            </template>
222
+          </el-table-column>
223
+          <el-table-column label="上莊分數">
224
+            <template slot-scope="scope">
225
+              <span>{{memberRecord[memberRecord.length-1][0].wager}}</span>
226
+            </template>
227
+          </el-table-column>  
228
+          <el-table-column prop="MemberRecord.FixedServiceFees" label="服務費"></el-table-column>
229
+          <el-table-column label="有效下注量">
230
+            <template slot-scope="scope">
231
+              <div>{{scope.row.effectiveWagger}}</div>
232
+            </template>
233
+          </el-table-column>
234
+          <el-table-column label="下注量抽水" >
235
+            <template slot-scope="scope">
236
+                <div>{{scope.row.MemberRecord.wagerServiceFees}}</div>
237
+            </template>
238
+          </el-table-column> 
239
+          <!-- 
240
+          <el-table-column label="莊輸贏">
241
+            <template slot-scope="scope">
242
+              <div :style="moneyColor(scope.row.MemberRecord.earned)">{{scope.row.MemberRecord.earned}}</div>
243
+            </template>
244
+          </el-table-column>
245
+          -->
246
+          <el-table-column label="莊贏抽水">
247
+              <template slot-scope="scope">
248
+                <div>{{scope.row.MemberRecord.serviceFees}}</div>
249
+            </template>
250
+          </el-table-column>
251
+          <el-table-column label="莊家結果">
252
+            <template slot-scope="scope">
253
+              <div :style="moneyColor(scope.row.bookieResult)">{{scope.row.bookieResult}}</div>
254
+            </template>
255
+          </el-table-column>
256
+          <el-table-column label="最終積分">
257
+            <template slot-scope="scope">
258
+              <div>{{scope.row.currentChips}}</div>
259
+            </template>
260
+          </el-table-column>  
261
+          <el-table-column label="閒家輸贏" prop="memberWagger"></el-table-column>          
262
+          <el-table-column label="閒家抽水" prop="effectiveServiceFees"></el-table-column>
263
+        </el-table-column>             
264
+      </el-table-column>                   
265
+    </el-table>
266
+    <el-table :header-cell-style="initDoor" :data="dealing" v-loading.body="listLoading" :summary-method="getSummaries" show-summary  element-loading-text="Loading" border fit highlight-current-row
267
+      style="width: 100%">
268
+      <el-table-column label="各門結果" align="center"> 
269
+        <el-table-column label="名稱">
270
+          <template slot-scope="scope">
271
+            <span>{{scope.$index === 0 ?"點數":"門主"}}</span>
272
+          </template>
273
+        </el-table-column>   
274
+        <el-table-column label="第一門">
275
+          <template slot-scope="scope">
276
+            <span>{{doorTableSwitch(scope.$index, 0)}}</span>
277
+          </template>
278
+        </el-table-column>
279
+        <el-table-column label="第二門">
280
+          <template slot-scope="scope">
281
+            <span>{{doorTableSwitch(scope.$index, 1)}}</span>
282
+          </template>
283
+        </el-table-column>
284
+        <el-table-column label="第三門">
285
+          <template slot-scope="scope">
286
+            <span>{{doorTableSwitch(scope.$index, 2)}}</span>
287
+          </template>
288
+        </el-table-column>
289
+        <el-table-column label="第四門">
290
+          <template slot-scope="scope">
291
+            <span>{{doorTableSwitch(scope.$index, 3)}}</span>
292
+          </template>
293
+        </el-table-column>
294
+        <el-table-column label="第五門">
295
+          <template slot-scope="scope">
296
+            <span>{{doorTableSwitch(scope.$index, 4)}}</span>
297
+          </template>
298
+        </el-table-column>
299
+        <el-table-column label="第六門">
300
+          <template slot-scope="scope">
301
+            <span>{{doorTableSwitch(scope.$index, 5)}}</span>
302
+          </template>
303
+        </el-table-column>
304
+      </el-table-column>      
305
+    </el-table>
306
+    <el-table v-show="hasPunishment(punishmentRecord)" :data="punishmentRecord" v-loading.body="listLoading" element-loading-text="Loading" border fit highlight-current-row
307
+      style="width: 100%">
308
+      <el-table-column label="懲罰名單" align="center">
309
+        <el-table-column prop="GambleMember.name" label="玩家">
310
+        </el-table-column>
311
+        <el-table-column label="原因">
312
+          <template slot-scope="scope">
313
+            <div>{{reason(scope.row.rule)}}</div>
314
+          </template>
315
+        </el-table-column>
316
+        <el-table-column label="金額">
317
+          <template slot-scope="scope">
318
+            <div :style="moneyColor((scope.row.chips)*(-1))">{{(scope.row.chips)*(-1)}}</div>
319
+          </template>
320
+        </el-table-column>
321
+      </el-table-column>      
322
+    </el-table>
323
+    <el-table :data="detail" :span-method="objectSpanMethod"  v-loading.body="listLoading" element-loading-text="Loading" border fit highlight-current-row
324
+      style="width: 100%">
325
+      <el-table-column label="本關結果" align="center">
326
+        <el-table-column prop="MemberRecord.GambleMember.name" label="玩家">
327
+        </el-table-column>
328
+        <!-- <el-table-column prop="MemberRecord.GambleMember.name" label="門主">
329
+        </el-table-column> -->
330
+        <el-table-column  label="押">
331
+          <template slot-scope="scope">
332
+            <span>{{`${scope.row.MemberRecord.door} / ${scope.row.MemberRecord.wager}`}}</span>
333
+          </template>
334
+        </el-table-column>
335
+        <el-table-column prop="DealingRecord.totalPoints" label="點數">
336
+          <template slot-scope="scope">
337
+            <span>{{`${scope.row.DealingRecord.point1} | ${scope.row.DealingRecord.point2} / ${point(scope.row.DealingRecord)}`}}</span>
338
+          </template>
339
+        </el-table-column>
340
+        <el-table-column label="輸贏">
341
+          <template slot-scope="scope">
342
+            <div :style="moneyColor(scope.row.MemberRecord.earned)">{{scope.row.MemberRecord.earned}}</div>
343
+          </template>
344
+        </el-table-column>
345
+        <el-table-column prop="MemberRecord.serviceFees" label="抽水">
346
+        </el-table-column>
347
+        <el-table-column label="輸贏合計">
348
+          <template slot-scope="scope">
349
+            <div :style="moneyColor(scope.row.totalChips)">{{scope.row.totalChips}}</div>
350
+          </template>
351
+        </el-table-column>
352
+        <el-table-column label="最終積分">
353
+          <template slot-scope="scope">
354
+            <div>{{scope.row.MemberRecord.currentChips}}</div>
355
+          </template>
356
+        </el-table-column>
357
+      </el-table-column>      
358
+    </el-table>
359
+
360
+    <el-table :data="members" v-loading.body="listLoading" element-loading-text="Loading" border fit highlight-current-row
361
+      style="width: 100%">
362
+      <el-table-column label="當前玩家餘額" align="center">
363
+        <el-table-column prop="name_0" label="成員">
364
+        </el-table-column>
365
+        <el-table-column prop="chips_0" label="當前積分">
366
+        </el-table-column>
367
+        <el-table-column prop="name_1" label="成員">
368
+        </el-table-column>
369
+        <el-table-column prop="chips_1" label="當前積分">
370
+        </el-table-column>
371
+        <el-table-column prop="name_2" label="成員">
372
+        </el-table-column>
373
+        <el-table-column prop="chips_2" label="當前積分">
374
+        </el-table-column>
375
+        <el-table-column prop="name_3" label="成員">
376
+        </el-table-column>
377
+        <el-table-column prop="chips_3" label="當前積分">
378
+        </el-table-column>
379
+        </el-table-column>      
380
+    </el-table>
381
+    </el-dialog>
188 382
 </div>
189 383
 </template>
190 384
 
191 385
 <script>
192
-
193 386
 import { mapGetters, mapActions } from 'vuex'
194 387
 import { fetchDetails, fetchRoundCount, fetchDealingRecords, fetchMemberRecords, fetchRoundRecord, fetchGameBid, fetchWagerRecord, fetchMemberInfo, fetchPunishmentRecord } from '@/api/gambleGameBucket'
195 388
 import { fetchGambleMemberList } from '@/api/gambleMember'
196 389
 import { ponitTransform } from '@/utils/point'
197 390
 import _ from 'lodash'
198 391
 import moment from 'moment-timezone'
392
+import screenfull from 'screenfull'
393
+import $ from 'jquery'
199 394
 
200 395
 export default {
201 396
   data() {
@@ -224,6 +419,7 @@ export default {
224 419
       memberRecordTemp: [],
225 420
       wagerRecord: [],
226 421
       roundTime: 0,
422
+      dialogVisible: false,
227 423
     }
228 424
   },
229 425
   async created() {
@@ -472,6 +668,12 @@ export default {
472 668
     },
473 669
     hasPunishment(data) {
474 670
       return data.length !== 0 ? true : false
671
+    },
672
+    click() {
673
+      console.log('click')
674
+      if (screenfull.enabled) {
675
+        screenfull.request(document.getElementById('full'));
676
+      }
475 677
     }
476 678
   },
477 679
   destroyed() {

+ 1 - 1
src/views/layout/components/Navbar.vue

@@ -4,7 +4,7 @@
4 4
     <breadcrumb></breadcrumb>
5 5
     <el-dropdown class="avatar-container" trigger="click">
6 6
       <div class="avatar-wrapper">
7
-        <img class="user-avatar" :src="avatar+'?imageView2/1/w/80/h/80'">
7
+        <!-- <img class="user-avatar" :src="avatar+'?imageView2/1/w/80/h/80'"> -->
8 8
         <i class="el-icon-caret-bottom"></i>
9 9
       </div>
10 10
       <el-dropdown-menu class="user-dropdown" slot="dropdown">