浏览代码

界面修改

tangjunhao 7 月之前
父节点
当前提交
12fe816288
共有 4 个文件被更改,包括 113 次插入48 次删除
  1. 2 2
      src/views/home.vue
  2. 65 29
      src/views/titlecomponent/Doptimize.vue
  3. 23 8
      src/views/titlecomponent/Toptimize.vue
  4. 23 9
      src/views/titlecomponent/ffds.vue

+ 2 - 2
src/views/home.vue

@@ -2554,8 +2554,8 @@ const initoptimize = () => {
     console.log('3:', res3.checked);
 
     Joptimizeref.value.getoptimizeAssign(res1);
-
-
+    Doptimizeref.value.getDoptimizeAssign(res2);
+    Toptimizeref.value.getToptimizeAssign(res3);
 
     
     // 根据返回值来设置 activeadf

+ 65 - 29
src/views/titlecomponent/Doptimize.vue

@@ -236,35 +236,38 @@ const getDoptimize = (id) => {
   request(params).then((res) => {
     console.log('chushihua')
     if (res.hasOwnProperty('suid')) {
-      suid.value = res.suid;
-      youhua.value.algorithm = res.algorithm;
-      youhua.value.iout = res.iout;
-      youhua.value.irestart = res.irestart;
-      youhua.value.ndoe = res.ndoe;
-      youhua.value.ns = res.ns;
-      youhua.value.nsmax = res.nsmax;
-      youhua.value.nslf = res.nslf;
-      youhua.value.nsmaxlf = res.nsmaxlf;
-      youhua.value.nsmk = res.nsmk;
-      youhua.value.nsmaxmk = res.nsmaxmk;
-      youhua.value.xtol = res.xtol;
-      youhua.value.feasibilitytolreal = res.feasibilitytolreal;
-      youhua.value.feasibilitytolsurro = res.feasibilitytolsurro;
-      youhua.value.surromod = res.surromod;
-      youhua.value.corr = res.corr;
-      youhua.value.consttheta = res.consttheta;
-      youhua.value.porder = res.porder;
-      youhua.value.dcmp = res.dcmp;
-      youhua.value.paraopt = res.paraopt;
-      youhua.value.regular = res.regular;
-      youhua.value.infill = res.infill;
-      youhua.value.nparallel = res.nparallel;
-      youhua.value.iopt = res.iopt;
-      youhua.value.icstr = res.icstr;
-      youhua.value.ipopsize = res.ipopsize;
-      youhua.value.maxgen = res.maxgen;
-      youhua.value.pc = res.pc;
-      youhua.value.pm = res.pm;
+      // suid.value = res.suid;
+      // youhua.value.algorithm = res.algorithm;
+      // youhua.value.iout = res.iout;
+      // youhua.value.irestart = res.irestart;
+      // youhua.value.ndoe = res.ndoe;
+      // youhua.value.ns = res.ns;
+      // youhua.value.nsmax = res.nsmax;
+      // youhua.value.nslf = res.nslf;
+      // youhua.value.nsmaxlf = res.nsmaxlf;
+      // youhua.value.nsmk = res.nsmk;
+      // youhua.value.nsmaxmk = res.nsmaxmk;
+      // youhua.value.xtol = res.xtol;
+      // youhua.value.feasibilitytolreal = res.feasibilitytolreal;
+      // youhua.value.feasibilitytolsurro = res.feasibilitytolsurro;
+      // youhua.value.surromod = res.surromod;
+      // youhua.value.corr = res.corr;
+      // youhua.value.consttheta = res.consttheta;
+      // youhua.value.porder = res.porder;
+      // youhua.value.dcmp = res.dcmp;
+      // youhua.value.paraopt = res.paraopt;
+      // youhua.value.regular = res.regular;
+      // youhua.value.infill = res.infill;
+      // youhua.value.nparallel = res.nparallel;
+      // youhua.value.iopt = res.iopt;
+      // youhua.value.icstr = res.icstr;
+      // youhua.value.ipopsize = res.ipopsize;
+      // youhua.value.maxgen = res.maxgen;
+      // youhua.value.pc = res.pc;
+      // youhua.value.pm = res.pm;
+
+      getDoptimizeAssign(res);
+
     } else {
     }
   })
@@ -273,6 +276,38 @@ const getDoptimize = (id) => {
   })
 }
 
