Selaa lähdekoodia

归档树添加项目id参数

gangyj 2 vuotta sitten
vanhempi
commit
276e2d7949

+ 12 - 3
src/views/manager/projectinfo/archivetreeRule.vue

@@ -991,6 +991,8 @@ export default {
         },
         highVisible:false,
         configVisible:false,
+
+        projectId:'',
     }
   },
   methods: {
@@ -1102,7 +1104,8 @@ export default {
     async lazyTree (parentId) {//树节点懒加载
       const { data: res } = await lazyTree({
         parentId,
-        token: this.token
+        token: this.token,
+        projectId:this.projectId
       })
       console.log(res);
       if (res.code == 200 && res.msg == '操作成功') {
@@ -1208,7 +1211,8 @@ export default {
     },
     async archiveTreetree4 () {//全加载左侧树
       const { data: res } = await archiveTreetree({
-        token: this.token
+        token: this.token,
+        projectId:this.projectId
       })
       console.log(res);
       if (res.code == 200 && res.msg == "操作成功") {
@@ -1428,6 +1432,7 @@ export default {
       this.checkXuan = []
     },
     async archiveTreetree (da) {//右侧树全加载接口
+      da = Object.assign(da,{projectId:this.projectId})
       const { data: res } = await archiveTreetree(da)
       console.log(res);
       if (res.code == 200 && res.msg == "操作成功") {
@@ -1454,6 +1459,8 @@ export default {
       }
     },
     async archiveTreetree2 (da) {//右侧树全加载接口
+      da = Object.assign(da,{projectId:this.projectId})
+      //console.log(da,'ddddddda')
       const { data: res } = await archiveTreetree(da)
       console.log(res);
       if (res.code == 200 && res.msg == "操作成功") {
@@ -1500,7 +1507,9 @@ export default {
     this.archiveTreetree4()//全加载左侧树
   },
   mounted () {
-    this.heights = this.$refs.container.$el.offsetHeight
+    this.heights = this.$refs.container.$el.offsetHeight;
+
+    this.projectId = this.$route.query.projectId;
   }
 }
 </script>

+ 1 - 1
src/views/manager/projectinfo/archivetreeconfig.vue

@@ -126,7 +126,7 @@ export default {
       this.$router.push({
         path: '/manager/projectinfo/archivetreeRule',
         query: {
-         
+          projectId:'1578599210897772545',//暂时传参
         }
       });
     },