liuqiao пре 2 година
родитељ
комит
161e62d3d2

+ 1 - 0
src/views/home/myproject/index.vue

@@ -221,6 +221,7 @@ this.init();
     rowclinck(row, column, event){
       console.log(row)
       this.$router.push({path:'/index',query:{pid:row.id}});
+     //this.$router.push({path:'/index',query:{pid:'fa26eb863f664446a20f7d461dfafd71'}});
     },
     newsave(){     //新建项目
          const params = {

+ 9 - 9
src/views/index/HCFDLab/echartsHFCD.vue

@@ -91,11 +91,11 @@ export default {
    p(s) {
 		return s < 10 ? '0' + s: s;
 	},
-    // 获取所有日志
+    // 获取求解日志
   newlog(){
          let params = {
-            transCode: "A001121",
-            projectId: this.projectId,
+            transCode: "C00006",
+            pid: this.projectId,
                     lesseeId: this.$store.getters.lesseeId
          
           };
@@ -108,8 +108,8 @@ export default {
   //获取历史数据每一条
   historydata(){
  let params = {
-            transCode: "A001122",
-            projectId: this.projectId,
+            transCode: "C00007",
+            pid: this.projectId,
              lesseeId: this.$store.getters.lesseeId
          
           };
@@ -133,10 +133,10 @@ export default {
     websocketonopen(e) {
           
       //连接建立之后执行send方法发送数据this.newlog();
-      if(this.lsolverState=='1'||this.numzhexian=='1'){
+      // if(this.lsolverState=='1'||this.numzhexian=='1'){
            this.newlog();
-              this.historydata()
-            }
+           //this.historydata()
+            // }
     },
     websocketonerror() {
       //连接建立失败重连
@@ -146,7 +146,7 @@ export default {
       //数据接收
    try{
             const redata = JSON.parse(e.data);
-            
+            console.log(redata);
             if(typeof redata==='object'&& redata){
               if(redata.type == "log"){
                  this.$emit('getthislog',redata.stats+redata.value);

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

@@ -7,7 +7,7 @@
                     
              </div> -->
         <div v-if="value2=='HCFDLab'">
-        <hcfd ref="hcfd" :objopp="objopp" ></hcfd>
+        <hcfd ref="hcfd" :objopp="objopp" :pid="pid" @fun="fun()" :exLoading="exLoading"></hcfd>
         </div>
           <div v-else-if="value2=='FEMLab(结构力学)'||value2=='FEMLab(结构力学)版本2'">
         <fem ref="fem" :femnum="femnum" ></fem>
@@ -106,9 +106,7 @@
   <el-container class="beij-container">
 <el-container>
    <el-main ref="main3d" :class="headMenu_2Show?'maxh400':'maxh221'" style="padding:0">
-              <!-- <echartsHFCD ref="monitor"   @getthislog='getthislog' @restimeyear='restimeyear' :lsolverState="lsolverState" :name="project.projectName" :numzhexian="numzhexian" :projectId='project.projectId' :nmlsteps="Number(parameterObj.nmlParam.steps)"></echartsHFCD>
-               加载图片条 -->
-            <!-- <TFileStream   :projectId="project.projectId" :servertype="servertype"  :wstep='wstep' :bStep='bStep' :vStep='vStep' ref="TFileStream"></TFileStream>  -->
+    <echartsHFCD ref="monitor"   @getthislog='getthislog' @restimeyear='restimeyear'  :projectId='pid'></echartsHFCD>
              <h1>我是主题
 
       </h1>
@@ -170,14 +168,17 @@ import toolindex from './tool/index.vue'
 import caozuo from './caozuo/index.vue'
 import hcfd from './HCFDLab/index.vue'
 import fem from './FEMLab/fem.vue'
+import echartsHFCD from "./HCFDLab/echartsHFCD.vue";
 export default {
-  components:{geometry,meshindex,Geometryandclass,Materials,touch,initial,boundary,Meshauto,loadcase,zuoye,result,caozuo,toolindex,hcfd,fem},
+  components:{geometry,meshindex,Geometryandclass,Materials,touch,initial,boundary,Meshauto,loadcase,zuoye,echartsHFCD,result,caozuo,toolindex,hcfd,fem},
   data() {
     return {
          restime:'',
         footerShow:true,
         headMenu_2Show:false,
+         exLoading:"hidden",
         logs: "欢迎来到HCFD",
+         newlog:'',
       data: [{
           label: '几何(33)',
           children: [{
@@ -324,9 +325,14 @@ export default {
     }
 
 
+},
+created(){
+
+  this.pid=this.$route.query.pid;
+  this.init();
 },
 mounted(){
-this.init();
+
 },
 methods:{
     handleNodeClick(data) {
@@ -341,6 +347,7 @@ methods:{
         init(){
           this.pid=this.$route.query.pid;
           console.log(this.pid);
+          this.solverchange('HCFDLab');
 
         },
     //项目求解查询
@@ -359,6 +366,7 @@ methods:{
         request(params)
           .then((res) => { 
         this.objopp=res.parameterObj;
+
         if(val=='HCFDLab'){
            this.$nextTick(()=>{
           this.$refs.hcfd.hcfdchange(this.objopp,res.solverConfigid);
@@ -377,7 +385,12 @@ methods:{
           })
         
       },
-  // 日志的文本框
+      // 调用求解过程日志
+      fun(){
+            this.$refs.monitor.getwebsocket(); 
+      },
+
+ // 日志的文本框
        footerShows(evt) {
          if(evt=='claer'){
           this.logs='';
@@ -387,6 +400,22 @@ methods:{
          }
            
     },
+     //日志
+    getthislog(log){
+   this.newlog = log+"\n"+this.newlog;
+    this.logs=this.newlog;
+     if ( this.logs.indexOf("Solver end") >= 0) {
+               this.exLoading='hidden';
+                  this.isSolverEnd = true;
+      }
+    },
+    // 剩余时间
+    restimeyear(time){
+      this.restime=time;
+    },
+   
+    
+
       }
 }
 </script>