fix: 参数配置根据规则布尔类型转换
This commit is contained in:
@@ -434,8 +434,11 @@ function arrayAdd() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 根据规则类型转值
|
// 根据规则类型转值
|
||||||
if(['enum', 'int'].includes(v.type)){
|
if (['enum', 'int'].includes(v.type)) {
|
||||||
v.value = Number(v.value)
|
v.value = Number(v.value);
|
||||||
|
}
|
||||||
|
if ('bool' === v.type) {
|
||||||
|
v.value = Boolean(v.value);
|
||||||
}
|
}
|
||||||
row[v.name] = Object.assign({}, v);
|
row[v.name] = Object.assign({}, v);
|
||||||
}
|
}
|
||||||
@@ -1053,42 +1056,40 @@ function fnModalCancel() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
neInfoStore
|
neInfoStore.fnNelist().then(res => {
|
||||||
.fnNelist()
|
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||||
.then(res => {
|
if (res.data.length > 0) {
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
// 过滤不可用的网元
|
||||||
if (res.data.length > 0) {
|
neCascaderOptions.value = neInfoStore.getNeCascaderOptions.filter(
|
||||||
// 过滤不可用的网元
|
(item: any) => {
|
||||||
neCascaderOptions.value = neInfoStore.getNeCascaderOptions.filter(
|
return !['OMC'].includes(item.value);
|
||||||
(item: any) => {
|
|
||||||
return !['OMC'].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 === 'UPF');
|
if (neCascaderOptions.value.length === 0) {
|
||||||
if (item && item.children) {
|
message.warning({
|
||||||
const info = item.children[0];
|
content: t('common.noData'),
|
||||||
neTypeSelect.value = [info.neType, info.neId];
|
duration: 2,
|
||||||
} else {
|
});
|
||||||
const info = neCascaderOptions.value[0].children[0];
|
return;
|
||||||
neTypeSelect.value = [info.neType, info.neId];
|
|
||||||
}
|
|
||||||
fnGetParamConfigTopTab();
|
|
||||||
}
|
}
|
||||||
} else {
|
// 默认选择AMF
|
||||||
message.warning({
|
const item = neCascaderOptions.value.find(s => s.value === 'UPF');
|
||||||
content: t('common.noData'),
|
if (item && item.children) {
|
||||||
duration: 2,
|
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];
|
||||||
|
}
|
||||||
|
fnGetParamConfigTopTab();
|
||||||
}
|
}
|
||||||
});
|
} else {
|
||||||
|
message.warning({
|
||||||
|
content: t('common.noData'),
|
||||||
|
duration: 2,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user