Merge branch 'lichang' into lite

This commit is contained in:
TsMask
2025-05-09 14:34:17 +08:00
69 changed files with 1700 additions and 2108 deletions

View File

@@ -7,13 +7,13 @@ import { DataNode } from 'ant-design-vue/es/tree';
import useI18n from '@/hooks/useI18n';
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useOptions from './hooks/useOptions';
import useConfigList from './hooks/useConfigList';
import useConfigArray from './hooks/useConfigArray';
import useConfigArrayChild from './hooks/useConfigArrayChild';
import { getAllNeConfig, getNeConfigData } from '@/api/ne/neConfig';
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const { t } = useI18n();
const { ruleVerification, smfByUPFIdLoadData, smfByUPFIdOptions } = useOptions({
t,
@@ -364,40 +364,28 @@ const {
onMounted(() => {
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
if (res.data.length > 0) {
// 过滤不可用的网元
neCascaderOptions.value = neInfoStore.getNeSelectOtions.filter(
(item: any) => {
return !['LMF', 'NEF'].includes(item.value);
}
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 默认选择AMF
const item = neCascaderOptions.value.find(s => s.value === 'AMF');
if (item && item.children) {
const info = item.children[0];
neTypeSelect.value = [info.neType, info.neId];
} else {
const info = neCascaderOptions.value[0].children[0];
neTypeSelect.value = [info.neType, info.neId];
}
fnGetNeConfig();
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
neCascaderOptions.value = neListStore.getNeCascaderOptions.filter(
(item: any) => {
return !['LMF', 'NEF'].includes(item.value); // 过滤不可用的网元
}
});
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 默认选择AMF
const item = neCascaderOptions.value.find(s => s.value === 'AMF');
if (item && item.children) {
const info = item.children[0];
neTypeSelect.value = [info.neType, info.neId];
} else {
const info = neCascaderOptions.value[0].children[0];
neTypeSelect.value = [info.neType, info.neId];
}
fnGetNeConfig();
});
</script>

View File

@@ -6,10 +6,9 @@ import { Form, Modal, TableColumnsType, 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 BackupModal from './components/BackupModal.vue';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import useDictStore from '@/store/modules/dict';
import { NE_TYPE_LIST } from '@/constants/ne-constants';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { parseDateToStr } from '@/utils/date-utils';
import {
@@ -22,13 +21,11 @@ import { pushBackupFTP } from '@/api/neData/backup';
import saveAs from 'file-saver';
const { t } = useI18n();
const { getDict } = useDictStore();
const neListStore = useNeListStore();
/**字典数据-状态 */
let dictStatus = ref<DictType[]>([]);
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
/**查询参数 */
let queryParams = reactive({
/**网元类型 */
@@ -368,23 +365,8 @@ onMounted(() => {
getDict('ne_license_status').then(res => {
dictStatus.value = res;
});
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
neOtions.value = useNeInfoStore().getNeSelectOtions;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
});
// 获取列表数据
fnGetList();
});
/**打开FTP配置窗口 */
@@ -422,7 +404,7 @@ function fnSyncFileToFTP(row: Record<string, any>) {
<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="true"
:placeholder="t('common.inputPlease')"
/>

View File

@@ -7,13 +7,13 @@ import { DataNode } from 'ant-design-vue/es/tree';
import useI18n from '@/hooks/useI18n';
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useOptions from './hooks/useOptions';
import useConfigList from './hooks/useConfigList';
import useConfigArray from './hooks/useConfigArray';
import useConfigArrayChild from './hooks/useConfigArrayChild';
import { getAllNeConfig, getNeConfigData } from '@/api/ne/neConfig';
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const { t } = useI18n();
const { ruleVerification, smfByUPFIdLoadData, smfByUPFIdOptions } = useOptions({
t,
@@ -536,41 +536,25 @@ const {
onMounted(() => {
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
neCascaderOptions.value = neInfoStore.getNeSelectOtions.filter(
(item: any) => {
return !['LMF', 'NEF'].includes(item.value);
}
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 默认选择AMF
const item = neCascaderOptions.value.find(s => s.value === 'AMF');
if (item && item.children) {
fnSelectNeType(null, item);
// const info = item.children[0];
// neTypeSelect.value = [info.neType, info.neId];
} else {
fnSelectNeType(null, neCascaderOptions.value[0]);
// const info = neCascaderOptions.value[0].children[0];
// neTypeSelect.value = [info.neType, info.neId];
}
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
neCascaderOptions.value = neListStore.getNeSelectOtions.filter(
(item: any) => {
return !['LMF', 'NEF'].includes(item.value); // 过滤不可用的网元
}
});
);
if (neCascaderOptions.value.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
return;
}
// 默认选择AMF
const item = neCascaderOptions.value.find(s => s.value === 'AMF');
if (item && item.children) {
fnSelectNeType(null, item);
} else {
fnSelectNeType(null, neCascaderOptions.value[0]);
}
});
</script>

View File

@@ -7,13 +7,13 @@ import { Modal, message } from 'ant-design-vue/es';
import { parseDateToStr } from '@/utils/date-utils';
import { getNeFile, listNeFiles } from '@/api/tool/neFile';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import ViewDrawer from './components/ViewDrawer.vue';
import saveAs from 'file-saver';
import { useRoute } from 'vue-router';
import { parseSizeFromFile } from '@/utils/parse-utils';
const neInfoStore = useNeInfoStore();
const neListStore = useNeListStore();
const { t } = useI18n();
const route = useRoute();
@@ -283,20 +283,10 @@ function fnDrawerOpen(row: Record<string, any>) {
}
onMounted(() => {
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length === 0) {
message.warning({
content: t('common.noData'),
duration: 2,
});
} else if (routeParams.neType) {
neTypeSelect.value = [routeParams.neType, routeParams.neId];
fnNeChange(neTypeSelect.value, undefined);
}
}
});
if (routeParams.neType) {
neTypeSelect.value = [routeParams.neType, routeParams.neId];
fnNeChange(neTypeSelect.value, undefined);
}
});
</script>
@@ -310,7 +300,7 @@ onMounted(() => {
<span>{{ t('views.logManage.neFile.neType') }}:</span>&nbsp;
<a-cascader
v-model:value="neTypeSelect"
:options="neInfoStore.getNeCascaderOptions"
:options="neListStore.getNeCascaderOptions"
@change="fnNeChange"
:allow-clear="false"
:placeholder="t('views.logManage.neFile.neTypePlease')"

View File

@@ -78,14 +78,19 @@ function fnModalVisibleByTypeAndId(neType: string, neId: string) {
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
const data = res.data;
const ipType = data?.oamConfig?.ipType || 'ipv4';
let omcIP = '127.0.0.1';
if (data.oamConfig && Reflect.has(data.oamConfig, ipType)) {
omcIP = data?.oamConfig[ipType];
}
Object.assign(modalState.from, {
omcIP: data.oamConfig[data.oamConfig.ipType],
oamEnable: data.oamConfig.enable,
oamPort: data.oamConfig.port,
snmpEnable: data.snmpConfig.enable,
snmpPort: data.snmpConfig.port,
kpiEnable: data.kpiConfig.enable,
kpiTimer: data.kpiConfig.timer,
omcIP: omcIP,
oamEnable: data?.oamConfig?.enable || false,
oamPort: data?.oamConfig?.port || 33030,
snmpEnable: data?.snmpConfig?.enable || false,
snmpPort: data?.snmpConfig?.port || 4957,
kpiEnable: data?.kpiConfig?.enable || false,
kpiTimer: data?.kpiConfig?.timer || 60,
});
modalState.title = t('views.ne.neInfo.oam.title');
modalState.openByEdit = true;

View File

@@ -7,12 +7,12 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import { listNeInfo, delNeInfo, stateNeInfo } from '@/api/ne/neInfo';
import { NE_TYPE_LIST } from '@/constants/ne-constants';
import useDictStore from '@/store/modules/dict';
import useNeOptions from './hooks/useNeOptions';
const { getDict } = useDictStore();
const neListStore = useNeListStore();
const { t } = useI18n();
const {
fnNeStart,
@@ -262,7 +262,7 @@ function reloadRowInfo(row: Record<string, any>) {
}
})
.finally(() => {
useNeInfoStore().fnRefreshNelist();
neListStore.fnNelistRefresh();
});
}
@@ -308,7 +308,7 @@ function fnRecordDelete(id: string) {
}
});
// 刷新缓存
useNeInfoStore().fnRefreshNelist();
neListStore.fnNelistRefresh();
} else {
message.error({
content: `${res.msg}`,
@@ -404,7 +404,7 @@ function fnGetList(pageNum?: number) {
})
.finally(() => {
// 刷新缓存的网元信息
useNeInfoStore().fnRefreshNelist();
neListStore.fnNelistRefresh();
});
}
@@ -435,7 +435,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')"
/>

View File

@@ -4,15 +4,15 @@ import { PageContainer } from 'antdv-pro-layout';
import { Modal, TableColumnsType, 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 useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import useDictStore from '@/store/modules/dict';
import { NE_TYPE_LIST } from '@/constants/ne-constants';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listNeLicense, stateNeLicense } from '@/api/ne/neLicense';
import { parseDateToStr } from '@/utils/date-utils';
const { t } = useI18n();
const { getDict } = useDictStore();
const neListStore = useNeListStore();
const EditModal = defineAsyncComponent(
() => import('./components/EditModal.vue')
);
@@ -20,9 +20,6 @@ const EditModal = defineAsyncComponent(
/**字典数据-状态 */
let dictStatus = ref<DictType[]>([]);
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
/**查询参数 */
let queryParams = reactive({
/**网元类型 */
@@ -113,6 +110,12 @@ let tableColumns = ref<TableColumnsType>([
align: 'left',
width: 120,
},
{
title: t('views.ne.common.capability'),
dataIndex: 'capability',
align: 'left',
width: 100,
},
{
title: t('common.remark'),
dataIndex: 'remark',
@@ -340,21 +343,9 @@ function fnRecordStateBatch() {
onMounted(() => {
// 初始字典数据
getDict('ne_license_status').then(res => {
dictStatus.value = res;
});
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
getDict('ne_license_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(() => {
// 获取列表数据
@@ -377,7 +368,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="true"
:placeholder="t('common.inputPlease')"
/>
@@ -492,7 +483,7 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:scroll="{ x: tableColumns.length * 120 }"
:scroll="{ x: tableColumns.length * 140 }"
@resizeColumn="(w:number, col:any) => (col.width = w)"
:row-selection="{
type: 'checkbox',

View File

@@ -8,8 +8,9 @@ import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
import { fnRestStepState, fnToStepName, stepState } from '../hooks/useStep';
import useI18n from '@/hooks/useI18n';
import useDictStore from '@/store/modules/dict';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
const { getDict } = useDictStore();
const neListStore = useNeListStore();
const { t } = useI18n();
/**字典数据 */
@@ -199,8 +200,8 @@ function fnModalOk() {
content: `${t('common.operateOk')}`,
duration: 3,
});
// 刷新缓存的网元信息
useNeInfoStore().fnRefreshNelist();
neListStore.fnNelistRefresh(); // 刷新缓存的网元信息
stepState.neInfo = from; // 保存网元信息
modalState.stepNext = true; // 开启下一步
} else {
@@ -368,7 +369,7 @@ onMounted(() => {
<template #title>
{{ t('views.ne.common.neTypeTip') }}
</template>
<InfoCircleOutlined style="opacity: 0.45; color: inherit;" />
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
</a-tooltip>
</template>
</a-input>
@@ -392,7 +393,7 @@ onMounted(() => {
<template #title>
{{ t('views.ne.common.neIdTip') }}
</template>
<InfoCircleOutlined style="opacity: 0.45; color: inherit;" />
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
</a-tooltip>
</template>
</a-input>
@@ -422,7 +423,7 @@ onMounted(() => {
{{ t('views.ne.common.ipAddrTip') }}
</div>
</template>
<InfoCircleOutlined style="opacity: 0.45; color: inherit;" />
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
</a-tooltip>
</template>
</a-input>
@@ -447,7 +448,7 @@ onMounted(() => {
<template #title>
<div>{{ t('views.ne.common.portTip') }}</div>
</template>
<InfoCircleOutlined style="opacity: 0.45; color: inherit;" />
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
</a-tooltip>
</template>
</a-input-number>

View File

@@ -1,7 +1,8 @@
import { reactive, toRaw } from 'vue';
import { getPara5GFilee, savePara5GFile, updateNeInfo } from '@/api/ne/neInfo';
import useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
const neListStore = useNeListStore();
/**对象信息信息状态类型 */
type StateType = {
@@ -37,7 +38,7 @@ export function usePara5G() {
/**载入数据*/
function fnReloadData() {
state.confirmLoading = true;
Promise.all([getPara5GFilee(), useNeInfoStore().fnRefreshNelist()]).then(
Promise.all([getPara5GFilee(), neListStore.fnNelistRefresh()]).then(
resArr => {
// 已保存的配置
if (resArr[0].code === RESULT_CODE_SUCCESS) {

View File

@@ -4,14 +4,14 @@ import { PageContainer } from 'antdv-pro-layout';
import { Modal, TableColumnsType, 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 useNeInfoStore from '@/store/modules/neinfo';
import useNeListStore from '@/store/modules/ne_list';
import useI18n from '@/hooks/useI18n';
import { NE_TYPE_LIST } from '@/constants/ne-constants';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listNeSoftware, delNeSoftware } from '@/api/ne/neSoftware';
import { parseDateToStr } from '@/utils/date-utils';
import { downloadFile } from '@/api/tool/file';
import { saveAs } from 'file-saver';
const neListStore = useNeListStore();
const { t } = useI18n();
// 异步加载组件
@@ -22,9 +22,6 @@ const UploadMoreFile = defineAsyncComponent(
() => import('./components/UploadMoreFile.vue')
);
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
/**查询参数 */
let queryParams = reactive({
/**网元类型 */
@@ -127,7 +124,7 @@ let tableColumns = ref<TableColumnsType>([
if (!opt.value) return '';
return parseDateToStr(opt.value);
},
width: 150,
width: 200,
},
{
title: t('common.operate'),
@@ -191,7 +188,7 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listNeSoftware(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.code === RESULT_CODE_SUCCESS) {
const { total, rows } = res.data;
tablePagination.total = total;
tableState.data = rows;
@@ -335,23 +332,8 @@ function fnRecordMore(type: string | number, row: Record<string, any>) {
}
onMounted(() => {
// 获取网元网元列表
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
neOtions.value = useNeInfoStore().getNeSelectOtions;
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
})
.finally(() => {
// 获取列表数据
fnGetList();
});
// 获取列表数据
fnGetList();
});
</script>
@@ -369,7 +351,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')"
/>
@@ -505,7 +487,7 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:scroll="{ x: tableColumns.length * 150 }"
:scroll="{ x: tableColumns.length * 180 }"
@resizeColumn="(w:number, col:any) => (col.width = w)"
:row-selection="{
type: 'checkbox',

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',