|
@@ -0,0 +1,375 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="XFpdding" style="height: 470px;">
|
|
|
|
|
+ <ul>
|
|
|
|
|
+ <li class="item" v-for="(tab, index) in tabslist1" :key="index" :class="{ active: currentTab1 === index }"
|
|
|
|
|
+ @click="selectTab1(index)">
|
|
|
|
|
+ <img :src="tab.imgSrc" style="width: 22px;" />
|
|
|
|
|
+ {{ tab.name }}
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ <div v-show="currentTab1 == '0'" class="eldesign classtable" style="margin-top: 10px">
|
|
|
|
|
+ <el-form :label-width="formLabelWidth1">
|
|
|
|
|
+ <el-form-item label="桨叶半径(m):">
|
|
|
|
|
+ <el-input v-model="propnoise.r"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="桨毂半径(m):">
|
|
|
|
|
+ <el-input v-model="propnoise.hub"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="桨叶片数:">
|
|
|
|
|
+ <el-input v-model="propnoise.blade"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="0.75R处扭转角(deg):">
|
|
|
|
|
+ <el-input v-model="propnoise.three_quarter_twist"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="剖面个数:">
|
|
|
|
|
+ <el-input v-model="propnoise.dim"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="剖面翼型:">
|
|
|
|
|
+ <el-row style="width: 100%">
|
|
|
|
|
+ <el-col :span="24">
|
|
|
|
|
+ <el-input v-model="propnoise.airfoil" readonly />
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <!-- 文件上传按钮部分 -->
|
|
|
|
|
+ <el-col :span="1" style="display: flex; align-items: center; margin-left: -35px">
|
|
|
|
|
+ <fileUploads :projectId="129" solverType="exampleSolver" accept="" upId="airfoil" name="点击选择文件"
|
|
|
|
|
+ :imgSrc="meshFileImgSrc" @upload-success="handleFileUploadSuccess" @update-fileName="updateFileName"
|
|
|
|
|
+ @update-percentage="updatePercentage" @upload-status="getUploadStatus" />
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <!-- 进度条 -->
|
|
|
|
|
+ <el-row v-if="showProgress" style="width: 100%; margin-top: 10px;">
|
|
|
|
|
+ <el-col :span="20">
|
|
|
|
|
+ <el-progress :percentage="percentage"></el-progress>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="4">
|
|
|
|
|
+ <div style="line-height: 15px">{{uploadStatus}}</div>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="翼型极曲线:">
|
|
|
|
|
+ <el-row style="width: 100%">
|
|
|
|
|
+ <el-col :span="24">
|
|
|
|
|
+ <el-input v-model="propnoise.airfoil_polars" readonly />
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <!-- 文件上传按钮部分 -->
|
|
|
|
|
+ <el-col :span="1" style="display: flex; align-items: center; margin-left: -35px">
|
|
|
|
|
+ <fileUploads :projectId="136" solverType="exampleSolver" accept="" upId="airfoil_polars" name="点击选择文件"
|
|
|
|
|
+ :imgSrc="meshFileImgSrc" @upload-success="handleFileUploadSuccess1" @update-fileName="updateFileName1"
|
|
|
|
|
+ @update-percentage="updatePercentage1" @upload-status="getUploadStatus1" />
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <!-- 进度条 -->
|
|
|
|
|
+ <el-row v-if="showProgress1" style="width: 100%; margin-top: 10px;">
|
|
|
|
|
+ <el-col :span="20">
|
|
|
|
|
+ <el-progress :percentage="percentage1"></el-progress>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="4">
|
|
|
|
|
+ <div style="line-height: 15px">{{uploadStatus1}}</div>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <el-table :data="gxcsTable" border style="width: 100%;max-height: 450px;" :header-cell-class-name="headerCellClassName1">
|
|
|
|
|
+ <el-table-column label="启用">
|
|
|
|
|
+ <el-table-column type="index" width="70" label="编号">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column>
|
|
|
|
|
+ <template v-slot:header>
|
|
|
|
|
+ <!-- 表头显示复选框 -->
|
|
|
|
|
+ <el-checkbox :false-label="0" :true-label="1" v-model="writesolution" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <el-table-column prop="r_r" label="展向位置r/R">
|
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
|
+ <el-input v-model="row.r_r" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column>
|
|
|
|
|
+ <template v-slot:header>
|
|
|
|
|
+ <!-- 表头显示复选框 -->
|
|
|
|
|
+ <el-checkbox :false-label="0" :true-label="1" v-model="writesolution" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <el-table-column prop="t_c" label="相对厚度t/c">
|
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
|
+ <el-input v-model="row.t_c" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column>
|
|
|
|
|
+ <template v-slot:header>
|
|
|
|
|
+ <!-- 表头显示复选框 -->
|
|
|
|
|
+ <el-checkbox :false-label="0" :true-label="1" v-model="writesolution" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <el-table-column prop="b_r" label="剖面弦长b/R">
|
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
|
+ <el-input v-model="row.b_r" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column>
|
|
|
|
|
+ <template v-slot:header>
|
|
|
|
|
+ <!-- 表头显示复选框 -->
|
|
|
|
|
+ <el-checkbox :false-label="0" :true-label="1" v-model="writesolution" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <el-table-column prop="beta" label="剖面扭转角(deg)">
|
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
|
+ <el-input v-model="row.beta" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div v-show="currentTab1 == '1'" class="eldesign classtable" style="margin-top: 10px">
|
|
|
|
|
+ <el-collapse v-model="activeNames">
|
|
|
|
|
+ <el-collapse-item title="环境参数" name="1">
|
|
|
|
|
+ <template #title>
|
|
|
|
|
+ <span class="collapse-title">环境参数</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <el-form-item label="声速(m/s):" :label-width="formLabelWidth1">
|
|
|
|
|
+ <el-input v-model="propnoise.a"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="温度(K):" :label-width="formLabelWidth1">
|
|
|
|
|
+ <el-input v-model="propnoise.t"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="密度(kg/m³):" :label-width="formLabelWidth1">
|
|
|
|
|
+ <el-input v-model="propnoise.density"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="动力黏度(pa·s):" :label-width="formLabelWidth1">
|
|
|
|
|
+ <el-input v-model="propnoise.dynamic_viscosity"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+ <el-collapse-item title="运行工况" name="2">
|
|
|
|
|
+ <!-- <el-form-item label="纵向" :label-width="formLabelWidth1">
|
|
|
|
|
+ </el-form-item> -->
|
|
|
|
|
+ <template #title>
|
|
|
|
|
+ <span class="collapse-title">运行工况</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <el-form>
|
|
|
|
|
+ <el-form-item label="转速(rpm):" :label-width="formLabelWidth1">
|
|
|
|
|
+ <el-input v-model="propnoise.omega"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="来流速度(m/s):" :label-width="formLabelWidth1">
|
|
|
|
|
+ <el-input v-model="propnoise.velocity"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+ </el-collapse>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div v-show="currentTab1 == '2'" class="eldesign classtable" style="margin-top: 10px">
|
|
|
|
|
+ <el-form :label-width="formLabelWidth1">
|
|
|
|
|
+ <el-form-item label="观测角度(deg):">
|
|
|
|
|
+ <el-input v-model="propnoise.theta"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="观测距离(m):">
|
|
|
|
|
+ <el-input v-model="propnoise.l"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div v-show="currentTab1 == '3'" class="eldesign classtable" style="margin-top: 10px">
|
|
|
|
|
+ <el-table :data="fxcstable" border style="width: 100%; height: 400px"
|
|
|
|
|
+ :header-cell-class-name="headerCellClassName">
|
|
|
|
|
+ <el-table-column type="index" width="70" label="编号" />
|
|
|
|
|
+ <el-table-column prop="name" label="参数名称">
|
|
|
|
|
+ <!-- <template #default="{ row }">
|
|
|
|
|
+ <el-input v-model="row.name" @change="handleEdit(row)" />
|
|
|
|
|
+ </template> -->
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="value" label="参数值">
|
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
|
+ <el-input v-model="row.value" type="number" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="flag" label="启用" width="100">
|
|
|
|
|
+ <template v-slot="scope">
|
|
|
|
|
+ <el-checkbox :false-label="0" :true-label="1" v-model="scope.row.flag" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script setup>
|
|
|
|
|
+import { ref, onMounted, reactive, provide, nextTick } from "vue"
|
|
|
|
|
+import { ElMessage, ElButton, ElDialog, ElSelect } from "element-plus"
|
|
|
|
|
+import { request, uploadFile } from "@/utils/request"
|
|
|
|
|
+
|
|
|
|
|
+import configParams from "@/assets/img/configParams.png";
|
|
|
|
|
+import propnoise1 from "@/assets/img/propnoise1.png";
|
|
|
|
|
+import propnoise2 from "@/assets/img/propnoise2.png";
|
|
|
|
|
+import propnoise3 from "@/assets/img/propnoise3.png";
|
|
|
|
|
+import propnoise4 from "@/assets/img/propnoise4.png";
|
|
|
|
|
+
|
|
|
|
|
+import fileUploads from "../components/fileuploads.vue";
|
|
|
|
|
+
|
|
|
|
|
+const meshFileImgSrc = new URL("@/assets/img/open.png", import.meta.url).href;
|
|
|
|
|
+
|
|
|
|
|
+let currentTab1 = ref(0)
|
|
|
|
|
+let formLabelWidth1 = ref(176)
|
|
|
|
|
+
|
|
|
|
|
+let activeNames = ref(['1','2'])
|
|
|
|
|
+
|
|
|
|
|
+let pid = ref()
|
|
|
|
|
+let wid = ref()
|
|
|
|
|
+let propnoiseid = ref()
|
|
|
|
|
+
|
|
|
|
|
+let propnoise = ref({
|
|
|
|
|
+ r: 1.015,
|
|
|
|
|
+ hub: 0.203,
|
|
|
|
|
+ blade: 2,
|
|
|
|
|
+ three_quarter_twist: 21,
|
|
|
|
|
+ dim: 9,
|
|
|
|
|
+ airfoil: '',
|
|
|
|
|
+ airfoil_polars: '',
|
|
|
|
|
+ a: 340.3,
|
|
|
|
|
+ t: 288.16889478,
|
|
|
|
|
+ density: 1.225,
|
|
|
|
|
+ dynamic_viscosity: 1.7894e-5,
|
|
|
|
|
+ omega: 2390,
|
|
|
|
|
+ velocity: 77.2,
|
|
|
|
|
+ theta: 90,
|
|
|
|
|
+ l: 4,
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+let tabslist1 = ref([
|
|
|
|
|
+ { id: "0", name: "构型参数", imgSrc: propnoise1 },
|
|
|
|
|
+ { id: "1", name: "工况设置", imgSrc: propnoise2 },
|
|
|
|
|
+ { id: "2", name: "观测点布置", imgSrc: propnoise3 },
|
|
|
|
|
+ { id: "3", name: "分析参数", imgSrc: propnoise4 },
|
|
|
|
|
+])
|
|
|
|
|
+
|
|
|
|
|
+const selectTab1 = (index) => {
|
|
|
|
|
+ // console.log('dayin',index)
|
|
|
|
|
+ currentTab1.value = index
|
|
|
|
|
+ // console.log('currentTab1',currentTab1.value)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+let percentage = ref(0);
|
|
|
|
|
+let percentage1 = ref(0);
|
|
|
|
|
+let uploadStatus = ref('');
|
|
|
|
|
+let uploadStatus1 = ref('');
|
|
|
|
|
+// 控制进度条显隐
|
|
|
|
|
+const showProgress = computed(() => percentage.value > 0 && percentage.value <= 100);
|
|
|
|
|
+const showProgress1 = computed(() => percentage1.value > 0 && percentage1.value <= 100);
|
|
|
|
|
+
|
|
|
|
|
+// 处理上传成功后的逻辑
|
|
|
|
|
+const handleFileUploadSuccess = (newValue) => {
|
|
|
|
|
+ //隐藏进度条
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ percentage.value = 0;
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ console.log("文件上传成功,bfid:", newValue.bfid, "fname:", newValue.fname)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 更新文件名
|
|
|
|
|
+const updateFileName = (newValue) => {
|
|
|
|
|
+ propnoise.value.airfoil = newValue
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 更新进度条
|
|
|
|
|
+const updatePercentage = (newValue) => {
|
|
|
|
|
+ percentage.value = newValue
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 更新上传状态
|
|
|
|
|
+const getUploadStatus = (newValue) => {
|
|
|
|
|
+ uploadStatus.value = newValue
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 处理上传成功后的逻辑
|
|
|
|
|
+const handleFileUploadSuccess1 = (newValue) => {
|
|
|
|
|
+ //隐藏进度条
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ percentage1.value = 0;
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ console.log("文件上传成功,bfid:", newValue.bfid, "fname:", newValue.fname)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 更新文件名
|
|
|
|
|
+const updateFileName1 = (newValue) => {
|
|
|
|
|
+ propnoise.value.airfoil_polars = newValue
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 更新进度条
|
|
|
|
|
+const updatePercentage1 = (newValue) => {
|
|
|
|
|
+ percentage1.value = newValue
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 更新上传状态
|
|
|
|
|
+const getUploadStatus1 = (newValue) => {
|
|
|
|
|
+ uploadStatus1.value = newValue
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+let writesolution = ref(1);
|
|
|
|
|
+
|
|
|
|
|
+let gxcsTable = ref([
|
|
|
|
|
+ {
|
|
|
|
|
+ r_r: 0.2,
|
|
|
|
|
+ t_c: 0.3585,
|
|
|
|
|
+ b_r: 0.116,
|
|
|
|
|
+ beta: 36.2
|
|
|
|
|
+ },
|
|
|
|
|
+])
|
|
|
|
|
+
|
|
|
|
|
+let fxcstable = ref([
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 112.385636424315,
|
|
|
|
|
+ name: "总声压级(dB)",
|
|
|
|
|
+ flag: 1
|
|
|
|
|
+ },
|
|
|
|
|
+])
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+const headerCellClassName = ({ column }) => {
|
|
|
|
|
+ // console.log('列:',column.property)
|
|
|
|
|
+ if (column.property === 'name') {
|
|
|
|
|
+ console.log('yanse',column.property)
|
|
|
|
|
+ return 'header-blue';
|
|
|
|
|
+ } else if (column.property === 'value') {
|
|
|
|
|
+ return 'header-green';
|
|
|
|
|
+ } else if (column.property === 'flag') {
|
|
|
|
|
+ return 'header-yellow';
|
|
|
|
|
+ }
|
|
|
|
|
+ return '';
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const headerCellClassName1 = ({ column }) => {
|
|
|
|
|
+ // console.log('列:',column.property)
|
|
|
|
|
+ if (column.property === 'r_r') {
|
|
|
|
|
+ return 'header-blue';
|
|
|
|
|
+ } else if (column.property === 't_c') {
|
|
|
|
|
+ return 'header-green';
|
|
|
|
|
+ } else if (column.property === 'b_r') {
|
|
|
|
|
+ return 'header-yellow';
|
|
|
|
|
+ } else if (column.property === 'beta') {
|
|
|
|
|
+ return 'header-orange';
|
|
|
|
|
+ }
|
|
|
|
|
+ return '';
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style scoped>
|
|
|
|
|
+
|
|
|
|
|
+:deep(.collapse-title) {
|
|
|
|
|
+ flex: 1 0 90%;
|
|
|
|
|
+ order: 1;
|
|
|
|
|
+ text-align: left;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+:deep(.collapse-title) .el-collapse-item__header {
|
|
|
|
|
+ flex: 1 0 auto;
|
|
|
|
|
+ order: -1;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+</style>
|