|
@@ -77,9 +77,11 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import { nextTick, ref, watch } from 'vue'
|
|
import { nextTick, ref, watch } from 'vue'
|
|
|
|
+import { useClick } from 'hc-vue3-ui'
|
|
import { deepClone, getArrValue, getObjValue, isNullES } from 'js-fast-way'
|
|
import { deepClone, getArrValue, getObjValue, isNullES } from 'js-fast-way'
|
|
import mainApi from '~api/project/formula'
|
|
import mainApi from '~api/project/formula'
|
|
import eleApi from '~api/project/element'
|
|
import eleApi from '~api/project/element'
|
|
|
|
+import treeApi from '~api/wbs/tree'
|
|
import priApi from '~api/wbs/private'
|
|
import priApi from '~api/wbs/private'
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -236,18 +238,22 @@ const treeResetFunLazyLoad = async (node, resolve) => {
|
|
treeResetFunLazyRef.value?.setCurrentKey(paramsId)
|
|
treeResetFunLazyRef.value?.setCurrentKey(paramsId)
|
|
}
|
|
}
|
|
} catch { /* empty */ }
|
|
} catch { /* empty */ }
|
|
-
|
|
|
|
|
|
+ //获取节点详情
|
|
|
|
+ await getNodeDetailApi(treeNode)
|
|
} else if (eleType) {
|
|
} else if (eleType) {
|
|
resolve([])
|
|
resolve([])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
//重置函数懒加载树点击
|
|
//重置函数懒加载树点击
|
|
-const treeResetFunLazyClick = () => {
|
|
|
|
-
|
|
|
|
|
|
+const treeResetFunItemData = ref({})
|
|
|
|
+const treeResetFunNodeData = ref({})
|
|
|
|
+const treeResetFunLazyClick = async (data, node) => {
|
|
|
|
+ treeResetFunItemData.value = data
|
|
|
|
+ treeResetFunNodeData.value = node
|
|
|
|
+ await getNodeDetailApi(data)
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
//重置函数树搜索
|
|
//重置函数树搜索
|
|
const resetFunTree = ref('')
|
|
const resetFunTree = ref('')
|
|
const resetFunTreeSearch = () => {
|
|
const resetFunTreeSearch = () => {
|
|
@@ -260,6 +266,22 @@ const resetFunEleSearch = () => {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//获取节点详情
|
|
|
|
+const getNodeDetailApi = async (item) => {
|
|
|
|
+ await useClick(300)
|
|
|
|
+ if (isNullES(item.initTableId)) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (item.hasChildren === false || item.isLinkTable === 2) {
|
|
|
|
+ const { data } = await treeApi.getTableElments({
|
|
|
|
+ id: item.initTableId,
|
|
|
|
+ })
|
|
|
|
+ console.log(data)
|
|
|
|
+ } else {
|
|
|
|
+ console.log('no')
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
|
|
//保存
|
|
//保存
|
|
const submitLoading = ref(false)
|
|
const submitLoading = ref(false)
|