Răsfoiți Sursa

11.2添加上传网格文件图片

liuqiao 1 an în urmă
părinte
comite
07abc9fddc

+ 8 - 5
src/views/index/FemLab2_0/index.vue

@@ -10,7 +10,7 @@
           <el-tab-pane label="网格划分" name="twos"> <meshindex></meshindex></el-tab-pane>
           <!-- 集合定义 -->
           <el-tab-pane label="集合定义" name="two">
-              <div class="imgzong">
+              <div class="imgzong heightimg">
              <div class="item1"  v-for="(itemcj,index) in jihlist"  :key="'two-'+ index" :class="{activeOrange:active=='two-'+ index}" @click="clickgeometry($event,index,'two-'+ index)">
                 <el-tooltip class="item" effect="dark" :content="itemcj.titlie" placement="bottom">
                              <el-image :src="itemcj.icon" fit="cover" /> 
@@ -20,7 +20,7 @@
           </el-tab-pane>
                 <!-- 属性设置 -->
                  <el-tab-pane label="属性设置" name="three">
-             <div class="imgzong">
+             <div class="imgzong heightimg">
              <div class="item1"  v-for="(item,index) in shxlist"  :key="'three-'+ index" :class="{activeOrange:active=='three-'+ index}" @click="clickgeometry($event,index,'three-'+ index)">
                 <el-tooltip class="item" effect="dark" :content="item.titlie" placement="bottom">
                         <el-image :src="item.icon" fit="cover" />   
@@ -30,7 +30,7 @@
           </el-tab-pane>
             <!-- 载荷边界 -->
                  <el-tab-pane label="载荷边界" name="four">
-             <div class="imgzong">
+             <div class="imgzong heightimg">
              <div class="item1"  v-for="(item,index) in zhlist"  :key="'four-'+ index" :class="{activeOrange:active=='four-'+ index}" @click="clickgeometry($event,index,'four-'+ index)">
                 <el-tooltip class="item" effect="dark" :content="item.titlie" placement="bottom">
                         <el-image :src="item.icon" fit="cover" />   
@@ -58,7 +58,7 @@
           </el-tab-pane>
            <!-- 求解控制 -->
                  <el-tab-pane label="求解控制" name="five">
-              <div class="imgzong" v-if="femnum=='FEMLab(结构力学)'">
+              <div class="imgzong heightimg" v-if="femnum=='FEMLab(结构力学)'">
              <div class="item1"  v-for="(item,index) in fexkz"  :key="'five-'+ index" :class="{activeOrange:active=='five-'+ index}" @click="clickgeometry($event,index,'five-'+ index)">
                 <el-tooltip class="item" effect="dark" :content="item.titlie" placement="bottom">
                         <el-image :src="item.icon" fit="cover" />   
@@ -94,7 +94,7 @@
              </div>
                </div>
             </div>
-             <div class="imgzong" v-if="femnum=='FEMLab(结构力学)版本2'">
+             <div class="imgzong heightimg" v-if="femnum=='FEMLab(结构力学)版本2'">
              <div class="item1"  v-for="(item,index) in fexkz6"  :key="'five11-'+ index" :class="{activeOrange:active=='five11-'+ index}" @click="clickgeometry($event,index,'five11-'+ index)">
                 <el-tooltip class="item" effect="dark" :content="item.titlie" placement="bottom">
                         <el-image :src="item.icon" fit="cover" />   
@@ -1913,6 +1913,9 @@ line-height: 30px;
 .btnaniu{
   text-align: right;
 }
+// .heightimg{
+//   height: 105px;
+// }
 .cj{
       height: 20px;
     line-height: 0px;

+ 6 - 1
src/views/index/HCFDLab/echartsHFCD.vue

@@ -395,12 +395,16 @@ export default {
   
   },
     beforeDestroy() {
-    this.websock.close();
+      if(this.websock!=null){
+         this.websock.close();
     // 清除时间
     clearTimeout(this.timeoutObj);
     clearTimeout(this.serverTimeoutObj);
+      }
   },
   destroyed() {
+    console.log(this.websock);
+     if(this.websock!=null){
     this.websock.close();
     //this.websock=null;
     //console.log( this.websock.close());
@@ -408,6 +412,7 @@ export default {
     clearTimeout(this.timeoutObj);
     clearTimeout(this.serverTimeoutObj);
     console.log("关闭了websocket")
+      }
   },
   
 };

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

@@ -446,7 +446,24 @@
             :label="$t('HCFD.tool.unitConversion')"
             name="six"
           >
-            <div class="imgzong">
+           <div class="imgzong">
+              <div
+                class="listitem lbg_color3 bkcolor3"
+                v-for="(item,index) in unitlist"
+                :key="'six-'+ index"
+                :class="{activeOrange:active=='six-'+ index}"
+                @click="clickgeometry($event,index,'six-'+ index)"
+              >
+                <div class="item2 ">
+                  <el-image
+                    :src="item.icon"
+                    fit="cover"
+                  />
+                  <span>{{item.titlie}}</span>
+                </div>
+              </div>
+            </div>
+            <!-- <div class="imgzong">
               <div
                 class="item1"
                 v-for="(item,index) in  unitlist "
@@ -466,7 +483,7 @@
                   />
                 </el-tooltip>
               </div>
-            </div>
+            </div> -->
           </el-tab-pane>
         </el-tabs>
       </div>
@@ -5748,7 +5765,30 @@ export default {
       }
     },
     geometryup() {
-      //  this.$parent.startimg("init",'loaddata');
+       this.$parent.startimg("init",'geometryFileShow');
+      // this.$parent.startimg("init",'geometryFileShow');
+        //this.loaddataaction('geometryFileShow');
+    },
+    // 文件上传成功调用几何接口
+      loaddataaction(action) {
+        this.solverConfigid=sessionStorage.getItem('solverConfigid');
+        console.log(this.solverConfigid);
+      let that = this;
+      let params = {
+        transCode: "AFT001", // 服务器渲染实例接口创建推流
+        pid: this.project.projectId,
+        solverConfigId: this.solverConfigid,
+        action: action,
+        paramJson: "",
+      };
+      request(params)
+        .then((res) => {})
+        .catch((err) => {
+          //  Message({
+          //         type: "info",
+          //         message: "请上传文件",
+          //       });
+        });
     },
     // 上传文件,加载图片
     runugrid() {
@@ -6016,7 +6056,15 @@ export default {
         })
         .catch((err) => {});
     },
-    handleClick(tab, event) {},
+    handleClick(tab, event) {
+      console.log(this.activeName);
+      if(this.activeName=='one'){
+       // this.$parent.startimg("init",'geometryFileShow');
+         this.loaddataaction('geometryFileShow');
+      }else if(this.activeName=='twos'){
+        this.$parent.startimg("init",'loaddata');
+      }
+    },
     activecleer() {
       this.active = 11;
     },
@@ -6246,7 +6294,6 @@ export default {
         .catch((err) => {});
     },
     //
-
     //模块选择
     clickgeometry(e, index, key) {
       var e = e || window.Event;