Browse Source

子表预填充设置解决子表被标签页嵌套时选择不到的问题

li_s1
liwenxuan 2 weeks ago
parent
commit
a4557fcc4c
  1. 34
      src/components/DesignForm/formControlPropertiNew.vue

34
src/components/DesignForm/formControlPropertiNew.vue

@ -5632,17 +5632,21 @@ function preFillDialogDetermine(){
preFillDialogFlag.value = false
}
const asfsCurrentTable = computed(()=>{
/* const asfsCurrentTable = computed(()=>{
let currentTable = []
let count = 0
let result = []
xTree.value.forEach((element:any) => {
console.log(getAfterLastColon(element.value))
console.log(controlData.value.name)
if(getAfterLastColon(element.value) == controlData.value.name){
currentTable.push(element)
count++
}
console.log("1111111111111111111111")
});
console.log("asfsCurrentTable(((((((((((((((((((((((())))))))))))))))))))))))")
console.log(count)
if(count>0){
result = currentTable[0].children
}else{
@ -5650,7 +5654,31 @@ const asfsCurrentTable = computed(()=>{
}
return result
})
}) */
const asfsCurrentTable = computed(() => {
const matchingNodes: any[] = [];
//
function traverse(nodes: any[]) {
for (const node of nodes) {
//
if (getAfterLastColon(node.value) === controlData.value.name) {
matchingNodes.push(node);
}
//
if (node.children && node.children.length > 0) {
traverse(node.children);
}
}
}
traverse(xTree.value);
// children
return matchingNodes.length > 0 ? matchingNodes[0].children || [] : [];
});
const asfPropsData = computed(()=>{
let result = {}

Loading…
Cancel
Save