|
|
|
@ -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 || [] : []; |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|