Commit 6ff2a0ab by fairyly

fix: 修改后端配置

parent 37c48cb5
......@@ -131,16 +131,18 @@ export default {
}
}
}
console.log('obj.type:',obj.type)
// 设置子级禁用和不禁用
if (obj.type == 'object' && Object.keys(obj.properties).length) {
obj.isRootKeyFlag = false;
for (let k in obj.properties) {
obj.properties[k].isRootKeyFlag = obj.isRootKey ? true : false;
if (obj.properties[k].type == 'object' && Object.keys(obj.properties[k].properties).length) {
console.log(0)
obj.isRootKey ? await that.checkArrObjData(obj.properties[k].properties) : await that.checkArrObjFalse(obj.properties[k].properties);
}
if (obj.properties[k].type == 'array' && Object.keys(obj.properties[k].items.properties).length) {
console.log(1,obj.isRootKey, obj.isRootKey? 2:3)
obj.isRootKey ? await that.checkArrObjData(obj.properties[k].items.properties) : await that.checkArrObjFalse(obj.properties[k].items.properties);
}
}
......@@ -152,6 +154,7 @@ export default {
if (obj.items.properties[key].type == 'object' && Object.keys(obj.items.properties[key].properties).length) {
obj.isRootKey ? await that.checkArrObjData(obj.items.properties[key].properties) : await that.checkArrObjFalse(obj.items.properties[key].properties);
}
console.log(obj.items.properties[key].properties)
if (obj.items.properties[key].type == 'array' && Object.keys(obj.items.properties[key].properties).length) {
obj.isRootKey ? await that.checkArrObjData(obj.items.properties[key].items.properties) : await that.checkArrObjFalse(obj.items.properties[key].items.properties);
}
......@@ -167,11 +170,13 @@ export default {
item[k].isRootKeyFlag = true;
await that.checkArrObjData(item[k].properties);
}
console.log('true:',item[k])
if (item[k].type == 'array' && Object.keys(item[k].items.properties).length) {
item[k].isRootKeyFlag = true;
await that.checkArrObjData(item[k].items.properties);
}
}
that.$forceUpdate();
},
async checkArrObjFalse(item) {
const that = this;
......@@ -179,13 +184,15 @@ export default {
item[k].isRootKeyFlag = false;
if (item[k].type == 'object' && Object.keys(item[k].properties).length) {
item[k].isRootKeyFlag = false;
await that.checkArrObjData(item[k].properties);
await that.checkArrObjFalse(item[k].properties);
}
console.log('false:',item[k])
if (item[k].type == 'array' && Object.keys(item[k].items.properties).length) {
item[k].isRootKeyFlag = true;
await that.checkArrObjData(item[k].items.properties);
item[k].isRootKeyFlag = false;
await that.checkArrObjFalse(item[k].items.properties);
}
}
that.$forceUpdate();
},
/**
* 处理
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment