|
@@ -178,6 +178,8 @@ const treeProps = {
|
|
}
|
|
}
|
|
const curNode = ref({})
|
|
const curNode = ref({})
|
|
const treeNodeTap = (data, node) => {
|
|
const treeNodeTap = (data, node) => {
|
|
|
|
+ console.log(node, 'node')
|
|
|
|
+
|
|
nodeInfo.value = data
|
|
nodeInfo.value = data
|
|
curNode.value = node
|
|
curNode.value = node
|
|
searchForm.value.parentId = data.id
|
|
searchForm.value.parentId = data.id
|
|
@@ -261,9 +263,42 @@ const linkClose = ()=>{
|
|
isAssociationShow.value = false
|
|
isAssociationShow.value = false
|
|
|
|
|
|
getTableData().then()
|
|
getTableData().then()
|
|
- refreshTree()
|
|
|
|
|
|
+ refreshTreeData()
|
|
|
|
+}
|
|
|
|
+const refreshTreeData = ()=>{
|
|
|
|
+ //刷新左边树形数据
|
|
|
|
+ if (curNode.value.level === 1) {
|
|
|
|
+ refreshTree()
|
|
|
|
+ nextTick(()=>{
|
|
|
|
+ defaultExpandKey.value.push(curNode.value.data.id)
|
|
|
|
+ treeRef.value.setCurrentKey(curNode.value.data.id)
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ updateTreeNewNode()
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const updateTreeNewNode = ()=>{
|
|
|
|
+ privateApi. tabTypeLazyTree(
|
|
|
|
+ { parentId: nodeInfo.value.parentId, projectId: projectId.value, current: 1, size: 1000 },
|
|
|
|
+ ).then((res) => {
|
|
|
|
+ treeRef.value.updateKeyChildren(
|
|
|
|
+ nodeInfo.value.parentId,
|
|
|
|
+ res.data.records,
|
|
|
|
+ )
|
|
|
|
+ nextTick(()=>{
|
|
|
|
+ treeRef.value.setCurrentKey(curNode.value.data.id)
|
|
|
|
+ let arr = getArrValue(res.data.records)
|
|
|
|
+ arr.forEach((ele)=>{
|
|
|
|
+ if (ele.id === curNode.value.data.id) {
|
|
|
|
+ tableData.value = [ele]
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ })
|
|
}
|
|
}
|
|
-
|
|
|
|
//公式配置
|
|
//公式配置
|
|
const elementFormulasObj = ref({})
|
|
const elementFormulasObj = ref({})
|
|
const elementFormulasShow = ref(false)
|
|
const elementFormulasShow = ref(false)
|