tangjunhao 3 napja
szülő
commit
6d2f81b022

+ 1 - 0
src/views/titlecomponent/AFNoise.vue

@@ -398,6 +398,7 @@ const getafnoise = (id,nowid) => {
   request(params).then((res) => {
     if (res.hasOwnProperty("afnoiseid")) {
       getafnoiseAssign(res);
+      emitter.emit('afnIdFromAFN', afnoiseid);
     }
   })
   .catch((err) => {

+ 9 - 1
src/views/titlecomponent/PropNoise.vue

@@ -237,7 +237,9 @@ let propnoise = ref({
   velocity: '77.2',
   theta: '90',
   l: '4',
-  spl: ''
+  spl: '',
+  airfoil_fid: '',
+  airfoil_polars_fids: ''
 })
 
 let tabslist1 = ref([
@@ -267,6 +269,7 @@ const handleFileUploadSuccess = (newValue) => {
   setTimeout(() => {
     percentage.value = 0;
   }, 1000);
+  propnoise.value.airfoil_fid = newValue.bfid;
   console.log("文件上传成功,bfid:", newValue.bfid, "fname:", newValue.fname)
 }
 
@@ -291,6 +294,7 @@ const handleFileUploadSuccess1 = (newValue) => {
   setTimeout(() => {
     percentage1.value = 0;
   }, 1000);
+  propnoise.value.airfoil_polars_fids = newValue.bfid;
   console.log("文件上传成功,bfid:", newValue.bfid, "fname:", newValue.fname)
 }
 
@@ -389,6 +393,8 @@ const getPropNAssign = (data) => {
   propnoise.value.dim = data.dim;
   propnoise.value.airfoil = data.airfoil;
   propnoise.value.airfoil_polars = data.airfoil_polars;
+  propnoise.value.airfoil_fid = data.airfoil_fid;
+  propnoise.value.airfoil_polars_fids = data.airfoil_polars_fids;
   propnoise.value.a = data.a;
   propnoise.value.t = data.t;
   propnoise.value.density = data.density;
@@ -447,6 +453,8 @@ const getpropnoisesave = (id, nowid) => {
     dim: propnoise.value.dim,
     airfoil: propnoise.value.airfoil,
     airfoil_polars: propnoise.value.airfoil_polars,
+    airfoil_fid: propnoise.value.airfoil_fid,
+    airfoil_polars_fids: propnoise.value.airfoil_polars_fids,
     a: propnoise.value.a,
     t: propnoise.value.t,
     density: propnoise.value.density,

+ 8 - 0
src/views/vuetree/index.vue

@@ -701,6 +701,7 @@ const adid = ref('')
 const mfcid = ref('')
 const tacsid = ref('')
 const propnid = ref('')
+const afnid = ref('')
 const ffdid = ref('')
 const cstid = ref('')
 // 监听组件xfoil返回的xfid
@@ -728,6 +729,11 @@ const handlePropnId = (propnidFromB) => {
   noid.value.data.propnid = propnid.value;
 }
 
+const handleAfnId = (afnIdFromB) => {
+  afnid.value = afnIdFromB.value;
+  noid.value.data.afnid = afnid.value;
+}
+
 const handleFfdid = (ffdidFromB) => {
   // console.log('ffdidFromB:',ffdidFromB.value);
   ffdid.value = ffdidFromB.value;
@@ -1432,6 +1438,7 @@ onMounted(() => {
   emitter.on("mfcidFromMathFunc", handleMfcid);
   emitter.on("tacsidFromTACS", handleTacsid);
   emitter.on("propnIdFromPropN", handlePropnId);
+  emitter.on("afnIdFromAFN", handleAfnId);
   emitter.on("ffdidFromFfd", handleFfdid);
   emitter.on("cstidFromCst", handleCstid);
   emitter.on("getMfcid",handlegetMfcid);
@@ -1467,6 +1474,7 @@ onUnmounted(() => {
   emitter.off("mfcidFromMathFunc", handleMfcid);
   emitter.off("tacsidFromTACS", handleTacsid);
   emitter.off("propnIdFromPropN", handlePropnId);
+  emitter.off("afnIdFromAFN", handleAfnId);
   emitter.off("ffdidFromFfd", handleFfdid);
   emitter.off("cstidFromCst", handleCstid);
   emitter.off("getMfcid",handlegetMfcid);