liuqiao преди 3 години
родител
ревизия
616eedb4c4
променени са 3 файла, в които са добавени 231 реда и са изтрити 42 реда
  1. 144 28
      src/views/home/myproject/index.vue
  2. 35 5
      src/views/index/HCFDLab/index.vue
  3. 52 9
      src/views/index/index.vue

+ 144 - 28
src/views/home/myproject/index.vue

@@ -30,6 +30,8 @@
     <!-- 表格 -->
      <template>
     <el-table
+      v-loading="loading"
+     element-loading-text="拼命加载中"
       :data="tableData"
       class="lbg_color2"
       @row-click="rowclinck"
@@ -40,17 +42,35 @@
         >
       </el-table-column>
       <el-table-column
-      prop="date"
+      prop="updateTime"
         label="最近编辑时间"
         >
        
       </el-table-column>
       <el-table-column
-         prop="address"
+         prop="remark"
         label="描述">
        
+      </el-table-column>
+         <el-table-column
+         prop="isshare"
+        label="是否公开">
+       <template slot-scope="scope">
+         <span  slot="content">{{
+            scope.row.isshare == '0'?"公有":"私有"
+            
+          }}</span>
+       </template>
+
+
       </el-table-column>
     </el-table>
+        <div class="pagination">
+      <Pagination
+        :pagination-config="paginationConfig"
+        @putPagination="getPagination"
+      ></Pagination>
+    </div>
   </template>
   <!-- 、新建文件 -->
 <el-dialog
@@ -59,22 +79,31 @@
   width="30%"
 >
        <el-form>
-   <el-form-item>
-      <span class="sblock">项目类型</span>
-          <el-radio  v-model="project.fileType" label="binary"
-            >公开</el-radio
-          >
-          <el-radio v-model="project.fileType" label="ascii">私有</el-radio>
+        <el-form-item  label="项目名称:" :label-width="formLabelWidth5">
+            <!-- <span class="sblock">项目类型</span> -->
+                <el-radio  v-model="newobj.isshare" label="0"
+                  >公开</el-radio
+                >
+          <el-radio v-model="newobj.isshare" label="1">私有</el-radio>
         </el-form-item>
- 
-        <div class="disflex">
+    <el-form-item label="项目名称:" :label-width="formLabelWidth5">
+      <el-input v-model="newobj.name" autocomplete="off"></el-input>
+    </el-form-item>
+       <el-form-item label="项目描述:" :label-width="formLabelWidth5">
+      <el-input v-model="newobj.remark" autocomplete="off"></el-input>
+    </el-form-item>
+        <!-- <div class="disflex">
           <span class="sblock">项目名称:</span>
           <el-input class="inpwidth" v-model="project.name"></el-input>
         </div>
+          <div class="disflex">
+          <span class="sblock">项目名称:</span>
+          <el-input class="inpwidth" v-model="project.name"></el-input>
+        </div> -->
        </el-form>
   <span slot="footer" class="dialog-footer">
     <el-button @click="dialogVisible = false">取 消</el-button>
-    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
+    <el-button type="primary" @click="dialogVisible = false;newsave()">确 定</el-button>
   </span>
 </el-dialog>
 
@@ -82,11 +111,24 @@
 </template>
 
 <script>
