Преглед изворни кода

6.27轮廓最大值最小的修改

liuqiao пре 2 година
родитељ
комит
757fcf804d
1 измењених фајлова са 26 додато и 101 уклоњено
  1. 26 101
      src/views/index/HCFDLab/index.vue

+ 26 - 101
src/views/index/HCFDLab/index.vue

@@ -1908,7 +1908,7 @@
       <el-input v-model="outlineobj.level"  autocomplete="off"></el-input>
       </el-form-item>
       <!--     @change="ContourvalVolume('Mesh')"   @change="ContourvalVolume('Contour')" -->
-      <div class="disflex lheig34 liitem">
+      <!-- <div class="disflex lheig34 liitem">
                       <el-checkbox-group v-model="velementCheckeds" style="display:flex">
                         <el-checkbox
                           label="Horizontal"
@@ -1919,7 +1919,7 @@
                 
                         ></el-checkbox>
                       </el-checkbox-group>
-                    </div>  
+                    </div>   -->
          <div class="line">
       <div class="linetext"> 范围</div>
     </div>
@@ -2819,10 +2819,8 @@ export default {
     VolumLoad,
     transformtool,
     Pagination,
-    // vtkLoad,
     echartsHFCD,
         Addtabs,},
-    // websocket,},
     props:{
       objopp:String,
       pid:String,
@@ -2860,14 +2858,15 @@ export default {
         leixing:'',
         level:'1',
         bmScalars:[],
-        nameTypes:''
+        nameTypes:'',
+        scalarmax:'',
      },
     colorobj:{
       R:'0',
       G:'0',
       B:'0',
       showHideState:'1',
-      transparency:'',
+      transparency:'1',
     },
     variableNamearr:[],
     vector:{
@@ -3622,20 +3621,9 @@ export default {
    created(){
    },
  mounted() {
-
      this.init();
   },    
-watch:{
-
-        // zobj:{
-        //   // handler(newValue, old){
-        //   //   if(newValue.linevalue)
-        //   //   console.log(newValue);
-
-        //   // },
-        //   deep:true
-        // }
-        
+watch:{        
 },
 
   //  destroyed() {
@@ -3646,10 +3634,6 @@ methods:{
   changeline(){
     let obj=JSON.stringify(this.zobj);
          this.$parent.changelines(obj);
-      //this.$emit("changelines",obj)
-      // this.$set(this.option.plotOptions.series, "lineWidth", Number(val));
-      // // console.log(this.option.plotOptions.series.lineWidth);
-      // this.$refs.echartsHFCD.HighchartsData("highcharts", this.Option);
       if(this.zobj.ineType=='line'){
      
     }
@@ -3747,7 +3731,6 @@ updataparam(){
    
        //删除新增的tab
       removeclear(val){
-
          let tabs = this.editableTabs;
         let activeName = this.editableTabsValue;
         if (activeName === val) {
@@ -3764,7 +3747,6 @@ updataparam(){
         this.editableTabsValue = activeName;
         this.editableTabs = tabs.filter(tab => tab.index !== val);
         this.bStepok("SliceDisplayDel",val,'');
-
       },
       removeTab(targetName) {
          
@@ -3781,7 +3763,6 @@ updataparam(){
             }
           });
         }
-        
         this.editableTabsValue = activeName;
         this.editableTabs = tabs.filter(tab => tab.index !== targetName);
          this.bStepok("SliceDisplayDel",targetName,'');
@@ -3837,9 +3818,6 @@ hcfdparam(){
         Runsolve(){
           this.hcfdparam();
           this.dialog.runc_visiable = false;
-          //  this.hcfdExe();
-          // this.hcfdrun();
-
         },
         hcfdExe(){
   var _this = this;
@@ -3849,12 +3827,10 @@ hcfdparam(){
       };
       request(params)
         .then((res) => {
-         // this.getlog();
         Message({
                   type: "success",
                   message:res.returnMsg,
                 });
-             // this.$emit("exlodingfalse",false)
         })
         .catch((err) => {
              this.$emit("exlodingfalse",false)
@@ -3923,9 +3899,7 @@ hcfdparam(){
             this.hcfdExe();
             let _this = this;
             let isStop = false;
-              // if (!isStop && !_this.isSolverEnd) {
            this.$parent.funagain();
-              // }
        
           })
           .catch(() => {
@@ -3939,10 +3913,8 @@ hcfdparam(){
         this.hcfdExe();
         let _this = this;
         let isStop = false;
-          // if (!isStop && !_this.isSolverEnd) {
-            isStop = true;
-              this.$parent.funagain();
-          // }
+        isStop = true;
+        this.$parent.funagain();
       }
     },
     // 求解的日志
@@ -3963,27 +3935,6 @@ hcfdparam(){
             });
   },
    handleClick(tab, event) {
-  //   if(this.activeName=='five'){
-  //     let params = {
-  //       transCode: "A00107",
-  //       projectId: this.project.projectId,
-  //     };
-  //      request(params)
-  //       .then((res) => {
-  //           this.lsolverState=res.solverState;
-  //       } )
-  //         if(this.lsolverState=='2'){
-  //            // this.resultdata();
-  //         }else{
-  //       Message({
-  //                   type: "warning",
-  //                   message: "求解未完成,请完成求解",
-  //                 });
-  //         }
-  //   }else{
-
-  //   }
-  //  this.activecleer();
         },
         activecleer(){
           this.active=11;
@@ -4003,11 +3954,7 @@ setpnum(){
         let steps= res.steps.split(',');
         this.boundaryStep=steps;
         this.volumStep=steps;
-
             })
-
-  }else{
-
   }
 
 },
@@ -4048,12 +3995,14 @@ vchangeblur(){
 },
 // 获取轮廓数据
 outlinedata(data){
+  let scalarrange1=''
  let ytdata= JSON.parse(data);
   this.outlineobj.scalarName=ytdata.scalarName;
   this.vSalar=ytdata.scalarName;
-   this.outlineobj.range0=ytdata.range0;
-   this.outlineobj.range1=ytdata.range1;
+  //  this.outlineobj.range0=ytdata.range0;
+  //  this.outlineobj.range1=ytdata.range1;
   let ress=ytdata.scalarNames;
+  this.outlineobj.scalarmax=ytdata.scalarrange;
 if(ress==undefined){
     Message({
             type: "info",
@@ -4063,9 +4012,21 @@ if(ress==undefined){
  this.outlineobj.bmScalars=Array.from(ress.split(","));
  this.outlineobj.nameTypes=ytdata.nameTypes
   this.strnumchange(ytdata.nameTypes);
+ this.outlinemax(this.vSalar);
 
 }
  
+},
+// 获取轮廓数据的最大值和最小值
+outlinemax(val){
+let arrmax=Array.from( this.outlineobj.scalarmax.split(","));
+arrmax.forEach((item,index)=>{
+ let arrval= arrmax[index].split("#");
+  if(arrval.includes(val)){
+  this.outlineobj.range0=arrval[1];
+   this.outlineobj.range1=arrval[2];
+ }
+})
 },
 //矢量数据
 vectordata(data){
@@ -4140,6 +4101,7 @@ strnumchange(val){
 bmScalarschange(val){
     this.outlineobj.scalarName=this.vSalar;
     this.strnumchange(this.outlineobj.nameTypes);
+    this.outlinemax(this.vSalar)
 
 },
 //实体的颜色的控制
@@ -4229,7 +4191,7 @@ this.styX.left=e.clientX+'px';
        break; 
        case 'three2-0':
        this.dialog.inviscid_visiable= true;
-        break; 
+        break;
         case 'three2-1':
        this.dialog.border_visiable= true;
        break;
@@ -4273,11 +4235,6 @@ this.styX.left=e.clientX+'px';
                this.hcfdrun();
 
        break;
-      
-      //   case 'four4-3':
-      //  break;
-      //   case 'four4-4':
-      //  break;
        case 'five-0':
          this.isVolume='1';
          this.setpnum();
@@ -4295,7 +4252,6 @@ this.styX.left=e.clientX+'px';
         this.dialog.Line_visiable = true;
        break;
         case 'five7-2':
-         // this.vectordata();
         this.dialog.Vector_visiable = true;
        break;
           case 'five8-0':
@@ -4316,17 +4272,6 @@ this.styX.left=e.clientX+'px';
         case 'five10-1':
         this.dialog.Curve_Disp1ay = true;
        break;
-      
-
-    //     case 'six-0':
-    //     this.visiable=true;
-    //    break;
-    //  case 'six-1':
-    //      this.Yvisiable= true;
-    //    break;
-    //       case 'six-2':
-    //      this.llsvisiable = true;
-    //    break;
   }
 
   },
@@ -4353,16 +4298,8 @@ this.styX.left=e.clientX+'px';
       };
     },
     init() {
-  
       this.project.projectId = this.pid; //获取url 参数
       this.project.lesseeId = this.$store.getters.lesseeId; //获取url 参数
-      
-      if (
-        this.project.projectId != undefined &&
-        this.project.projectId != null
-      ) {
-       // this.selectProjectOK();
-      }
       this.missType=true
     },
     
@@ -4414,7 +4351,6 @@ this.styX.left=e.clientX+'px';
     referencevisiable() {
       this.parameterObjclone = JSON.parse(sessionStorage.getItem("res"));
       this.parameterObj.nmlParam = this.parameterObjclone.nmlParam;
-      // this.dialog.scale_visiable = false;
     },
   
     timeasmvisiable() {
@@ -4427,7 +4363,6 @@ this.styX.left=e.clientX+'px';
       this.parameterObj.nmlParam = this.parameterObjclone.nmlParam;
       this.dialog.runc_visiable = false;
     },
-       //  this.$emit("visiable",this.visiable);
        dialogbtnkew(){
             this.form1.ssd="";
             var kelvins=parseFloat(this.form1.kelvins) 
@@ -4525,8 +4460,6 @@ this.styX.left=e.clientX+'px';
       param.append("projectId", this.project.projectId);
       uploadFile(param)
         .then((res) => {
-          // console.log(res);
-          // this.fileId = res.fileId
           this.findParam();
           this.getHCFDLoadFiles();
         })
@@ -4539,8 +4472,6 @@ this.styX.left=e.clientX+'px';
       param.append("projectId", this.project.projectId);
       uploadFile(param) 
         .then((res) => {
-          // console.log(res);
-          // this.fileId = res.fileId
           this.findParam();
         })
         .catch((err) => {});
@@ -4580,7 +4511,6 @@ bStepChange(val){
 //选择step
 vStepChange(val){
   this.Stepe=val;
-  //this.vStep=val;
     if(val==0){
     Message({
             type: "warning",
@@ -4624,10 +4554,8 @@ VolumenumChange(value){// 选择色条个数
         transCode: "A00107",
         projectId: this.project.projectId,
       };
-      // console.log(params);
       await request(params)
         .then((res) => {
-          // console.log("findParam:" + res);
           this.project.projectName = res.projectName;
           this.project.uid = res.uid;
           let cjuserid = this.$route.query.cjuserid;
@@ -4755,7 +4683,6 @@ if(val==true){
       this.parameterObj.nmlParam.a_vort_z = true;
       this.parameterObj.nmlParam.a_q_criterion = true;
       this.Solution.boundaryout.isIndeterminate = false;
-      //this.solutionbSetParam();
 }else {
    
      this.parameterObj.nmlParam.a_u = false;
@@ -4969,7 +4896,6 @@ if(val==true){
           this.$refs.boundaryLoad.mesh(this.bScalar);
         }
         if (contour) {
-          //  console.log(222);
           this.$refs.volumLoad.vdivb = false;
           this.$refs.boundaryLoad.divb = true;
           this.$refs.boundaryLoad.contour(this.bScalar);
@@ -5110,7 +5036,6 @@ if(val==true){
               }
             }
           }else{
-            consolog.log(2222)
           }
           })
           .catch((err) => {