Pārlūkot izejas kodu

4.20 0.2添加折线图

liuqiao 2 gadi atpakaļ
vecāks
revīzija
6cbc137ef7

+ 6 - 3
src/views/index/HCFDLab/echartsHFCD.vue

@@ -160,11 +160,9 @@ export default {
               const onelines = kgReplace(lines.trim()).split(" ")
                 .map((str) => str.trim());
               this.s1= onelines.slice(1,2).map((str) => Number(str));
-               console.log(this.s1);
           
             }
                this.timedata(redata.startTime,redata.time,this.s1[0]);
-               console.log(this.s1[0])
             
             }
               }
@@ -282,4 +280,9 @@ export default {
     },
   },
 };
-</script>
+</script>
+<style>
+.x-bar{
+  margin-top: 120px;
+}
+</style>

+ 15 - 4
src/views/index/HCFDLab/index.vue

@@ -139,6 +139,12 @@
                             <span >{{item.titlie}}</span>
             </div>
             </div>  
+              <div class="listitem lbg_color3 bkcolor3  imgsolution"  v-for="(item,index) in  solutionlist22"  :key="'four44-'+ index" :class="{activeOrange:active=='four44-'+ index}" @click="clickgeometry($event,index,'four44-'+ index)" >
+             <div class="item2 "   >
+                 <el-image :src="item.icon" fit="cover" />  
+                   <span >{{item.titlie}}</span>
+            </div>
+            </div> 
             </div>
         
           </el-tab-pane>
@@ -2577,7 +2583,7 @@ import q3 from '@/assets/icon/u9987.png'
 import q4 from '@/assets/icon/u3868.png'
 import q5 from '@/assets/icon/u10048.png'
 import q6 from '@/assets/icon/u10068.png'
-
+import qq from '@/assets/icon/14.png'
 
 import p1 from '@/assets/icon/7.png'
 import p2 from '@/assets/icon/zoomtowindow.png'
