Browse Source

更新依赖

ZaiZai 4 tháng trước cách đây
mục cha
commit
659d0af1a6

+ 1 - 1
package.json

@@ -22,7 +22,7 @@
         "dayjs": "^1.11.13",
         "echarts": "^5.5.1",
         "element-plus": "2.8.7",
-        "hc-vue3-ui": "^4.4.1",
+        "hc-vue3-ui": "^4.4.2",
         "js-base64": "^3.7.7",
         "js-fast-way": "^0.5.6",
         "js-md5": "^0.8.3",

+ 3 - 0
src/styles/view/project/edit-formula.scss

@@ -65,6 +65,9 @@
                 box-shadow: none;
             }
         }
+        .hc-div-new-card-box.reset-fun-left-card .el-scrollbar__bar.is-vertical {
+            right: -8px;
+        }
     }
     //没有滚动条,拉满
     .hc-project-list-edit-formula-card.is-no-scroll {

+ 26 - 4
src/views/project/list/edit-formula.vue

@@ -77,9 +77,11 @@
 
 <script setup>
 import { nextTick, ref, watch } from 'vue'
+import { useClick } from 'hc-vue3-ui'
 import { deepClone, getArrValue, getObjValue, isNullES } from 'js-fast-way'
 import mainApi from '~api/project/formula'
 import eleApi from '~api/project/element'
+import treeApi from '~api/wbs/tree'
 import priApi from '~api/wbs/private'
 
 const props = defineProps({
@@ -236,18 +238,22 @@ const treeResetFunLazyLoad = async (node, resolve) => {
                 treeResetFunLazyRef.value?.setCurrentKey(paramsId)
             }
         } catch { /* empty */ }
-
+        //获取节点详情
+        await getNodeDetailApi(treeNode)
     } else if (eleType) {
         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 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)

+ 4 - 4
yarn.lock

@@ -2063,10 +2063,10 @@ has-flag@^4.0.0:
   resolved "http://39.108.216.210:9000/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
   integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
 
-hc-vue3-ui@^4.4.1:
-  version "4.4.1"
-  resolved "http://39.108.216.210:9000/hc-vue3-ui/-/hc-vue3-ui-4.4.1.tgz#f6170dcfac0ba7f12a6e17d20a9476a7997367b3"
-  integrity sha512-tUpvPIird5VyX6oFqpweW1JhhFd0UQcuh7d+AiHQpneUPxRUygjC31jhGWDd1sE+MNmxt9gPZMk+BjbQxZZ1Kg==
+hc-vue3-ui@^4.4.2:
+  version "4.4.2"
+  resolved "http://39.108.216.210:9000/hc-vue3-ui/-/hc-vue3-ui-4.4.2.tgz#e8ece1e11c6ebe544092f35a7f9d562d097f87a2"
+  integrity sha512-hHO0WD3ODm1E0Aw6YQBo2tJVU2ci22TkUFdBlQatRkDSe3Sv04qUBVoj1L7HGnXSLcNS9NzCejudoxdJhi1UIA==
   dependencies:
     axios "^1.7.7"
     dayjs "^1.11.13"