feat: 在组件挂载时获取网元列表并更新授权状态
This commit is contained in:
@@ -321,9 +321,28 @@ function fnRecordStateReload() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 初始字典数据
|
// 初始字典数据
|
||||||
getDict('ne_license_status')
|
getDict('ne_license_status').then(res => {
|
||||||
.then(res => {
|
dictStatus.value = res;
|
||||||
dictStatus.value = res;
|
});
|
||||||
|
// 获取网元网元列表
|
||||||
|
useNeInfoStore()
|
||||||
|
.fnNelist()
|
||||||
|
.then(async res => {
|
||||||
|
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||||
|
tableState.loading = true;
|
||||||
|
for (const row of res.data) {
|
||||||
|
if (row.neType.toUpperCase() === 'OMC') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
await stateNeLicense(row.neType, row.neId);
|
||||||
|
}
|
||||||
|
tableState.loading = false;
|
||||||
|
} else {
|
||||||
|
message.warning({
|
||||||
|
content: t('common.noData'),
|
||||||
|
duration: 2,
|
||||||
|
});
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
|
|||||||
Reference in New Issue
Block a user