@@ -2686,7 +2692,7 @@ export default {
         w1,w2,w3,w4,w5,w6,
         d1,d2,d3,d4,
        j1,j2,
-       q1, q2,q3,q4,q5,q6,
+       q1, q2,q3,q4,q5,q6,qq,
        p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,
       visibles:false,
       restime:'',
@@ -2794,7 +2800,9 @@ export default {
          solutionlist21:[
              { icon:q4, titlie:'初始化'},
         ],
-        
+         solutionlist22:[
+             { icon:qq, titlie:'折线图'},
+        ],
         solutionlist3:[
             { icon:q5, titlie:'运行控制'},
             { icon:q6, titlie:'输出控制'},
@@ -3440,7 +3448,7 @@ hcfdparam(){
           this.hcfdparam();
           this.dialog.runc_visiable = false;
           //  this.hcfdExe();
-          this.hcfdrun();
+          // this.hcfdrun();
 
         },
         hcfdExe(){
@@ -3672,6 +3680,9 @@ this.styX.left=e.clientX+'px';
         case 'four4-2':
        this.hcfdrun(true);
        break;
+        case 'four44-0':
+          this.hcfdrun();
+       break;
       //   case 'four4-3':
       //  break;
       //   case 'four4-4':

+ 3 - 0
src/views/index/compoents/TFileStreamhcfd.vue

@@ -33,8 +33,11 @@ export default {
     },
     methods:{
       fetchData(imgs) {
+            console.log(33333);
+              console.log(imgs.img);
       this.loadingend(this.loadingopen());
           this.imgsrc = imgs.img;
+      
      
       },
       //开起loading

+ 47 - 18
src/views/index/index.vue

@@ -104,7 +104,7 @@
   <el-container class="beij-container">
 <el-container>
    <el-main ref="main3d" :class="headMenu_2Show?'maxh400':'maxh221'" style="padding:0">
-     <tool1 @startimg="startimg"></tool1>
+     <tool1 @startimg="startimg" :monitorHCFD="monitorHCFD"></tool1>
      <!-- 加载折线图 -->
     <echartsHFCD ref="monitor" v-if="femnum=='HCFDLab'"  @getthislog='getthislog' @restimeyear='restimeyear'  :projectId='pid' :nmlsteps="Number(numsteps)"></echartsHFCD>
     <!-- 加载图片 -->
@@ -196,6 +196,7 @@ export default {
      tl11,tl12,tl13,tl14,tl15,tl16,
       active:'',
          restime:'',
+         monitorHCFD:false,
         footerShow:true,
         headMenu_2Show:false,
          elodingfalse:false,
@@ -381,8 +382,7 @@ created(){
 mounted(){
 
       let curcolor  = this.$store.state.themecolor;
-      this.classH2 = 'custome-' + curcolor; 
-     
+      this.classH2 = 'custome-' + curcolor;
 },
 methods:{
    meshclick(e,index,key){
@@ -439,14 +439,52 @@ methods:{
 
         },
         init(){
+        
          this.pid=this.$route.query.pid;
         // this.pid='31f117acb7e74232a3267b091391eab2';
-          this.solverchange('HCFDLab');
+          this.solverchange1('HCFDLab');
+      
+        
      
         },
     //项目求解查询
       pojectquery(){
        
+      },
+       solverchange1(val){
+        console.log(val)
+        let that=this;
+        this.femnum=val;
+           const params = {
+          transCode: 'C00003',
+        pid:this.pid,
+        company:this.value0,
+        solverModel:this.value2
+        }
+        sessionStorage.setItem('params',JSON.stringify(params))
+        request(params)
+          .then((res) => { 
+        this.objopp=res.parameterObj;
+
+        if(val=='HCFDLab'){
+           this.$nextTick(()=>{
+          this.$refs.hcfd.hcfdchange(this.objopp,res.solverConfigid);
+          this.solverConfigid=res.solverConfigid;
+         let data= JSON.parse(this.objopp);
+          this.numsteps=data.nmlParam.steps;
+             that.startimg("init",'loaddata');
+           })   
+        }else if(val=='FEMLab(结构力学)'){
+             this.$nextTick(()=>{
+              this.$refs.fem.femchange(res.parameterObj,'abc6db6cb2c0482eb7964df6fea02c70');
+           })   
+        }else{
+          
+        }
+          })
+          .catch((err) => {
+          })
+        
       },
       solverchange(val){
         console.log(val)
@@ -468,7 +506,6 @@ methods:{
           this.$refs.hcfd.hcfdchange(this.objopp,res.solverConfigid);
           this.solverConfigid=res.solverConfigid;
          let data= JSON.parse(this.objopp);
-          this.startimg("init",'loaddata');
           this.numsteps=data.nmlParam.steps;
          console.log(this.numsteps);
            })   
@@ -489,6 +526,7 @@ methods:{
       fun(){
             this.$refs.monitor.getwebsocket(); 
            this.$refs.monitor.container_show=true;
+           this.monitorHCFD=this.$refs.monitor.container_show
                this.$refs.TFileStream.imgtupian=false;
       },
 
@@ -594,21 +632,12 @@ let params = {
          console.log(e);
         try{
             const redata = JSON.parse(e.data);   
-                
-            // if(redata.hasOwnProperty("data")){          
-            // }else{
-           
-            //     // this.newlog =this.newlog+"\n" +JSON.stringify(redata);
-            //     //   this.logs=this.newlog;
-            // }
-          //  if(redata.data!=undefined){
-                // this.$refs.monitor.hiden();
-                 this.$refs.monitor.container_show=false;
+            console.log(redata);
+            console.log(redata.img)
+              this.$refs.monitor.hiden();
               this.$refs.TFileStream.imgtupian=true;
               this.$refs.TFileStream.fetchData(redata);
-          //  }
-      
-     
+         
         return true;       
         }catch(error){
           return false;