liuqiao 1 سال پیش
والد
کامیت
f67e120582

+ 8 - 1
src/views/index/FEMLab/fem.vue

@@ -236,6 +236,7 @@
           :accept="'.igs,.stp,.sat,.sab,.x_t,.x_b,.iges,.step,.stp,.stl'"
           :name="'Load File'"
           :upId="'3'"
+           @runstatezt1="runstatezt($event)"
         ></vue-uploader>
       </el-form>
       <div
@@ -245,6 +246,7 @@
         <el-button @click="dialog.geometry_upload = false">{{ $t("HCFD.file.cancel")}}</el-button>
         <el-button
           type="primary"
+          :disabled="disabledok"
           @click="geometryup(); dialog.geometry_upload = false"
         >{{ $t("HCFD.file.ok")}}</el-button>
       </div>
@@ -286,11 +288,12 @@
           @handfiles="handfiles"
           @upoK='upDisOk'
           style="margin: 20px 0 0 0"
+           @runstatezt1="runstatezt($event)"
         ></vue-uploader>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button  @click="dialog.fem_upload = false">{{ $t("HCFD.file.cancel")}}</el-button>
-        <el-button type="primary" @click="femupload();dialog.fem_upload = false"
+        <el-button type="primary" :disabled="disabledok" @click="femupload();dialog.fem_upload = false"
           >{{ $t("HCFD.file.ok")}}</el-button
         >
       </div>
