liuqiao %!s(int64=2) %!d(string=hai) anos
pai
achega
e9b45f98b3
Modificáronse 2 ficheiros con 144 adicións e 57 borrados
  1. 85 39
      src/views/index/HCFDLab/echartsHFCD.vue
  2. 59 18
      src/views/index/HCFDLab/index.vue

+ 85 - 39
src/views/index/HCFDLab/echartsHFCD.vue

@@ -23,6 +23,45 @@ export default {
       convergeDate: { title: "hcfd", VARIABLES: [], value: [] },
     numlist:[],
     s1:'',
+    option:{
+        title: {
+          text: "HCFD",
+        },
+        type: 'point',
+        credits:{
+          enabled:false,
+        },
+        chart: {
+          plotBackgroundColor: "rgba(255,255,255,0)",
+          // borderWidth: 1,
+          backgroundColor: "rgba(255,255,255,0)",
+        },
+        yAxis: {},
+        xAxis: {},
+        plotOptions: {
+          series: {
+            lineWidth: 2,
+            label: {
+              connectorAllowed: false,
+            },
+            marker: {
+              radius: 5,
+            },
+            pointStart: 1,
+          },
+        },
+        tooltip: {},
+       
+                
+        legend: {
+                  layout: "horizontal",
+                  align: "center",
+                  verticalAlign: "bottom",
+                  itemStyle:{'color':"#b6b6b6" }
+                },
+        series: [
+        ],
+      }
     };
   },
   components:{
@@ -49,6 +88,10 @@ export default {
    // this.getwebsocket();
   },
   methods: {
+      newHighcharts(){
+      let _this = this;
+  _this.chart = Highcharts.chart("container",_this.option);
+    },
       hiden(){
       this.container_show=false;
     },
@@ -230,44 +273,44 @@ export default {
     },
     HighchartsData() {
       let _this = this;
-      let option={
-        title: {
-          text: "HCFD",
-        },
-        credits:{
-          enabled:false,
-        },
-        chart: {
-          plotBackgroundColor: "rgba(255,255,255,0)",
-          // borderWidth: 1,
-          backgroundColor: "rgba(255,255,255,0)",
-        },
-        yAxis: {},
-        xAxis: {},
-        plotOptions: {
-          series: {
-            lineWidth: 2,
-            label: {
-              connectorAllowed: false,
-            },
-            marker: {
-              radius: 5,
-            },
-            pointStart: 1,
-          },
-        },
-        tooltip: {},
+      // let option={
+      //   title: {
+      //     text: "HCFD",
+      //   },
+      //   credits:{
+      //     enabled:false,
+      //   },
+      //   chart: {
+      //     plotBackgroundColor: "rgba(255,255,255,0)",
+      //     // borderWidth: 1,
+      //     backgroundColor: "rgba(255,255,255,0)",
+      //   },
+      //   yAxis: {},
+      //   xAxis: {},
+      //   plotOptions: {
+      //     series: {
+      //       lineWidth: 2,
+      //       label: {
+      //         connectorAllowed: false,
+      //       },
+      //       marker: {
+      //         radius: 5,
+      //       },
+      //       pointStart: 1,
+      //     },
+      //   },
+      //   tooltip: {},
        
                 
-        legend: {
-                  layout: "horizontal",
-                  align: "center",
-                  verticalAlign: "bottom",
-                  itemStyle:{'color':"#b6b6b6" }
-                },
-        series: [
-        ],
-      }
+      //   legend: {
+      //             layout: "horizontal",
+      //             align: "center",
+      //             verticalAlign: "bottom",
+      //             itemStyle:{'color':"#b6b6b6" }
+      //           },
+      //   series: [
+      //   ],
+      // }
        for (var i in _this.convergeDate.VARIABLES) {
           var obj = {
             name: "",
@@ -276,13 +319,16 @@ export default {
             display: true,
           };
           obj.name = _this.convergeDate.VARIABLES[i];
-          option.series.push(obj);
+        _this.option.series.push(obj);
       
         }
-      option.title.text=this.name;
-      _this.chart = Highcharts.chart("container", option);
+
+     _this.option.title.text=this.name;
+      _this.chart = Highcharts.chart("container",_this.option);
     },
+  
   },
+  
 };
 </script>
 <style lang="scss" scoped>

+ 59 - 18
src/views/index/HCFDLab/index.vue

@@ -2378,19 +2378,19 @@
         <span class="texttype">选择类型</span>
       <div class="divselect">
       <div>
-         <el-radio-group  v-model="lineType"  @input="inputline()" >
-         <el-radio  label="1">点</el-radio>
-        <el-radio  label="2">曲线</el-radio>
+         <el-radio-group  v-model="zobj.lineType"  @change="changeline()" >
+         <el-radio  label="areaspline">点</el-radio>
+        <el-radio  label="Line">曲线</el-radio>
         </el-radio-group>
        
       </div>
        
         <div>
          <el-form-item label="点大小" :label-width="formLabelWidth2" >
-      <el-input  v-model="linevalue" autocomplete="off"></el-input>
+      <el-input  v-model="zobj.pointvalue" autocomplete="off"></el-input>
       </el-form-item>
          <el-form-item label="曲线大小" :label-width="formLabelWidth2" >
-      <el-input  v-model="linevalue" autocomplete="off"></el-input>
+      <el-input  v-model="zobj.linevalue" @blur="lineclick()" autocomplete="off"></el-input>
       </el-form-item>
         </div>
       </div>
@@ -2413,7 +2413,7 @@
         <el-button   @click="dialog.Curve_Disp1ay= false"
           >{{ $t("HCFD.file.cancel")}}</el-button
         >
-        <el-button type="primary" @click="dialog.Curve_Disp1ay= false"
+        <el-button type="primary" @click="lineoclick();dialog.Curve_Disp1ay= false"
           >{{ $t("HCFD.file.ok")}}</el-button
         >
         <el-button type="primary" @click="dialog.Curve_Disp1ay = false"
@@ -2645,8 +2645,11 @@ export default {
   data() {
     return {
       // 折线图的参数
-      lineType: "2",
+      zobj:{
+      lineType: "Line",
+      pointvalue:'1',
       linevalue:"1",
+      },
       slice:{
       fw:'1',
       slicecheck:'Solid',
@@ -3354,19 +3357,48 @@ export default {
 
      this.init();
   },    
+watch:{
+
+        // zobj:{
+        //   // handler(newValue, old){
+        //   //   if(newValue.linevalue)
+        //   //   console.log(newValue);
+
+        //   // },
+        //   deep:true
+        // }
+        
+},
 
   //  destroyed() {
   //     this.websock.close() //离开路由之后断开websocket连接
   //   },
 methods:{
   //  折线图对线的控制
-  // inputline(){
-  //     let val = this.linevalue;
-  //     this.$set(this.option.plotOptions.series, "lineWidth", Number(val));
-  //     // console.log(this.option.plotOptions.series.lineWidth);
-  //     this.$refs.child.showChart("highcharts", this.Option);
-  // },
+  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'){
+     
+    }
+  },
+  lineclick(){
+    console.log(222)
+    console.log(this.zobj.lineType)
+    let num=Number(this.zobj.linevalue);
+      if(num<0&&this.zobj.lineType=='Line'||num<10&&this.zobj.lineType=='Line'){
+        console.log(11111)
+        this.$parent.linezhexian(this.zobj.linevalue);
+      }
+        
+  },
+// lineoclick(){
 
+// },
   // 上传文件,加载图片 
   runugrid(){
       this.$parent.startimg("init",'loaddata');
@@ -3441,7 +3473,6 @@ console.log(val)
        this.desclist=this.parameterObj.hcfdBoundarys;
       sessionStorage.setItem("res", obj);
       this.solverConfigid=solverConfigid;
-
        this.state=datas.state;
       sessionStorage.setItem("solverConfigid", solverConfigid);
     },
@@ -3615,7 +3646,11 @@ hcfdparam(){
         },
 // 获取物面数据的步数
 setpnum(){
- let params = {
+  let steplist=this.boundaryStep
+  let len=steplist.length;
+  console.log(len);
+  if(len==0){
+     let params = {
             transCode: "AFT002",
             pid: this.projectId,
             solverConfigId:this.solverConfigid,
@@ -3626,9 +3661,14 @@ setpnum(){
         let steps= res.steps.split(',');
         console.log(steps);
         this.boundaryStep=steps;
-        
             })
+
+  }else{
+
+  }
+
 },
+
  //模块选择
   clickgeometry(e,index,key){
   
@@ -3767,7 +3807,7 @@ this.styX.left=e.clientX+'px';
       this.showVolumeflage = false; //Volume 是否显示过
       this.showMonitorflage = false;
       this.islogload = true;
-
+      this.boundaryStep=[];
       this.logs = "";
       this.project = {
         projectId: "",
@@ -4005,7 +4045,8 @@ bStepChange(val){
             message: "请选择setp有效值",
           });
   }else{
-      this.showboundary();
+
+     
   }
 
 },