import { request } from '@vtx/utils';
export const getStaffPageData = param => async ({ current, pageSize }, formData) => {
    const body = {
        ...formData,
        ...param,
        page: current - 1,
        size: pageSize,
    };
    let list = [];
    let total = 0;
    const res = await request.get(`/cloud/gas/api/v1/gasStaff/page`, {
        body,
    });
    if (res?.result === 0) {
        if (Array.isArray(res.data?.rows)) {
            list = res.data.rows.map(item => ({
                ...item,
                key: item.id,
            }));
            total = res.data.total;
        }
    }
    return {
        list,
        total,
    };
};
