feat: 将额定电压输入改为下拉选择框
将额定电压从数字输入改为预定义选项的下拉选择框,支持常见的电压等级
This commit is contained in:
@@ -26,12 +26,11 @@
|
||||
<q-card-section>
|
||||
<div class="row q-col-gutter-md">
|
||||
<div class="col-12 col-md-6">
|
||||
<q-input
|
||||
<q-select
|
||||
v-model="params.parameter.rated_voltage"
|
||||
type="number"
|
||||
:options="voltageOptions"
|
||||
label="额定电压等级 (kV)"
|
||||
hint="输电线路的额定电压"
|
||||
:rules="[val => val > 0 || '必须大于0']"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
@@ -313,7 +312,7 @@ import LogComponent from './Log.vue'
|
||||
// 默认参数
|
||||
const defaultParams: AllParameters = {
|
||||
parameter: {
|
||||
rated_voltage: 750,
|
||||
rated_voltage: '500kV',
|
||||
h_c_sag: 14.43,
|
||||
h_g_sag: 11.67,
|
||||
insulator_c_len: 7.02,
|
||||
@@ -342,6 +341,11 @@ const result = ref<string | null>(null)
|
||||
const error = ref<string | null>(null)
|
||||
const logRef = ref<InstanceType<typeof LogComponent> | null>(null)
|
||||
|
||||
const voltageOptions = [
|
||||
'110kV', '220kV', '330kV', '500kV', '750kV','1000kV',
|
||||
'±500kV', '±660kV', '±800kV', '±1100kV'
|
||||
]
|
||||
|
||||
// 数组操作函数
|
||||
const addHArm = () => {
|
||||
const last = params.parameter.h_arm[params.parameter.h_arm.length - 1] || 100
|
||||
|
||||
Reference in New Issue
Block a user