房间详情增加幸运值流水

This commit is contained in:
yziiy
2026-01-28 14:40:27 +08:00
parent ffcc0e77c1
commit 0e2d3d3097
2 changed files with 85 additions and 5 deletions

View File

@@ -316,4 +316,12 @@ export const getRoomHostList = params => {
"/adminapi/Room/room_host_list", "/adminapi/Room/room_host_list",
{ params } { params }
); );
};
// 获取房间幸运值流水列表
export const getRoomLuckList = params => {
return http.request<Result>(
"get",
"/adminapi/Room/room_luck_list",
{ params }
);
}; };

View File

@@ -8,7 +8,8 @@ import {
getRoomDetail, getRoomDetail,
getRoomWaterFlow, getRoomWaterFlow,
getRoomEnterByUser, getRoomEnterByUser,
getRoomHostList getRoomHostList,
getRoomLuckList
} from "@/api/modules/room"; } from "@/api/modules/room";
const props = defineProps(["tableData"]); const props = defineProps(["tableData"]);
const dataBytable = ref({ ...props.tableData }); const dataBytable = ref({ ...props.tableData });
@@ -147,6 +148,17 @@ const getFlowData = async index => {
pagination.value.total = data.count; pagination.value.total = data.count;
pagination.value.currentPage = data.page; pagination.value.currentPage = data.page;
} }
} else if (index === 5) {
const { data, code } = await getRoomLuckList({
room_id: dataBytable.value.room_id,
page: pagination.value.currentPage,
page_limit: pagination.value.pageSize
});
if (code) {
flowTableList.value = data.lists;
pagination.value.total = data.count;
pagination.value.currentPage = data.page;
}
} }
}; };
const getExportData = async index => { const getExportData = async index => {
@@ -231,6 +243,36 @@ const dynamicHostColumns = ref([
slot: "avatar" slot: "avatar"
} }
]); ]);
const dynamicLuckColumns = ref([
{
label: "ID",
prop: "id"
},
{
label: "送礼人",
prop: "send_nickname"
},
{
label: "礼物",
prop: "gift_name"
},
{
label: "数量",
prop: "num"
},
{
label: "收礼人",
prop: "recv_nickname"
},
{
label: "幸运值",
prop: "luck_value"
},
{
label: "时间",
prop: "createtime"
}
]);
const activeName = ref("1"); const activeName = ref("1");
const tagValue = ref(1); const tagValue = ref(1);
const dateSearchValue = ref(getDefaultTimeRange()); const dateSearchValue = ref(getDefaultTimeRange());
@@ -250,9 +292,15 @@ const handleClick = tab => {
pagination.value.currentPage = 1; pagination.value.currentPage = 1;
flowTableList.value = []; flowTableList.value = [];
activeIndex.value = name; activeIndex.value = name;
if (["1", "2", "4"].includes(name)) { if (["1", "2", "4", "5"].includes(name)) {
getFlowData( getFlowData(
activeIndex.value == "1" ? 1 : activeIndex.value == "2" ? 2 : 4 activeIndex.value == "1"
? 1
: activeIndex.value == "2"
? 2
: activeIndex.value == "4"
? 4
: 5
); );
} else { } else {
console.log("点歌记录"); console.log("点歌记录");
@@ -260,11 +308,27 @@ const handleClick = tab => {
}; };
const handleSizeChange = (val: number) => { const handleSizeChange = (val: number) => {
pagination.value.pageSize = val; pagination.value.pageSize = val;
getFlowData(activeIndex.value == "1" ? 1 : activeIndex.value == "2" ? 2 : 4); getFlowData(
activeIndex.value == "1"
? 1
: activeIndex.value == "2"
? 2
: activeIndex.value == "4"
? 4
: 5
);
}; };
const handleCurrentChange = (val: number) => { const handleCurrentChange = (val: number) => {
pagination.value.currentPage = val; pagination.value.currentPage = val;
getFlowData(activeIndex.value == "1" ? 1 : activeIndex.value == "2" ? 2 : 4); getFlowData(
activeIndex.value == "1"
? 1
: activeIndex.value == "2"
? 2
: activeIndex.value == "4"
? 4
: 5
);
}; };
const changeTime = val => { const changeTime = val => {
// console.log(val) // console.log(val)
@@ -389,6 +453,14 @@ const exportExcal = async () => {
</template> </template>
</pure-table> </pure-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="幸运值流水" name="5">
<pure-table ref="tableRef" class="mt-5" align-whole="center" showOverflowTooltip table-layout="auto"
default-expand-all row-key="id" :adaptiveConfig="{ offsetBottom: 108 }" :data="flowTableList"
:columns="dynamicLuckColumns" :pagination="{ ...pagination }" :header-cell-style="{
background: 'var(--el-fill-color-light)',
color: 'var(--el-text-color-primary)'
}" @page-current-change="handleCurrentChange" @page-size-change="handleSizeChange" />
</el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</div> </div>