Browse Source

关联表单

qin_s5
herenshan112 2 weeks ago
parent
commit
769a4aeb9c
  1. 38
      src/views/sysworkflow/lowcodepage/appPage/appPageForm/unitsPageFrom/attribute.vue

38
src/views/sysworkflow/lowcodepage/appPage/appPageForm/unitsPageFrom/attribute.vue

@ -16,7 +16,7 @@ import type { UploadInstance, UploadProps, UploadRawFile,ElTree } from "element-
import { ElMessage, genFileId } from "element-plus";
import { getAssociatedFormsCurrentFieldTree, getAssociatedFormsOrgAndManTree, getCustomerFormList, getAsfasfFieldTree, getAsfasfFieldTreeOptionsValue3, getPersonByRoleId, getAllRole,getQrCodeImgInside, getAssociatedFormsRoleTree } from "@/api/javaRequest";
import Draggable from "vuedraggable-es";
import AssociatedformsForCreate from "@/widget/associatedforms/associatedFormsForCreate.vue";
//
import MathFormula from "@/components/DesignForm/math/mathFormula.vue";
import { orgInfo } from "@/api/hr/org/type";
@ -6143,26 +6143,28 @@ function mergeAndFilterAssociatedForms(treeA, treeB) {
return cTree;
}
const asfsCurrentTable = computed(()=>{
let currentTable: any[] = []
let count = 0
let result = []
xTree.value.forEach((element:any) => {
const asfsCurrentTable = computed(() => {
const matchingNodes: any[] = [];
if(getAfterLastColon(element.value) == controlData.value.name){
currentTable.push(element)
count++
}
});
console.log("xTree.value------------------>",xTree.value)
if(count>0){
result = currentTable[0].children
}else{
result = []
//
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);
}
}
}
return result
})
traverse(xTree.value);
// children
return matchingNodes.length > 0 ? matchingNodes[0].children || [] : [];
});

Loading…
Cancel
Save