feat: 参数配置表单竖向形式/多语言
This commit is contained in:
@@ -260,33 +260,27 @@ export async function getParamConfigInfoTable(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询配置参数标签栏对应信息-树结构处理
|
* 查询配置参数标签栏对应信息-表单结构处理
|
||||||
* @param neType 网元类型
|
* @param neType 网元类型
|
||||||
* @param topTag
|
* @param topTag
|
||||||
* @param neId
|
* @param neId
|
||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
export async function getParamConfigInfoTree(
|
export async function getParamConfigInfoForm(
|
||||||
neType: string,
|
neType: string,
|
||||||
topTag: string,
|
topTag: string,
|
||||||
neId: string
|
neId: string
|
||||||
) {
|
) {
|
||||||
const { wrRule, dataArr } = await getParamConfigInfo(neType, topTag, neId);
|
const { wrRule, dataArr } = await getParamConfigInfo(neType, topTag, neId);
|
||||||
|
|
||||||
type TreeNodeType = {
|
|
||||||
title: string;
|
|
||||||
key: string;
|
|
||||||
record: Record<string, any>[];
|
|
||||||
};
|
|
||||||
|
|
||||||
// 拼装数据
|
// 拼装数据
|
||||||
const result = {
|
const result = {
|
||||||
code: RESULT_CODE_SUCCESS,
|
code: RESULT_CODE_SUCCESS,
|
||||||
msg: RESULT_MSG_SUCCESS,
|
msg: RESULT_MSG_SUCCESS,
|
||||||
data: {
|
data: {
|
||||||
type: 'list' as 'list' | 'array',
|
type: 'list' as 'list' | 'array',
|
||||||
data: [] as TreeNodeType[],
|
data: [] as Record<string, any>[],
|
||||||
recordRule: {},
|
dataRule: {},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -298,7 +292,7 @@ export async function getParamConfigInfoTree(
|
|||||||
// 列表项数据
|
// 列表项数据
|
||||||
const dataList = [];
|
const dataList = [];
|
||||||
for (const item of dataArr) {
|
for (const item of dataArr) {
|
||||||
for (const key of Object.keys(item)) {
|
for (const key in item) {
|
||||||
// 规则为准
|
// 规则为准
|
||||||
for (const rule of ruleArr) {
|
for (const rule of ruleArr) {
|
||||||
if (rule['name'] === key) {
|
if (rule['name'] === key) {
|
||||||
@@ -322,7 +316,7 @@ export async function getParamConfigInfoTree(
|
|||||||
for (const item of dataArr) {
|
for (const item of dataArr) {
|
||||||
const index = item['index'];
|
const index = item['index'];
|
||||||
let record: Record<string, any>[] = [];
|
let record: Record<string, any>[] = [];
|
||||||
for (const key of Object.keys(item)) {
|
for (const key in item) {
|
||||||
// 规则为准
|
// 规则为准
|
||||||
for (const rule of ruleArr) {
|
for (const rule of ruleArr) {
|
||||||
if (rule['name'] === key) {
|
if (rule['name'] === key) {
|
||||||
@@ -339,11 +333,7 @@ export async function getParamConfigInfoTree(
|
|||||||
result.data.data = dataArray;
|
result.data.data = dataArray;
|
||||||
|
|
||||||
// 无数据时,用于新增
|
// 无数据时,用于新增
|
||||||
let dataRule: Record<string, any> = {};
|
result.data.dataRule = { title: `Index-0`, key: 0, record : [ruleArr]} ;
|
||||||
for (const rule of ruleArr) {
|
|
||||||
dataRule[rule.name] = rule;
|
|
||||||
}
|
|
||||||
result.data.recordRule = dataRule;
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -427,7 +427,30 @@ export default {
|
|||||||
editSure:'Are you sure you want to update this attribute value? ',
|
editSure:'Are you sure you want to update this attribute value? ',
|
||||||
arraryEdit:'Are you sure to submit the record whose updated Index is [{value}]? ',
|
arraryEdit:'Are you sure to submit the record whose updated Index is [{value}]? ',
|
||||||
addSure:'Are you sure to submit the new record of Index: [{value}]? '
|
addSure:'Are you sure to submit the new record of Index: [{value}]? '
|
||||||
}
|
},
|
||||||
|
configParamForm: {
|
||||||
|
neType: 'NE Type',
|
||||||
|
neTypePleace: "Please select the network element type",
|
||||||
|
noConfigData: "No data on configuration items",
|
||||||
|
updateValue: "The value of the {num} attribute was modified successfully.",
|
||||||
|
updateValueErr: "Attribute value modification failure",
|
||||||
|
updateItem: "Modify Index to {num}.",
|
||||||
|
updateItemErr: "Record modification failure",
|
||||||
|
delItemOk: "Deleting Index as {num} succeeded",
|
||||||
|
addItemOk: "Add Index as {num} Record Succeeded",
|
||||||
|
addItemErr: "Record addition failure",
|
||||||
|
requireUn: "{display} input value is of unknown type",
|
||||||
|
requireString: "The {display} parameter value does not make sense.",
|
||||||
|
requireInt: "{display} Parameter value not in reasonable range {filter}",
|
||||||
|
requireIpv4: "{display} not a legitimate IPV4 address",
|
||||||
|
requireIpv6: "{display} Not a legitimate IPV6 address.",
|
||||||
|
requireEnum: "{display} is not a reasonable enumeration value.",
|
||||||
|
requireBool: "{display} is not a reasonable boolean value.",
|
||||||
|
editOkTip: "Confirm updating the value of this {num} attribute?",
|
||||||
|
updateItemTip: "Confirm updating the data item with Index [{num}]?",
|
||||||
|
delItemTip: "Confirm deleting the data item with Index [{num}]?",
|
||||||
|
arrayMore: "commence",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
neUser: {
|
neUser: {
|
||||||
auth: {
|
auth: {
|
||||||
|
|||||||
@@ -426,8 +426,31 @@ export default {
|
|||||||
post:'提交',
|
post:'提交',
|
||||||
editSure:'确认更新该属性值吗?',
|
editSure:'确认更新该属性值吗?',
|
||||||
arraryEdit:'确认提交更新 Index 为 【{value}】 的记录吗?',
|
arraryEdit:'确认提交更新 Index 为 【{value}】 的记录吗?',
|
||||||
addSure:'确认提交新增 Index :【{value}】 的记录吗?'
|
addSure:'确认提交新增 Index :【{value}】 的记录吗?',
|
||||||
}
|
},
|
||||||
|
configParamForm: {
|
||||||
|
neType: "网元类型",
|
||||||
|
neTypePleace: "请选择网元类型",
|
||||||
|
noConfigData: "暂无配置项数据",
|
||||||
|
updateValue: "{num} 属性值修改成功",
|
||||||
|
updateValueErr: "属性值修改失败",
|
||||||
|
updateItem: "修改 Index 为 {num} 记录成功",
|
||||||
|
updateItemErr: "记录修改失败",
|
||||||
|
delItemOk: "删除 Index 为 {num} 记录成功",
|
||||||
|
addItemOk: "新增 Index 为 {num} 记录成功",
|
||||||
|
addItemErr: "记录新增失败",
|
||||||
|
requireUn: "{display} 输入值是未知类型",
|
||||||
|
requireString: "{display} 参数值不合理",
|
||||||
|
requireInt: "{display} 参数值不在合理范围 {filter}",
|
||||||
|
requireIpv4: "{display} 不是合法的IPV4地址",
|
||||||
|
requireIpv6: "{display} 不是合法的IPV6地址",
|
||||||
|
requireEnum: "{display} 不是合理的枚举值",
|
||||||
|
requireBool: "{display} 不是合理的布尔类型的值",
|
||||||
|
editOkTip: "确认更新该{num}属性值吗?",
|
||||||
|
updateItemTip: "确认更新Index为 【{num}】 的数据项?",
|
||||||
|
delItemTip: "确认删除Index为 【{num}】 的数据项?",
|
||||||
|
arrayMore: "展开",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
neUser: {
|
neUser: {
|
||||||
auth: {
|
auth: {
|
||||||
|
|||||||
1718
src/views/configManage/configParamForm/index.vue
Normal file
1718
src/views/configManage/configParamForm/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user