feat: 根据网元显示特有菜单

This commit is contained in:
TsMask
2025-05-07 15:45:54 +08:00
parent 2c2ca82442
commit d3efefe7c5
58 changed files with 1110 additions and 1377 deletions

View File

@@ -4,14 +4,14 @@ import { PageContainer } from 'antdv-pro-layout';
import { Modal, message } from 'ant-design-vue/es';
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
import useI18n from '@/hooks/useI18n';
import { getMMLByUDM, sendMMlByUDM } from '@/api/mmlManage/udmOperate';
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
import { uploadFileToNE } from '@/api/tool/file';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
let neOptions = ref<Record<string, any>[]>([]);
@@ -505,42 +505,24 @@ function fnAutoCompleteKeydown(evt: any) {
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 获取可用UDM
const udmArr = useNeInfoStore().getNeSelectOtions.find(
item => item.value === 'UDM'
);
if (udmArr) {
neOptions.value = udmArr.children;
}
// 是否有可选项
if (neOptions.value.length > 0) {
state.neId = neOptions.value[0].value;
// 获取列表数据
fnGetList();
} else {
message.warning({
content: t('views.mmlManage.udmOpesrate.noUDM'),
duration: 5,
});
}
} else {
message.warning({
content: t('views.mmlManage.udmOpesrate.noUDM'),
duration: 5,
});
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'UDM') {
neOptions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOptions.value.length > 0) {
state.neId = neOptions.value[0].value;
}
// 获取列表数据
fnGetList();
});
</script>