liuqiao 1 năm trước cách đây
mục cha
commit
0eee9ab0fd
2 tập tin đã thay đổi với 72 bổ sung26 xóa
  1. 13 10
      src/views/index/HCFDLab/index.vue
  2. 59 16
      src/views/index/index.vue

+ 13 - 10
src/views/index/HCFDLab/index.vue

@@ -2424,14 +2424,14 @@
           <span class="formLabelWidth8">{{ $t("HCFD.physics.zaxis") }}</span>
           <el-input v-model="parameterObj.nmlParam.y_moment_length"></el-input>
         </li>
-        <li class=" liitem liangf">
+        <!-- <li class=" liitem liangf">
           <span class="formLabelWidth8">{{ $t("HCFD.physics.momentc") }}</span>
           <el-input v-model="parameterObj.nmlParam.x_moment_center"></el-input>
-        </li>
-        <li class=" liitem liangf">
+        </li> -->
+        <!-- <li class=" liitem liangf">
           <span class="formLabelWidth8">{{ $t("HCFD.physics.xcoordinate") }}</span>
           <el-input v-model="parameterObj.nmlParam.x_moment_center"></el-input>
-        </li>
+        </li> -->
         <li class=" liitem liangf">
           <span class="formLabelWidth8">{{ $t("HCFD.physics.ycoordinate") }}</span>
           <el-input v-model="parameterObj.nmlParam.y_moment_center"></el-input>
@@ -4770,6 +4770,11 @@ export default {
 
   data() {
     return {
+       objcheck:{
+       pointsFlag:false,
+       curvesFlag:true,
+       surFacesFlag:false,
+      },
       funbool:true,
    objmesh:{
     strResultFormat:".vtk",
@@ -5765,12 +5770,10 @@ export default {
       }
     },
     geometryup() {
-       this.$parent.startimg("init",'geometryFileShow');
-      // this.$parent.startimg("init",'geometryFileShow');
-        //this.loaddataaction('geometryFileShow');
+       this.loaddataaction('geometryFileShow',JSON.stringify(this.objcheck));
     },
     // 文件上传成功调用几何接口
-      loaddataaction(action) {
+      loaddataaction(action,paramJson) {
         this.solverConfigid=sessionStorage.getItem('solverConfigid');
         console.log(this.solverConfigid);
       let that = this;
@@ -5779,7 +5782,7 @@ export default {
         pid: this.project.projectId,
         solverConfigId: this.solverConfigid,
         action: action,
-        paramJson: "",
+        paramJson: paramJson,
       };
       request(params)
         .then((res) => {})
@@ -6060,7 +6063,7 @@ export default {
       console.log(this.activeName);
       if(this.activeName=='one'){
        // this.$parent.startimg("init",'geometryFileShow');
-         this.loaddataaction('geometryFileShow');
+         this.loaddataaction('geometryFileShow','');
       }else if(this.activeName=='twos'){
         this.$parent.startimg("init",'loaddata');
       }

+ 59 - 16
src/views/index/index.vue

@@ -177,17 +177,18 @@
               label="模型导航"
               name="first"
             >
+            <!--          @node-click="handleNodeClick1" -->
               <el-tree
                 :data="data"
                 class="my-tree"
                 show-checkbox
                   node-key="id"
-                  :default-expanded-keys="[2, 3]"
-                  :default-checked-keys="[5]"
+                  :default-expanded-keys="[1,2]"
+                  :default-checked-keys="[13]"
                 :props="defaultProps"
-              @check-change="handleNodeClick"
+             @check="handleNodeClick"
               ref="tree"
-               @check="getCheckedNodes"
+           
               ></el-tree>
             </el-tab-pane>
             <el-tab-pane
@@ -392,6 +393,14 @@ export default {
   },
   data() {
     return {
+      //几何参数
+      checkIdArr:[],
+      objcheck:{
+       pointsFlag:false,
+       curvesFlag:true,
+       surFacesFlag:false,
+      },
+      checkkey:[],
       // 心跳包的参数
       websock: null, //建立连接
       lockReconnect: false, //是否真正建立连接
@@ -1248,18 +1257,51 @@ export default {
       //this.loadingend(this.loadingopen());
       //this.reconnect();
     },
+    getafl(action,paramJson){
+      let that = this;
+      let params = {
+        transCode: "AFT001", // 服务器渲染实例接口创建推流
+        pid: this.pid,
+        solverConfigId: this.solverConfigid,
+        action: action,
+        paramJson: paramJson
+      };
+      request(params)
+        .then((res) => {})
+        .catch((err) => {
+          //  Message({
+          //         type: "info",
+          //         message: "请上传文件",
+          //       });
+        });
+    },
     handleNodeClick(data, checked, indeterminate){
-      
-      console.log(data)
-       console.log(111)
-       console.log(checked)
-       console.log(222)
-          // console.log(indeterminate)
-
+      this.checkIdArr = this.$refs.tree.getCheckedKeys();
+       if(this.checkIdArr.includes(12)){
+                this.objcheck.pointsFlag=true;
+            }else {
+              this.objcheck.pointsFlag=false;
+            }
+            if(this.checkIdArr.includes(13)){
+              this.objcheck.curvesFlag=true;
+            }else{
+                 this.objcheck.curvesFlag=false;
+            }
+             if(this.checkIdArr.includes(14)){
+               this.objcheck.surFacesFlag=true;
+            }else {
+                this.objcheck.surFacesFlag=false;
+            }
+           this.getafl('geometryFileShow',JSON.stringify(this.objcheck));
     },
+
     getCheckedNodes(obj,a){
-        console.log(this.$refs.tree.getCheckedNodes())
-    }
+      //  console.log(this.$refs.tree.setCheckedKeys([3]))
+    },
+    // getMenuAllCheckedKeys(){
+    //   let  checkedKeys=this.$refs.tree.getMenuAllCheckedKeys();
+    //   console.log(checkedKeys);
+    // }
   },
 };
 </script>
@@ -1528,9 +1570,7 @@ export default {
  /* .my-tree .el-tree-node__children  .el-tree-node__content .el-checkbox{
  display: inline-block;
  } */
- .el-tree .el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__content label.el-checkbox{
- display: inline-block;
- }
+ 
 /* .my-tree .el-tree-node__content label.el-checkbox,.my-tree .el-tree-node__children .el-checkbox .el-checkbox__inner,
 .my-tree .el-tree-node__content .el-checkbox .el-checkbox__inner
 {
@@ -1551,6 +1591,9 @@ export default {
 .my-tree .el-checkbox .el-checkbox__inner{
 display: inline-block;
 } */
+.el-tree .el-tree-node .el-tree-node__children .el-tree-node:first-of-type .el-tree-node__children .el-tree-node .el-tree-node__content label.el-checkbox{
+ display: inline-block;
+ }
 </style>
 <style lang="scss" scoped>
 /deep/.my-tree {