|
@@ -1888,12 +1888,11 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<!-- an_Animation -->
|
|
|
- <!-- an_Animation -->
|
|
|
+<!-- an_Animation -->
|
|
|
<el-dialog :visible.sync="dialog.an_Animation"
|
|
|
- v-if="active=='five9-0'"
|
|
|
+
|
|
|
:modal='false'
|
|
|
:close-on-click-modal="false"
|
|
|
- @close='activecleer()'
|
|
|
custom-class='dialoglocation dialog_color'
|
|
|
width="385px"
|
|
|
:style="styX"
|
|
@@ -1904,21 +1903,43 @@
|
|
|
</div>
|
|
|
<el-form :model="form">
|
|
|
<div class="heigeinput">
|
|
|
- <div class="line">
|
|
|
- <div class="linetext">动画</div>
|
|
|
- </div>
|
|
|
- <div class="listbtn anbtn">
|
|
|
- <el-button plain class="anniu" @click="animationclick('contour')">轮廓显示</el-button>
|
|
|
- <el-button plain class="anniu" @click="animationclick('line')">线</el-button>
|
|
|
- <el-button plain class="anniu" @click="animationclick('vector')">矢量</el-button>
|
|
|
- <el-button plain class="anniu" @click="animationclick('solidSurface')">实体表面</el-button>
|
|
|
- </div>
|
|
|
+ <div class="selecttype">
|
|
|
+ <span class="texttype">动画</span>
|
|
|
+
|
|
|
+ <el-form>
|
|
|
+ <el-form-item :label="$t('HCFD.results.steps') " :label-width="formLabelWidth2">
|
|
|
+ <el-select size="mini" v-model="animaval" @change="animationclick" placeholder="请选择" style="width:100%">
|
|
|
+ <el-option
|
|
|
+ v-for="setep in classlist"
|
|
|
+ :key="setep.val"
|
|
|
+ :label="setep.titlie"
|
|
|
+ :value="setep.val"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div class='selecttype'>
|
|
|
+ <span class="texttype">zoom</span>
|
|
|
+ <ul style="padding:0">
|
|
|
+ <li>
|
|
|
+ <el-checkbox-group v-model="checkList" >
|
|
|
+ <el-checkbox v-for="(item,key) in animationobj.zoomarr" @change="zoomList(item,key)" :key="key" :label="item" >{{item}}</el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
<div class="yiinpu loadclass" >
|
|
|
- <el-button plain class="anniu">Lode</el-button>
|
|
|
- <el-progress :percentage="50" :stroke-width="5" ></el-progress>
|
|
|
+ <el-button plain class="anniu" @click="loadonclick()">Load</el-button>
|
|
|
+ <el-progress :percentage="percentage" v-if="!isNaN(parseInt(percentage))" :stroke-width="5" ></el-progress>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
+ <div class="line">
|
|
|
+ <div class="linetext">通用场景</div>
|
|
|
+ </div>
|
|
|
<el-form-item label="第一步" :label-width="formLabelWidth2" >
|
|
|
- <el-input v-model="animationobj.firststep" autocomplete="off"></el-input>
|
|
|
+ <el-input v-model="animationobj.firststep" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="最后一步" :label-width="formLabelWidth2" >
|
|
|
<el-input v-model="animationobj.laststep" autocomplete="off"></el-input>
|
|
@@ -1926,47 +1947,20 @@
|
|
|
<el-form-item label="当前步" :label-width="formLabelWidth2" >
|
|
|
<el-input v-model="animationobj.currentstep" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
-<div class="line">
|
|
|
- <div class="linetext">通用场景</div>
|
|
|
- </div>
|
|
|
- <div class="block1" style="dispaly:flex">
|
|
|
+ <div class="block1" style="dispaly:flex">
|
|
|
<div class="listbtn">
|
|
|
- <el-button plain class="anniu">low</el-button>
|
|
|
- <el-slider v-model="value1" style="width:50%;margin: 0 10px 0 15px;"></el-slider>
|
|
|
- <el-button plain class="anniu">Quick</el-button>
|
|
|
+ <el-button plain class="anniu" @click="lowclick()">low</el-button>
|
|
|
+ <el-slider :max='1000' v-model.number="value1" style="width:50%;margin: 0 10px 0 15px;"></el-slider>
|
|
|
+ <el-button plain class="anniu" @click="Quickclick()">Quick</el-button>
|
|
|
</div>
|
|
|
<div class="listbtn anbtn">
|
|
|
- <el-button plain class="anniu">Start</el-button>
|
|
|
- <el-button plain class="anniu">Last</el-button>
|
|
|
- <el-button plain class="anniu">Play/stop</el-button>
|
|
|
- <el-button plain class="anniu">Next</el-button>
|
|
|
- <el-button plain class="anniu">End</el-button>
|
|
|
+ <el-button plain class="anniu" @click="Startclick()">Start</el-button>
|
|
|
+ <el-button plain class="anniu" @click="Lastclick()">Last</el-button>
|
|
|
+ <el-button plain class="anniu" @click="Playstop()">Play/stop</el-button>
|
|
|
+ <el-button plain class="anniu" @click="Nextclick()">Next</el-button>
|
|
|
+ <el-button plain class="anniu" @click="Endclick()">End</el-button>
|
|
|
|
|
|
</div>
|
|
|
- <div class="anbtn1">
|
|
|
- <div class="yiinpu">
|
|
|
- <el-form-item label="Interral" :label-width="formLabelWidth5">
|
|
|
- <el-input v-model="form.name" autocomplete="off"></el-input>
|
|
|
- <el-button plain class="anniu">Edit</el-button>
|
|
|
- <el-button plain class="anniu">apply</el-button>
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- <div class="yiinpu">
|
|
|
- <el-form-item label="Scale Factor" :label-width="formLabelWidth5">
|
|
|
- <el-input v-model="form.name" autocomplete="off"></el-input>
|
|
|
- <el-button plain class="anniu">apply</el-button>
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class='selecttype'>
|
|
|
- <span class="texttype">zoom</span>
|
|
|
- <ul>
|
|
|
- <li v-for="(item,key) in animationobj.zoomarr" :key="key">
|
|
|
- <span class="zoomclass">{{item}}</span>
|
|
|
- <el-checkbox :label="item" :key="item" v-model="checked" @change="zoomList(item)">hide</el-checkbox>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-form>
|
|
@@ -1980,6 +1974,7 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
+
|
|
|
<filesload
|
|
|
ref="filesload"
|
|
|
:fileurls="fileurls"
|
|
@@ -2065,6 +2060,16 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ sign:'low',
|
|
|
+ signnum:false,
|
|
|
+ median:Number,
|
|
|
+ currentstep1:Number,
|
|
|
+ hideZones:'',
|
|
|
+ animationType:'ContourDisplay',
|
|
|
+ percentage:0,
|
|
|
+ countnum:0,
|
|
|
+ numan:1,
|
|
|
+ checkList:[],
|
|
|
animationobj:{
|
|
|
firststep:'',
|
|
|
laststep:'',
|
|
@@ -2382,6 +2387,13 @@ export default {
|
|
|
{ icon:shx22, titlie:'接触体-接触属性'},
|
|
|
{ icon:shx23, titlie:'接触体-接触对'},
|
|
|
],
|
|
|
+ classlist:[
|
|
|
+ {val:'ContourDisplay', titlie:' 轮廓显示'},
|
|
|
+ {val:'LineDisplay', titlie:'线'},
|
|
|
+ {val:'VectorDisplay', titlie:'矢量'},
|
|
|
+ {val:'SolidSurfaceDisplay', titlie:'实体表面'},
|
|
|
+ ],
|
|
|
+ animaval:'ContourDisplay',
|
|
|
fexkz:[
|
|
|
{ icon:shx2, titlie:'分析类型'},
|
|
|
{ icon:shx10, titlie:'并行类型'},
|
|
@@ -2658,6 +2670,9 @@ bStepok(action,index){
|
|
|
dataW:this.vector.w,
|
|
|
scaleFactor:this.vectorobj.scaleFactor,
|
|
|
index:index,
|
|
|
+ animationType:this.animationType,
|
|
|
+ hideZones:this.hideZones,
|
|
|
+
|
|
|
}
|
|
|
request(params)
|
|
|
.then((res) => {
|
|
@@ -2954,9 +2969,6 @@ let b=(Number(this.colorobj.B)/255).toFixed(4);
|
|
|
},
|
|
|
handleClick(tab, event) {
|
|
|
let tabindex=tab.index;
|
|
|
-if(tabindex=='2'){
|
|
|
- this.bStepok('ResultImport','');
|
|
|
-}
|
|
|
this.activecleer();
|
|
|
},
|
|
|
activecleer(){
|
|
@@ -3053,6 +3065,7 @@ this.styX.left=e.clientX+'px';
|
|
|
this.dialog.Stream_Surface=true;
|
|
|
break;
|
|
|
case 'six4-0':
|
|
|
+ this.value1= Number(this.animationobj.currentstep);
|
|
|
this.dialog.an_Animation=true;
|
|
|
break;
|
|
|
case 'five6-0':
|
|
@@ -3060,6 +3073,7 @@ this.styX.left=e.clientX+'px';
|
|
|
break
|
|
|
case 'six0-0':
|
|
|
this.setpnum();
|
|
|
+ this.currentstep1=Number(this.animationobj.currentstep)
|
|
|
this.dialog.an_steps=true;
|
|
|
break;
|
|
|
|
|
@@ -3087,32 +3101,34 @@ setpnum(){
|
|
|
let params = {
|
|
|
transCode: "AFT002",
|
|
|
pid:this.project.projectId,
|
|
|
- solverConfigId:this.solverConfigid,
|
|
|
+ solverConfigId:this.femsolverConfigid,
|
|
|
};
|
|
|
request(params)
|
|
|
.then((res) => {
|
|
|
let steps= res.steps.split(',');
|
|
|
this.femSteplist=steps;
|
|
|
+ this.median=Number(this.femSteplist[2])-Number(this.femSteplist[1]);
|
|
|
})
|
|
|
}
|
|
|
|
|
|
},
|
|
|
animationclick(val){
|
|
|
+ this.percentage=0;
|
|
|
+ this.animationType=val;
|
|
|
switch(val){
|
|
|
- case 'contour':
|
|
|
-
|
|
|
+ case 'ContourDisplay':
|
|
|
this.active='six2-0';
|
|
|
this.dialog.contour_visiable = true;
|
|
|
break;
|
|
|
- case 'line':
|
|
|
+ case 'LineDisplay':
|
|
|
this.active='six2-1';
|
|
|
this.dialog.Line_visiable = true;
|
|
|
break;
|
|
|
- case 'vector':
|
|
|
+ case 'VectorDisplay':
|
|
|
this.active='six2-2';
|
|
|
this.dialog.Vector_visiable = true;
|
|
|
break;
|
|
|
- case 'solidSurface':
|
|
|
+ case 'SolidSurfaceDisplay':
|
|
|
this.active='six3-0';
|
|
|
this.dialog.Solid_Surface = true;
|
|
|
break;
|
|
@@ -3255,6 +3271,179 @@ setpnum(){
|
|
|
this.websock.close();
|
|
|
|
|
|
},
|
|
|
+ // 动画的开始
|
|
|
+ // 动画
|
|
|
+ // zoom
|
|
|
+ zoomanimation(data) {
|
|
|
+ let zoomparam= JSON.parse(data);
|
|
|
+ this.animationobj.zoomarr=(zoomparam.zonename).split(",");
|
|
|
+ console.log( this.animationobj.zoomarr);
|
|
|
+ },
|
|
|
+//拿到勾选数据
|
|
|
+zoomList(data,index){
|
|
|
+ console.log(this.checkList)
|
|
|
+ console.log(data+index);
|
|
|
+
|
|
|
+},
|
|
|
+loadonclick(){
|
|
|
+this.hideZones=(this.checkList).toString()
|
|
|
+this.bStepok("animation",'','')
|
|
|
+},
|
|
|
+ Startclick(){
|
|
|
+ this.sign=='Start'
|
|
|
+ let that=this;
|
|
|
+ this.countnum=0;
|
|
|
+ this.value1= Number(this.animationobj.currentstep);
|
|
|
+ this.timesleep(100)
|
|
|
+ },
|
|
|
+ timesleep(time){
|
|
|
+ this.signnum=true;
|
|
|
+ const sleep = (timeout= time)=>new Promise( (resolve, reject)=>{
|
|
|
+ setTimeout (resolve, timeout);
|
|
|
+ });
|
|
|
+ let timer = async(timeout) => {
|
|
|
+ for(let i= this.currentstep1;i<=this.femSteplist.length-1;i++){
|
|
|
+ if(this.signnum)
|
|
|
+ if(this.signnum==true){
|
|
|
+ await sleep(time);
|
|
|
+ this.jiekou(this.femSteplist[i]);
|
|
|
+ }else{
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ // await sleep(time);
|
|
|
+ // this.jiekou(this.femSteplist[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ timer(time);
|
|
|
+ },
|
|
|
+ //Low/2
|
|
|
+ lowclick(){
|
|
|
+ // this.Stepe
|
|
|
+ this.sign='Low';
|
|
|
+ this.timesleep(2000)
|
|
|
+ },
|
|
|
+ Quickclick(){
|
|
|
+ this.sign='Quick';
|
|
|
+ this.timesleep(500)
|
|
|
+
|
|
|
+ },
|
|
|
+ //上一个
|
|
|
+ Lastclick(){
|
|
|
+ let startstep=Number(this.animationobj.firststep)
|
|
|
+ if(this.value1<=startstep){
|
|
|
+ Message({
|
|
|
+ type: "warning",
|
|
|
+ message: "已经是最开始一张",
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ console.log(this.median)
|
|
|
+ this.animationobj.currentstep= (this.value1)-this.median;
|
|
|
+ console.log( this.animationobj.currentstep);
|
|
|
+ this.jiekou( this.animationobj.currentstep);
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ // 下一个
|
|
|
+ Nextclick(){
|
|
|
+ let laststep=Number(this.animationobj.laststep)
|
|
|
+ if(this.value1>=laststep){
|
|
|
+ Message({
|
|
|
+ type: "warning",
|
|
|
+ message: "已经是最后一张",
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ this.animationobj.currentstep= (this.value1)+this.median;
|
|
|
+ console.log( this.animationobj.currentstep);
|
|
|
+ this.jiekou( this.animationobj.currentstep);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 点击一下循环,再点击一下停止备注记录长度在循环
|
|
|
+ Playstop(){
|
|
|
+ this.numan++
|
|
|
+ if(this.numan%2==0){
|
|
|
+ console.log("点击结束")
|
|
|
+ this.signnum=false;
|
|
|
+ // if( this.sign=='Low'){
|
|
|
+
|
|
|
+ // }else if(this.sign=='Quick'){
|
|
|
+ // this.signnum=false;
|
|
|
+ // }else if(this.sign=='Start'){
|
|
|
+
|
|
|
+ // }
|
|
|
+ // else{
|
|
|
+ console.log("没有动画播放")
|
|
|
+ // }
|
|
|
+ }else{
|
|
|
+ console.log("点击结束")
|
|
|
+
|
|
|
+ if( this.sign=='Low'){
|
|
|
+ this.lowclick()
|
|
|
+ this.signnum=true;
|
|
|
+ }else if(this.sign=='Quick'){
|
|
|
+ this.signnum=true;
|
|
|
+ this.Quickclick();
|
|
|
+ }else if(this.sign=='Start'){
|
|
|
+ this.signnum=true;
|
|
|
+ this.Startclick();
|
|
|
+ }else{
|
|
|
+ console.log("没有动画播放")
|
|
|
+ }
|
|
|
+ console.log("点开始")
|
|
|
+
|
|
|
+ }
|
|
|
+ // this.numan++;
|
|
|
+ // let flag = true;
|
|
|
+ // this.value1= Number(this.animationobj.currentstep);
|
|
|
+ // const sleep = (timeout=2000)=>new Promise( (resolve, reject)=>{
|
|
|
+ // setTimeout (resolve, timeout);
|
|
|
+ // });
|
|
|
+ // console.log(this.value1+''+typeof this.value1)
|
|
|
+ // let timer = async(timeout) => {
|
|
|
+ // for(let i= this.countnum;i<=this.femSteplist.length;i++){
|
|
|
+ // if(this.numan%2==0){
|
|
|
+ // this.countnum++;
|
|
|
+ // if(i<this.femSteplist.length){
|
|
|
+ // this.jiekou(this.femSteplist[i]);
|
|
|
+ // }else{
|
|
|
+ // this.numan=1;
|
|
|
+ // this.countnum=0;
|
|
|
+ // }
|
|
|
+ // }else{
|
|
|
+ // flag = true;
|
|
|
+ // this.value1=Number(this.animationobj.currentstep);
|
|
|
+ // console.log("点击结束")
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // await sleep(2000);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // timer(2000);
|
|
|
+
|
|
|
+ },
|
|
|
+ // 最后一张
|
|
|
+ Endclick(){
|
|
|
+ this.jiekou(this.animationobj.laststep);
|
|
|
+ },
|
|
|
+ // 接口
|
|
|
+ jiekou(step){
|
|
|
+ this.value1=Number(step);
|
|
|
+ let that=this;
|
|
|
+ this.animationobj.currentstep=step+'';
|
|
|
+ let params = {
|
|
|
+ transCode: "AFT003",// 服务器渲染实例接口创建推流
|
|
|
+ pid:this.project.projectId,
|
|
|
+ solverConfigId: this.femsolverConfigid,
|
|
|
+ animationType:this.animaval,
|
|
|
+ step:this.animationobj.currentstep,
|
|
|
+ };
|
|
|
+ this.loading = true;
|
|
|
+ request(params)
|
|
|
+ .then((res) => {
|
|
|
+ this.$parent.chaild(res.img);
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ });
|
|
|
+ },
|
|
|
}
|
|
|
|
|
|
}
|