|
@@ -472,7 +472,10 @@ methods:{
|
|
|
this.solverConfigid=res.solverConfigid;
|
|
|
let data= JSON.parse(this.objopp);
|
|
|
this.numsteps=data.nmlParam.steps;
|
|
|
- that.startimg("init",'loaddata');
|
|
|
+ setTimeout(function(){
|
|
|
+ that.initWebSocket();
|
|
|
+ },1000)
|
|
|
+
|
|
|
})
|
|
|
}else if(val=='FEMLab(结构力学)'){
|
|
|
this.$nextTick(()=>{
|
|
@@ -607,7 +610,7 @@ let params = {
|
|
|
request(params)
|
|
|
.then((res) => {
|
|
|
console.log(res);
|
|
|
- that.initWebSocket();
|
|
|
+ // that.initWebSocket();
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
|
|
@@ -626,23 +629,22 @@ let params = {
|
|
|
this.websock.onclose = this.websocketclose;
|
|
|
},
|
|
|
websocketonopen(e){ //连接建立之后执行send方法发送数据
|
|
|
-
|
|
|
+ this.startimg("init",'loaddata');
|
|
|
|
|
|
},
|
|
|
websocketonerror(){//连接建立失败重连
|
|
|
this.websock.close()
|
|
|
},
|
|
|
websocketonmessage(e){ //数据接收
|
|
|
- // this.loadingopen();
|
|
|
- this.$refs.monitor.hiden();
|
|
|
- console.log(e);
|
|
|
+ this.loadingopen();
|
|
|
+ // this.$refs.monitor.container_show=true;
|
|
|
+
|
|
|
try{
|
|
|
const redata = JSON.parse(e.data);
|
|
|
- console.log(redata);
|
|
|
- console.log(redata.img)
|
|
|
-
|
|
|
- this.$refs.TFileStream.imgtupian=true;
|
|
|
+ console.log(redata);
|
|
|
+ this.$refs.TFileStream.imgtupian=true;
|
|
|
this.$refs.TFileStream.fetchData(redata);
|
|
|
+ that.$refs.monitor.container_show=false;
|
|
|
|
|
|
return true;
|
|
|
}catch(error){
|