代码调整

This commit is contained in:
dong 2023-11-07 16:34:11 +08:00
parent 0343baabb6
commit 5982bc957f

View File

@ -251,6 +251,7 @@ function onCreate() {
createFormShow.value = false;
tableRef.value.requestServerInteraction(); //
} catch (err) {
console.log(err);
const error = err as ApiError;
$q.notify({
type: 'negative',
@ -360,13 +361,14 @@ function getObjData(fieldInfo: Description, obj: obj) {
const key = fieldInfo.fieldName;
if (fieldInfo.type == 'array') {
obj[key] = [];
(fieldInfo.val as []).forEach((ii: Description[]) => {
const iiObj = {};
ii.forEach((e: Description) => {
getObjData(e, iiObj);
fieldInfo.val &&
(fieldInfo.val as []).forEach((ii: Description[]) => {
const iiObj = {};
ii.forEach((e: Description) => {
getObjData(e, iiObj);
});
obj[key].push(iiObj);
});
obj[key].push(iiObj);
});
} else if (fieldInfo.type == 'map') {
const value = {};
obj[key] = value;