+const getDoptimizeAssign = (data) => {
+  suid.value = data.suid;
+  youhua.value.algorithm = data.algorithm;
+  youhua.value.iout = data.iout;
+  youhua.value.irestart = data.irestart;
+  youhua.value.ndoe = data.ndoe;
+  youhua.value.ns = data.ns;
+  youhua.value.nsmax = data.nsmax;
+  youhua.value.nslf = data.nslf;
+  youhua.value.nsmaxlf = data.nsmaxlf;
+  youhua.value.nsmk = data.nsmk;
+  youhua.value.nsmaxmk = data.nsmaxmk;
+  youhua.value.xtol = data.xtol;
+  youhua.value.feasibilitytolreal = data.feasibilitytolreal;
+  youhua.value.feasibilitytolsurro = data.feasibilitytolsurro;
+  youhua.value.surromod = data.surromod;
+  youhua.value.corr = data.corr;
+  youhua.value.consttheta = data.consttheta;
+  youhua.value.porder = data.porder;
+  youhua.value.dcmp = data.dcmp;
+  youhua.value.paraopt = data.paraopt;
+  youhua.value.regular = data.regular;
+  youhua.value.infill = data.infill;
+  youhua.value.nparallel = data.nparallel;
+  youhua.value.iopt = data.iopt;
+  youhua.value.icstr = data.icstr;
+  youhua.value.ipopsize = data.ipopsize;
+  youhua.value.maxgen = data.maxgen;
+  youhua.value.pc = data.pc;
+  youhua.value.pm = data.pm;
+}
+
 //代理优化器,添加保存
 const getaddDsave = () => {
   const params = {
@@ -321,6 +356,7 @@ const getaddDsave = () => {
 }
 defineExpose({
   getDoptimize,
+  getDoptimizeAssign,
   getaddDsave
 });
 </script>

+ 23 - 8
src/views/titlecomponent/Toptimize.vue

@@ -73,14 +73,16 @@ const getToptimize = (id) => {
   }
   request(params).then((res) => {
     if (res.hasOwnProperty('grid')) {
-      grid.value = res.grid;
-      youhua.value.algorithm = res.algorithm;
-      youhua.value.majoriterationslimit = res.majoriterationslimit;
-      youhua.value.majorprintlevel = res.majorprintlevel;
-      youhua.value.linearfeasibilitytolerance = res.linearfeasibilitytolerance;
-      youhua.value.nonlinearfeasibilitytolerance = res.nonlinearfeasibilitytolerance;
-      youhua.value.optimalitytolerance = res.optimalitytolerance;
-      youhua.value.verifylevel = res.verifylevel;
+      // grid.value = res.grid;
+      // youhua.value.algorithm = res.algorithm;
+      // youhua.value.majoriterationslimit = res.majoriterationslimit;
+      // youhua.value.majorprintlevel = res.majorprintlevel;
+      // youhua.value.linearfeasibilitytolerance = res.linearfeasibilitytolerance;
+      // youhua.value.nonlinearfeasibilitytolerance = res.nonlinearfeasibilitytolerance;
+      // youhua.value.optimalitytolerance = res.optimalitytolerance;
+      // youhua.value.verifylevel = res.verifylevel;
+
+      getToptimizeAssign(res);
 
     } else {
       
@@ -91,6 +93,18 @@ const getToptimize = (id) => {
   })
 }
 
+const getToptimizeAssign = (data) => {
+  pid.value = data.pid;
+  grid.value = data.grid;
+  youhua.value.algorithm = data.algorithm;
+  youhua.value.majoriterationslimit = data.majoriterationslimit;
+  youhua.value.majorprintlevel = data.majorprintlevel;
+  youhua.value.linearfeasibilitytolerance = data.linearfeasibilitytolerance;
+  youhua.value.nonlinearfeasibilitytolerance = data.nonlinearfeasibilitytolerance;
+  youhua.value.optimalitytolerance = data.optimalitytolerance;
+  youhua.value.verifylevel = data.verifylevel;
+}
+
 //代理优化器,添加保存
 const getaddTsave = () => {
   const params = {
@@ -119,6 +133,7 @@ const getaddTsave = () => {
 }
 defineExpose({
   getToptimize,
+  getToptimizeAssign,
   getaddTsave
 });
 </script>

+ 23 - 9
src/views/titlecomponent/ffds.vue

@@ -191,15 +191,17 @@ const getffds = (id) => {
   };
   request(params).then((res) => {
     if (res.hasOwnProperty("ffdid")) {
-      ffdid.value = res.ffdid;
-      ffdvalue.value.fname = res.fname;
-      ffdvalue.value.nx = res.nx;
-      ffdvalue.value.ny = res.ny;
-      ffdvalue.value.nz = res.nz;
-      order.value = Number(res.order);
-      vars.value = res.vars;
-      generateTable();
-      initializeTableFromVars();
+      // ffdid.value = res.ffdid;
+      // ffdvalue.value.fname = res.fname;
+      // ffdvalue.value.nx = res.nx;
+      // ffdvalue.value.ny = res.ny;
+      // ffdvalue.value.nz = res.nz;
+      // order.value = Number(res.order);
+      // vars.value = res.vars;
+      // generateTable();
+      // initializeTableFromVars();
+
+      getffdsAssign(res);
     }
   })
   .catch((err) => {
@@ -207,6 +209,18 @@ const getffds = (id) => {
     })
 };
 
+const getffdsAssign = (data) => {
+  ffdid.value = data.ffdid;
+  ffdvalue.value.fname = data.fname;
+  ffdvalue.value.nx = data.nx;
+  ffdvalue.value.ny = data.ny;
+  ffdvalue.value.nz = data.nz;
+  order.value = Number(data.order);
+  vars.value = data.vars;
+  generateTable();
+  initializeTableFromVars();
+};
+
 // ffd保存
 const getffdsave = () => {
   generateVars();