This commit is contained in:
yziiy
2025-09-27 16:18:50 +08:00
parent abc2a7b2fb
commit 98616cbe0f
4 changed files with 17 additions and 16 deletions

View File

@@ -33,10 +33,10 @@ export const getInfo = params => {
{ params } { params }
); );
}; };
export const getUserList = () => { export const getUserList = params => {
return http.request<Result>( return http.request<Result>(
"get", "get",
"/adminapi/User/get_user_list" "/adminapi/User/get_user_list", { params }
); );
}; };
export const getRoomList = () => { export const getRoomList = () => {

View File

@@ -89,12 +89,12 @@ export function useData() {
searchForm.value = { ...formData } searchForm.value = { ...formData }
const { data, code } = await queryList({ const { data, code } = await queryList({
...formData, ...formData,
pageNum: pagination.value.currentPage, page: pagination.value.currentPage,
pageSize: pagination.value.pageSize page_limit: pagination.value.pageSize
}); });
if (code) { if (code) {
tableList.value = data.lists; tableList.value = data.lists;
pagination.value.total = data.totalRow; pagination.value.total = data.count;
pagination.value.currentPage = data.pageNumber; pagination.value.currentPage = data.pageNumber;
} }
loading.value = false; loading.value = false;

View File

@@ -8,23 +8,24 @@ function getRef() {
return selectUserList.value; return selectUserList.value;
} }
const searchLabel = ref([ const searchLabel = ref([
{ label: "用户ID", prop: "user_id", type: "input" } { label: "用户ID", prop: "user_code", type: "input" }
]); ]);
const searchForm = ref({}) const searchForm = ref({})
const multipleTable = ref(null) const multipleTable = ref(null)
const onSearch = (formData) => { const onSearch = (formData) => {
userList.value = []
selectUserList.value = []
getAllUserList(formData)
} }
const props = defineProps(["userList"]); const props = defineProps(["userList"]);
const getAllUserList = async () => { const getAllUserList = async (form) => {
const { code, data } = await getUserList() const { code, data } = await getUserList({ ...form })
userList.value = code ? data : [] userList.value = code ? data : []
setTimeout(() => { setTimeout(() => {
if (userList.value.length) { if (userList.value.length) {
userList.value.forEach(ele => { userList.value.forEach(ele => {
const listData = props.userList.map(e => { return Number(e) }) const listData = props.userList.map(e => { return Number(e) })
if (listData.includes(ele.id)) { if (listData.includes(ele.id)) {
selectUserList.value.push()
multipleTable.value.toggleRowSelection(ele, true) multipleTable.value.toggleRowSelection(ele, true)
} }
}) })
@@ -35,7 +36,7 @@ function handleSelectionChange(val) {
selectUserList.value = val selectUserList.value = val
} }
onMounted(() => { onMounted(() => {
getAllUserList() getAllUserList(searchForm.value)
}) })
defineExpose({ getRef }); defineExpose({ getRef });
</script> </script>

View File

@@ -6,7 +6,7 @@ const statisticsData = []
const titleData = [ const titleData = [
{ {
name: "今日收入金额", name: "今日收入金额",
tip: "总已支付金额", tip: "总已支付金额",
prop: 'today_money', prop: 'today_money',
tipProp: 'all_money' tipProp: 'all_money'
}, },
@@ -24,13 +24,13 @@ const titleData = [
}, { }, {
name: "周实时收入金额", name: "周实时收入金额",
tip: "上周实时收入金额", tip: "上周实时收入金额",
prop: 'today_wait_pay', prop: 'week_money',
tipProp: 'all_wait_pay' tipProp: 'last_week_money'
}, { }, {
name: "月实时收入金额", name: "月实时收入金额",
tip: "上月实时收入金额", tip: "上月实时收入金额",
prop: 'today_wait_pay_num', prop: 'month_money',
tipProp: 'all_wait_pay_num' tipProp: 'last_month_money'
} }
] ]
if (props.allData) { if (props.allData) {