style: 网元列表加载同时清除缓存
This commit is contained in:
@@ -357,7 +357,8 @@ function fnGetList(pageNum?: number) {
|
||||
if (pageNum) {
|
||||
queryParams.pageNum = pageNum;
|
||||
}
|
||||
listNeInfo(toRaw(queryParams)).then(res => {
|
||||
listNeInfo(toRaw(queryParams))
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
|
||||
// 取消勾选
|
||||
if (tableState.selectedRowKeys.length > 0) {
|
||||
@@ -383,6 +384,10 @@ function fnGetList(pageNum?: number) {
|
||||
});
|
||||
}
|
||||
tableState.loading = false;
|
||||
})
|
||||
.finally(() => {
|
||||
// 刷新缓存的网元信息
|
||||
useNeInfoStore().fnRefreshNelist();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -441,13 +446,8 @@ onMounted(() => {
|
||||
}
|
||||
});
|
||||
|
||||
// 刷新缓存的网元信息
|
||||
useNeInfoStore()
|
||||
.fnRefreshNelist()
|
||||
.finally(() => {
|
||||
// 获取列表数据
|
||||
fnGetList();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user