修改代码
This commit is contained in:
parent
a532440685
commit
253caadce8
@ -38,14 +38,26 @@ const gridOptions: VxeGridProps<any> = {
|
|||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async ({ page }, formValues) => {
|
query: async ({ page }, formValues) => {
|
||||||
const { data } = await postCTWingLogInfoPage({
|
// 构建查询参数
|
||||||
|
const queryParams: any = {
|
||||||
pageIndex: page.currentPage,
|
pageIndex: page.currentPage,
|
||||||
pageSize: page.pageSize,
|
pageSize: page.pageSize,
|
||||||
DeviceType,
|
};
|
||||||
DeviceId,
|
|
||||||
FocusAddress,
|
// 如果有表单值,添加到查询参数中
|
||||||
...formValues,
|
if (formValues) {
|
||||||
|
Object.assign(queryParams, formValues);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加路由参数
|
||||||
|
if (DeviceType) queryParams.DeviceType = DeviceType;
|
||||||
|
if (DeviceId) queryParams.DeviceId = DeviceId;
|
||||||
|
if (FocusAddress) queryParams.FocusAddress = FocusAddress;
|
||||||
|
|
||||||
|
const { data } = await postCTWingLogInfoPage({
|
||||||
|
body: queryParams,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 确保返回的数据包含totalCount字段
|
// 确保返回的数据包含totalCount字段
|
||||||
const result = {
|
const result = {
|
||||||
items: data.items || [],
|
items: data.items || [],
|
||||||
|
|||||||
@ -38,14 +38,26 @@ const gridOptions: VxeGridProps<any> = {
|
|||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async ({ page }, formValues) => {
|
query: async ({ page }, formValues) => {
|
||||||
const { data } = await postOneNETLogInfoPage({
|
// 构建查询参数
|
||||||
|
const queryParams: any = {
|
||||||
pageIndex: page.currentPage,
|
pageIndex: page.currentPage,
|
||||||
pageSize: page.pageSize,
|
pageSize: page.pageSize,
|
||||||
DeviceType,
|
};
|
||||||
DeviceId,
|
|
||||||
FocusAddress,
|
// 如果有表单值,添加到查询参数中
|
||||||
...formValues,
|
if (formValues) {
|
||||||
|
Object.assign(queryParams, formValues);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加路由参数
|
||||||
|
if (DeviceType) queryParams.DeviceType = DeviceType;
|
||||||
|
if (DeviceId) queryParams.DeviceId = DeviceId;
|
||||||
|
if (FocusAddress) queryParams.FocusAddress = FocusAddress;
|
||||||
|
|
||||||
|
const { data } = await postOneNETLogInfoPage({
|
||||||
|
body: queryParams,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 确保返回的数据包含totalCount字段
|
// 确保返回的数据包含totalCount字段
|
||||||
const result = {
|
const result = {
|
||||||
items: data.items || [],
|
items: data.items || [],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user