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

@@ -5,11 +5,12 @@ import { message } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listIMSSessionList } from '@/api/neData/ims';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
@@ -147,13 +148,13 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listIMSSessionList(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
tablePagination.total = res.data.length;
tableState.data = res.data;
tablePagination.total = res.data.length;
tableState.data = res.data;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -172,33 +173,24 @@ function fnGetList(pageNum?: number) {
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'IMS') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
neListStore.neCascaderOptions.forEach(item => {
if (item.value === 'IMS') {
neOtions.value = JSON.parse(JSON.stringify(item.children));
}
});
if (neOtions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
}
// 获取列表数据
fnGetList();
});
</script>
@@ -223,7 +215,11 @@ onMounted(() => {
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item label="IMSI" name="imsi">
<a-input v-model:value="queryParams.imsi" allow-clear :maxlength="15"></a-input>
<a-input
v-model:value="queryParams.imsi"
allow-clear
:maxlength="15"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">