重新排版表单

This commit is contained in:
lai
2024-09-09 18:12:23 +08:00
parent 7dcdfabce2
commit 71338670f0
3 changed files with 53 additions and 30 deletions

View File

@@ -1069,6 +1069,7 @@ export default {
symbol:'Symbol', symbol:'Symbol',
element:'Element', element:'Element',
granularity:'Granularity', granularity:'Granularity',
unit:'Unit',
} }
}, },
traceManage: { traceManage: {

View File

@@ -1071,6 +1071,7 @@ export default {
symbol:"符号", symbol:"符号",
element:'元素', element:'元素',
granularity:'颗粒度', granularity:'颗粒度',
unit:'单位',
} }
}, },
traceManage: { traceManage: {

View File

@@ -290,13 +290,25 @@ const modalStateFrom = Form.useForm(
t('views.perfManage.customTarget.title') + t('common.unableNull'), t('views.perfManage.customTarget.title') + t('common.unableNull'),
}, },
], ],
unit: [
{
required: true,
message:
t('views.perfManage.customTarget.unit') + t('common.unableNull'),
},
],
}) })
); );
/**性能测量数据集选择初始 value:neType*/ /**性能测量数据集选择初始 value:neType*/
function fnSelectPerformanceInit(value: any) { function fnSelectPerformanceInit(value: any) {
modalState.from.expression = ''; modalState.from.expression = '';
modalState.neTypPerformance = [{value:'granularity',label:t('views.perfManage.customTarget.granularity')}]; modalState.neTypPerformance = [
{
value: 'granularity',
label: t('views.perfManage.customTarget.granularity'),
},
];
// 当前语言 // 当前语言
var language = currentLocale.value.split('_')[0]; var language = currentLocale.value.split('_')[0];
if (language === 'zh') language = 'cn'; if (language === 'zh') language = 'cn';
@@ -627,7 +639,10 @@ onMounted(() => {
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="12" :md="12" :xs="24"> <a-col :lg="12" :md="12" :xs="24">
<a-form-item :label="t('views.perfManage.customTarget.status')" name="status"> <a-form-item
:label="t('views.perfManage.customTarget.status')"
name="status"
>
<a-select <a-select
v-model:value="modalState.from.status" v-model:value="modalState.from.status"
default-value="0" default-value="0"
@@ -671,19 +686,24 @@ onMounted(() => {
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="16">
<a-col :lg="16" :md="16" :xs="24">
<a-form-item <a-form-item
:label="t('views.perfManage.customTarget.expression')" :label="t('views.perfManage.customTarget.expression')"
name="expression" name="expression"
:label-col="{ span: 3 }" :label-col="{ span: 4 }"
v-bind="modalStateFrom.validateInfos.expression" v-bind="modalStateFrom.validateInfos.expression"
> >
<a-input <a-input v-model:value="modalState.from.expression" allow-clear>
v-model:value="modalState.from.expression"
style="width: 80%"
allow-clear
>
</a-input> </a-input>
</a-form-item>
</a-col>
<a-col :lg="8" :md="8" :xs="24">
<a-form-item
:label="t('views.perfManage.customTarget.unit')"
name="expression"
v-bind="modalStateFrom.validateInfos.unit"
>
<a-auto-complete <a-auto-complete
v-model:value="modalState.from.unit" v-model:value="modalState.from.unit"
:options="[ :options="[
@@ -696,9 +716,10 @@ onMounted(() => {
value: '%', value: '%',
}, },
]" ]"
style="width: 20%"
></a-auto-complete> ></a-auto-complete>
</a-form-item> </a-form-item>
</a-col>
</a-row>
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24"> <a-col :lg="12" :md="12" :xs="24">
<a-form-item <a-form-item