金币收支页面增加游戏厂商筛选项
(cherry picked from commit 3bbc31e1bbdfcc73ae7c196337362744e62299bd)
This commit is contained in:
parent
b3f3b8918e
commit
9bdedc76c3
@ -34,6 +34,41 @@
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="gameFilter.gameOrigin"
|
||||
placeholder="游戏厂商"
|
||||
clearable
|
||||
style="width: 120px"
|
||||
class="filter-item"
|
||||
@change="onGameOriginChange"
|
||||
@clear="onGameFilterClear"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in gameOrigins"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="gameFilter.gameConfigId"
|
||||
placeholder="游戏ID"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 180px"
|
||||
class="filter-item"
|
||||
:disabled="!gameFilter.gameOrigin"
|
||||
:loading="gameListLoading"
|
||||
@change="onGameSelect"
|
||||
@clear="onGameFilterClear"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in gameList"
|
||||
:key="item.id"
|
||||
:label="item.name + ' [' + item.gameId + ']'"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<div class="filter-item">
|
||||
<el-autocomplete
|
||||
v-model="listQuery.origin"
|
||||
@ -41,6 +76,7 @@
|
||||
:fetch-suggestions="querySearch"
|
||||
:placeholder="$t('pages.goldRunningWater.filter.origin')"
|
||||
clearable
|
||||
:disabled="!!(gameFilter.gameOrigin)"
|
||||
@select="handleSelect"
|
||||
@clear="handleSelect"
|
||||
>
|
||||
@ -174,6 +210,7 @@
|
||||
<script>
|
||||
|
||||
import { getClsGoldRunningWater } from '@/api/purchase'
|
||||
import { pageGameConfig } from '@/api/sys'
|
||||
import { originPlatforms } from '@/constant/origin'
|
||||
import { candyPurchasingTypes, currencyOrigins } from '@/constant/type'
|
||||
import { mapGetters } from 'vuex'
|
||||
@ -191,6 +228,20 @@ export default {
|
||||
return {
|
||||
limits: [10, 20, 30, 50, 100, 200],
|
||||
searchDisabled: false,
|
||||
gameOrigins: [
|
||||
{ value: 'BAISHUN', name: 'Baishun' },
|
||||
{ value: 'LINGXIAN', name: 'LingXian' },
|
||||
{ value: 'HOTGAME', name: 'HOTGAME' },
|
||||
{ value: 'YOMI', name: 'YOMI' },
|
||||
{ value: 'ZEEONE', name: 'ZEEONE' },
|
||||
{ value: 'ZGAME', name: 'ZGAME' }
|
||||
],
|
||||
gameFilter: {
|
||||
gameOrigin: '',
|
||||
gameConfigId: ''
|
||||
},
|
||||
gameList: [],
|
||||
gameListLoading: false,
|
||||
minDate: null,
|
||||
maxDate: null,
|
||||
pickerOptions: {
|
||||
@ -372,6 +423,44 @@ export default {
|
||||
clickLoadMore() {
|
||||
this.renderData()
|
||||
},
|
||||
// 游戏厂商切换:拉取对应游戏列表,清空已选游戏和 origin
|
||||
onGameOriginChange(val) {
|
||||
this.gameFilter.gameConfigId = ''
|
||||
this.listQuery.origin = ''
|
||||
this.gameList = []
|
||||
if (!val) return
|
||||
const that = this
|
||||
that.gameListLoading = true
|
||||
pageGameConfig({
|
||||
cursor: 1,
|
||||
limit: 200,
|
||||
showcase: true,
|
||||
sysOrigin: that.sysOrigins && that.sysOrigins.length > 0 ? that.sysOrigins[0] : '',
|
||||
gameOrigin: val
|
||||
}).then(res => {
|
||||
that.gameList = (res.body && res.body.records) || []
|
||||
that.gameListLoading = false
|
||||
}).catch(() => {
|
||||
that.gameListLoading = false
|
||||
})
|
||||
},
|
||||
// 选中某个游戏:拼装 origin 并触发搜索
|
||||
onGameSelect(id) {
|
||||
if (!id) return
|
||||
const game = this.gameList.find(item => item.id === id)
|
||||
if (game) {
|
||||
const gameIdPart = game.gameOrigin === 'ZGAME' ? 'tk_' + game.gameId : game.gameId
|
||||
this.listQuery.origin = game.gameOrigin + '_GAME_' + gameIdPart
|
||||
this.renderData(true)
|
||||
}
|
||||
},
|
||||
// 清空游戏筛选:同步清空 origin
|
||||
onGameFilterClear() {
|
||||
this.gameFilter.gameOrigin = ''
|
||||
this.gameFilter.gameConfigId = ''
|
||||
this.gameList = []
|
||||
this.listQuery.origin = ''
|
||||
},
|
||||
getRunningWaterTypeName(type, fallback) {
|
||||
const keyMap = {
|
||||
0: 'income',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user