-
+import Pagination from '@/components/Pagination'
+import { request, getImage } from '@/utils/request'
 export default {
   name: 'Project',
+    components: {
+         Pagination
+         },
   data() {
     return {
+       loading: false, // 是显示加载
+        paginationConfig: {
+        hideSinglePage: false,
+        page: 1,
+        size: 15,
+        sizeList: [10, 15, 30, 50],
+        layout: 'total, sizes, prev, pager, next, jumper',
+        total: 0,
+      },
         options:[{
           value: '0',
           label: '搜索项目'
@@ -95,21 +137,38 @@ export default {
           label: '搜索标签'
         }
         ],
+        newobj:{
+          name:'',
+          remark:'',
+          image:'',
+          isshare:0,
+          
+          },   // 新建项目参数
+          
+       
+
+        formLabelWidth: '60px',
+        formLabelWidth2:'73px',
+        formLabelWidth4:'37px',
+        formLabelWidth5:'100px',
+         formLabelWidth6:'120px',
         value:'0',
         input:'',
-             tableData: [{
-            date: '2022-05-02',
-            name: '封顶圆柱壳',
-            address: '案例1'
-          }, {
-            date: '2016-05-04',
-            name: '气缸盖二次接触接头热/结构分析综述  ',
-            address: '案例2'
-          }, {
-            date: '2019-11-01',
-            name: 'RBE3(通用刚体连杆)',
-            address: '案例3'
-          }],
+             tableData: [
+              //  {
+          //   date: '2022-05-02',
+          //   name: '封顶圆柱壳',
+          //   address: '案例1'
+          // }, {
+          //   date: '2016-05-04',
+          //   name: '气缸盖二次接触接头热/结构分析综述  ',
+          //   address: '案例2'
+          // }, {
+          //   date: '2019-11-01',
+          //   name: 'RBE3(通用刚体连杆)',
+          //   address: '案例3'
+          // }
+          ],
            dialogVisible: false,
            project:{
              fileType:"公开",
@@ -119,11 +178,65 @@ export default {
   },
   created() {
 
+  },
+  mounted(){
+this.init();
   },
   methods: {
-    rowclinck(){
-      this.$router.push({path:'/index',query:{setid:123456}});
-    }
+    init(){
+      this.projectlist();
+
+    },
+      // 分页查询
+        getPagination(data) {
+      this.paginationConfig = data;
+      this.projectlist();
+
+    },
+    projectlist(){//列表加载
+    const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      })
+         setTimeout(() => {
+    const params = {
+          transCode: 'C00001',
+        page: this.paginationConfig.page,
+        count: this.paginationConfig.size,
+        }
+        request(params)
+          .then((res) => { 
+             loading.close()
+            this.paginationConfig.total = res.total
+           this.tableData=res.rows;
+          console.log(this.tableData)
+          })
+          .catch((err) => {
+             loading.close()
+          })
+          }, 1500)
+    },
+    rowclinck(row, column, event){
+      console.log(row)
+      this.$router.push({path:'/index',query:{pid:row.id}});
+    },
+    newsave(){     //新建项目
+         const params = {
+          transCode: 'C00002',
+          name:  this.newobj.name,
+          remark:  this.newobj.remark,
+          isshare:  this.newobj.isshare,
+        }
+        request(params)
+          .then((res) => { 
+            this.projectlist();
+          })
+          .catch((err) => {
+          })
+    },
+
   }
 }
 </script>
@@ -192,6 +305,9 @@ position:relative;
   border-radius: 0;
   border: none;
 }
+.pagination{
+  margin-top: 50px;
+}
 
 </style>
 

+ 35 - 5
src/views/index/HCFDLab/index.vue

@@ -929,7 +929,7 @@
                   </el-option>
                 </el-select>
              </el-form-item>
-        <div v-if="parameterObj.hcfdBoundarys[0].name!='WING1'">
+        <div v-if="Physics.Boundary.bquery=='WING1'">
        <el-form-item label=" 总压比" :label-width="formLabelWidth">
       <el-input v-model="form.name" autocomplete="off"></el-input>
     </el-form-item> 
@@ -1272,6 +1272,7 @@
             <el-radio label="on">On</el-radio>
           </el-radio-group>
     </el-form-item>
+    <el-button type="info"  @click="hcfdparam()"> 运行</el-button>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="info"  @click="runcvisiable()"> {{ $t("HCFD.file.cancel")}} </el-button>
@@ -1871,9 +1872,11 @@ export default {
     echartsHFCD,
     TFileStream,},
     // websocket,},
+    props:["objopp"],
   data() {
     return {
       checked:false,
+      solverConfigid:'',
       mcnames:'apply1',
          formLabelWidth: '60px',
         formLabelWidth2:'73px',
@@ -2273,7 +2276,7 @@ export default {
         //数据存储
         MeshTransform: {
           Scale: {
-            Factor: 1,
+            Factor: 0,
           },
           Translation: {
             Distance: 0,
@@ -2406,7 +2409,7 @@ export default {
           a_v: "true",
           dynamic_Mesh: "off",
           jacobian_eval_freq: 10,
-          turb_model: "sa",
+          turb_model: "menter-sst",
           grid_format: "aflr3",
           turbulence_sweeps: 10,
           mach_number: 0.5,
@@ -2414,7 +2417,7 @@ export default {
           area_reference: 1,
           flux_limiter: "none",
           a_cp: "true",
-          viscous_terms: "inviscid",
+          viscous_terms: "turbulent",
           volume_animation_freq: 100,
           steps: 1500,
           flux_construction_lhs: "roe",
@@ -2438,7 +2441,7 @@ export default {
           schedule: 1,
           first_order_iterations: 0,
           restart_read: "off",
-          temperature: 491.4,
+          temperature: 490,
           input_version: 2.2,
           namelist_verbosity: "off",
           ignore_euler_number: "false",
@@ -2487,6 +2490,31 @@ export default {
   //     this.websock.close() //离开路由之后断开websocket连接
   //   },
 methods:{
+  //数据加载参数配置obj
+    hcfdchange(obj,solverConfigid){
+       this.parameterObj = JSON.parse(obj);
+       console.log(  this.parameterObj),
+        console.log( this.parameterObj.hcfdBoundarys);
+      sessionStorage.setItem("res", obj);
+      this.solverConfigid=solverConfigid;
+    },
+//更新参数配置
+hcfdparam(){
+  const params = {
+        transCode: 'C00004',
+        solverConfigid: this.solverConfigid,
+        parameterObj: JSON.stringify(this.parameterObj),
+        }
+        request(params)
+          .then((res) => { 
+          Message({
+                  type: "success",
+                  message: "参数上传,成功",
+                });
+         })
+          .catch((err) => {
+          })
+},
     //清除相关信息
 
     clearAll() {
@@ -2661,6 +2689,7 @@ this.styX.left=e.clientX+'px';
       };
     },
     init() {
+  
      // this.project.projectId ='81797100f859485e8aad9492a18904a7'
       this.project.projectId = this.$route.query.projectId; //获取url 参数
       this.project.lesseeId = this.$store.getters.lesseeId; //获取url 参数
@@ -2675,6 +2704,7 @@ this.styX.left=e.clientX+'px';
       this.missType=true
       // this.changeRendererSize();
     },
+    
     logtime(){
       let self = this;
       let projectId = self.project.projectId;

+ 52 - 9
src/views/index/index.vue

@@ -6,8 +6,8 @@
                  
                     
              </div> -->
-        <div v-if="value2=='0'"    class="div">
-        <hcfd></hcfd>
+        <div v-if="value2=='HCFDLab'">
+        <hcfd ref="hcfd" :objopp="objopp" ></hcfd>
         </div>
         <div class="adi" v-else>
           <el-tabs  :tab-position="tabPosition" v-model="activeName" type="card" @tab-click="handleClick">
@@ -28,15 +28,15 @@
         </el-tabs>
         </div>
         <div class="textselsect">
-         <el-select v-model="value" placeholder="请选择">
+         <el-select v-model="value0" placeholder="请选择">
         <el-option
-          v-for="item in options"
+          v-for="item in options0"
           :key="item.value"
           :label="item.label"
           :value="item.value">
         </el-option>
       </el-select>
-      <el-select v-model="value2" placeholder="请选择">
+      <el-select v-model="value2" placeholder="请选择" @change="solverchange">
         <el-option
           v-for="item in options2"
           :key="item.value"
@@ -74,6 +74,7 @@
 
 
 // 引入组件
+import { request, getImage } from '@/utils/request'
 import geometry from './geometry/index.vue'
 import meshindex from './meshindex/index.vue'
 import Geometryandclass from './Geometryandclass/index.vue'
@@ -93,7 +94,9 @@ export default {
   data() {
     return {
         // current:0,
+        pid:'',
       activeName: 'one',
+      objopp:'',
         tab:[
             {index:0,name:"几何建模"},
             {index:1,name:"网格划分"},
@@ -124,7 +127,7 @@ export default {
         {value: '9', label: 'Pointwise(流体力学)' },
         {value: '10',label: 'ANSYS_ICEMCFD(流体力学)' }
         ],
-        value:'0',
+        
   options1:[
     {value: '0',label: '结构分析'},
     { value: '1',label: '传热分析'},
@@ -155,14 +158,21 @@ export default {
 
         ],
         value1:'0',
+  options0:[
+     {value: 'ADI.SimWork',label: 'ADI.SimWork'},
+    ], 
+      value0:'ADI.SimWork', 
     options2:[
-    {value: '0',label: 'HCFDLab'},
-    { value: '1',label: 'adi'},
+    {value: 'HCFDLab',label: 'HCFDLab'},
+    { value: 'adi',label: 'adi'},
         ],
-      value2:'0',
+      value2:'HCFDLab',
     }
 
 
+},
+mounted(){
+this.init();
 },
 methods:{
         hide(){
@@ -170,7 +180,39 @@ methods:{
           },
         handleClick(tab, event) {
 
+        },
+        init(){
+          this.pid=this.$route.query.pid;
+          console.log(this.pid);
+
+        },
+    //项目求解查询
+      pojectquery(){
+       
+      },
+      solverchange(val){
+        console.log(val)
+           const params = {
+          transCode: 'C00003',
+        pid:this.pid,
+        company:this.value0,
+        solverModel:this.value2
+        }
+        request(params)
+          .then((res) => { 
+        this.objopp=res.parameterObj;
+        if(val=='HCFDLab'){
+          console.log(5555);
+           this.$nextTick(()=>{
+          this.$refs.hcfd.hcfdchange(this.objopp,res.solverConfigid);
+           })   
         }
+          })
+          .catch((err) => {
+          })
+        
+      }
+
       }
 }
 </script>
@@ -361,4 +403,5 @@ html,body{
 .el-form-item{
       margin-bottom: 5px;
 }
+
 </style>