|
@@ -766,8 +766,8 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
- <!-- Xfiol -->
|
|
|
- <el-dialog v-model="dialog.Xfiol" align-center :modal="false" :close-on-click-modal="false"
|
|
|
+ <!-- Xfiol改版之前 -->
|
|
|
+ <!-- <el-dialog v-model="dialog.Xfiol" align-center :modal="false" :close-on-click-modal="false"
|
|
|
:append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false"
|
|
|
modal-class="summary-dlg2 summary-dlg" :before-close="handleClose" width="500"
|
|
|
class="dialog_class bgcolor tianjia sel">
|
|
@@ -785,9 +785,9 @@
|
|
|
</ul>
|
|
|
<div class="chushij">
|
|
|
<el-button type="info" size="small" @click="initialize()">初始化</el-button>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<!-- 输入 -->
|
|
|
- <div class="eldesign classtable" style="margin-top: 10px;" v-if="activeIndex3 == 0">
|
|
|
+ <!-- <div class="eldesign classtable" style="margin-top: 10px;" v-if="activeIndex3 == 0">
|
|
|
<el-table :data="srtable" border style="width: 100%" height="400">
|
|
|
<el-table-column prop="enable" label="启用" width="50">
|
|
|
<template v-slot="scope">
|
|
@@ -816,24 +816,21 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<!-- 执行 -->
|
|
|
- <div class="eldesign classtable" style="margin-top: 10px;" v-if="activeIndex3 == 1">
|
|
|
+ <!-- <div class="eldesign classtable" style="margin-top: 10px;" v-if="activeIndex3 == 1">
|
|
|
<div style="display: flex;">
|
|
|
<el-form-item label="执行路径">
|
|
|
- <!-- <el-input v-model="num" :min="1" :max="10" controls-position="right" /> -->
|
|
|
<el-select v-model="zhixing" :suffix-icon="CaretBottom" placeholder="请选择">
|
|
|
- <!-- <el-option v-for="item in quxian" :key="item.value" :label="item.label" :value="item.value">
|
|
|
- </el-option> -->
|
|
|
<el-option label="Rosenbrock" value="Rosenbrock">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-button type="primary" style="margin-left: 10px;">选择路径</el-button>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<!-- 输出 -->
|
|
|
- <div class="eldesign classtable" style="margin-top: 10px;" v-if="activeIndex3 == 2">
|
|
|
+ <!-- <div class="eldesign classtable" style="margin-top: 10px;" v-if="activeIndex3 == 2">
|
|
|
<el-table :data="sctable" border style="width: 100%" height="400">
|
|
|
<el-table-column prop="enable" label="启用" width="50">
|
|
|
<template v-slot="scope">
|
|
@@ -873,6 +870,114 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ </el-dialog> -->
|
|
|
+ <!-- Xfiol改版后的 -->
|
|
|
+ <el-dialog v-model="dialog.Xfiol" align-center :modal="false" :close-on-click-modal="false"
|
|
|
+ :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false"
|
|
|
+ modal-class="summary-dlg2 summary-dlg" :before-close="handleClose" width="500"
|
|
|
+ class="dialog_class bgcolor tianjia sel">
|
|
|
+
|
|
|
+ <template #header="{ titleId, titleClass }">
|
|
|
+ <div class="my-header ">
|
|
|
+ <el-image :src="getImgPath('xuek9.png')" fit="contain"></el-image>
|
|
|
+ <h4 :id="titleId" :class="titleClass">Xfiol</h4>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div class="youhualog youhualog1" style="height: 480px;">
|
|
|
+ <ul>
|
|
|
+ <li v-for="(tab, index) in newxfoil" :key="index" :class="{ 'active2': activeIndex3 === index }"
|
|
|
+ @click="dianjia(index)">{{ tab }}</li>
|
|
|
+ </ul>
|
|
|
+ <div class="chushij">
|
|
|
+ <el-button type="info" size="small" @click="initialize()">初始化</el-button>
|
|
|
+ </div>
|
|
|
+ <!-- 输入 -->
|
|
|
+ <div class="eldesign classtable" style="margin-top: 10px;" v-if="activeIndex3 == 0">
|
|
|
+ <el-table :data="srnewtable" border style="width: 100%" height="400">
|
|
|
+
|
|
|
+ <el-table-column prop="name" label="参数名称">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-input v-model="row.name" @change="handleEdit(row)" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="v1" label="参数值">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-input v-model.number="row.v1" @change="handleEdit(row)" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="enable" label="启用" width="100">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <el-checkbox :false-label="'0'" :true-label="'1'" :label="false" v-model="scope.row.enable" @change="changecheck($event,scope.row)"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <!-- 输出 -->
|
|
|
+ <div class="eldesign classtable" style="margin-top: 10px;" v-if="activeIndex3 == 1">
|
|
|
+ <el-table :data="scnewtable" border style="width: 100%" height="400">
|
|
|
+ <el-table-column prop="name" label="参数名称">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-input v-model="row.name" @change="handleEdit(row)" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="v1" label="参数值">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-input v-model="row.v1" @change="handleEdit(row)" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="con" label="约束属性">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <el-select class="no-border " v-model.number="scope.row.con" :suffix-icon="CaretBottom"
|
|
|
+ placeholder="请选择">
|
|
|
+ <el-option v-for="item in shuxingopt" :key="item.value" :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="enable" label="启用" width="100">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <el-checkbox :false-label="'0'" :true-label="'1'" :label="false" v-model="scope.row.enable" @change="changecheck($event,scope.row)"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <!-- 中间参数 -->
|
|
|
+ <div class="eldesign classtable" style="margin-top: 10px;" v-if="activeIndex3 == 2">
|
|
|
+ <el-form-item label="计算完成">
|
|
|
+ <el-radio-group v-model="resource">
|
|
|
+ <el-radio :value="0">是</el-radio>
|
|
|
+ <el-radio :value="1">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <div style="display:flex">
|
|
|
+ <div class="cstleft">
|
|
|
+ <el-form-item label="迭代次数:">
|
|
|
+ <el-input v-model="youhua.popsize" :step="100" :min="0" :max="1000" controls-position="right" />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="cstleft">
|
|
|
+ <el-form-item label="表面求解点个数:" >
|
|
|
+ <el-input v-model="youhua.popsize" :step="100" :min="0" :max="1000" controls-position="right" />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button type="info" @click="newxfiol">新建 </el-button>
|
|
|
+ <el-button type="info" @click="dialog.Xfiol = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="dialog.Xfiol = false">
|
|
|
+ 确定
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</el-dialog>
|
|
|
<!--梯度优化器 -->
|
|
|
<el-dialog v-model="dialog.tidu" align-center :modal="false" :close-on-click-modal="false"
|
|
@@ -965,12 +1070,11 @@
|
|
|
<el-table :data="tableDatacst" style="width: 100%" border>
|
|
|
<el-table-column prop="date" label="" width="180" />
|
|
|
<el-table-column
|
|
|
- v-for="(column,index) in tablecstHeaders" :key="index"
|
|
|
- :prop="column.prop"
|
|
|
- :label="column.label">
|
|
|
-
|
|
|
- <template #default="{ row }">
|
|
|
- <el-input v-model="row.label" />
|
|
|
+ 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>
|
|
@@ -980,7 +1084,7 @@
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
|
<el-button @click="dialog.CSTt = false">取消</el-button>
|
|
|
- <el-button type="primary" @click=" dialog.CSTt = false">
|
|
|
+ <el-button type="primary" @click="cstok()">
|
|
|
确定
|
|
|
</el-button>
|
|
|
</div>
|
|
@@ -1322,7 +1426,8 @@ import BarChart from './echart/BarChart.vue'
|
|
|
import scatter from './echart/scatter.vue'
|
|
|
import radar from './echart/radar.vue'
|
|
|
let Sidebarref = ref();
|
|
|
-let cstnum=ref(0);
|
|
|
+let resource=ref(0);
|
|
|
+let cstnum=ref('');
|
|
|
let formLabelWidth3=ref(100)
|
|
|
let tablecstHeaders=ref([]);
|
|
|
let treeitem = ref({});
|
|
@@ -1397,7 +1502,30 @@ let tabName = ref("one")
|
|
|
const tabs = ['信息栏', '优化问题'];
|
|
|
const listli = ['设计变量', '约束条件', '优化目标'];
|
|
|
const xfoil = ['输入', '执行', '输出'];
|
|
|
+const newxfoil = ['输入参数', '输出参数', '中间参数'];
|
|
|
let srtable = ref([]);
|
|
|
+let srnewtable = ref([
|
|
|
+{
|
|
|
+ date: '2016-05-04',
|
|
|
+ name: 'Aleyna Kutzner',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ date: '2016-05-03',
|
|
|
+ name: 'Helen Jacobi',
|
|
|
+ },
|
|
|
+]);
|
|
|
+let scnewtable = ref([
|
|
|
+{
|
|
|
+ date: '2016-05-04',
|
|
|
+ name: 'Aleyna Kutzner',
|
|
|
+ con:-1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ date: '2016-05-03',
|
|
|
+ name: 'Helen Jacobi',
|
|
|
+ con:1
|
|
|
+ },
|
|
|
+]);
|
|
|
let sctable = ref([]);
|
|
|
// let quxian=ref([{
|
|
|
// val:'1',name:"设计变量",
|
|
@@ -1455,6 +1583,10 @@ let options3 = ref([
|
|
|
{ label: '大于', value: -1 },
|
|
|
{ label: '小于', value: 1 },
|
|
|
])
|
|
|
+let shuxingopt = ref([
|
|
|
+ { label: '约束条件', value: -1 },
|
|
|
+ { label: '优化目标', value: 1 },
|
|
|
+])
|
|
|
let defaultExpandedArr = ref([]);
|
|
|
const defaultProps = {
|
|
|
children: 'children',
|
|
@@ -1622,13 +1754,13 @@ let dialog = ref({
|
|
|
let tableDatacst=ref([
|
|
|
{date:"上表头"},{date:"下表头"}
|
|
|
])
|
|
|
-let columns=ref[{
|
|
|
- columns: [
|
|
|
- { label: '上表面', prop: 'sbiao' },
|
|
|
- { label: '下表面', prop: 'xbiao' },
|
|
|
- // 动态添加更多列
|
|
|
- ]
|
|
|
-}]
|
|
|
+// let columns=ref[{
|
|
|
+// columns: [
|
|
|
+// { label: '上表面', prop: 'sbiao' },
|
|
|
+// { label: '下表面', prop: 'xbiao' },
|
|
|
+// // 动态添加更多列
|
|
|
+// ]
|
|
|
+// }]
|
|
|
let options = ref([
|
|
|
{ label: '升阻比', value: '升阻比' },
|
|
|
{ label: 'RCS', value: 'RCS' },
|
|
@@ -1793,21 +1925,36 @@ const handleNodeClick = (data) => {
|
|
|
}
|
|
|
// cst时间
|
|
|
const keydownenter=()=>{
|
|
|
+ //cstnum.value='';
|
|
|
tablecstHeaders.value=[];
|
|
|
let arrheader=[];
|
|
|
+ let tablearr=[];
|
|
|
let num=Number(cstnum.value);
|
|
|
|
|
|
-for(let i=0;i<=num;i++){
|
|
|
+for(let i=1;i<=num+1;i++){
|
|
|
arrheader.push('x'+i)
|
|
|
}
|
|
|
-arrheader.forEach(function (item){
|
|
|
-let obj ={ label: item,prop:null };
|
|
|
+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) => {
|
|
|
if (val == '优化器') {
|
|
@@ -2518,6 +2665,12 @@ const initialize = () => {
|
|
|
ElMessage.error(err.returnMsg)
|
|
|
})
|
|
|
}
|
|
|
+// new输入参数
|
|
|
+const changecheck = (val,row) => {
|
|
|
+ console.log(val);
|
|
|
+ console.log(row);
|
|
|
+
|
|
|
+}
|
|
|
//输入参数查询
|
|
|
const importget = () => {
|
|
|
const params = {
|