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

@@ -10,8 +10,7 @@ import {
} 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 useNeInfoStore from '@/store/modules/neinfo';
import { NE_TYPE_LIST } from '@/constants/ne-constants';
import useNeListStore from '@/store/modules/ne_list';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listNeVersion, operateNeVersion } from '@/api/ne/neVersion';
import { parseDateToStr } from '@/utils/date-utils';
@@ -19,6 +18,7 @@ import useI18n from '@/hooks/useI18n';
import useDictStore from '@/store/modules/dict';
import useMaskStore from '@/store/modules/mask';
const maskStore = useMaskStore();
const neListStore = useNeListStore();
const { t } = useI18n();
const { getDict } = useDictStore();
@@ -33,9 +33,6 @@ const UploadMoreFile = defineAsyncComponent(
/**字典数据-状态 */
let dictStatus = ref<DictType[]>([]);
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
/**查询参数 */
let queryParams = reactive({
/**网元类型 */
@@ -151,7 +148,7 @@ let tableColumns = ref<TableColumnsType>([
if (!opt.value) return '';
return parseDateToStr(opt.value);
},
width: 150,
width: 200,
},
{
title: t('common.operate'),
@@ -441,21 +438,9 @@ async function fnRecordUpgrade() {
onMounted(() => {
// 初始字典数据
getDict('ne_version_status').then(res => {
dictStatus.value = res;
});
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
getDict('ne_version_status')
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
neOtions.value = useNeInfoStore().getNeSelectOtions;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
dictStatus.value = res;
})
.finally(() => {
// 获取列表数据
@@ -478,7 +463,7 @@ onMounted(() => {
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
<a-auto-complete
v-model:value="queryParams.neType"
:options="NE_TYPE_LIST.map(v => ({ value: v }))"
:options="neListStore.getNeSelectOtions"
allow-clear
:placeholder="t('common.inputPlease')"
/>
@@ -607,7 +592,7 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:scroll="{ x: tableColumns.length * 120 }"
:scroll="{ x: tableColumns.length * 150 }"
@resizeColumn="(w:number, col:any) => (col.width = w)"
:row-selection="{
type: 'checkbox',