|
|
@@ -1,13 +1,16 @@
|
|
|
<script setup>
|
|
|
import {$t} from "@vben/locales";
|
|
|
-import {Avatar, Button, Card, Input, InputGroup, Select, SelectOption, Tag} from "ant-design-vue";
|
|
|
-import {Page, useVbenModal} from "@vben/common-ui";
|
|
|
+import {Avatar, Button, Card, Input, InputGroup, message, Select, SelectOption, Tag} from "ant-design-vue";
|
|
|
+import {Page, useVbenModal, confirm} from "@vben/common-ui";
|
|
|
import {reactive, ref} from "vue";
|
|
|
import {getGameMinList} from "#/api/game_control/game_config.js";
|
|
|
import dayjs from "dayjs";
|
|
|
import {useVbenVxeGrid} from "#/adapter/vxe-table.js";
|
|
|
-import {getPlayerControlList} from "#/api/game_control/player_control.js";
|
|
|
-
|
|
|
+import {
|
|
|
+ cancelAllPlayerControl,
|
|
|
+ cancelPlayerControlInfo,
|
|
|
+ getPlayerControlList
|
|
|
+} from "#/api/game_control/player_control.js";
|
|
|
|
|
|
// 列表筛选
|
|
|
const filterData = reactive({
|
|
|
@@ -107,24 +110,24 @@ const gridOptions = {
|
|
|
// },
|
|
|
columns: [
|
|
|
{ fixed: 'left', title: $t('common.serial'), type: 'seq', width: 50},
|
|
|
- { fixed: 'left', field: 'third_gid', title: $t('player_data.search.third_gid'), width: 230, titlePrefix: {'content':$t('player_data.gameRecords.tips.third_gid')}, treeNode: true },
|
|
|
- { field: 'third_order_id', title: $t('player_data.fundsChange.uuid'), width: 230},
|
|
|
- { field: 'third_round_id', title: $t('player_data.gameRecords.third_round_id'), width: 230, titlePrefix: {'content':$t('player_data.gameRecords.tips.third_round_id')} },
|
|
|
- { field: 'nickname', title: $t('player_data.gameRecords.nickname'), width: 150, titlePrefix: {'content':$t('player_data.gameRecords.tips.nickname')}},
|
|
|
+ { field: 'create_time', title: $t('player_data.gameRecords.create_time'), width: 200, titlePrefix: {'content':$t('player_data.gameRecords.tips.create_time')} },
|
|
|
{ field: 'user_id', title: $t('player_data.gameRecords.user_id'), width: 120, titlePrefix: {'content':$t('player_data.gameRecords.tips.user_id')}},
|
|
|
{ field: 'uname', title: $t('player_data.gameRecords.uname'), width: 150, titlePrefix: {'content':$t('player_data.gameRecords.tips.uname')}},
|
|
|
- { align: 'left', field: 'game_title', title: $t('player_data.gameRecords.game_title'), width: 200, slots: {"default":"game_title"}},
|
|
|
- { field: 'amount', title: $t('player_data.fundsChange.change_amount'), width: 140, slots: {'default':'amount'}},
|
|
|
- { field: 'prev_amount', title: $t('player_data.gameRecords.prev_amount'), width: 140, titlePrefix: {'content':$t('player_data.gameRecords.tips.prev_amount')}},
|
|
|
- { field: 'next_amount', title: $t('player_data.gameRecords.next_amount'), width: 140, titlePrefix: {'content':$t('player_data.gameRecords.tips.next_amount')}},
|
|
|
- { field: 'bet', title: $t('player_data.fundsChange.bet_amount'), width: 140, titlePrefix: {'content':$t('player_data.gameRecords.tips.bet_amount')}, slots: {'default':'bet_amount'}},
|
|
|
- { field: 'total_win_amount', title: $t('player_data.fundsChange.change_total_amount'), width: 140, slots: {'default':'total_win_amount'}},
|
|
|
- { field: 'total_amount', title: $t('player_data.fundsChange.total_amount'), width: 140,},
|
|
|
- { field: 'action_type', title: $t('player_data.fundsChange.order_type'), width: 140, slots: {'default':'action_type'}},
|
|
|
- { field: 'status', title: $t('player_data.fundsChange.order_status'), width: 140, slots: {'default':'status'}},
|
|
|
- { field: 'reason', title: $t('player_data.fundsChange.reason'), width: 200},
|
|
|
- { field: 'create_time', title: $t('player_data.gameRecords.create_time'), width: 200, titlePrefix: {'content':$t('player_data.gameRecords.tips.create_time')} },
|
|
|
- // { align:"left", title: $t('game_control.game_list.action'), width: 220, slots: {default:'action'}},
|
|
|
+ { field: 'nickname', title: $t('player_data.gameRecords.nickname'), width: 150, titlePrefix: {'content':$t('player_data.gameRecords.tips.nickname')}},
|
|
|
+ { align: 'left', field: 'game_title', title: $t('player_data.gameRecords.game_title'), width: 300, slots: {"default":"game_title"}},
|
|
|
+
|
|
|
+ { field: 'control_rpt', title: $t('game_control.player_control.control_rpt'), width: 150, },
|
|
|
+ { field: 'auto_cancel_rtp', title: $t('game_control.player_control.auto_cancel_rtp'), width: 200,},
|
|
|
+ { field: 'max_win_multi', title: $t('game_control.player_control.max_win_multi'), width: 150},
|
|
|
+ { field: 'old_rtp', title: $t('game_control.player_control.old_rtp'), width: 150},
|
|
|
+ { field: 'now_rtp', title: $t('game_control.player_control.now_rtp'), width: 150},
|
|
|
+ { field: 'bet_amount', title: $t('game_control.player_control.bet_amount'), width: 150},
|
|
|
+ { field: 'bet_count', title: $t('game_control.player_control.bet_count'), width: 150},
|
|
|
+ { field: 'total_win_amount', title: $t('game_control.player_control.total_win_amount'), width: 150},
|
|
|
+ { field: 'control_balance', title: $t('game_control.player_control.control_balance'), width: 150},
|
|
|
+ { field: 'balance', title: $t('game_control.player_control.balance'), width: 150},
|
|
|
+ { field: 'admin_name', title: $t('game_control.player_control.admin_name'), width: 150},
|
|
|
+ { fixed: 'right', align: 'left', field: 'action', title: $t('common.action'), width: 150, slots: {"default":"action"} },
|
|
|
],
|
|
|
exportConfig: {},
|
|
|
// height: 'auto', // 如果设置为 auto,则必须确保存在父节点且不允许存在相邻元素,否则会出现高度闪动问题
|
|
|
@@ -154,6 +157,14 @@ const gridOptions = {
|
|
|
form[filterData['search_type']] = search.search_text;
|
|
|
}
|
|
|
const list = await getPlayerControlList(form);
|
|
|
+ list.list.forEach(item => {
|
|
|
+ if(item.auto_cancel_rtp == 0) {
|
|
|
+ item.auto_cancel_rtp = "-";
|
|
|
+ }
|
|
|
+ if(item.max_win_multi == 0) {
|
|
|
+ item.max_win_multi = "-";
|
|
|
+ }
|
|
|
+ })
|
|
|
return {
|
|
|
total: list.total,
|
|
|
items: list.list
|
|
|
@@ -197,26 +208,39 @@ const createControl = (row) => {
|
|
|
modalApi.open();
|
|
|
}
|
|
|
|
|
|
+const cancelControl = (row) => {
|
|
|
+ confirm($t('game_control.player_control.confirm_cancel_control', {title: row.game_title})).then(async () => {
|
|
|
+ let res = await cancelPlayerControlInfo({'control_id': row.control_id});
|
|
|
+ message.success($t('common.suc_msg'));
|
|
|
+ gridApi.reload();
|
|
|
+ // alert('Confirmed');
|
|
|
+ }).catch(() => {
|
|
|
+ // alert('Canceled');
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+}
|
|
|
+const cancelAllControl = (row) => {
|
|
|
+ confirm($t('game_control.player_control.confirm_all_cancel_control')).then(async () => {
|
|
|
+ let res = await cancelAllPlayerControl();
|
|
|
+ message.success($t('common.suc_msg'));
|
|
|
+ gridApi.reload();
|
|
|
+ // alert('Confirmed');
|
|
|
+ }).catch(() => {
|
|
|
+ // alert('Canceled');
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
<Page>
|
|
|
<Grid>
|
|
|
- <template #bet_amount="{ row }">
|
|
|
- <span style="color:red">{{row.bet}}</span>
|
|
|
- </template>
|
|
|
- <template #amount="{ row }">
|
|
|
- <span style="color: green" v-if="row.amount >= 0">{{row.amount}}</span>
|
|
|
- <span style="color: red" v-else>{{row.amount}}</span>
|
|
|
- </template>
|
|
|
<template #total_win_amount="{ row }">
|
|
|
<span style="color: green" v-if="row.total_win_amount >= 0">{{row.total_win_amount}}</span>
|
|
|
<span style="color: red" v-else>{{row.total_win_amount}}</span>
|
|
|
</template>
|
|
|
- <template #action_type="{ row }">
|
|
|
- <Tag v-if="row.action_type == 1" color="blue">{{ $t('player_data.fundsChange.bet') }}</Tag>
|
|
|
- <Tag v-if="row.action_type == 3" color="green">{{ $t('player_data.fundsChange.result_amount') }}</Tag>
|
|
|
- <Tag v-if="row.action_type == 4" color="red">{{ $t('player_data.fundsChange.check') }}</Tag>
|
|
|
+ <template #action="{ row }">
|
|
|
+ <Button type="link" danger @click="cancelControl(row)">{{$t('game_control.player_control.cancel_control')}}</Button>
|
|
|
</template>
|
|
|
<template #game_title="{ row }">
|
|
|
<div>
|
|
|
@@ -225,11 +249,7 @@ const createControl = (row) => {
|
|
|
<span style="margin-left: .5rem;display: inline-block;">{{row.game_title}}</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <template #status="{ row }">
|
|
|
- <Tag v-if="row.status == 2" color="green">{{$t('common.success')}}</Tag>
|
|
|
- <Tag v-if="row.status == 0" color="red">{{$t('common.abnormal')}}</Tag>
|
|
|
- <Tag v-if="row.status == 1" color="blue">{{$t('common.warn')}}</Tag>
|
|
|
- </template>
|
|
|
+
|
|
|
<template #form-search_text="slotProps">
|
|
|
<Input-Group compact>
|
|
|
<Select name="search_type" style="width: 110px;" v-model:value="filterData.search_type">
|
|
|
@@ -243,7 +263,7 @@ const createControl = (row) => {
|
|
|
|
|
|
<template #toolbar-actions>
|
|
|
<Button type="primary" @click="createControl">{{$t('game_control.button.create_control')}}</Button>
|
|
|
- <Button type="primary" danger style="margin-left:10px;">{{$t('game_control.button.all_cancel_control')}}</Button>
|
|
|
+ <Button type="primary" danger style="margin-left:10px;" @click="cancelAllControl">{{$t('game_control.button.all_cancel_control')}}</Button>
|
|
|
</template>
|
|
|
</Grid>
|
|
|
<Modal />
|