|
|
@@ -5,11 +5,10 @@ import httpClient from "@/services/httpClient";
|
|
|
import type { CompanyAgg } from "@/types/company.types";
|
|
|
import type { ReportsResponse } from "@/types/report.types";
|
|
|
import type { Response } from "@/types/response.types";
|
|
|
-import qs from 'qs';
|
|
|
|
|
|
const _url = withPrefix("/gw/user")
|
|
|
|
|
|
-export async function query(page: number, companyIds?: Array<number>, field?: string, keyword?: string): Promise<ReportsResponse> {
|
|
|
+export async function query(page: number, companyIds?: number[], field?: string, keyword?: string): Promise<ReportsResponse> {
|
|
|
//const params: any = { page, companyIds, field, keyword }
|
|
|
// if (companyId) {
|
|
|
// params['companyId'] = companyId;
|
|
|
@@ -17,7 +16,7 @@ export async function query(page: number, companyIds?: Array<number>, field?: st
|
|
|
|
|
|
let param = ''
|
|
|
if (companyIds && companyIds.length > 0) {
|
|
|
- param = companyIds.map((_: any)=>`companyIds=${_}`).join('&');
|
|
|
+ param = companyIds.map((id: number)=>`companyIds=${id}`).join('&');
|
|
|
}
|
|
|
if (field && keyword && keyword.length > 0 && field.length > 0) {
|
|
|
param += `&field=${field}&keyword=${keyword}`
|