|
|
@@ -148,6 +148,24 @@
|
|
|
<!-- 条件要求 -->
|
|
|
<el-divider content-position="left">{{$t('工况要求')}}</el-divider>
|
|
|
|
|
|
+ <!-- 单位选择 -->
|
|
|
+ <el-row :gutter="20" style="margin-bottom: 20px;">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item :label="$t('流量单位')" prop="in_q">
|
|
|
+ <el-select v-model="workingCondition.in_q" :placeholder="$t('请选择流量单位')" style="width: 100%;">
|
|
|
+ <el-option v-for="item in flowUnits" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item :label="$t('压力单位')" prop="in_p">
|
|
|
+ <el-select v-model="workingCondition.in_p" :placeholder="$t('请选择压力单位')" style="width: 100%;">
|
|
|
+ <el-option v-for="item in pressureUnits" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
<!-- 最小流量 -->
|
|
|
<el-row :gutter="20" style="margin-bottom: 20px;">
|
|
|
<el-col :span="2" style="display: flex; align-items: center; justify-content: center; background-color: #f5f5f5; border: 1px solid #ddd; height: 40px;">
|
|
|
@@ -156,9 +174,8 @@
|
|
|
<el-col :span="5">
|
|
|
<el-form-item :label="$t('流量') + ':'" prop="minCondition.flow" style="margin-bottom: 0;">
|
|
|
<el-input v-model="workingCondition.minCondition.flow" @input="calculatePressureDrop('min')">
|
|
|
-
|
|
|
<span style="color:blue" slot="suffix">
|
|
|
- m³/h
|
|
|
+ {{workingCondition.in_q}}
|
|
|
</span>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
@@ -166,7 +183,7 @@
|
|
|
<el-col :span="5">
|
|
|
<el-form-item :label="$t('阀前压力') + ':'" prop="minCondition.beforePressure" style="margin-bottom: 0;">
|
|
|
<el-input v-model="workingCondition.minCondition.beforePressure" @input="calculatePressureDrop('min')">
|
|
|
- <span style="color:blue" slot="suffix">kpa
|
|
|
+ <span style="color:blue" slot="suffix">{{workingCondition.in_p}}
|
|
|
</span>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
@@ -174,7 +191,7 @@
|
|
|
<el-col :span="5">
|
|
|
<el-form-item :label="$t('阀后压力') + ':'" prop="minCondition.afterPressure" style="margin-bottom: 0;">
|
|
|
<el-input v-model="workingCondition.minCondition.afterPressure" @input="calculatePressureDrop('min')">
|
|
|
- <span style="color:blue" slot="suffix">kpa
|
|
|
+ <span style="color:blue" slot="suffix">{{workingCondition.in_p}}
|
|
|
</span>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
@@ -182,7 +199,7 @@
|
|
|
<el-col :span="5">
|
|
|
<el-form-item :label="$t('前后压差') + ':'" style="margin-bottom: 0;">
|
|
|
<el-input v-model="workingCondition.minCondition.pressureDrop" :disabled="true">
|
|
|
- <span style="color:blue" slot="suffix">kpa
|
|
|
+ <span style="color:blue" slot="suffix">{{workingCondition.in_p}}
|
|
|
</span>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
@@ -198,7 +215,7 @@
|
|
|
<el-form-item :label="$t('流量') + ':'" prop="maxCondition.flow" style="margin-bottom: 0;">
|
|
|
<el-input v-model="workingCondition.maxCondition.flow" @input="calculatePressureDrop('max')">
|
|
|
<span style="color:blue" slot="suffix">
|
|
|
- m³/h
|
|
|
+ {{workingCondition.in_q}}
|
|
|
</span>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
@@ -206,7 +223,7 @@
|
|
|
<el-col :span="5">
|
|
|
<el-form-item :label="$t('阀前压力') + ':'" prop="maxCondition.beforePressure" style="margin-bottom: 0;">
|
|
|
<el-input v-model="workingCondition.maxCondition.beforePressure" @input="calculatePressureDrop('max')">
|
|
|
- <span style="color:blue" slot="suffix">kpa
|
|
|
+ <span style="color:blue" slot="suffix">{{workingCondition.in_p}}
|
|
|
</span>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
@@ -214,7 +231,7 @@
|
|
|
<el-col :span="5">
|
|
|
<el-form-item :label="$t('阀后压力') + ':'" prop="maxCondition.afterPressure" style="margin-bottom: 0;">
|
|
|
<el-input v-model="workingCondition.maxCondition.afterPressure" @input="calculatePressureDrop('max')">
|
|
|
- <span style="color:blue" slot="suffix">kpa
|
|
|
+ <span style="color:blue" slot="suffix">{{workingCondition.in_p}}
|
|
|
</span>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
@@ -222,7 +239,7 @@
|
|
|
<el-col :span="5">
|
|
|
<el-form-item :label="$t('前后压差') + ':'" style="margin-bottom: 0;">
|
|
|
<el-input v-model="workingCondition.maxCondition.pressureDrop" :disabled="true">
|
|
|
- <span style="color:blue" slot="suffix">kpa
|
|
|
+ <span style="color:blue" slot="suffix">{{workingCondition.in_p}}
|
|
|
</span>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
@@ -239,14 +256,39 @@
|
|
|
</el-alert>
|
|
|
</el-form>
|
|
|
</el-card>
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
|
|
|
<!-- 步骤3: 阀门选型 -->
|
|
|
<div v-if="activeStep === 2" class="step-panel">
|
|
|
- <el-card class="step-card" shadow="never">
|
|
|
- <h3 class="mt-10">
|
|
|
- 节流件配置
|
|
|
- </h3>
|
|
|
+ <el-form ref="valveForm" :model="valveSelection" :rules="valveRules" label-width="120px">
|
|
|
+ <el-card class="step-card" shadow="never">
|
|
|
+ <!-- 单位选择 -->
|
|
|
+ <h3>{{$t('单位选择')}}</h3>
|
|
|
+ <el-row :gutter="20" class="mt-10">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item :label="$t('流量单位')" prop="out_q">
|
|
|
+ <el-select v-model="valveSelection.out_q" size="small" style="width: 120px;">
|
|
|
+ <el-option v-for="unit in flowUnits" :key="unit.value" :label="unit.label" :value="unit.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item :label="$t('压力单位')" prop="out_p">
|
|
|
+ <el-select v-model="valveSelection.out_p" size="small" style="width: 120px;">
|
|
|
+ <el-option v-for="unit in pressureUnits" :key="unit.value" :label="unit.label" :value="unit.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item :label="$t('流速单位')" prop="out_v">
|
|
|
+ <el-select v-model="valveSelection.out_v" size="small" style="width: 120px;">
|
|
|
+ <el-option v-for="unit in velocityUnits" :key="unit.value" :label="unit.label" :value="unit.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <h3>{{$t('节流件配置')}}</h3>
|
|
|
<div class="mt-10">
|
|
|
<p style="display: inline-block; width: 100px;;font-size:14px">{{$t('节流件类型')}}: </p>
|
|
|
<el-select v-model="valveSelection.throttletype" :placeholder="$t('请选择')" size="small">
|
|
|
@@ -261,14 +303,24 @@
|
|
|
</el-select>
|
|
|
<el-button type="primary" :disabled="!valveSelection.throttleValue" size="small" @click="beginSelection(() => {},'table')">{{$t('选型验证')}}</el-button>
|
|
|
</div>
|
|
|
- <el-table :data="tableData" style="width: 100%" size="mini" border>
|
|
|
+ <div class="mt-10" v-if="resultMessages.result_success">
|
|
|
+ <el-alert
|
|
|
+ :title="$t('计算提示')"
|
|
|
+ :type="resultMessages.result_success ? 'success' : 'error'">
|
|
|
+ <p style="font-size:14px" v-for="(item, index) in resultMessages.result" :key="index">{{item}}</p>
|
|
|
+ </el-alert>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <el-table :data="tableData" style="width: 100%" size="mini" border class="mt-20">
|
|
|
<el-table-column prop="workingCondition" :label="$t('工况')" align="center"></el-table-column>
|
|
|
<el-table-column prop="conditionName" :label="$t('条件名称')" align="center"></el-table-column>
|
|
|
- <el-table-column prop="q" :label="$t('流量') + '(m³/h)'" align="center"></el-table-column>
|
|
|
- <el-table-column prop="p1" :label="$t('阀前压力') + '(kPa)'" align="center"></el-table-column>
|
|
|
- <el-table-column prop="p2" :label="$t('阀后压力') + '(kPa)'" align="center"></el-table-column>
|
|
|
- <el-table-column prop="p" :label="$t('前后压差') + '(kPa)'" align="center"></el-table-column>
|
|
|
- <el-table-column prop="pv" :label="$t('饱和蒸汽压') + '(kPa)'" align="center"></el-table-column>
|
|
|
+ <el-table-column prop="q" :label="$t('流量') + '(' + valveSelection.out_q + ')'" align="center"></el-table-column>
|
|
|
+ <el-table-column prop="p1" :label="$t('阀前压力') + '(' + valveSelection.out_p + ')'" align="center"></el-table-column>
|
|
|
+ <el-table-column prop="p2" :label="$t('阀后压力') + '(' + valveSelection.out_p + ')'" align="center"></el-table-column>
|
|
|
+ <el-table-column prop="p" :label="$t('前后压差') + '(' + valveSelection.out_p + ')'" align="center"></el-table-column>
|
|
|
+ <el-table-column prop="pv" :label="$t('饱和蒸汽压') + '(' + valveSelection.out_p + ')'" align="center"></el-table-column>
|
|
|
<el-table-column prop="kv" :label="$t('Kv')" align="center"></el-table-column>
|
|
|
<el-table-column prop="li" :label="$t('开度') + '(%)'" align="center"></el-table-column>
|
|
|
<el-table-column prop="ldc" :label="$t('临界汽蚀系数')" align="center"></el-table-column>
|
|
|
@@ -276,7 +328,7 @@
|
|
|
<el-table-column prop="fi" :label="$t('压力恢复系数')" align="center"></el-table-column>
|
|
|
<el-table-column prop="fr" :label="$t('流阻系数')" align="center"></el-table-column>
|
|
|
<el-table-column prop="fkv" :label="$t('阻塞流修正系数')" align="center"></el-table-column>
|
|
|
- <el-table-column prop="v" :label="$t('流速') + '(m/h)'" align="center"></el-table-column>
|
|
|
+ <el-table-column prop="v" :label="$t('流速') + '(' + valveSelection.out_v + ')'" align="center"></el-table-column>
|
|
|
</el-table>
|
|
|
<!-- 开度设置 -->
|
|
|
<el-divider content-position="left">{{$t('开度设置')}}</el-divider>
|
|
|
@@ -329,6 +381,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-card>
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
<!-- 操作按钮 -->
|
|
|
<div class="button-group">
|
|
|
@@ -394,6 +447,8 @@ export default {
|
|
|
|
|
|
// 工况条件
|
|
|
workingCondition: {
|
|
|
+ in_q: 'm³/h', // 流量单位
|
|
|
+ in_p: 'kPa', // 压力单位
|
|
|
minCondition: {
|
|
|
flow: '',
|
|
|
beforePressure: '',
|
|
|
@@ -408,6 +463,26 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ // 单位选项
|
|
|
+ flowUnits: [
|
|
|
+ { label: 'm³/h', value: 'm³/h' },
|
|
|
+ { label: 'm³/s', value: 'm³/s' },
|
|
|
+ { label: 'L/s', value: 'L/s' },
|
|
|
+ { label: 'L/h', value: 'L/h' }
|
|
|
+ ],
|
|
|
+ pressureUnits: [
|
|
|
+ { label: 'mH₂O', value: 'mH₂O' },
|
|
|
+ { label: 'mmH₂O', value: 'mmH₂O' },
|
|
|
+ { label: 'kPa', value: 'kPa' },
|
|
|
+ { label: 'MPa', value: 'MPa' },
|
|
|
+ { label: 'bar', value: 'bar' }
|
|
|
+ ],
|
|
|
+ velocityUnits: [
|
|
|
+ { label: 'm/s', value: 'm/s' },
|
|
|
+ { label: 'm/h', value: 'm/h' },
|
|
|
+ { label: 'km/h', value: 'km/h' }
|
|
|
+ ],
|
|
|
+
|
|
|
// 验证信息
|
|
|
validationMessage: '',
|
|
|
validationType: 'warning',
|
|
|
@@ -416,6 +491,9 @@ export default {
|
|
|
valveSelection: {
|
|
|
throttletype: '',
|
|
|
throttleValue: '',
|
|
|
+ out_p: 'kPa', // 压力单位
|
|
|
+ out_q: 'm³/h', // 流量单位
|
|
|
+ out_v: 'm/s', // 流速单位
|
|
|
},
|
|
|
|
|
|
// 开度设置
|
|
|
@@ -491,6 +569,12 @@ export default {
|
|
|
},
|
|
|
|
|
|
workingRules: {
|
|
|
+ in_q: [
|
|
|
+ { required: true, message: this.$t('请选择流量单位'), trigger: 'change' }
|
|
|
+ ],
|
|
|
+ in_p: [
|
|
|
+ { required: true, message: this.$t('请选择压力单位'), trigger: 'change' }
|
|
|
+ ],
|
|
|
'minCondition.flow': [
|
|
|
{ required: true, message: this.$t('请输入最小流量'), trigger: 'blur' },
|
|
|
{ pattern: /^\d+(\.\d+)?$/, message: this.$t('请输入有效的数值'), trigger: 'blur' },
|
|
|
@@ -576,8 +660,19 @@ export default {
|
|
|
],
|
|
|
material: [
|
|
|
{ required: true, message: this.$t('请选择材质'), trigger: 'change' }
|
|
|
+ ],
|
|
|
+ out_p: [
|
|
|
+ { required: true, message: this.$t('请选择压力单位'), trigger: 'change' }
|
|
|
+ ],
|
|
|
+ out_q: [
|
|
|
+ { required: true, message: this.$t('请选择流量单位'), trigger: 'change' }
|
|
|
+ ],
|
|
|
+ out_v: [
|
|
|
+ { required: true, message: this.$t('请选择流速单位'), trigger: 'change' }
|
|
|
]
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ resultMessages: {}
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -774,6 +869,11 @@ export default {
|
|
|
p2: parseFloat(this.workingCondition.maxCondition.afterPressure),
|
|
|
p2_unit: 'kPa'
|
|
|
}, //最大流量
|
|
|
+ in_p: this.workingCondition.in_p, //入口压力(kPa)
|
|
|
+ in_q:this.workingCondition.in_q,
|
|
|
+ out_p: this.valveSelection.out_p, //出口压力(kPa)
|
|
|
+ out_q:this.valveSelection.out_q,
|
|
|
+ out_v:this.valveSelection.out_v,
|
|
|
},
|
|
|
"id": 2025091909425802,
|
|
|
})
|
|
|
@@ -788,20 +888,25 @@ export default {
|
|
|
// 处理表格数据
|
|
|
const minData = {
|
|
|
...res.data.min,
|
|
|
- li: res.data.min.li * 100,
|
|
|
+ li: (res.data.min.li * 100).toFixed(2),
|
|
|
workingCondition: this.$t('通用'),
|
|
|
conditionName: this.$t('最小流量')
|
|
|
}
|
|
|
const maxData = {
|
|
|
...res.data.max,
|
|
|
- li: res.data.max.li * 100,
|
|
|
+ li: (res.data.max.li * 100).toFixed(2),
|
|
|
workingCondition: this.$t('通用'),
|
|
|
conditionName: this.$t('最大流量')
|
|
|
}
|
|
|
this.tableData = [minData, maxData]
|
|
|
+ this.resultMessages = {
|
|
|
+ result:res.data.result,
|
|
|
+ result_success:res.data.result_success,
|
|
|
+ }
|
|
|
} else {
|
|
|
- // 如果没有返回数据,显示错误信息
|
|
|
- this.$message.error(res.msg || this.$t('API调用失败,请检查网络连接或联系管理员'))
|
|
|
+ //
|
|
|
+
|
|
|
+ this.$message.error(res.msg)
|
|
|
}
|
|
|
},
|
|
|
|