新增查看显示实时彩金池

This commit is contained in:
2026-03-10 16:41:11 +08:00
parent e56c3ada34
commit bc034727b0
6 changed files with 159 additions and 39 deletions

View File

@@ -75,5 +75,41 @@ export default {
url: '/dice/lottery_config/DiceLotteryConfig/destroy',
data: params
})
},
/**
* 获取当前彩金池Redis 实例化,无则按 type=0 创建),含 profit_amount 实时值
*/
getCurrentPool() {
return request.get<{
id: number
name: string
safety_line: number
t1_weight: number
t2_weight: number
t3_weight: number
t4_weight: number
t5_weight: number
profit_amount: number
}>({
url: '/dice/lottery_config/DiceLotteryConfig/getCurrentPool'
})
},
/**
* 更新当前彩金池:仅 safety_line、t1_weightt5_weight不可改 profit_amount
*/
updateCurrentPool(params: {
safety_line?: number
t1_weight?: number
t2_weight?: number
t3_weight?: number
t4_weight?: number
t5_weight?: number
}) {
return request.post<any>({
url: '/dice/lottery_config/DiceLotteryConfig/updateCurrentPool',
data: params
})
}
}

View File

@@ -7,29 +7,13 @@
<!-- 表格头部 -->
<ArtTableHeader v-model:columns="columnChecks" :loading="loading" @refresh="refreshData">
<template #left>
<!-- <ElSpace wrap>-->
<!-- <ElButton-->
<!-- v-permission="'dice:lottery_config:index:save'"-->
<!-- @click="showDialog('add')"-->
<!-- v-ripple-->
<!-- >-->
<!-- <template #icon>-->
<!-- <ArtSvgIcon icon="ri:add-fill" />-->
<!-- </template>-->
<!-- 新增-->
<!-- </ElButton>-->
<!-- <ElButton-->
<!-- v-permission="'dice:lottery_config:index:destroy'"-->
<!-- :disabled="selectedRows.length === 0"-->
<!-- @click="deleteSelectedRows(api.delete, refreshData)"-->
<!-- v-ripple-->
<!-- >-->
<!-- <template #icon>-->
<!-- <ArtSvgIcon icon="ri:delete-bin-5-line" />-->
<!-- </template>-->
<!-- 删除-->
<!-- </ElButton>-->
<!-- </ElSpace>-->
<ElButton
v-permission="'dice:lottery_config:index:index'"
type="primary"
@click="showCurrentPoolDialog"
>
查看当前彩金池
</ElButton>
</template>
</ArtTableHeader>
@@ -54,11 +38,11 @@
type="secondary"
@click="showDialog('edit', row)"
/>
<!-- <SaButton-->
<!-- v-permission="'dice:lottery_config:index:destroy'"-->
<!-- type="error"-->
<!-- @click="deleteRow(row, api.delete, refreshData)"-->
<!-- />-->
<!-- <SaButton-->
<!-- v-permission="'dice:lottery_config:index:destroy'"-->
<!-- type="error"-->
<!-- @click="deleteRow(row, api.delete, refreshData)"-->
<!-- />-->
</div>
</template>
</ArtTable>
@@ -71,6 +55,8 @@
:data="dialogData"
@success="refreshData"
/>
<!-- 当前彩金池弹窗 -->
<CurrentPoolDialog v-model="currentPoolVisible" @success="refreshData" />
</div>
</template>
@@ -80,6 +66,7 @@
import api from '../../api/lottery_config/index'
import TableSearch from './modules/table-search.vue'
import EditDialog from './modules/edit-dialog.vue'
import CurrentPoolDialog from './modules/current-pool-dialog.vue'
// 搜索表单
const searchForm = ref({
@@ -172,14 +159,10 @@
})
// 编辑配置
const {
dialogType,
dialogVisible,
dialogData,
showDialog,
// deleteRow,
// deleteSelectedRows,
handleSelectionChange
// selectedRows
} = useSaiAdmin()
const { dialogType, dialogVisible, dialogData, showDialog, handleSelectionChange } = useSaiAdmin()
const currentPoolVisible = ref(false)
function showCurrentPoolDialog() {
currentPoolVisible.value = true
}
</script>