房间详情增加幸运值流水
This commit is contained in:
@@ -316,4 +316,12 @@ export const getRoomHostList = params => {
|
||||
"/adminapi/Room/room_host_list",
|
||||
{ params }
|
||||
);
|
||||
};
|
||||
// 获取房间幸运值流水列表
|
||||
export const getRoomLuckList = params => {
|
||||
return http.request<Result>(
|
||||
"get",
|
||||
"/adminapi/Room/room_luck_list",
|
||||
{ params }
|
||||
);
|
||||
};
|
||||
@@ -8,7 +8,8 @@ import {
|
||||
getRoomDetail,
|
||||
getRoomWaterFlow,
|
||||
getRoomEnterByUser,
|
||||
getRoomHostList
|
||||
getRoomHostList,
|
||||
getRoomLuckList
|
||||
} from "@/api/modules/room";
|
||||
const props = defineProps(["tableData"]);
|
||||
const dataBytable = ref({ ...props.tableData });
|
||||
@@ -147,6 +148,17 @@ const getFlowData = async index => {
|
||||
pagination.value.total = data.count;
|
||||
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 => {
|
||||
@@ -231,6 +243,36 @@ const dynamicHostColumns = ref([
|
||||
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 tagValue = ref(1);
|
||||
const dateSearchValue = ref(getDefaultTimeRange());
|
||||
@@ -250,9 +292,15 @@ const handleClick = tab => {
|
||||
pagination.value.currentPage = 1;
|
||||
flowTableList.value = [];
|
||||
activeIndex.value = name;
|
||||
if (["1", "2", "4"].includes(name)) {
|
||||
if (["1", "2", "4", "5"].includes(name)) {
|
||||
getFlowData(
|
||||
activeIndex.value == "1" ? 1 : activeIndex.value == "2" ? 2 : 4
|
||||
activeIndex.value == "1"
|
||||
? 1
|
||||
: activeIndex.value == "2"
|
||||
? 2
|
||||
: activeIndex.value == "4"
|
||||
? 4
|
||||
: 5
|
||||
);
|
||||
} else {
|
||||
console.log("点歌记录");
|
||||
@@ -260,11 +308,27 @@ const handleClick = tab => {
|
||||
};
|
||||
const handleSizeChange = (val: number) => {
|
||||
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) => {
|
||||
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 => {
|
||||
// console.log(val)
|
||||
@@ -389,6 +453,14 @@ const exportExcal = async () => {
|
||||
</template>
|
||||
</pure-table>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user