|
@@ -1166,11 +1166,53 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- CST -->
|
|
|
+ <el-dialog v-model="dialog.CSTt" align-center :modal="false" :close-on-click-modal="false"
|
|
|
+ :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
|
|
|
+ :before-close="handleClose" width="900" class="dialog_class bgcolor colortext tianjia sel">
|
|
|
+
|
|
|
+ <template #header="{ titleId, titleClass }">
|
|
|
+ <div class="my-header ">
|
|
|
+ <el-image :src="getImgPath('xuek0.png')" fit="contain"></el-image>
|
|
|
+ <h4 :id="titleId" :class="titleClass">CST</h4>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <csts/>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="dialog.CSTt = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="cstok()">
|
|
|
+ 确定
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- FFD -->
|
|
|
+ <el-dialog v-model="dialog.ffdt" align-center :modal="false" :close-on-click-modal="false"
|
|
|
+ :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
|
|
|
+ :before-close="handleClose" width="900" class="dialog_class bgcolor colortext tianjia sel">
|
|
|
+
|
|
|
+ <template #header="{ titleId, titleClass }">
|
|
|
+ <div class="my-header ">
|
|
|
+ <el-image :src="getImgPath('ffd.png')" fit="contain"></el-image>
|
|
|
+ <h4 :id="titleId" :class="titleClass">FFD</h4>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <ffds/>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="dialog.ffdt = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="cstok()">
|
|
|
+ 确定
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</el-dialog>
|
|
|
<!-- 气动分析CST、FFD -->
|
|
|
<el-dialog v-model="dialog.cstffd" align-center :modal="false" :close-on-click-modal="false"
|
|
|
:append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
|
|
|
- :before-close="handleClose" width="800" class="dialog_class bgcolor tianjia sel colortext">
|
|
|
+ :before-close="handleClose" width="1000" class="dialog_class bgcolor tianjia sel colortext">
|
|
|
|
|
|
<template #header="{ titleId, titleClass }">
|
|
|
<div class="my-header ">
|
|
@@ -1182,89 +1224,11 @@
|
|
|
<!-- CST -->
|
|
|
<el-tabs tab-position="left" class="demo-tabs" v-model="activeadf" @tab-click="adfhandleClick">
|
|
|
<el-tab-pane label="CST" name="CST">
|
|
|
- <div class="XFpdding">
|
|
|
- <div class="numberinput lefttext ">
|
|
|
- <el-form>
|
|
|
- <div>
|
|
|
- <el-form-item label="CST阶数:" :label-width="formLabelWidth200">
|
|
|
- <el-input v-model="cstnum" :max="20" controls-position="right" @keydown.enter='keydownenter'/>
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- <div style="display: flex;">
|
|
|
- <div class="cstleft ">
|
|
|
- <el-form-item label="上表面类函数参数N1:" :label-width="formLabelWidth200">
|
|
|
- <el-input v-model="youhua.popsize" :step="100" :min="0" :max="1000" controls-position="right" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="下表面类函数参数N1:" :label-width="formLabelWidth200">
|
|
|
- <el-input v-model="youhua.popsize" :step="100" :min="0" :max="1000" controls-position="right" />
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- <div class="cstleft " style="margin-left: 20px;">
|
|
|
- <el-form-item label="上表面类函数参数N2:" :label-width="formLabelWidth200">
|
|
|
- <el-input v-model="youhua.popsize" :step="100" :min="0" :max="1000" controls-position="right" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="下表面类函数参数N2:" :label-width="formLabelWidth200">
|
|
|
- <el-input v-model="youhua.popsize" :step="100" :min="0" :max="1000" controls-position="right" />
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="classtable">
|
|
|
- <el-table :data="tableDatacst" style="width: 100%" border>
|
|
|
- <el-table-column prop="date" label="表格" width="180" />
|
|
|
-
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <csts/>
|
|
|
</el-tab-pane>
|
|
|
<!-- FFD -->
|
|
|
<el-tab-pane label="FFD" name="FFD">
|
|
|
- <div class="XFpdding">
|
|
|
- <div>
|
|
|
- <el-form-item label="FFD box:" :label-width="formLabelWidth1">
|
|
|
- <el-input v-model="cstnum" :max="20" controls-position="right" @keydown.enter='keydownenter'/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="参考坐标系:" :label-width="formLabelWidth1">
|
|
|
- <el-radio-group v-model="radio1">
|
|
|
- <el-radio :value="0" :label="0">x-y-z</el-radio>
|
|
|
- <el-radio :value="1" :label="1">x-z-y</el-radio>
|
|
|
- <el-radio :value="2" :label="2">y-x-z</el-radio>
|
|
|
- <el-radio :value="3" :label="3">y-z-x</el-radio>
|
|
|
- <el-radio :value="4" :label="4">z-x-y</el-radio>
|
|
|
- <el-radio :value="5" :label="5">z-y-x</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- <el-form-item label="控制点数:" :label-width="formLabelWidth1">
|
|
|
- <div style="display: flex;">
|
|
|
- <el-input type="text" style="margin-right: 10px;" v-model="cstnum">
|
|
|
- <!-- <template #prepend>X方向</template> -->
|
|
|
- <template #prefix>X方向</template>
|
|
|
- </el-input>
|
|
|
- <el-input type="text" style="margin-right: 10px;" v-model="cstnum">
|
|
|
- <template #prefix>Y方向</template>
|
|
|
- </el-input>
|
|
|
- <el-input type="text" style="margin-right: 10px;" v-model="cstnum">
|
|
|
- <template #prefix>Z方向</template>
|
|
|
- </el-input>
|
|
|
- <el-button >应用</el-button>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- <div class="classtable">
|
|
|
- <el-table :data="tableDatacst" style="width: 100%" border>
|
|
|
- <el-table-column prop="表格" label="表格" width="180" />
|
|
|
- <el-table-column
|
|
|
- v-for="(item,index) in tablecstHeaders" :key="index"
|
|
|
- :prop="item.prop"
|
|
|
- :label="item.label">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-input v-model="row[item.prop]" @change="handleEdit(row)"/>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <ffds/>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-form>
|
|
@@ -1503,6 +1467,58 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- Python -->
|
|
|
+ <el-dialog v-model="dialog.Pythonshow" align-center :modal="false" :close-on-click-modal="false"
|
|
|
+ :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
|
|
|
+ :before-close="handleClose" width="700" class="dialog_class bgcolor colortext tianjia sel">
|
|
|
+
|
|
|
+ <template #header="{ titleId, titleClass }">
|
|
|
+ <div class="my-header ">
|
|
|
+ <!-- <el-image :src="getImgPath('xuek0.png')" fit="contain"></el-image> -->
|
|
|
+ <h4 :id="titleId" :class="titleClass">Python</h4>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div class="footerp" style="height:500px;padding:15px">
|
|
|
+ <!-- <el-input
|
|
|
+ v-model="textarea1"
|
|
|
+ style="width: 100%;height:400px"
|
|
|
+ :autosize="{ minRows: 2, maxRows: 19}"
|
|
|
+
|
|
|
+ type="textarea"
|
|
|
+ placeholder="Please input"
|
|
|
+ /> -->
|
|
|
+ <div class="text">
|
|
|
+ <el-input
|
|
|
+ v-model="textarea1"
|
|
|
+
|
|
|
+ style="width: 100%"
|
|
|
+ :autosize="{ minRows: 2, maxRows: 4 }"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="Please input"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="pythfoter">
|
|
|
+ <div class="span active" >
|
|
|
+ <el-image :src="xin" fit="contain"></el-image>
|
|
|
+ <span>信息栏 </span></div>
|
|
|
+ <el-input
|
|
|
+ v-model="textarea2"
|
|
|
+ style="width: 100%"
|
|
|
+ :autosize="{ minRows: 2, maxRows: 4 }"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="Please input"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="dialog.Pythonshow = false">检查</el-button>
|
|
|
+ <el-button type="primary">
|
|
|
+ 保存
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</el-dialog>
|
|
|
<!-- 内容区 -->
|
|
|
<div class="main mianflex">
|
|
@@ -1826,9 +1842,13 @@ import Joptimize from './titlecomponent/Joptimize.vue'
|
|
|
import Toptimize from './titlecomponent/Toptimize.vue'
|
|
|
import ADflow from './titlecomponent/ADflow.vue'
|
|
|
import Xfoil from './titlecomponent/Xfoil.vue'
|
|
|
+import csts from './titlecomponent/csts.vue'
|
|
|
+import ffds from './titlecomponent/ffds.vue'
|
|
|
let Sidebarref = ref();
|
|
|
let resource=ref(0);
|
|
|
let cstnum=ref('');
|
|
|
+let textarea2=ref()
|
|
|
+let textarea1=ref("import os\nnimport numpy as np+\nfrom surromdao.solver import BaseSolv+\nclass Branin(BaseSolver):+\ndef __init__(self, filename=os.pa+\nsuper().__init__(filename)+\ndef compute(self, xdict):+\nx= np.zeros(2)+\n#x[0] = xdict['x1']+\n#x[1] = xdict['x2']");
|
|
|
let Joptimizeref=ref();
|
|
|
let Doptimizeref=ref();
|
|
|
let Toptimizeref=ref();
|
|
@@ -2218,6 +2238,7 @@ let dialog = ref({
|
|
|
Xfiol: false,
|
|
|
tidu:false,
|
|
|
CSTt:false,
|
|
|
+ ffdt:false,
|
|
|
XfAD:false,
|
|
|
cstffd:false,
|
|
|
Taxs:false,
|
|
@@ -2227,10 +2248,9 @@ let dialog = ref({
|
|
|
task: false,
|
|
|
guanli: false,
|
|
|
optgroup:false,
|
|
|
+ Pythonshow:false
|
|
|
})
|
|
|
-let tableDatacst=ref([
|
|
|
- {date:"上表面CST参数"},{date:"下表面CST参数"}
|
|
|
-])
|
|
|
+
|
|
|
// let columns=ref[{
|
|
|
// columns: [
|
|
|
// { label: '上表面', prop: 'sbiao' },
|
|
@@ -2401,73 +2421,52 @@ const handleNodeClick = (data) => {
|
|
|
dialogbolen();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-// cst时间
|
|
|
-const keydownenter=()=>{
|
|
|
- //cstnum.value='';
|
|
|
- tablecstHeaders.value=[];
|
|
|
- let arrheader=[];
|
|
|
- let tablearr=[];
|
|
|
- let num=Number(cstnum.value);
|
|
|
-
|
|
|
-for(let i=1;i<=num+1;i++){
|
|
|
- arrheader.push('x'+i)
|
|
|
-}
|
|
|
-arrheader.forEach(function (item,index){
|
|
|
-
|
|
|
-let name="x"+Number(index+1);
|
|
|
-let obj ={ label: item,prop:name };
|
|
|
-console.log(obj);
|
|
|
-tablecstHeaders.value.push(obj);
|
|
|
-});
|
|
|
-tableDatacst.value.forEach(function (item){
|
|
|
- for(let j=1;j<=num+1;j++){
|
|
|
-let name=('x'+j);
|
|
|
-item['x' + j]=null;
|
|
|
-}
|
|
|
-tablearr.push(item);
|
|
|
-});
|
|
|
-tableDatacst.value=tablearr;
|
|
|
-}
|
|
|
-const cstok=()=>{
|
|
|
- // cstnum.value='';
|
|
|
- dialog.value.CSTt = false;
|
|
|
- console.log(tableDatacst.value);
|
|
|
-
|
|
|
-}
|
|
|
const optimizerfalse = (val) => {
|
|
|
console.log(val);
|
|
|
if (val == '优化器') {
|
|
|
- dialog.value.optimizer = true;
|
|
|
-
|
|
|
+ // dialog.value.optimizer = true;
|
|
|
+ activeadf.value='代理优化器';
|
|
|
+ dialog.value.optgroup = true;
|
|
|
+ } else if (val == '参数化') {
|
|
|
+ activeadf.value='CST'
|
|
|
+ dialog.value.cstffd = true;
|
|
|
+ }else if (val == '气动分析') {
|
|
|
+ activeadf.value='Xfoil'
|
|
|
+ dialog.value.XfAD = true;
|
|
|
} else if (val == '进化优化器') {
|
|
|
activeadf.value='进化优化器';
|
|
|
dialog.value.jboptimizer = true;
|
|
|
- // dialog.value.jboptimizer = true;
|
|
|
Joptimizeref.value.getoptimize(pid.value);
|
|
|
} else if (val == '代理优化器') {
|
|
|
activeadf.value='代理优化器';
|
|
|
// dialog.value.optgroup = true;
|
|
|
dialog.value.dboptimizer = true;
|
|
|
- } else if (val == 'Xfiol' || val == 'Rosenbrock') {
|
|
|
- importget();
|
|
|
- dialog.value.Xfiol = true;
|
|
|
+ }
|
|
|
+ // else if (val == 'Xfiol' || val == 'Rosenbrock') {
|
|
|
+ // importget();
|
|
|
+ // dialog.value.Xfiol = true;
|
|
|
|
|
|
- }else if(val == '梯度优化器'){
|
|
|
+ // }
|
|
|
+ else if(val == '梯度优化器'){
|
|
|
activeadf.value='梯度优化器';
|
|
|
dialog.value.tboptimizer = true;
|
|
|
}else if(val == 'CST'){
|
|
|
/// dialog.value.CSTt = true;
|
|
|
- activeadf.value='CST';
|
|
|
- dialog.value.cstffd = true;
|
|
|
- }else if(val == 'ADflow'){
|
|
|
+ // activeadf.value='CST';
|
|
|
+ dialog.value.CSTt = true;
|
|
|
+ }else if(val == 'FFD'){
|
|
|
+ /// dialog.value.CSTt = true;
|
|
|
+ // activeadf.value='CST';
|
|
|
+ dialog.value.ffdt = true;
|
|
|
+ }
|
|
|
+ else if(val == 'ADflow'){
|
|
|
// adfhandleClick();
|
|
|
activeadf.value='ADflow';
|
|
|
dialog.value.isADflow = true;
|
|
|
// dialog.value. = true;
|
|
|
}else if(val == 'Xfiol'){
|
|
|
- activeadf.value='Xfiol';
|
|
|
- dialog.value.XfAD = true;
|
|
|
+ // activeadf.value='Xfiol';
|
|
|
+ dialog.value.Xfiol = true;
|
|
|
}else if(val == 'FFD'){
|
|
|
activeadf.value='FFD';
|
|
|
dialog.value.cstffd = true;
|
|
@@ -2476,6 +2475,8 @@ const optimizerfalse = (val) => {
|
|
|
}else if(val == '模版'){
|
|
|
dialog.value.optgroup = true;
|
|
|
activeadf.value='代理优化器';
|
|
|
+ }else if(val == 'Python'){
|
|
|
+ dialog.value.Pythonshow = true;
|
|
|
}
|
|
|
else {
|
|
|
dialog.value.optimizer = false;
|
|
@@ -2486,6 +2487,7 @@ const optimizerfalse = (val) => {
|
|
|
dialog.value.CSTt = false;
|
|
|
dialog.value.XfAD = false;
|
|
|
dialog.value.cstffd = false;
|
|
|
+ dialog.value.Pythonshow = false;
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -2985,6 +2987,11 @@ const getmub = () => {
|
|
|
ElMessage.error(err.returnMsg)
|
|
|
})
|
|
|
}
|
|
|
+const cstok=()=>{
|
|
|
+ // cstnum.value='';
|
|
|
+ dialog.value.CSTt = false;
|
|
|
+
|
|
|
+}
|
|
|
//对象数组转化字符串
|
|
|
const getarr = (name, arrays) => {
|
|
|
console.log(arrays)
|
|
@@ -3555,7 +3562,7 @@ const adfhandleClick=(tab,event)=>{
|
|
|
line-height: 40px;
|
|
|
cursor: default;
|
|
|
position: relative;
|
|
|
- font-size: 17px;
|
|
|
+ font-size: 16px;
|
|
|
color: #333333;
|
|
|
font-family: 'Source Sans-Regular';
|
|
|
}
|
|
@@ -3667,7 +3674,7 @@ color: #2267B1;
|
|
|
font-family: 'Source Sans-Regular';
|
|
|
flex: 1;
|
|
|
border-left: 1px solid #B3B3B3;
|
|
|
- font-size: 17px;
|
|
|
+ font-size: 16px;
|
|
|
height: 40px;
|
|
|
line-height: 40px;
|
|
|
width: 168px;
|
|
@@ -3725,11 +3732,12 @@ color: #2267B1;
|
|
|
}
|
|
|
|
|
|
.classtable .el-table th .cell {
|
|
|
- background: #D8D8D8;
|
|
|
+ background: #fff;
|
|
|
}
|
|
|
|
|
|
.classtable .el-table .cell {
|
|
|
- font-size: 12px;
|
|
|
+ font-family: 'Source Sans-Regular';
|
|
|
+ font-size: 14px;
|
|
|
}
|
|
|
|
|
|
.classtable .el-table td.el-table__cell div {
|