liuqiao 2 سال پیش
والد
کامیت
f77d43b724
1فایلهای تغییر یافته به همراه84 افزوده شده و 35 حذف شده
  1. 84 35
      src/views/index/HCFDLab/index.vue

+ 84 - 35
src/views/index/HCFDLab/index.vue

@@ -1892,8 +1892,8 @@
           <div class="line">
       <div class="linetext"> 标量集</div>
     </div> 
-       <el-form-item label="颜色控制" :label-width="formLabelWidth2" >
-      <el-input v-model="outlineobj.level"  @blur="changeblur()"  autocomplete="off"></el-input>
+       <el-form-item label="level" :label-width="formLabelWidth2" >
+      <el-input v-model="outlineobj.level"  autocomplete="off"></el-input>
       </el-form-item>
       <div class="disflex lheig34 liitem">
                       <el-checkbox-group v-model="velementCheckeds" style="display:flex">
@@ -1921,7 +1921,7 @@
         <el-button   @click="dialog.contour_visiable= false"
           >{{ $t("HCFD.file.cancel")}}</el-button
         >
-        <el-button type="primary" @click="dialog.contour_visiable = false"
+        <el-button type="primary" @click="changeblur();dialog.contour_visiable = false"
           >{{ $t("HCFD.file.ok")}}</el-button
         >
       </div>
@@ -1971,8 +1971,8 @@
           <div class="line">
       <div class="linetext"> 标量集</div>
     </div>  
-       <el-form-item label="颜色控制" :label-width="formLabelWidth2" >
-      <el-input v-model="outlineobj.level"  @blur="vchangeblur()"  autocomplete="off"></el-input>
+       <el-form-item label="level" :label-width="formLabelWidth2" >
+      <el-input v-model="outlineobj.level"  autocomplete="off"></el-input>
       </el-form-item>
          <div class="line">
       <div class="linetext"> 范围</div>
@@ -1988,7 +1988,7 @@
         <el-button   @click="dialog.Line_visiable= false"
           >{{ $t("HCFD.file.cancel")}}</el-button
         >
-        <el-button type="primary" @click="dialog.Line_visiable = false"
+        <el-button type="primary" @click="vchangeblur(); dialog.Line_visiable = false"
           >{{ $t("HCFD.file.ok")}}</el-button
         >
       </div>
@@ -2015,11 +2015,11 @@
           <el-form-item label="u" :label-width="formLabelWidth2">
       <el-select 
                   size="mini"
-                  v-model="vSalar"
+                  v-model="vectorobj.dataU"
                   placeholder="select boundary"
                 >
                    <el-option
-                            v-for="scalar in volumScalars"
+                            v-for="scalar in vectorobj.dataUarr"
                             :key="scalar"
                             :label="scalar"
                             :value="scalar"
@@ -2030,11 +2030,11 @@
         <el-form-item label="v" :label-width="formLabelWidth2">
       <el-select 
                   size="mini"
-                  v-model="vSalar"
+                  v-model="vectorobj.dataV"
                   placeholder="select boundary"
                 >
                    <el-option
-                            v-for="scalar in volumScalars"
+                            v-for="scalar in vectorobj.dataVarr"
                             :key="scalar"
                             :label="scalar"
                             :value="scalar"
@@ -2045,11 +2045,11 @@
             <el-form-item label="w" :label-width="formLabelWidth2">
       <el-select 
                   size="mini"
-                  v-model="vSalar"
+                  v-model="vectorobj.dataW"
                   placeholder="select boundary"
                 >
                    <el-option
-                            v-for="scalar in volumScalars"
+                            v-for="scalar in vectorobj.dataWarr"
                             :key="scalar"
                             :label="scalar"
                             :value="scalar"
@@ -2062,7 +2062,7 @@
       <div class="linetext"> 参数设置</div>
     </div>  
        <el-form-item label="标度因子" :label-width="formLabelWidth2" >
-      <el-input value="" autocomplete="off"></el-input>
+      <el-input v-model="vectorobj.scaleFactor" autocomplete="off"></el-input>
       </el-form-item>
      
   </el-form>
@@ -2070,12 +2070,12 @@
         <el-button   @click="dialog.Vector_visiable= false"
           >{{ $t("HCFD.file.cancel")}}</el-button
         >
-        <el-button type="primary" @click="dialog.Vector_visiable = false"
+        <el-button type="primary" @click="vectorOK(); dialog.Vector_visiable = false"
           >{{ $t("HCFD.file.ok")}}</el-button
         >
-        <el-button type="primary" @click="dialog.Vector_visiable = false"
+        <!-- <el-button type="primary" @click="dialog.Vector_visiable = false"
           >Apply</el-button
-        >
+        > -->
       </div>
 </el-dialog>
 <!--Solid Surface固体 -->
@@ -2096,9 +2096,9 @@
    <div class="heigeinput">
         <el-form-item label="颜色">
          <div class="saninput titleinput"> R
-      <el-input v-model="form.name" autocomplete="off"></el-input>G
-       <el-input v-model="form.name" autocomplete="off"></el-input>B
-        <el-input v-model="form.name" autocomplete="off"></el-input>
+      <el-input v-model="r" autocomplete="off"></el-input>G
+       <el-input v-model="g" autocomplete="off"></el-input>B
+        <el-input v-model="b" autocomplete="off"></el-input>
           <el-color-picker
             v-model="lineColor"
             show-alpha
@@ -2133,12 +2133,12 @@
         <el-button   @click="dialog.Solid_Surface= false"
           >{{ $t("HCFD.file.cancel")}}</el-button
         >
