feat: 配置管理>参数配置
This commit is contained in:
@@ -2,6 +2,36 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
|||||||
import { request } from '@/plugins/http-fetch';
|
import { request } from '@/plugins/http-fetch';
|
||||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询配置参数标签栏
|
||||||
|
* @param neType 网元类型
|
||||||
|
* @returns object
|
||||||
|
*/
|
||||||
|
export async function getParamConfigTopTab(neType : string ) {
|
||||||
|
// 发起请求
|
||||||
|
const result = await request({
|
||||||
|
url: `/databaseManagement/v1/elementType/omc_db/objectType/param_config`,
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
SQL: `SELECT top_display,top_tag FROM param_config WHERE ne_type = '${neType}'`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
// 解析数据
|
||||||
|
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||||
|
let data = result.data.data[0];
|
||||||
|
data = data['param_config']
|
||||||
|
if(Array.isArray(data)){
|
||||||
|
return Object.assign(result, {
|
||||||
|
data: parseObjLineToHump(data),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return Object.assign(result, {
|
||||||
|
data: [],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询网元列表
|
* 查询网元列表
|
||||||
* @param query 查询参数
|
* @param query 查询参数
|
||||||
|
|||||||
@@ -1,21 +1,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { reactive, ref, onMounted, toRaw } from 'vue';
|
import { reactive, ref, onMounted } from 'vue';
|
||||||
import { PageContainer } from '@ant-design-vue/pro-layout';
|
import { PageContainer } from '@ant-design-vue/pro-layout';
|
||||||
import { message, Modal, Form, CascaderProps } from 'ant-design-vue/lib';
|
import { message } from 'ant-design-vue/lib';
|
||||||
import { SizeType } from 'ant-design-vue/lib/config-provider';
|
|
||||||
import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface';
|
|
||||||
import { ColumnsType } from 'ant-design-vue/lib/table';
|
|
||||||
import {
|
|
||||||
listNeInfo,
|
|
||||||
getNeInfo,
|
|
||||||
addNeInfo,
|
|
||||||
updateNeInfo,
|
|
||||||
delNeInfo,
|
|
||||||
} from '@/api/configManage/neManage';
|
|
||||||
import { parseDateToStr } from '@/utils/date-utils';
|
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
|
import { getParamConfigTopTab } from '@/api/configManage/configParam';
|
||||||
|
import { TabPosition } from 'ant-design-vue/lib/tabs/src/interface';
|
||||||
|
import useNeInfoStore from '@/store/modules/neinfo';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
@@ -25,398 +17,100 @@ let title = ref<string>((route.meta.title as string) ?? '标题');
|
|||||||
/**查询参数 */
|
/**查询参数 */
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
/**网元类型 */
|
/**网元类型 */
|
||||||
neType: '',
|
neType: [''],
|
||||||
/**当前页数 */
|
|
||||||
pageNum: 1,
|
|
||||||
/**每页条数 */
|
|
||||||
pageSize: 20,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
let value = ref<string[]>([]);
|
/**tab标签栏类型 */
|
||||||
const options = ref<CascaderProps['options']>([
|
type TabStateType = {
|
||||||
{
|
/**标签项 */
|
||||||
value: 'zhejiang',
|
tabNames: Record<string, any>[];
|
||||||
label: 'Zhejiang',
|
/**标签方向 */
|
||||||
isLeaf: false,
|
tabPosition: TabPosition;
|
||||||
},
|
/**标签高度 */
|
||||||
{
|
height: string;
|
||||||
value: 'jiangsu',
|
/**标签选择后加载配置等待 */
|
||||||
label: 'Jiangsu',
|
tabLoading: boolean;
|
||||||
isLeaf: false,
|
/**标签激活项 */
|
||||||
},
|
tabActiveKey: number;
|
||||||
]);
|
|
||||||
|
|
||||||
const loadData: CascaderProps['loadData'] = selectedOptions => {
|
|
||||||
const targetOption = selectedOptions[selectedOptions.length - 1];
|
|
||||||
targetOption.loading = true;
|
|
||||||
|
|
||||||
// load options lazily
|
|
||||||
setTimeout(() => {
|
|
||||||
targetOption.loading = false;
|
|
||||||
targetOption.children = [
|
|
||||||
{
|
|
||||||
label: `${targetOption.label} Dynamic 1`,
|
|
||||||
value: 'dynamic1',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: `${targetOption.label} Dynamic 2`,
|
|
||||||
value: 'dynamic2',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
options.value = [...options.value as any];
|
|
||||||
}, 1000);
|
|
||||||
};
|
};
|
||||||
/**查询参数重置 */
|
let tabState: TabStateType = reactive({
|
||||||
function fnQueryReset() {
|
tabNames: [],
|
||||||
queryParams = Object.assign(queryParams, {
|
tabPosition: 'top',
|
||||||
neType: '',
|
height: '800px',
|
||||||
pageNum: 1,
|
tabLoading: true,
|
||||||
pageSize: 20,
|
tabActiveKey: 1,
|
||||||
});
|
|
||||||
tablePagination.current = 1;
|
|
||||||
tablePagination.pageSize = 20;
|
|
||||||
fnGetList();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**表格状态类型 */
|
|
||||||
type TabeStateType = {
|
|
||||||
/**加载等待 */
|
|
||||||
loading: boolean;
|
|
||||||
/**紧凑型 */
|
|
||||||
size: SizeType;
|
|
||||||
/**搜索栏 */
|
|
||||||
seached: boolean;
|
|
||||||
/**记录数据 */
|
|
||||||
data: object[];
|
|
||||||
/**勾选记录 */
|
|
||||||
selectedRowKeys: (string | number)[];
|
|
||||||
};
|
|
||||||
|
|
||||||
/**表格状态 */
|
|
||||||
let tableState: TabeStateType = reactive({
|
|
||||||
loading: false,
|
|
||||||
size: 'middle',
|
|
||||||
seached: true,
|
|
||||||
data: [],
|
|
||||||
selectedRowKeys: [],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**表格字段列 */
|
/**查询网元类型 */
|
||||||
let tableColumns: ColumnsType = [
|
function fnGetParamConfigTopTab() {
|
||||||
{
|
if (!queryParams.neType || queryParams.neType.length != 2) {
|
||||||
title: '网元类型',
|
message.warning({
|
||||||
dataIndex: 'neType',
|
content: `请选择网元类型`,
|
||||||
align: 'center',
|
duration: 2,
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '网元内部标识',
|
|
||||||
dataIndex: 'neId',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '资源唯一标识',
|
|
||||||
dataIndex: 'rmUid',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '网元名称',
|
|
||||||
dataIndex: 'neName',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'IP地址',
|
|
||||||
dataIndex: 'ip',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '网元地址',
|
|
||||||
dataIndex: 'neAddress',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '端口',
|
|
||||||
dataIndex: 'port',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '网元虚拟化标识',
|
|
||||||
dataIndex: 'pvFlag',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '网元所在省份',
|
|
||||||
dataIndex: 'province',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '厂商名称',
|
|
||||||
dataIndex: 'vendorName',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '网络标识',
|
|
||||||
dataIndex: 'dn',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '修改时间',
|
|
||||||
dataIndex: 'updateTime',
|
|
||||||
align: 'center',
|
|
||||||
customRender(opt) {
|
|
||||||
if (!opt.value) return '';
|
|
||||||
return parseDateToStr(opt.value);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
key: 'id',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
/**表格分页器参数 */
|
|
||||||
let tablePagination = reactive({
|
|
||||||
/**当前页数 */
|
|
||||||
current: 1,
|
|
||||||
/**每页条数 */
|
|
||||||
pageSize: 20,
|
|
||||||
/**默认的每页条数 */
|
|
||||||
defaultPageSize: 20,
|
|
||||||
/**指定每页可以显示多少条 */
|
|
||||||
pageSizeOptions: ['10', '20', '50', '100'],
|
|
||||||
/**只有一页时是否隐藏分页器 */
|
|
||||||
hideOnSinglePage: false,
|
|
||||||
/**是否可以快速跳转至某页 */
|
|
||||||
showQuickJumper: true,
|
|
||||||
/**是否可以改变 pageSize */
|
|
||||||
showSizeChanger: true,
|
|
||||||
/**数据总数 */
|
|
||||||
total: 0,
|
|
||||||
showTotal: (total: number) => `总共 ${total} 条`,
|
|
||||||
onChange: (page: number, pageSize: number) => {
|
|
||||||
tablePagination.current = page;
|
|
||||||
tablePagination.pageSize = pageSize;
|
|
||||||
queryParams.pageNum = page;
|
|
||||||
queryParams.pageSize = pageSize;
|
|
||||||
fnGetList();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
/**表格紧凑型变更操作 */
|
|
||||||
function fnTableSize({ key }: MenuInfo) {
|
|
||||||
tableState.size = key as SizeType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**对话框对象信息状态类型 */
|
|
||||||
type ModalStateType = {
|
|
||||||
/**详情框是否显示 */
|
|
||||||
visibleByView: boolean;
|
|
||||||
/**新增框或修改框是否显示 */
|
|
||||||
visibleByEdit: boolean;
|
|
||||||
/**标题 */
|
|
||||||
title: string;
|
|
||||||
/**表单数据 */
|
|
||||||
from: Record<string, any>;
|
|
||||||
/**确定按钮 loading */
|
|
||||||
confirmLoading: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**对话框对象信息状态 */
|
|
||||||
let modalState: ModalStateType = reactive({
|
|
||||||
visibleByView: false,
|
|
||||||
visibleByEdit: false,
|
|
||||||
title: '网元',
|
|
||||||
from: {
|
|
||||||
dn: '网络标识',
|
|
||||||
ip: '192.168.4.132',
|
|
||||||
neAddress: '192.160.0.107',
|
|
||||||
neId: '网元内部标识',
|
|
||||||
neName: '网元名称',
|
|
||||||
neType: 'AMF',
|
|
||||||
port: '3030',
|
|
||||||
province: '网元所在省份',
|
|
||||||
pvFlag: '',
|
|
||||||
rmUid: '资源唯一标识',
|
|
||||||
vendorName: '厂商名称',
|
|
||||||
},
|
|
||||||
confirmLoading: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
/**对话框内表单属性和校验规则 */
|
|
||||||
const modalStateFrom = Form.useForm(
|
|
||||||
modalState.from,
|
|
||||||
reactive({
|
|
||||||
ne_type: [{ required: true, message: '网元类型不能为空' }],
|
|
||||||
ne_id: [{ required: true, message: '网元内部标识不能为空' }],
|
|
||||||
rm_uid: [{ required: true, message: '资源唯一标识不能为空' }],
|
|
||||||
ip: [{ required: true, message: 'IP地址不能为空' }],
|
|
||||||
port: [{ required: true, message: '端口不能为空' }],
|
|
||||||
pv_flag: [{ required: true, message: '请选择网元虚拟化标识' }],
|
|
||||||
ne_name: [{ required: true, message: '网元名称不能为空' }],
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 对话框弹出显示为 新增或者修改
|
|
||||||
* @param noticeId 网元id, 不传为新增
|
|
||||||
*/
|
|
||||||
function fnModalVisibleByEdit(row?: Record<string, any>) {
|
|
||||||
if (!row) {
|
|
||||||
modalStateFrom.resetFields();
|
|
||||||
modalState.title = '添加网元';
|
|
||||||
modalState.visibleByEdit = true;
|
|
||||||
} else {
|
|
||||||
if (modalState.confirmLoading) return;
|
|
||||||
const hide = message.loading('正在打开...', 0);
|
|
||||||
modalState.confirmLoading = true;
|
|
||||||
getNeInfo(row.id).then(res => {
|
|
||||||
modalState.confirmLoading = false;
|
|
||||||
hide();
|
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
|
||||||
modalState.from = Object.assign(modalState.from, res.data);
|
|
||||||
modalState.title = '修改网元';
|
|
||||||
modalState.visibleByEdit = true;
|
|
||||||
} else {
|
|
||||||
message.error(`获取网元信息失败`, 2);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
const neType = queryParams.neType[0];
|
||||||
|
getParamConfigTopTab(neType).then(res => {
|
||||||
/**
|
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||||
* 对话框弹出确认执行函数
|
tabState.tabNames = res.data;
|
||||||
* 进行表达规则校验
|
} else {
|
||||||
*/
|
message.warning({
|
||||||
function fnModalOk() {
|
content: `暂无配置项数据`,
|
||||||
modalStateFrom
|
duration: 2,
|
||||||
.validate()
|
|
||||||
.then(e => {
|
|
||||||
modalState.confirmLoading = true;
|
|
||||||
const from = toRaw(modalState.from);
|
|
||||||
const result = from.id ? updateNeInfo(from) : addNeInfo(from);
|
|
||||||
const hide = message.loading({ content: t('common.loading') });
|
|
||||||
result
|
|
||||||
.then(res => {
|
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
|
||||||
message.success({
|
|
||||||
content: t('common.msgSuccess', { msg: modalState.title }),
|
|
||||||
duration: 3,
|
|
||||||
});
|
|
||||||
modalState.visibleByEdit = false;
|
|
||||||
modalStateFrom.resetFields();
|
|
||||||
fnGetList();
|
|
||||||
} else {
|
|
||||||
message.error({
|
|
||||||
content: `${res.msg}`,
|
|
||||||
duration: 3,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hide();
|
|
||||||
modalState.confirmLoading = false;
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
message.error(t('common.errorFields', { num: e.errorFields.length }), 3);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 对话框弹出关闭执行函数
|
|
||||||
* 进行表达规则校验
|
|
||||||
*/
|
|
||||||
function fnModalCancel() {
|
|
||||||
modalState.visibleByEdit = false;
|
|
||||||
modalState.visibleByView = false;
|
|
||||||
modalStateFrom.resetFields();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 网元删除
|
|
||||||
* @param row 网元编号ID
|
|
||||||
*/
|
|
||||||
function fnRecordDelete(row: Record<string, any>) {
|
|
||||||
Modal.confirm({
|
|
||||||
title: '提示',
|
|
||||||
content: `确认删除网元编号为 【${row.id}】 的数据项?`,
|
|
||||||
onOk() {
|
|
||||||
const key = 'delNotice';
|
|
||||||
message.loading({ content: '请稍等...', key });
|
|
||||||
delNeInfo(row).then(res => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
message.success({
|
|
||||||
content: `删除成功`,
|
|
||||||
key,
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
fnGetList();
|
|
||||||
} else {
|
|
||||||
message.error({
|
|
||||||
content: `${res.msg}`,
|
|
||||||
key: key,
|
|
||||||
duration: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**查询网元列表 */
|
|
||||||
function fnGetList() {
|
|
||||||
if (tableState.loading) return;
|
|
||||||
tableState.loading = true;
|
|
||||||
listNeInfo(toRaw(queryParams)).then(res => {
|
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
|
|
||||||
// 取消勾选
|
|
||||||
if (tableState.selectedRowKeys.length > 0) {
|
|
||||||
tableState.selectedRowKeys = [];
|
|
||||||
}
|
|
||||||
tablePagination.total = res.total;
|
|
||||||
tableState.data = res.rows;
|
|
||||||
}
|
}
|
||||||
tableState.loading = false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取列表数据
|
// 获取网元网元列表
|
||||||
fnGetList();
|
useNeInfoStore()
|
||||||
|
.fnNelist()
|
||||||
|
.then(res => {
|
||||||
|
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||||
|
if (res.data.length > 0) {
|
||||||
|
const item = res.data[0];
|
||||||
|
queryParams.neType = [item.neType, item.neId];
|
||||||
|
fnGetParamConfigTopTab();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
message.warning({
|
||||||
|
content: `暂无网元列表数据`,
|
||||||
|
duration: 2,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<PageContainer :title="title">
|
<PageContainer :title="title">
|
||||||
<a-card
|
<a-card
|
||||||
v-show="tableState.seached"
|
|
||||||
:bordered="false"
|
:bordered="false"
|
||||||
:body-style="{ marginBottom: '24px', paddingBottom: 0 }"
|
:body-style="{ marginBottom: '24px', paddingBottom: 0 }"
|
||||||
>
|
>
|
||||||
<!-- 表格搜索栏 -->
|
<!-- 表格搜索栏 -->
|
||||||
<a-form :model="queryParams" name="queryParams" layout="horizontal">
|
<a-form :model="queryParams" name="queryParams" layout="horizontal">
|
||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="6" :md="12" :xs="24">{{ value }}
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="网元类型" name="neType ">
|
<a-form-item label="网元类型" name="neType ">
|
||||||
<a-cascader
|
<a-cascader
|
||||||
v-model:value="value"
|
v-model:value="queryParams.neType"
|
||||||
:options="options"
|
:options="useNeInfoStore().getNeOtions"
|
||||||
:load-data="loadData"
|
placeholder="请选择网元"
|
||||||
placeholder="Please select"
|
|
||||||
change-on-select
|
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :xs="24">
|
<a-col :lg="6" :md="12" :xs="24">
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<a-space :size="8">
|
<a-space :size="8">
|
||||||
<a-button type="primary" @click.prevent="fnGetList">
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
@click.prevent="fnGetParamConfigTopTab"
|
||||||
|
>
|
||||||
<template #icon><SearchOutlined /></template>
|
<template #icon><SearchOutlined /></template>
|
||||||
{{ t('common.search') }}
|
{{ t('common.ok') }}
|
||||||
</a-button>
|
|
||||||
<a-button type="default" @click.prevent="fnQueryReset">
|
|
||||||
<template #icon><ClearOutlined /></template>
|
|
||||||
{{ t('common.reset') }}
|
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -425,283 +119,33 @@ onMounted(() => {
|
|||||||
</a-form>
|
</a-form>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
||||||
<a-card :bordered="false" :body-style="{ padding: '0px' }">
|
<a-card :bordered="false" :body-style="{ paddingTop: '0px' }">
|
||||||
<!-- 插槽-卡片左侧侧 -->
|
<!-- 插槽-卡片左侧侧 -->
|
||||||
<template #title>
|
<template #title>
|
||||||
<a-space :size="8" align="center">
|
<a-space :size="8" align="center">
|
||||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()">
|
<a-button type="primary" @click.prevent="">
|
||||||
<template #icon><PlusOutlined /></template>
|
<template #icon><PlusOutlined /></template>
|
||||||
{{ t('common.addText') }}
|
{{ t('common.addText') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 插槽-卡片右侧 -->
|
<a-tabs
|
||||||
<template #extra>
|
v-model:activeKey="tabState.tabActiveKey"
|
||||||
<a-space :size="8" align="center">
|
:tab-position="tabState.tabPosition"
|
||||||
<a-tooltip>
|
:style="{ height: tabState.height }"
|
||||||
<template #title>{{ t('common.searchBarText') }}</template>
|
|
||||||
<a-switch
|
|
||||||
v-model:checked="tableState.seached"
|
|
||||||
:checked-children="t('common.switch.show')"
|
|
||||||
:un-checked-children="t('common.switch.hide')"
|
|
||||||
size="small"
|
|
||||||
/>
|
|
||||||
</a-tooltip>
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>{{ t('common.reloadText') }}</template>
|
|
||||||
<a-button type="text" @click.prevent="fnGetList">
|
|
||||||
<template #icon><ReloadOutlined /></template>
|
|
||||||
</a-button>
|
|
||||||
</a-tooltip>
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>{{ t('common.sizeText') }}</template>
|
|
||||||
<a-dropdown trigger="click">
|
|
||||||
<a-button type="text">
|
|
||||||
<template #icon><ColumnHeightOutlined /></template>
|
|
||||||
</a-button>
|
|
||||||
<template #overlay>
|
|
||||||
<a-menu
|
|
||||||
:selected-keys="[tableState.size as string]"
|
|
||||||
@click="fnTableSize"
|
|
||||||
>
|
|
||||||
<a-menu-item key="default">{{
|
|
||||||
t('common.size.default')
|
|
||||||
}}</a-menu-item>
|
|
||||||
<a-menu-item key="middle">{{
|
|
||||||
t('common.size.middle')
|
|
||||||
}}</a-menu-item>
|
|
||||||
<a-menu-item key="small">{{
|
|
||||||
t('common.size.small')
|
|
||||||
}}</a-menu-item>
|
|
||||||
</a-menu>
|
|
||||||
</template>
|
|
||||||
</a-dropdown>
|
|
||||||
</a-tooltip>
|
|
||||||
</a-space>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- 表格列表 -->
|
|
||||||
<a-table
|
|
||||||
class="table"
|
|
||||||
row-key="id"
|
|
||||||
:columns="tableColumns"
|
|
||||||
:loading="tableState.loading"
|
|
||||||
:data-source="tableState.data"
|
|
||||||
:size="tableState.size"
|
|
||||||
:pagination="tablePagination"
|
|
||||||
:scroll="{ x: true }"
|
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ column, record }">
|
<a-tab-pane
|
||||||
<template v-if="column.key === 'id'">
|
v-for="tab in tabState.tabNames"
|
||||||
<a-space :size="8" align="center">
|
:key="tab.topTag"
|
||||||
<a-tooltip>
|
:tab="tab.topDisplay"
|
||||||
<template #title>{{ t('common.editText') }}</template>
|
>
|
||||||
<a-button
|
<a-spin :spinning="tabState.tabLoading">
|
||||||
type="link"
|
Content of tab {{ tab.topDisplay }}
|
||||||
@click.prevent="fnModalVisibleByEdit(record)"
|
</a-spin>
|
||||||
>
|
</a-tab-pane>
|
||||||
<template #icon><FormOutlined /></template>
|
</a-tabs>
|
||||||
</a-button>
|
|
||||||
</a-tooltip>
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>{{ t('common.deleteText') }}</template>
|
|
||||||
<a-button type="link" @click.prevent="fnRecordDelete(record)">
|
|
||||||
<template #icon><DeleteOutlined /></template>
|
|
||||||
</a-button>
|
|
||||||
</a-tooltip>
|
|
||||||
</a-space>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</a-table>
|
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
||||||
<!-- 新增框或修改框 -->
|
|
||||||
<a-modal
|
|
||||||
width="800px"
|
|
||||||
:keyboard="false"
|
|
||||||
:mask-closable="false"
|
|
||||||
:visible="modalState.visibleByEdit"
|
|
||||||
:title="modalState.title"
|
|
||||||
:confirm-loading="modalState.confirmLoading"
|
|
||||||
@ok="fnModalOk"
|
|
||||||
@cancel="fnModalCancel"
|
|
||||||
>
|
|
||||||
<a-form name="modalStateFrom" layout="horizontal">
|
|
||||||
<a-row :gutter="16">
|
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
|
||||||
<a-form-item
|
|
||||||
label="网元类型"
|
|
||||||
name="neType"
|
|
||||||
v-bind="modalStateFrom.validateInfos.neType"
|
|
||||||
>
|
|
||||||
<a-input
|
|
||||||
v-model:value="modalState.from.neType"
|
|
||||||
allow-clear
|
|
||||||
placeholder="请输入网元类型"
|
|
||||||
>
|
|
||||||
<template #prefix>
|
|
||||||
<a-tooltip placement="topLeft">
|
|
||||||
<template #title> 填写创建的网元类型,如:SMF </template>
|
|
||||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
|
||||||
</a-tooltip>
|
|
||||||
</template>
|
|
||||||
</a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
|
||||||
<a-form-item
|
|
||||||
label="网元内部标识"
|
|
||||||
name="neId"
|
|
||||||
v-bind="modalStateFrom.validateInfos.neId"
|
|
||||||
>
|
|
||||||
<a-input
|
|
||||||
v-model:value="modalState.from.neId"
|
|
||||||
allow-clear
|
|
||||||
placeholder="请输入网元内部标识"
|
|
||||||
></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
|
|
||||||
<a-row :gutter="16">
|
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
|
||||||
<a-form-item
|
|
||||||
label="资源唯一标识"
|
|
||||||
name="rmUid"
|
|
||||||
v-bind="modalStateFrom.validateInfos.rmUid"
|
|
||||||
>
|
|
||||||
<a-input
|
|
||||||
v-model:value="modalState.from.rmUid"
|
|
||||||
allow-clear
|
|
||||||
placeholder="请输入资源唯一标识"
|
|
||||||
>
|
|
||||||
</a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
|
||||||
<a-form-item
|
|
||||||
label="网元虚拟化标识"
|
|
||||||
name="pvFlag"
|
|
||||||
v-bind="modalStateFrom.validateInfos.pvFlag"
|
|
||||||
>
|
|
||||||
<a-select
|
|
||||||
v-model:value="modalState.from.pvFlag"
|
|
||||||
default-value="PNF"
|
|
||||||
placeholder="请选择网元虚拟化标识"
|
|
||||||
>
|
|
||||||
<a-select-opt-group label="物理网元">
|
|
||||||
<a-select-option value="PNF">PNF</a-select-option>
|
|
||||||
</a-select-opt-group>
|
|
||||||
<a-select-opt-group label="虚拟网元">
|
|
||||||
<a-select-option value="VNF">VNF</a-select-option>
|
|
||||||
</a-select-opt-group>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
|
|
||||||
<a-row :gutter="16">
|
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
|
||||||
<a-form-item
|
|
||||||
label="IP地址"
|
|
||||||
name="ip"
|
|
||||||
v-bind="modalStateFrom.validateInfos.ip"
|
|
||||||
>
|
|
||||||
<a-input
|
|
||||||
v-model:value="modalState.from.ip"
|
|
||||||
allow-clear
|
|
||||||
placeholder="请输入IP地址"
|
|
||||||
></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
|
||||||
<a-form-item
|
|
||||||
label="端口号"
|
|
||||||
name="port"
|
|
||||||
v-bind="modalStateFrom.validateInfos.port"
|
|
||||||
>
|
|
||||||
<a-input
|
|
||||||
v-model:value="modalState.from.port"
|
|
||||||
allow-clear
|
|
||||||
placeholder="请输入端口"
|
|
||||||
>
|
|
||||||
<template #prefix>
|
|
||||||
<a-tooltip placement="topLeft">
|
|
||||||
<template #title> <div>最大范围0~65535</div> </template>
|
|
||||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
|
||||||
</a-tooltip>
|
|
||||||
</template>
|
|
||||||
</a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
|
|
||||||
<a-row :gutter="16">
|
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
|
||||||
<a-form-item
|
|
||||||
label="网元名称"
|
|
||||||
name="neName"
|
|
||||||
v-bind="modalStateFrom.validateInfos.neName"
|
|
||||||
>
|
|
||||||
<a-input
|
|
||||||
v-model:value="modalState.from.neName"
|
|
||||||
allow-clear
|
|
||||||
placeholder="请输入网元名称"
|
|
||||||
>
|
|
||||||
</a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
|
||||||
<a-form-item label="网元地址" name="neAddress">
|
|
||||||
<a-input
|
|
||||||
v-model:value="modalState.from.neAddress"
|
|
||||||
allow-clear
|
|
||||||
placeholder="请输入网元地址"
|
|
||||||
><template #prefix>
|
|
||||||
<a-tooltip placement="topLeft">
|
|
||||||
<template #title>
|
|
||||||
<div>能够定位网元的物理地址(MAC)</div>
|
|
||||||
</template>
|
|
||||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
|
||||||
</a-tooltip> </template
|
|
||||||
></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
|
|
||||||
<a-row :gutter="16">
|
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
|
||||||
<a-form-item label="网元所在省份" name="province">
|
|
||||||
<a-input
|
|
||||||
v-model:value="modalState.from.province"
|
|
||||||
allow-clear
|
|
||||||
placeholder="请输入网元所在省份"
|
|
||||||
></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :lg="6" :md="6" :xs="24">
|
|
||||||
<a-form-item label="厂商名称" name="vendorName">
|
|
||||||
<a-input
|
|
||||||
v-model:value="modalState.from.vendorName"
|
|
||||||
allow-clear
|
|
||||||
placeholder="请输入厂商名称"
|
|
||||||
>
|
|
||||||
</a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :lg="6" :md="6" :xs="24">
|
|
||||||
<a-form-item label="网络标识" name="dn">
|
|
||||||
<a-input
|
|
||||||
v-model:value="modalState.from.dn"
|
|
||||||
allow-clear
|
|
||||||
placeholder="请输入网络标识"
|
|
||||||
></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
|
||||||
</a-modal>
|
|
||||||
</PageContainer>
|
</PageContainer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user