liuqiao před 2 roky
rodič
revize
20768ae014
2 změnil soubory, kde provedl 75 přidání a 31 odebrání
  1. 24 24
      src/views/index/HCFDLab/index.vue
  2. 51 7
      src/views/index/index.vue

+ 24 - 24
src/views/index/HCFDLab/index.vue

@@ -1772,7 +1772,7 @@
         <el-button   @click="dialog.SurfaceGrid_visiable = false"
           >{{ $t("HCFD.file.cancel")}}  </el-button
         >
-        <el-button type="primary" @click="bStepok('','ResultImport','','');dialog.SurfaceGrid_visiable = false"
+        <el-button type="primary" @click="bStepok('ResultImport','','');dialog.SurfaceGrid_visiable = false"
           >{{ $t("HCFD.file.ok")}}</el-button
         >
       </div>
@@ -1854,7 +1854,7 @@
         <el-button   @click="dialog.VolumeGrid_visiable = false"
           >{{ $t("HCFD.file.cancel")}}</el-button
         >
-        <el-button type="primary" @click="bStepok('','ResultImport','',''); dialog.VolumeGrid_visiable = false"
+        <el-button type="primary" @click="bStepok('ResultImport','',''); dialog.VolumeGrid_visiable = false"
           >{{ $t("HCFD.file.ok")}}</el-button
         >
       </div>
