重新查询数据,正常返回后表格数据如何显示新条件下的...
表格默认api能正常返回数据,通过 调用方法 改变查询条件,正确返回结果后,如何让新结果刷新表格数据,用reload()方法刷新返回的还是之前的数据 代码如下:async function query(values: any) {let obj = JSON.parse(JSON.stringify(values));
let params = { userNo: obj.userNo };
try {
let customList = await defHttp.get({ url: '/charge/query', params });
let userInfo = JSON.parse(JSON.stringify(customList));
// alert(userInfo.userName);
document.getElementById('userName').value = userInfo.userName;
document.getElementById('address').value = userInfo.address;
document.getElementById('tel').value = userInfo.tel;
document.getElementById('chargeMode').value = userInfo.chargeMode;
document.getElementById('userNo').value = userInfo.userNo;
let params = { username: 'zhangsan' };
//location.reload();
// Address.value = userInfo.address;
listNoCareTenant = await defHttp.get({ url: '/sys/user/listByParm', params });
// console.log('0000000' + refundTimeTableData);
// alert(listNoCareTenant);
console.log(listNoCareTenant);
getDataSource();
await reload();
//await tablist();
//console.log(customList);
} catch (err: any) {
console.log(err);
}
}
页:
[1]