feat: 在组件挂载时获取网元列表并更新授权状态

This commit is contained in:
TsMask
2025-07-10 10:33:26 +08:00
parent f45ad79015
commit fae66a2b79

View File

@@ -321,9 +321,28 @@ function fnRecordStateReload() {
onMounted(() => {
// 初始字典数据
getDict('ne_license_status')
.then(res => {
dictStatus.value = res;
getDict('ne_license_status').then(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(() => {
// 获取列表数据