|
@@ -104,7 +104,8 @@
|
|
|
<el-container class="beij-container">
|
|
|
<el-container>
|
|
|
<el-main ref="main3d" :class="headMenu_2Show?'maxh400':'maxh221'" style="padding:0">
|
|
|
- <div class="toolmain lbg_color3 el-menu">
|
|
|
+ <tool1 @startimg="startimg"></tool1>
|
|
|
+ <!-- <div class="toolmain lbg_color3 el-menu">
|
|
|
<div class="imgzong itemimg1">
|
|
|
<div class="item1" v-for="(item,index) in toollist" :key="'tl1-'+ index" :class="{activeOrange1:active=='tl1-'+ index}" @click="meshclick($event,index,'tl1-'+ index)">
|
|
|
<el-tooltip class="item" effect="dark" :content="item.titlie" placement="bottom">
|
|
@@ -130,8 +131,11 @@
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
+ <!-- 加载折线图 -->
|
|
|
<echartsHFCD ref="monitor" v-if="femnum=='HCFDLab'" @getthislog='getthislog' @restimeyear='restimeyear' :projectId='pid' :nmlsteps="Number(numsteps)"></echartsHFCD>
|
|
|
+ <!-- 加载图片 -->
|
|
|
+ <TFileStream :projectId='pid' ref="TFileStream" ></TFileStream>
|
|
|
</el-main>
|
|
|
<div class="footerTitle el-tag--primary">
|
|
|
<div>{{ $t("FEM.other.console") }}
|
|
@@ -209,8 +213,10 @@ import hcfd from './HCFDLab/index.vue'
|
|
|
import fem from './FEMLab/fem.vue'
|
|
|
import echartsHFCD from "./HCFDLab/echartsHFCD.vue";
|
|
|
import { number } from 'echarts/lib/export'
|
|
|
+import TFileStream from "./compoents/TFileStreamhcfd.vue";
|
|
|
+import tool1 from "./compoents/tool1.vue";
|
|
|
export default {
|
|
|
- components:{geometry,meshindex,Geometryandclass,Materials,touch,initial,boundary,Meshauto,loadcase,zuoye,echartsHFCD,result,caozuo,toolindex,hcfd,fem},
|
|
|
+ components:{geometry,meshindex,Geometryandclass,Materials,touch,initial,boundary,Meshauto,loadcase,zuoye,echartsHFCD,result,caozuo,toolindex,hcfd,fem,TFileStream,tool1},
|
|
|
data() {
|
|
|
return {
|
|
|
tl1,tl2,tl3,tl4,tl5,tl6,tl7,tl8,tl9,tl10,
|
|
@@ -289,6 +295,7 @@ export default {
|
|
|
},
|
|
|
// current:0,
|
|
|
pid:'',
|
|
|
+ solverConfigid:'',
|
|
|
activeName: 'one',
|
|
|
activeName1:'first',
|
|
|
objopp:'',
|
|
@@ -399,8 +406,10 @@ created(){
|
|
|
this.init();
|
|
|
},
|
|
|
mounted(){
|
|
|
+
|
|
|
let curcolor = this.$store.state.themecolor;
|
|
|
this.classH2 = 'custome-' + curcolor;
|
|
|
+
|
|
|
},
|
|
|
methods:{
|
|
|
meshclick(e,index,key){
|
|
@@ -457,10 +466,10 @@ methods:{
|
|
|
|
|
|
},
|
|
|
init(){
|
|
|
- this.pid=this.$route.query.pid;
|
|
|
- console.log(this.pid);
|
|
|
+ //this.pid=this.$route.query.pid;
|
|
|
+ this.pid='31f117acb7e74232a3267b091391eab2';
|
|
|
this.solverchange('HCFDLab');
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
//项目求解查询
|
|
|
pojectquery(){
|
|
@@ -468,6 +477,7 @@ methods:{
|
|
|
},
|
|
|
solverchange(val){
|
|
|
console.log(val)
|
|
|
+ let that=this;
|
|
|
this.femnum=val;
|
|
|
const params = {
|
|
|
transCode: 'C00003',
|
|
@@ -483,7 +493,14 @@ methods:{
|
|
|
if(val=='HCFDLab'){
|
|
|
this.$nextTick(()=>{
|
|
|
this.$refs.hcfd.hcfdchange(this.objopp,res.solverConfigid);
|
|
|
+ this.solverConfigid=res.solverConfigid;
|
|
|
let data= JSON.parse(this.objopp);
|
|
|
+ // this.startimg("init");
|
|
|
+ //this.startimg("loaddata");
|
|
|
+ setTimeout(function(){
|
|
|
+ // that.initWebSocket();
|
|
|
+ },500)
|
|
|
+
|
|
|
|
|
|
this.numsteps=data.nmlParam.steps;
|
|
|
console.log(this.numsteps);
|
|
@@ -532,8 +549,100 @@ methods:{
|
|
|
restimeyear(time){
|
|
|
this.restime=time;
|
|
|
},
|
|
|
-
|
|
|
+ //开起loading
|
|
|
+loadingopen(){
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: 'Loading',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ });
|
|
|
+ return loading;
|
|
|
+},
|
|
|
+ // 关闭lodind
|
|
|
+loadingend(loading){
|
|
|
+ loading.close()
|
|
|
+
|
|
|
+},
|
|
|
+ // 文件渲染之前的动作
|
|
|
+ startimg(action){
|
|
|
+ console.log(2222);
|
|
|
+let params = {
|
|
|
+ transCode: "AFT001",// 服务器渲染实例接口创建推流
|
|
|
+ pid:this.pid,
|
|
|
+ solverConfigId: this.solverConfigid,
|
|
|
+ action:action,
|
|
|
+ paramJson:"",
|
|
|
+ };
|
|
|
+ this.loading = true;
|
|
|
+ request(params)
|
|
|
+ .then((res) => {
|
|
|
+ console.log(res);
|
|
|
+
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.loadingend(this.loadingopen());
|
|
|
+
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
+ // // 文件渲染websoket
|
|
|
+ initWebSocket(){ //初始化weosocket
|
|
|
+
|
|
|
+ const wsuri = "ws://192.168.0.43:8087//websocket?projectId="+this.pid;
|
|
|
+ this.websock = new WebSocket(wsuri);
|
|
|
+ this.websock.onmessage = this.websocketonmessage;
|
|
|
+ this.websock.onopen = this.websocketonopen;
|
|
|
+ this.websock.onerror = this.websocketonerror;
|
|
|
+ this.websock.onclose = this.websocketclose;
|
|
|
+ },
|
|
|
+ websocketonopen(e){ //连接建立之后执行send方法发送数据
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ websocketonerror(){//连接建立失败重连
|
|
|
+ this.websock.close()
|
|
|
+ },
|
|
|
+ websocketonmessage(e){ //数据接收
|
|
|
+
|
|
|
+ try{
|
|
|
+ const redata = JSON.parse(e.data);
|
|
|
+ console.log(redata.img);
|
|
|
+
|
|
|
+ // 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.TFileStream.imgtupian=true;
|
|
|
+ this.$refs.TFileStream.fetchData(redata);
|
|
|
+ console.log(22222)
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }catch(error){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ websocketsend(Data){//数据发送
|
|
|
+ this.websock.send(Data);
|
|
|
+ },
|
|
|
+ websocketclose(e){ //关闭
|
|
|
+ Message({
|
|
|
+ type: "error",
|
|
|
+ message: "websock断开连接",
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -788,26 +897,7 @@ html,body{
|
|
|
.itemimg1{
|
|
|
padding: 4px;
|
|
|
}
|
|
|
-.activeOrange1{
|
|
|
- background-color:rgba(240, 171, 39, 0);
|
|
|
- border-radius: 5px;
|
|
|
- box-sizing: border-box;
|
|
|
- box-sizing: border-box;
|
|
|
- background-color: yellow;
|
|
|
|
|
|
- }
|
|
|
-.activeOrange2 :focus{
|
|
|
- border-radius: 5px;
|
|
|
- border: 2px solid yellow;
|
|
|
- box-sizing: border-box;
|
|
|
- background-color: yellow;
|
|
|
-}
|
|
|
-.activeOrange2 :active{
|
|
|
- border-radius: 5px;
|
|
|
- border: none;
|
|
|
- box-sizing: border-box;
|
|
|
- background-color: none;
|
|
|
-}
|
|
|
.itemimg1 .item1 .el-image{
|
|
|
width: 20px;
|
|
|
height: 20px;
|