fix: 延迟刷新获取更新的数据
This commit is contained in:
@@ -514,17 +514,22 @@ function fnLoadData() {
|
||||
const neID = queryParams.neId;
|
||||
if (tableState.loading || !neID) return;
|
||||
modalState.loadDataLoading = true;
|
||||
tablePagination.total = 0;
|
||||
tableState.data = [];
|
||||
tableState.loading = true; // 表格loading
|
||||
loadAuth(neID).then(res => {
|
||||
modalState.loadDataLoading = false;
|
||||
tableState.loading = false; // 表格loading
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
notification.success({
|
||||
message: t('views.neUser.auth.loadData'),
|
||||
description: t('views.neUser.auth.loadDataTip', { num: res.data }),
|
||||
duration: 10,
|
||||
});
|
||||
fnQueryReset();
|
||||
// 延迟3s后关闭loading刷新列表
|
||||
setTimeout(() => {
|
||||
modalState.loadDataLoading = false;
|
||||
tableState.loading = false; // 表格loading
|
||||
fnQueryReset();
|
||||
}, 3000);
|
||||
} else {
|
||||
message.error({
|
||||
content: `获取数据失败`,
|
||||
|
||||
@@ -253,9 +253,9 @@ let modalState: ModalStateType = reactive({
|
||||
apnContext: '',
|
||||
staticIp: '',
|
||||
},
|
||||
BatchDelForm:{
|
||||
num:'',
|
||||
imsi:'',
|
||||
BatchDelForm: {
|
||||
num: '',
|
||||
imsi: '',
|
||||
},
|
||||
confirmLoading: false,
|
||||
loadDataLoading: false,
|
||||
@@ -549,7 +549,7 @@ function fnBatchModalOk() {
|
||||
* 对话框弹出 批量删除确认执行函数
|
||||
* 进行表达规则校验
|
||||
*/
|
||||
function fnBatchDelModalOk() {
|
||||
function fnBatchDelModalOk() {
|
||||
modalStateBatchDelFrom
|
||||
.validate()
|
||||
.then(e => {
|
||||
@@ -612,7 +612,7 @@ function fnBatchModalCancel() {
|
||||
* 批量删除对话框弹出关闭执行函数
|
||||
* 进行表达规则校验
|
||||
*/
|
||||
function fnBatchDelModalCancel() {
|
||||
function fnBatchDelModalCancel() {
|
||||
modalState.visibleByBatchDel = false;
|
||||
modalState.visibleByView = false;
|
||||
modalStateBatchDelFrom.resetFields();
|
||||
@@ -683,17 +683,22 @@ function fnLoadData() {
|
||||
const neID = queryParams.neId;
|
||||
if (tableState.loading || !neID) return;
|
||||
modalState.loadDataLoading = true;
|
||||
tablePagination.total = 0;
|
||||
tableState.data = [];
|
||||
tableState.loading = true; // 表格loading
|
||||
loadSub(neID).then(res => {
|
||||
modalState.loadDataLoading = false;
|
||||
tableState.loading = false; // 表格loading
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
notification.success({
|
||||
message: t('views.neUser.sub.loadData'),
|
||||
description: t('views.neUser.sub.loadDataTip', { num: res.data }),
|
||||
duration: 10,
|
||||
});
|
||||
fnQueryReset();
|
||||
// 延迟3s后关闭loading刷新列表
|
||||
setTimeout(() => {
|
||||
modalState.loadDataLoading = false;
|
||||
tableState.loading = false; // 表格loading
|
||||
fnQueryReset();
|
||||
}, 3000);
|
||||
} else {
|
||||
message.error({
|
||||
content: `获取数据失败`,
|
||||
@@ -1695,8 +1700,8 @@ onMounted(() => {
|
||||
</a-form>
|
||||
</a-modal>
|
||||
|
||||
<!-- 批量删除框 -->
|
||||
<a-modal
|
||||
<!-- 批量删除框 -->
|
||||
<a-modal
|
||||
width="1000px"
|
||||
:keyboard="false"
|
||||
:mask-closable="false"
|
||||
@@ -1751,8 +1756,7 @@ onMounted(() => {
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user