@@ -2528,6 +2531,7 @@ export default {
     },
   data() {
     return {
+      disabledok:false,
            // 心跳包的参数
       websock: null, //建立连接
       lockReconnect: false, //是否真正建立连接
@@ -3150,6 +3154,9 @@ this.init();
       handfiles(file) {
       this.files = "";
       this.files = file;
+    },
+      runstatezt(res){
+       this.disabledok=res;
     },
      upDisOk(){
       this.disOK=false

+ 8 - 0
src/views/index/FEMLab/fileupload.vue

@@ -33,6 +33,7 @@ import { connect } from 'echarts/lib/echarts';
 export default {
     data(){
         return {
+            runupboolen:true,
             uploader:undefined,
             fileName:undefined,
             md5:"1212",
@@ -197,6 +198,9 @@ export default {
                     fileObj.msg='上传中';
                     fileObj.percentage=prage;
                 })
+                   v_this.$nextTick(()=>{
+                v_this.$emit('runstatezt1', v_this.runupboolen);
+                    })
             });
             this.uploader.on( 'uploadSuccess', ( file ,response) =>{
                 console.log(file.ext);
@@ -213,6 +217,10 @@ export default {
                         if ((fileObj.id = file.id)) {
                         fileObj.msg = "已上传";
                         v_this.$emit('upoK')
+                        v_this.runupboolen=false;
+                           v_this.$nextTick(()=>{
+                        v_this.$emit('runstatezt1', v_this.runupboolen);
+                            })
                         }
                         if (file.ext=='bdf') {
                         v_this.fembdf(response.bfid);

+ 36 - 1
src/views/index/HCFDLab/fileupload.vue

@@ -45,6 +45,7 @@ import { connect } from "echarts/lib/echarts";
 export default {
   data() {
     return {
+      runupboolen:true,
       uploader: undefined,
       fileName: undefined,
       md5: "1212",
@@ -68,6 +69,7 @@ export default {
     //传入参数
     projectId: String,
     solverType: String,
+    disabledok:Boolean,
     accept: String,
     upId: String,
     name: String,
@@ -97,6 +99,7 @@ export default {
       request(params)
         .then((res) => {
           console.log("绑定成功");
+        
         })
         .catch((err) => {});
     },
@@ -130,6 +133,7 @@ export default {
         .then((res) => {
           console.log("绑定成功");
           this.mapbc();
+        
         })
         .catch((err) => {});
     },
@@ -271,7 +275,13 @@ export default {
         v_this.files.forEach((fileObj) => {
           if ((fileObj.id = file.id)) fileObj.msg = "上传中";
           fileObj.percentage = prage;
+          
+          //v_this.$emit('runstatezt',true)
+        
         });
+            v_this.$nextTick(()=>{
+       v_this.$emit('runstatezt1', v_this.runupboolen);
+          })
         this.upstate = "2";
         sessionStorage.setItem("upstate", this.upstate);
       });
@@ -287,11 +297,16 @@ export default {
             .then((res) => {
               sessionStorage.removeItem("upstate");
               console.log(res);
+                   console.log(file);
               v_this.files.forEach((fileObj) => {
                 if ((fileObj.id = file.id)) {
                   fileObj.msg = "已上传";
+                   v_this.runupboolen=false;
                   v_this.$emit("upoK");
                 }
+                     v_this.$nextTick(()=>{
+                  v_this.$emit('runstatezt1', v_this.runupboolen);
+                  })
                 if (file.ext == "ugrid") {
                 v_this.bindugrid(response.bfid);
                 }else if (file.ext == "mapbc"){
@@ -414,8 +429,28 @@ export default {
 
       // }
     },
+
   },
-  datalish() {},
+// watch: {
+
+// runupboolen:{
+// deep: true,
+// handler(newValue, oldValue) {
+//   let that=this;
+//   console.log( that.$parent);
+
+//    that.$nextTick(()=>{
+//        that.$emit('runstatezt1', newValue);
+//           console.log(22);
+//   })
+//  //this.$emit('runstatezt', newValue);
+//     // 处理对象变化
+//     console.log(newValue)
+ 
+
+//   },
+//     },
+// }
 };
 </script>
 <style>

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

@@ -520,6 +520,7 @@
           :accept="'.igs,.stp,.sat,.sab,.x_t,.x_b,.iges,.step,.stp,.stl'"
           :name="'Load File'"
           :upId="'3'"
+           @runstatezt1="runstatezt($event)"
         ></vue-uploader>
       </el-form>
       <div
@@ -529,6 +530,7 @@
         <el-button @click="dialog.geometry_upload = false">{{ $t("HCFD.file.cancel")}}</el-button>
         <el-button
           type="primary"
+          :disabled="disabledok"
           @click="geometryup();dialog.geometry_upload = false"
         >{{ $t("HCFD.file.ok")}}</el-button>
       </div>
@@ -576,6 +578,7 @@
           :accept="'.ugrid'"
           :name="'Load Grid File'"
           :upId="'2'"
+           @runstatezt1="runstatezt($event)"
         ></vue-uploader>
       </el-form>
       <div
@@ -585,7 +588,8 @@
         <el-button @click="dialog.upload_visiable = false">{{ $t("HCFD.file.cancel")}}</el-button>
         <el-button
           type="primary"
-          @click="runugrid();dialog.upload_visiable = false"
+          :disabled="disabledok"
+          @click="runugrid()"
         >{{ $t("HCFD.file.ok")}}</el-button>
       </div>
     </el-dialog>
@@ -761,7 +765,7 @@
       <el-input v-model="objmesh.surfParam.min_size" autocomplete="off"></el-input>
     </el-form-item>
       <el-form-item label="相邻网格边比率" :label-width="formLabelWidth5">
-      <el-input v-model="form.name" autocomplete="off"></el-input>
+      <el-input v-model="objmesh.surfParam.gradation" autocomplete="off"></el-input>
     </el-form-item>
       <el-form-item label="全局几何大小" :label-width="formLabelWidth5">
       <el-input v-model="objmesh.surfParam.global_physical_size" autocomplete="off"></el-input>
@@ -4654,6 +4658,7 @@
       ref="filesload"
       :fileurls="fileurls"
       @fileLoadeState="fileLoadeState($event)"
+     
     ></filesload>
     <loading
       ref="loading"
@@ -4780,6 +4785,7 @@ export default {
       //  curvesFlag:true,
       //  surFacesFlag:false,
       // },
+      disabledok:false,
       funbool:true,
    objmesh:{
     strResultFormat:".vtk",
@@ -4787,7 +4793,8 @@ export default {
         max_size:"10",
         min_size:"1",
         surfStyle:"triangle",
-        global_physical_size:"1.0"
+        global_physical_size:"1.0",
+        gradation:'0'
     },
     surfParam1:{
         gradation:"1",
@@ -5221,7 +5228,7 @@ export default {
         { value: "local", name: "local" },
         { value: "none", name: "none" },
       ],
-       patternval:'0',
+       patternval:'global',
         elsementlist:[
         { value: "linear", name: "linear" },
         { value: "quadratic", name: "quadratic" },
@@ -5800,8 +5807,15 @@ export default {
         });
     },
     // 上传文件,加载图片
+    runstatezt(res){
+       this.disabledok=res;
+    },
+
     runugrid() {
-      this.$parent.startimg("init", "loaddata");
+      this.dialog.upload_visiable = false;
+    this.$parent.startimg("init", "loaddata");
+     // console.log(this.$refs.filesload.statezhuangt)
+   
     },
     // 添加div
     addTab(targetName) {