金币收支页面增加游戏厂商筛选项

(cherry picked from commit 3bbc31e1bbdfcc73ae7c196337362744e62299bd)
This commit is contained in:
tianfeng 2026-05-26 16:45:02 +08:00
parent b3f3b8918e
commit 9bdedc76c3

View File

@ -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',