-        <el-button type="primary" @click="dialog.Solid_Surface= false"
+        <el-button type="primary" @click="colorsolid(); "
           >{{ $t("HCFD.file.ok")}}</el-button
         >
-        <el-button type="primary" @click="dialog.Solid_Surface = false"
+        <!-- <el-button type="primary" @click="dialog.Solid_Surface = false"
           >Apply</el-button
-        >
+        > -->
       </div>
 </el-dialog>
 <!--Slice片 -->
@@ -2642,6 +2642,12 @@ export default {
           default () {
             return {}
           }
+        },
+         vectorparam: {
+          type: Object,
+          default () {
+            return {}
+          }
         }
     },
 
@@ -2656,6 +2662,17 @@ export default {
         leixing:'',
         level:'1',
         bmScalars:[],
+        nameTypes:''
+     },
+    
+     vectorobj:{
+       dataU:'r',
+       dataV:'r',
+       dataW:'r',
+       dataUarr:[],
+       dataVarr:[],
+       dataWarr:[],
+       scaleFactor:''
      },
       // 折线图的参数
       zobj:{
@@ -2726,6 +2743,9 @@ export default {
         projectDesc:'',
       },
       // 颜色选择
+      r:'',
+      g:'',
+      b:'',
       lineColor: 'rgba(255, 69, 0, 0.68)',
         predefineColors: [
           '#ff4500',
@@ -3696,30 +3716,37 @@ bStepok(num,action){
         range0:this.outlineobj.range0,
         range1:this.outlineobj.range1,
         isVolume:this.isVolume,
+        dataU:this.vectorobj.dataU,
+        dataV:this.vectorobj.dataV,
+        dataW:this.vectorobj.dataW,
+        scaleFactor:this.vectorobj.scaleFactor
         }
         request(params)
           .then((res) => { 
+              this.outlinedata();
          })
           .catch((err) => {
           })
 },
 //level颜色的数据
 changeblur(){
-  console.log(1111);
  this.bStepok(this.outlineobj.level,'ContourDisplay')
 },
 vchangeblur(){
  this.bStepok(this.outlineobj.level,"LineDisplay")
 },
+// 矢量的OK按钮
+vectorOK(){
+ this.bStepok('',"VectorDisplay")
+},
 // 获取轮廓数据
 outlinedata(){
-  // this.ytdata=JSON.parse(sessionStorage.getItem("data"));
-  console.log(this.ytdata)
-  this.outlineobj.scalarName=this.ytdata.scalarName;
-  this.vSalar=this.ytdata.scalarName;
-   this.outlineobj.range0=this.ytdata.range0;
-   this.outlineobj.range1=this.ytdata.range1;
-  let ress=this.ytdata.scalarNames;
+  let ytdata= JSON.parse(sessionStorage.getItem("ytdata"));
+  this.outlineobj.scalarName=ytdata.scalarName;
+  this.vSalar=ytdata.scalarName;
+   this.outlineobj.range0=ytdata.range0;
+   this.outlineobj.range1=ytdata.range1;
+  let ress=ytdata.scalarNames;
 if(ress==undefined){
     Message({
             type: "info",
@@ -3727,10 +3754,25 @@ if(ress==undefined){
           });
 }else{
  this.outlineobj.bmScalars=Array.from(ress.split(","));
-  this.strnumchange(this.ytdata.nameTypes);
+ this.outlineobj.nameTypes=ytdata.nameTypes
+   this.strnumchange(ytdata.nameTypes);
+
 }
  
 },
+//矢量数据
+vectordata(){
+let vectorparam= JSON.parse(sessionStorage.getItem("vectorparam"));
+let datau=vectorparam.dataU;
+let datav=vectorparam.dataV;
+let dataw=vectorparam.dataW;
+this.vectorobj.dataUarr=datau.split(",");
+this.vectorobj.dataVarr=datav.split(",");
+this.vectorobj.dataWarr=dataw.split(",");
+this.vectorobj.scaleFactor=vectorparam.scaleFactor;
+
+},
+
 // 字符串的裁剪
 strnumchange(val){
     let strnum=val;
@@ -3750,9 +3792,18 @@ strnumchange(val){
 // 标量选择名称跟着边
 bmScalarschange(val){
     this.outlineobj.scalarName=this.vSalar;
-    this.strnumchange(this.ytdata.nameTypes);
+    this.strnumchange(this.outlineobj.nameTypes);
 
 },
+//实体的颜色的控制
+colorsolid(){
+ 
+  let str=this.lineColor.slice(5,-1)
+  let a=str.lice(0,)
+  let colorstr=str.split(",");
+  const obj = {...colorstr} ;
+   console.log(colorstr);
+},
 // 
  //模块选择
   clickgeometry(e,index,key){
@@ -3851,14 +3902,13 @@ this.styX.left=e.clientX+'px';
         this.dialog.VolumeGrid_visiable = true;
        break;
       case 'five7-0':
-        this.outlinedata();
         this.dialog.contour_visiable = true;
        break;
         case 'five7-1':
-        this.outlinedata();
         this.dialog.Line_visiable = true;
        break;
         case 'five7-2':
+          this.vectordata();
         this.dialog.Vector_visiable = true;
        break;
           case 'five8-0':
@@ -4685,7 +4735,6 @@ if(val==true){
           this.openshow=false;
 
         }else{
-        console.log(val);
           this.Consoleshow=false;
           this.openshow=true;
         }