@@ -2849,6 +2849,7 @@ export default {
 
   data() {
     return {
+    
       // 云图参数
          Stepe:'',//步数
          isVolume:"",
@@ -3674,7 +3675,7 @@ pointclick(){
  addTab(targetName) {
    this.target= targetName;
         let newTabName = ++this.tabIndex + '';
-       this.bStepok('',"SliceDisplayAdd",newTabName,'')
+       this.bStepok("SliceDisplayAdd",newTabName,'')
         this.editableTabs.push({
                 index:newTabName,
                 type:"line", 
@@ -3718,7 +3719,7 @@ addparam(){
        })
 },
       updata(){
-            this.bStepok('',"SliceDisplayUpdate",'','');
+            this.bStepok("SliceDisplayUpdate",'','');
             
       },
       //updata的参数
@@ -3762,7 +3763,7 @@ updataparam(){
         }
         this.editableTabsValue = activeName;
         this.editableTabs = tabs.filter(tab => tab.index !== val);
-        this.bStepok('',"SliceDisplayDel",val,'');
+        this.bStepok("SliceDisplayDel",val,'');
 
       },
       removeTab(targetName) {
@@ -3783,7 +3784,7 @@ updataparam(){
         
         this.editableTabsValue = activeName;
         this.editableTabs = tabs.filter(tab => tab.index !== targetName);
-         this.bStepok('',"SliceDisplayDel",targetName,'');
+         this.bStepok("SliceDisplayDel",targetName,'');
         
       },
    handletabclick(el){
@@ -3792,7 +3793,7 @@ updataparam(){
    },  
 liceOK(){
   let paramJson=JSON.stringify(this.editableTabs)
-  this.bStepok('',"SliceDisplayApply",'',paramJson);
+  this.bStepok("SliceDisplayApply",'',paramJson);
   this.dialog.Slice_Surface= false;
 
 },
@@ -3923,7 +3924,6 @@ hcfdparam(){
             let _this = this;
             let isStop = false;
               // if (!isStop && !_this.isSolverEnd) {
-           //this.$parent.fun();
            this.$parent.funagain();
               // }
        
@@ -4012,7 +4012,7 @@ setpnum(){
 
 },
 // 获取轮廓数据
-bStepok(num,action,index,paramJson){
+bStepok(action,index,paramJson){
   const params = {
         transCode: 'AFT001',
         pid:this.project.projectId,
@@ -4021,7 +4021,7 @@ bStepok(num,action,index,paramJson){
         paramJson:paramJson,
         step:this.Stepe,
         scalarName:this.outlineobj.scalarName,
-        level:num,
+        level:this.outlineobj.level,
         range0:this.outlineobj.range0,
         range1:this.outlineobj.range1,
         isVolume:this.isVolume,
@@ -4041,14 +4041,14 @@ bStepok(num,action,index,paramJson){
 },
 //level颜色的数据
 changeblur(){
- this.bStepok(this.outlineobj.level,'ContourDisplay','','')
+ this.bStepok('ContourDisplay','','')
 },
 vchangeblur(){
- this.bStepok(this.outlineobj.level,"LineDisplay",'','')
+ this.bStepok("LineDisplay",'','')
 },
 // 获取轮廓数据
-outlinedata(){
-  let ytdata= JSON.parse(sessionStorage.getItem("ytdata"));
+outlinedata(data){
+ let ytdata= JSON.parse(data);
   this.outlineobj.scalarName=ytdata.scalarName;
   this.vSalar=ytdata.scalarName;
    this.outlineobj.range0=ytdata.range0;
@@ -4062,14 +4062,16 @@ if(ress==undefined){
 }else{
  this.outlineobj.bmScalars=Array.from(ress.split(","));
  this.outlineobj.nameTypes=ytdata.nameTypes
-   this.strnumchange(ytdata.nameTypes);
+  this.strnumchange(ytdata.nameTypes);
 
 }
  
 },
 //矢量数据
-vectordata(){
-    let vectorparam= JSON.parse(sessionStorage.getItem("vectorparam"));
+vectordata(data){
+    //let vectorparam= JSON.parse(sessionStorage.getItem("vectorparam"));
+    let vectorparam= JSON.parse(data);
+    console.log(vectorparam);
     let datau=vectorparam.dataU;
     let datav=vectorparam.dataV;
     let dataw=vectorparam.dataW;
@@ -4084,7 +4086,7 @@ vectorOK(){
     this.vector.u=this.vectorobj.dataU,
     this.vector.v=this.vectorobj.dataV,
     this.vector.w=this.vectorobj.dataW,
- this.bStepok('',"VectorDisplay",'','')
+ this.bStepok("VectorDisplay",'','')
 },
 //stream 数据
 streamdata(data){
@@ -4108,7 +4110,7 @@ CreateStream(){
             message: "矢量值,各不相同才能创建!",
           });
     }else{
-       this.bStepok(this.outlineobj.level,'StreamDisplayCreate','','')
+       this.bStepok('StreamDisplayCreate','','')
     }
 
 },
@@ -4116,7 +4118,7 @@ CreateStream(){
 streamOK(){
 console.log(this.streamres);
 let parae=JSON.stringify(this.streamres);
- this.bStepok(this.outlineobj.level,'StreamDisplayApply','',parae)
+ this.bStepok('StreamDisplayApply','',parae)
 },
 // 字符串的裁剪
 strnumchange(val){
@@ -4287,15 +4289,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.vectordata();
         this.dialog.Vector_visiable = true;
        break;
           case 'five8-0':
@@ -5860,7 +5860,7 @@ display: block;
     height: 28px;
       }
 }
-.el-tabs--bottom .el-tabs--left>.el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom .el-tabs--right>.el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--border-card>.el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--left>.el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--right>.el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--border-card>.el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2){
+/deep/ .el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2){
       padding-left: 6px;
 }
 @media screen and (max-width:1330px){

+ 51 - 7
src/views/index/index.vue

@@ -106,7 +106,7 @@
    <el-main ref="main3d" :class="headMenu_2Show?'maxh400':'maxh221'" style="padding:0;">
      <tool1 @startimg="startimg" :monitorHCFD="monitorHCFD" @changehcfd="changehcfd"></tool1>
      <!-- 加载折线图 -->
-    <echartsHFCD ref="monitor" v-if="femnum=='HCFDLab'"  @getthislog='getthislog' @restimeyear='restimeyear'  :projectId='pid' :nmlsteps="Number(numsteps)"></echartsHFCD>
+    <echartsHFCD ref="monitor" v-if="femnum=='HCFDLab'" @statechange='statechange'  @getthislog='getthislog' @restimeyear='restimeyear'  :projectId='pid' :nmlsteps="Number(numsteps)"></echartsHFCD>
     <!-- 加载图片 -->
       <TFileStream   :projectId='pid' ref="TFileStream" ></TFileStream>
    </el-main>
@@ -199,6 +199,7 @@ export default {
      ytdata:{},
      vectorparam:{},
      selectval:'HCFDLab',
+      statecustom:'0',//自定义求解状态
       active:'',
          restime:'',
          monitorHCFD:false,
@@ -570,10 +571,24 @@ linezhexian(num){
           })
         
       },
+      // 状态
+      statechange(val){
+        this.statecustom=val;
+          console.log( this.statecustom);
+          console.log(111222);
+      },
       // 调用求解过程日志
       fun(){
+          this.logs='';
+          this.newlog='';
+        if( this.statecustom=='1'){
+           Message({
+            type: "warning",
+            message: "运行中不能点击",
+          });
+        }else{
+          console.log(222444);
         if( this.state=='1'){
-          console.log(111)
            this.$refs.monitor.getwebsocket(); 
         }else{
           this.$refs.hcfd.hcfdrun();
@@ -582,24 +597,41 @@ linezhexian(num){
            this.$refs.monitor.container_show=true;
            this.monitorHCFD=this.$refs.monitor.container_show
             this.$refs.TFileStream.imgtupian=false;
+        }
       },
       funagain(){
+           if( this.statecustom=='1'){
+           Message({
+            type: "warning",
+            message: "运行中不能点击",
+          });
+        }else{
           this.$refs.monitor.getwebsocket(); 
              this.$refs.monitor.container_show=true;
            this.monitorHCFD=this.$refs.monitor.container_show
             this.$refs.TFileStream.imgtupian=false;
+            }
       },
 // 工具栏的显示隐藏
 changehcfd(pare){
+     this.logs='';
+    this.newlog='';
+      if( this.statecustom=='1'){
+           Message({
+            type: "warning",
+            message: "运行中不能点击",
+          });
+        }else{
     this.$refs.monitor.getwebsocket(); 
   this.$refs.TFileStream.imgtupian=false;
   this.$refs.monitor.container_show=pare;
-
+}
 },
  // 日志的文本框
        footerShows(evt) {
          if(evt=='claer'){
           this.logs='';
+          this.newlog='';
 
          }else{
         this.footerShow=!this.footerShow
@@ -610,10 +642,22 @@ changehcfd(pare){
     getthislog(log){
    this.newlog = log+"\n"+this.newlog;
     this.logs=this.newlog;
+    let logs=this.logs;
      if ( this.logs.indexOf("newSolver end") >= 0) {
             this.elodingfalse=false;
             this.isSolverEnd = true;
+             this.statecustom='0'; 
       }
+        if( logs.includes("oldSolver end")){
+         
+            this.statecustom='0';
+            console.log(this.statecustom);
+            console.log(111188888);
+             //this.statecustom='1';
+      
+      }
+          
+      
     },
     // 剩余时间
     restimeyear(time){
@@ -726,16 +770,17 @@ let params = {
           
                     let data=JSON.parse(rdata.paramJson);
                       if(data.msgType=="contour_param"){
-                        sessionStorage.setItem("ytdata",JSON.stringify(data));
+                        //sessionStorage.setItem("ytdata",JSON.stringify(data));
+                          this.$refs.hcfd.outlinedata(JSON.stringify(data))
                           this.ytdata=rdata;
                       }
                       if(data.msgType=='line_param'){
-                          sessionStorage.setItem("ytdata",JSON.stringify(data));
-                            this.ytdata=rdata;
+                           this.$refs.hcfd.outlinedata(JSON.stringify(data))
                       }
                       if(data.msgType=='vector_param'){
                         sessionStorage.setItem("vectorparam",JSON.stringify(data));
                         this.vectorparam=rdata;
+                         this.$refs.hcfd.vectordata(JSON.stringify(data))
                       }
                       if(data.msgType=='stream_param'){
                           this.$refs.hcfd.streamdata(JSON.stringify(data))
@@ -743,7 +788,6 @@ let params = {
                       if(data.msgType=='solidsurface_param'){
                           //this.$refs.hcfd.colorval(JSON.stringify(data))
                       }
-
               }else if(rdata.action=='LineDisplay'){
                           this.ytdata=rdata;
               }else if(rdata.action=='SliceDisplayAdd'){