소스 검색

资料填报加载树更改

duy 2 년 전
부모
커밋
3b50404fa5
1개의 변경된 파일16개의 추가작업 그리고 2개의 파일을 삭제
  1. 16 2
      src/views/data-fill/wbs.vue

+ 16 - 2
src/views/data-fill/wbs.vue

@@ -930,8 +930,23 @@ watch(() => [
     if (search.length == 0) {
         isSearchTree.value = false
     }
+    
 })
 
+//加载树需要的classType
+const classType = ref('')
+watch(() => [
+    classType.value,
+], ([classify]) => {
+ if (classify) {
+      //重新加载左边树
+      isShowLeft.value = false
+        setTimeout(()=>{
+            isShowLeft.value = true
+        }, 500)
+ }
+    
+})
 //渲染完成
 onMounted(() => {
     treeLoading.value = typeName === 'tree'
@@ -939,8 +954,6 @@ onMounted(() => {
     getDictionaryApi()
 })
 
-//加载树需要的classType
- const classType = ref('')
 //身份按钮切换数据
 const authBtnTabKey = ref('1')
 
@@ -1135,6 +1148,7 @@ const searchTreeClick = async () => {
 //懒加载的数据
 const treeLoadNode = async ({ node, item, level }, resolve) => {
     let contractIdRelation = '', parentId = '', primaryKeyId = ''
+    console.log(classType.value, 'classType1111')
     if (level !== 0) {
         const nodeData = getObjValue(item)
         contractIdRelation = nodeData?.contractIdRelation || ''