fix: 延迟加载数据
This commit is contained in:
@@ -549,17 +549,21 @@ function fnLoadData() {
|
|||||||
tableState.loading = true; // 表格loading
|
tableState.loading = true; // 表格loading
|
||||||
loadAuth(neID).then(res => {
|
loadAuth(neID).then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
|
const num = res.data;
|
||||||
notification.success({
|
notification.success({
|
||||||
message: t('views.neUser.auth.loadData'),
|
message: t('views.neUser.auth.loadData'),
|
||||||
description: t('views.neUser.auth.loadDataTip', { num: res.data }),
|
description: t('views.neUser.auth.loadDataTip', { num }),
|
||||||
duration: 10,
|
duration: num < 10_0000 ? 10 : 30,
|
||||||
});
|
});
|
||||||
// 延迟10s后关闭loading刷新列表
|
// 延迟10s后关闭loading刷新列表
|
||||||
setTimeout(() => {
|
setTimeout(
|
||||||
modalState.loadDataLoading = false;
|
() => {
|
||||||
tableState.loading = false; // 表格loading
|
modalState.loadDataLoading = false;
|
||||||
fnQueryReset();
|
tableState.loading = false; // 表格loading
|
||||||
}, 10_000);
|
fnQueryReset();
|
||||||
|
},
|
||||||
|
num < 10_0000 ? 10_000 : 30_000
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
message.error({
|
message.error({
|
||||||
content: t('common.getInfoFail'),
|
content: t('common.getInfoFail'),
|
||||||
|
|||||||
@@ -777,17 +777,21 @@ function fnLoadData() {
|
|||||||
tableState.loading = true; // 表格loading
|
tableState.loading = true; // 表格loading
|
||||||
loadSub(neID).then(res => {
|
loadSub(neID).then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
|
const num = res.data;
|
||||||
notification.success({
|
notification.success({
|
||||||
message: t('views.neUser.sub.loadData'),
|
message: t('views.neUser.sub.loadData'),
|
||||||
description: t('views.neUser.sub.loadDataTip', { num: res.data }),
|
description: t('views.neUser.sub.loadDataTip', { num }),
|
||||||
duration: 10,
|
duration: num < 10_0000 ? 10 : 30,
|
||||||
});
|
});
|
||||||
// 延迟10s后关闭loading刷新列表
|
// 延迟20s后关闭loading刷新列表
|
||||||
setTimeout(() => {
|
setTimeout(
|
||||||
modalState.loadDataLoading = false;
|
() => {
|
||||||
tableState.loading = false; // 表格loading
|
modalState.loadDataLoading = false;
|
||||||
fnQueryReset();
|
tableState.loading = false; // 表格loading
|
||||||
}, 10_000);
|
fnQueryReset();
|
||||||
|
},
|
||||||
|
num < 10_0000 ? 10_000 : 30_000
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
message.error({
|
message.error({
|
||||||
content: t('common.getInfoFail'),
|
content: t('common.getInfoFail'),
|
||||||
|
|||||||
Reference in New Issue
Block a user